Skip to content

Commit 0084dcf

Browse files
committed
I like this way
1 parent 7d255ba commit 0084dcf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

library/data_structures/uncommon/linear_rmq.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ template<class T, class F> struct linear_rmq {
3232
head[prev] = i;
3333
st.push_back(i);
3434
}
35-
rep(i, 1, n)(asc[i] |= asc[i - 1]) &=
36-
-(in[i] & -in[i]);
35+
rep(i, 1, n) asc[i] =
36+
(asc[i] | asc[i - 1]) & -(in[i] & -in[i]);
3737
}
3838
int idx(int l, int r) { // [l, r]
3939
if (unsigned j = in[l] ^ in[r]; j) {

0 commit comments

Comments
 (0)