summaryrefslogtreecommitdiff
path: root/test/other/pbs.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/other/pbs.cpp
parente95f59debd69ee7d45d5c966ce466d23264e1c3c (diff)
get rid of all() and sz()
Diffstat (limited to 'test/other/pbs.cpp')
-rw-r--r--test/other/pbs.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/other/pbs.cpp b/test/other/pbs.cpp
index ba3b9d0..e1dfea0 100644
--- a/test/other/pbs.cpp
+++ b/test/other/pbs.cpp
@@ -49,7 +49,7 @@ void stress_test() {
for (int i=1; i<n; i++) {
edges.emplace_back(Random::integer(0, i), i);
}
- shuffle(all(edges), Random::rng);
+ ranges::shuffle(edges, Random::rng);
queries.clear();
for (int i=0; i<Q; i++) {
auto x = Random::distinct(2, n);
@@ -80,7 +80,7 @@ void performance_test() {
for (int i=1; i<n; i++) {
edges.emplace_back(Random::integer(0, i), i);
}
- shuffle(all(edges), Random::rng);
+ ranges::shuffle(edges, Random::rng);
queries.clear();
for (int i=0; i<Q; i++) {
auto x = Random::distinct(2, n);
@@ -91,7 +91,7 @@ void performance_test() {
t.start();
vector<int> ans = pbs(Q, MAX_OPERATIONS);
t.stop();
- ll hash = accumulate(all(ans), 0LL);
+ ll hash = accumulate(begin(ans), end(ans), 0LL);
if (t.time > 700) cerr << "too slow: " << t.time << FAIL;
cerr << "tested performance: " << t.time << "ms (hash: " << hash << ")" << endl;