summaryrefslogtreecommitdiff
path: root/test/string/z.cpp
diff options
context:
space:
mode:
authorGloria Mundi <gloria@gloria-mundi.eu>2024-11-16 21:17:29 +0100
committerGloria Mundi <gloria@gloria-mundi.eu>2024-11-16 21:17:29 +0100
commit1880ccb6d85c6eb79e724593457877bab431951c (patch)
tree23eddd5bd0b29b3024e170a5ef9023eda9226ab5 /test/string/z.cpp
parente95f59debd69ee7d45d5c966ce466d23264e1c3c (diff)
get rid of all() and sz()
Diffstat (limited to 'test/string/z.cpp')
-rw-r--r--test/string/z.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/string/z.cpp b/test/string/z.cpp
index f890a3e..3c76939 100644
--- a/test/string/z.cpp
+++ b/test/string/z.cpp
@@ -2,9 +2,9 @@
#include <string/z.cpp>
vector<int> naive(const string& s) {
- vector<int> res(sz(s));
- for (int i = 1; i < sz(s); i++) {
- while (i + res[i] < sz(s) && s[res[i]] == s[i + res[i]]) res[i]++;
+ vector<int> res(ssize(s));
+ for (int i = 1; i < ssize(s); i++) {
+ while (i + res[i] < ssize(s) && s[res[i]] == s[i + res[i]]) res[i]++;
}
return res;
}