summaryrefslogtreecommitdiff
path: root/test/string/suffixAutomaton.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/suffixAutomaton.cpp
parente95f59debd69ee7d45d5c966ce466d23264e1c3c (diff)
get rid of all() and sz()
Diffstat (limited to 'test/string/suffixAutomaton.cpp')
-rw-r--r--test/string/suffixAutomaton.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/string/suffixAutomaton.cpp b/test/string/suffixAutomaton.cpp
index c2ff511..cab555e 100644
--- a/test/string/suffixAutomaton.cpp
+++ b/test/string/suffixAutomaton.cpp
@@ -4,10 +4,10 @@
pair<int, int> naive(string_view s, string_view t) {
int pos = 0;
int len = 0;
- for (int j = 0; j < sz(t); j++) {
- for (int i = 0; i < sz(s); i++) {
+ for (int j = 0; j < ssize(t); j++) {
+ for (int i = 0; i < ssize(s); i++) {
int cur = 0;
- while (i+cur < sz(s) && j+cur < sz(t) && s[i+cur] == t[j+cur]) cur++;
+ while (i+cur < ssize(s) && j+cur < ssize(t) && s[i+cur] == t[j+cur]) cur++;
if (cur > len) {
pos = j;
len = cur;
@@ -43,7 +43,7 @@ void performance_test() {
SuffixAutomaton sa(s);
t.stop();
hash_t hash = 0;
- for (ll c = 0; c < sz(s);) {
+ for (ll c = 0; c < ssize(s);) {
int m = Random::integer<int>(1, 1000);
s = Random::string(m, "abc");
t.start();