We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4ea8f0 commit 1db1d29Copy full SHA for 1db1d29
library/data_structures_[l,r)/seg_tree_uncommon/walk.hpp
@@ -1,5 +1,5 @@
1
int walk(int l, int r, const auto& f) {
2
- while (T x = unit; l < r) {
+ for (T x = unit; l < r;) {
3
int u = l + n, v = __lg(min(u & -u, r - l));
4
if (T y = op(x, s[u >> v]); f(y)) x = y, l += 1 << v;
5
else r = l + (1 << v) - 1;
0 commit comments