Skip to content

Commit 1db1d29

Browse files
authored
Update walk.hpp
1 parent f4ea8f0 commit 1db1d29

File tree

1 file changed

+1
-1
lines changed
  • library/data_structures_[l,r)/seg_tree_uncommon

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
int walk(int l, int r, const auto& f) {
2-
while (T x = unit; l < r) {
2+
for (T x = unit; l < r;) {
33
int u = l + n, v = __lg(min(u & -u, r - l));
44
if (T y = op(x, s[u >> v]); f(y)) x = y, l += 1 << v;
55
else r = l + (1 << v) - 1;

0 commit comments

Comments
 (0)