Fix another segtree bug
This commit is contained in:
parent
03b09cc02a
commit
b890783bf6
|
@ -18,7 +18,7 @@ void build(sqlite3_stmt *stmt, int l, int r, int n) {
|
|||
/* Update value at index x*/
|
||||
void update(int x, int v, int l, int r, int n) {
|
||||
if (l == r) {
|
||||
seg[n] += v;
|
||||
seg[n] = v;
|
||||
return;
|
||||
}
|
||||
int m = l + r >> 1;
|
||||
|
|
Loading…
Reference in a new issue