Skip to content

Commit 5ba1cec

Browse files
committed
minor golf
1 parent c917157 commit 5ba1cec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/data_structures/seg_tree_uncommon/wavelet_matrix.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ struct wavelet_matrix {
1717
int i = 0;
1818
vector<bool> b(n);
1919
ranges::stable_partition(a,
20-
[&](ull x) { return b[i++] = !((x >> h) & 1); });
20+
[&](ull x) { return b[i++] = (~x >> h) & 1; });
2121
bv[h] = b;
2222
}
2323
}

0 commit comments

Comments
 (0)