summaryrefslogtreecommitdiff
path: root/test/math/permIndex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/math/permIndex.cpp')
-rw-r--r--test/math/permIndex.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/math/permIndex.cpp b/test/math/permIndex.cpp
index 6c77d74..d68ba3a 100644
--- a/test/math/permIndex.cpp
+++ b/test/math/permIndex.cpp
@@ -6,13 +6,13 @@ void stress_test() {
for (ll i = 0; i < 10'000; i++) {
int n = Random::integer<int>(1, 100);
vector<ll> cur(n);
- iota(all(cur), 0);
+ iota(begin(cur), end(cur), 0);
ll expected = 0;
do {
auto got = permIndex(cur);
if (got != expected) cerr << "got: " << got << ", expected: " << expected << FAIL;
expected++;
- } while (expected < 100 && next_permutation(all(cur)));
+ } while (expected < 100 && ranges::next_permutation(cur).found);
queries += n;
}
cerr << "tested queries: " << queries << endl;
@@ -22,7 +22,7 @@ constexpr int N = 500'000;
void performance_test() {
timer t;
vector<ll> cur(N);
- iota(all(cur), 0);
+ iota(begin(cur), end(cur), 0);
reverse(cur.end() - 10, cur.end());
t.start();
auto hash = permIndex(cur);