From 1880ccb6d85c6eb79e724593457877bab431951c Mon Sep 17 00:00:00 2001 From: Gloria Mundi Date: Sat, 16 Nov 2024 21:17:29 +0100 Subject: get rid of all() and sz() --- content/string/duval.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'content/string/duval.cpp') 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> duval(const string& s) { vector> 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> 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; }} -- cgit v1.2.3