Skip to content

Commit e987fcc

Browse files
authored
Fix formatting and assertion in wavelet_matrix.hpp
1 parent 6f3a198 commit e987fcc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/data_structures_[l,r)/seg_tree_uncommon/wavelet_matrix.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ struct wavelet_matrix {
1818
vector<bool> b(n);
1919
ranges::stable_partition(a,
2020
[&](ull x) { return b[i++] = (~x >> h) & 1; });
21+
for (int i = 0; i < n; i++)
22+
assert(b[i] == ((~a[i] >> h) & 1));
2123
bv[h] = b;
2224
}
2325
}

0 commit comments

Comments
 (0)