Skip to content

Commit 908cdf7

Browse files
authored
Fix bug in nxt function for segment tree
1 parent 56d0dee commit 908cdf7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/data_structures_[l,r]/seg_tree.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//! @time O(n + q log n)
1212
//! @space O(n)
1313
int nxt(int& l, int r) {
14-
int x = min(l & -l, 1 << __lg(r - l + 1u));
14+
int x = min(l & -l, 1 << __lg(r - l + 1));
1515
return exchange(l, l + x) / x;
1616
}
1717
template<class T, class F> struct tree {

0 commit comments

Comments
 (0)