Skip to content

Commit f1f13f2

Browse files
committed
nit
1 parent b47f737 commit f1f13f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
//! // [tl,tr] splits into [tl,tm] and [tm+1,tr]
66
//! @endcode
77
int split(int tl, int tr) {
8-
int pw2 = 1 << __lg(tr - tl + 1);
8+
int pw2 = bit_floor(tr - tl + 1u);
99
return min(tl + pw2 - 1, tr - pw2 / 2);
1010
}

0 commit comments

Comments
 (0)