summaryrefslogtreecommitdiff
path: root/test/other/bitOps.cpp
diff options
context:
space:
mode:
authormzuenni <michi.zuendorf@gmail.com>2025-07-10 17:40:18 +0200
committermzuenni <michi.zuendorf@gmail.com>2025-07-10 17:40:18 +0200
commit630a5bdf06d59b8340fb4bfc0e692cbcf094026a (patch)
treeadee732c8d2cdcb46e5f400611c370b4c2ec1947 /test/other/bitOps.cpp
parent609d5a3bf490cfa151b40e60cb62c8ff751bbe56 (diff)
run with sanitizer
Diffstat (limited to 'test/other/bitOps.cpp')
-rw-r--r--test/other/bitOps.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/other/bitOps.cpp b/test/other/bitOps.cpp
index 44f6297..707c3f0 100644
--- a/test/other/bitOps.cpp
+++ b/test/other/bitOps.cpp
@@ -27,7 +27,7 @@ void test_subsets() {
ll naive(ll x) {
vector<ll> bits;
- for (ll i = 0; i < 64; i++) {
+ for (ll i = 0; i < 63; i++) {
bits.push_back(x & 1);
x >>= 1;
}
@@ -35,7 +35,7 @@ ll naive(ll x) {
next_permutation(all(bits));
reverse(all(bits));
x = 0;
- for (ll i = 0, j = 1; i < 64; i++, j <<= 1) {
+ for (ll i = 0, j = 1; i < 63; i++, j <<= 1) {
if (bits[i] != 0) x |= j;
}
return x;