![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
树状数组
aspprp
爬呀爬,即便是一只蜗牛也有向上奔跑的权利
展开
-
树状数组 -- hdu敌兵布阵 -- 树状数组
2017年5月7日题目来源: http://acm.hdu.edu.cn/showproblem.php?pid=1166分析: 每次只修改一个点,求的是一个区间的内容代码如下:#include <iostream> #include <string> #include <cstring>using namespace std; const int maxn = 99999;int c[转载 2017-05-07 15:41:31 · 183 阅读 · 0 评论 -
color the ball -- hdu -- 树状数组
每次修改的是一个区间,所求的值是关于某个点的;题目来源; color the ball向下查询,向上统计代码如下:#include <iostream> #include <cstring>using namespace std;const int maxn = 100010;int c[maxn] = {0}; int n ;int lowbit(int x) { return (-原创 2017-05-07 16:51:56 · 212 阅读 · 0 评论 -
poj-stars--树状数组
给出星星坐标,判断星星左下部分的星星的个数,其中y是按照升序排列的,所以只对x进行判断即可原创 2017-05-09 21:11:20 · 168 阅读 · 0 评论