1
0
Fork 0

Update segtree_generic.cc

This commit is contained in:
Ariel 2024-03-09 12:50:18 +08:00 committed by GitHub
parent 12e4d957ba
commit 0f8212960f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -24,8 +24,8 @@ private:
} }
size_type m = s + (t - s >> 1); size_type m = s + (t - s >> 1);
if (s != t) push(p); if (s != t) push(p);
if (x <= m) range_set(s, m, p * 2, x, c); if (x <= m) set(s, m, p * 2, x, c);
else range_set(m + 1, t, p * 2 + 1, x, c); else set(m + 1, t, p * 2 + 1, x, c);
d[p] = d[p * 2] + d[p * 2 + 1]; d[p] = d[p * 2] + d[p * 2 + 1];
} }