摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4031用了树状数组的区间更新 单点查找(一般为单点更新 区间查找)例如 区间(2,4)加1则Updata(2,1) Updata(4+1,-1)实现了更新(2,4)的值而不改变其他值求Sum时即可得到某一点的值View Code #include <iostream>using namespace std;const int MAX = 20000 + 100;int C[MAX];int N;struct Node{ int l; int r;};int LowBit(int x){ re... 阅读全文
posted @ 2012-11-10 18:30 zx雄 阅读(2490) 评论(0) 推荐(0) 编辑