We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 00695a4 commit b7e30b5Copy full SHA for b7e30b5
library/data_structures_[l,r)/bit.hpp
@@ -9,12 +9,12 @@ struct BIT {
9
void update(int i, ll d) {
10
for (; i < sz(s); i |= i + 1) s[i] += d;
11
}
12
- ll query(int r) { // [0, r)
+ ll query(int r) {
13
ll ret = 0;
14
for (; r > 0; r &= r - 1) ret += s[r - 1];
15
return ret;
16
17
- ll query(int l, int r) { // [l, r)
+ ll query(int l, int r) {
18
return query(r) - query(l);
19
20
#include "bit_uncommon/walk.hpp"
0 commit comments