Skip to content

Commit

Permalink
fix BIT
Browse files Browse the repository at this point in the history
  • Loading branch information
idat50me committed May 5, 2024
1 parent 867f41e commit 9994654
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions tree/binary_indexed_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ template<typename T> struct BIT {
return sum(r) - sum(max(l - 1, 0));
}

void add(int idx, T &val) {
assert(0 < idx && idx <= N);
while(idx <= N) {
node[idx] += val;
idx += idx & -idx;
}
}
void add(int idx, T val) {
assert(0 < idx && idx <= N);
while(idx <= N) {
Expand Down

0 comments on commit 9994654

Please sign in to comment.