We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 710e9d1 commit bc750ffCopy full SHA for bc750ff
library/data_structures_[l,r]/seg_tree.hpp
@@ -11,8 +11,8 @@
11
//! @time O(n + q log n)
12
//! @space O(n)
13
int nxt(int& l, int r) {
14
- int lg = __lg(min(l & -l, r - l + 1));
15
- return exchange(l, l + (1 << lg)) >> lg;
+ int x = __lg(min(l & -l, r - l + 1));
+ return exchange(l, l + (1 << x)) >> x;
16
}
17
template<class T, class F> struct tree {
18
int n;
0 commit comments