teamnote history merge

This commit is contained in:
2026-06-03 09:36:52 +09:00
parent f50ed902fe
commit 7176febe54
142 changed files with 13243 additions and 0 deletions

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;
}