标签:font 数组 += col span void class turn style
1 int lowbit(int x) {
2 return x & -x;
3 }
4
5 void add(int x, int y) {
6 for (int i = x; i <= n; i += lowbit(i))
7 c[i] += y;
8 }
9
10 int ask(int x) {
11 int res = 0;
12 for (int i = x; i; i -= lowbit(i))
13 res += c[i];
14 return res;
15 }
标签:font 数组 += col span void class turn style
原文地址:https://www.cnblogs.com/hhyx/p/12375354.html