diff options
| author | Gloria Mundi <gloria@gloria-mundi.eu> | 2024-11-16 21:17:29 +0100 |
|---|---|---|
| committer | Gloria Mundi <gloria@gloria-mundi.eu> | 2024-11-16 21:17:29 +0100 |
| commit | 1880ccb6d85c6eb79e724593457877bab431951c (patch) | |
| tree | 23eddd5bd0b29b3024e170a5ef9023eda9226ab5 /test/string/suffixTree.cpp | |
| parent | e95f59debd69ee7d45d5c966ce466d23264e1c3c (diff) | |
get rid of all() and sz()
Diffstat (limited to 'test/string/suffixTree.cpp')
| -rw-r--r-- | test/string/suffixTree.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/string/suffixTree.cpp b/test/string/suffixTree.cpp index c0d79e4..69c24fe 100644 --- a/test/string/suffixTree.cpp +++ b/test/string/suffixTree.cpp @@ -2,8 +2,8 @@ #include <string/suffixTree.cpp> vector<string> naive(string_view s) { - vector<string> res(sz(s)); - for (ll i = 0; i < sz(s); i++) { + vector<string> res(ssize(s)); + for (ll i = 0; i < ssize(s); i++) { res[i] = s.substr(i); } return res; @@ -19,7 +19,7 @@ void stress_test() { auto dfs = [&](auto&& self, string pref, ll node) -> void { auto& [l, r, _, next] = st.tree[node]; if (l >= 0) pref += s.substr(l, r - l); - if (pref.back() == '#') got[n + 1 - sz(pref)] = pref; + if (pref.back() == '#') got[n + 1 - ssize(pref)] = pref; for (auto [__, j] : next) { self(self, pref, j); } @@ -39,7 +39,7 @@ void performance_test() { t.start(); SuffixTree st(s); t.stop(); - hash_t hash = sz(st.tree); + hash_t hash = ssize(st.tree); if (t.time > 500) cerr << "too slow: " << t.time << FAIL; cerr << "tested performance: " << t.time << "ms (hash: " << hash << ")" << endl; } |
