Skip to content

Commit 60546c3

Browse files
committed
another golf
1 parent 78b05a3 commit 60546c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/data_structures/uncommon/linear_rmq.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ template<class T, class F> struct linear_rmq {
2121
vi st{-1};
2222
rep(i, 0, n + 1) {
2323
int prev = -1;
24-
while (st.back() != -1 &&
24+
while (sz(st) > 1 &&
2525
(i == n || !cmp(a[st.back()], a[i]))) {
2626
if (prev != -1) head[prev] = st.back();
2727
int b = bit_floor((end(st)[-2] + 1u) ^ i);

0 commit comments

Comments
 (0)