2011年7月22日

POJ 2352 starts 树状数组

摘要: #include <iostream>#include<stdio.h>#include<string.h>using namespace std;int N;int x,y;int tree[33000];int level[16000];int lowbit(int t){return t&(-t);}void update(int index){ while(index<33000) { tree[index]++; index+=lowbit(index); }}int getSum(int index){ int sum=0; whi 阅读全文

posted @ 2011-07-22 14:35 lonelycatcher 阅读(170) 评论(0) 推荐(0) 编辑

导航