We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 46b31a7 commit 5e306b2Copy full SHA for 5e306b2
library/data_structures_[l,r]/seg_tree.hpp
@@ -19,8 +19,8 @@
19
//! @time O(n + q log n)
20
//! @space O(n)
21
int nxt(int& l, int r) {
22
- int x = l, y = __lg(min(l & -l, r - l + 1));
23
- return l += 1 << y, x >> y;
+ int u = l, v = __lg(min(l & -l, r - l + 1));
+ return l += 1 << v, u >> v;
24
}
25
template<class T, class F> struct tree {
26
int n;
0 commit comments