Skip to content

Commit c7f4999

Browse files
committed
another golf
1 parent dcfa30f commit c7f4999

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
@@ -23,13 +23,13 @@ template<class T, class F> struct linear_rmq {
2323
int prev = 0;
2424
while (sz(st) > 1 &&
2525
(i == n || !cmp(a[st.back()], a[i]))) {
26-
if (prev) head[prev] = st.back();
26+
head[prev] = st.back();
2727
int b = bit_floor((end(st)[-2] + 1u) ^ i);
2828
in[st.back()] = prev = i & -b;
2929
st.pop_back();
3030
asc[st.back() + 1] |= b;
3131
}
32-
if (prev) head[prev] = i;
32+
head[prev] = i;
3333
st.push_back(i);
3434
}
3535
rep(i, 1, n)(asc[i] |= asc[i - 1]) &=

0 commit comments

Comments
 (0)