summaryrefslogtreecommitdiff
path: root/content/string/duval.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'content/string/duval.cpp')
-rw-r--r--content/string/duval.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/content/string/duval.cpp b/content/string/duval.cpp
index 253bae1..de94ebd 100644
--- a/content/string/duval.cpp
+++ b/content/string/duval.cpp
@@ -1,8 +1,8 @@
vector<pair<int, int>> duval(const string& s) {
vector<pair<int, int>> res;
- for (int i = 0; i < sz(s);) {
+ for (int i = 0; i < ssize(s);) {
int j = i + 1, k = i;
- for (; j < sz(s) && s[k] <= s[j]; j++) {
+ for (; j < ssize(s) && s[k] <= s[j]; j++) {
if (s[k] < s[j]) k = i;
else k++;
}
@@ -15,5 +15,5 @@ vector<pair<int, int>> duval(const string& s) {
int minrotation(const string& s) {
auto parts = duval(s+s);
for (auto [l, r] : parts) {
- if (r >= sz(s)) return l;
+ if (r >= ssize(s)) return l;
}}