Skip to content

Commit 9a819e5

Browse files
LorentLorent
Lorent
authored and
Lorent
committed
remove unnecessary calculation
1 parent 03d8c97 commit 9a819e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

atcoder/lazysegtree.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ struct lazy_segtree {
8888

8989
for (int i = log; i >= 1; i--) {
9090
if (((l >> i) << i) != l) push(l >> i);
91-
if (((r >> i) << i) != r) push((r - 1) >> i);
91+
if (((r >> i) << i) != r) push(r >> i);
9292
}
9393

9494
{
@@ -105,7 +105,7 @@ struct lazy_segtree {
105105

106106
for (int i = 1; i <= log; i++) {
107107
if (((l >> i) << i) != l) update(l >> i);
108-
if (((r >> i) << i) != r) update((r - 1) >> i);
108+
if (((r >> i) << i) != r) update(r >> i);
109109
}
110110
}
111111

0 commit comments

Comments
 (0)