摘要:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3279数状数组#include <stdio.h>#include <string.h>#define lowbit(x) ((x)&(-x))int n;int a[100005],b[100005];void update(int x,int v){ while(x <= n) { a[x] += v; x += lowbit(x); }}int sum(int x){ int ret = 0; while(x) { ret += 阅读全文