Tag: fenwick tree

在编程中(数字和数字)是什么意思?

例如: int get(int i) { int res = 0; while (i) { res = (res + tree[i]) % MOD; i -= ( (i) & (-i) ); } return res; } 树更新function: void update(int i, int val) { while (i <= m) { tree[i] = (tree[i] + val) % MOD; i += ( (i) & (-i) […]