From 1880ccb6d85c6eb79e724593457877bab431951c Mon Sep 17 00:00:00 2001 From: Gloria Mundi Date: Sat, 16 Nov 2024 21:17:29 +0100 Subject: get rid of all() and sz() --- test/math/permIndex.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/math/permIndex.cpp') 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(1, 100); vector 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 cur(N); - iota(all(cur), 0); + iota(begin(cur), end(cur), 0); reverse(cur.end() - 10, cur.end()); t.start(); auto hash = permIndex(cur); -- cgit v1.2.3