c++ 树状数组
碳酸钙的01妖精
这个作者很懒,什么都没留下…
展开
-
树状数组模板
树状数组的创建void CreateTree(int x,int v) { int i; for(i=x;i<=MAXN;i+=lowbit(i)) { tree[i]+=v; } return; }树状数组区间和查询int sum(int x) //x是5的话,算的就是1~5的和,如果要算2~5就sum(5)-sum(1); { ...原创 2018-07-12 22:12:26 · 609 阅读 · 0 评论 -
POJ-2352 Stars (树状数组)
Stars Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 52887 Accepted: 22777 Description Astronomers often examine star maps where stars are represented by points on a ...原创 2018-07-12 22:15:34 · 259 阅读 · 0 评论