teamnote default

This commit is contained in:
2026-06-03 09:20:51 +09:00
commit f50ed902fe
65 changed files with 6033 additions and 0 deletions

9
source/DS/Fenwick.cpp Normal file
View File

@@ -0,0 +1,9 @@
ll tree[N];
void update(int i,ll x) {
while(i < N) tree[i] += x, i += i&-i;
}
int query(int i) {
ll s = 0;
while(i) s += tree[i], i -= i&-i;
return s;
}