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/other/bitOps.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'test/other/bitOps.cpp') diff --git a/test/other/bitOps.cpp b/test/other/bitOps.cpp index 44f6297..2250521 100644 --- a/test/other/bitOps.cpp +++ b/test/other/bitOps.cpp @@ -31,9 +31,7 @@ ll naive(ll x) { bits.push_back(x & 1); x >>= 1; } - reverse(all(bits)); - next_permutation(all(bits)); - reverse(all(bits)); + ranges::next_permutation(bits | views::reverse); x = 0; for (ll i = 0, j = 1; i < 64; i++, j <<= 1) { if (bits[i] != 0) x |= j; @@ -56,4 +54,4 @@ void test_nextPerm() { int main() { test_subsets(); test_nextPerm(); -} \ No newline at end of file +} -- cgit v1.2.3