summaryrefslogtreecommitdiff
path: root/test/other/bitOps.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/bitOps.cpp
parente95f59debd69ee7d45d5c966ce466d23264e1c3c (diff)
get rid of all() and sz()
Diffstat (limited to 'test/other/bitOps.cpp')
-rw-r--r--test/other/bitOps.cpp6
1 files changed, 2 insertions, 4 deletions
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
+}