![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
树状数组
文章平均质量分 75
lenga5241
这个作者很懒,什么都没留下…
展开
-
poj_2985 The k-th Largest Group 树状数组求第K大
前面说了树状数组的三个用途, 在原创 2014-04-14 21:37:40 · 654 阅读 · 0 评论 -
Poj 2029 Get Many Persimmon Trees 二维树状数组
题目链接:http://poj.org/problem?id=2029 题目大意:原创 2014-08-14 17:12:18 · 452 阅读 · 0 评论 -
Poj 1195 Mobile phones 二维树状数组
题目链接:http://poj.org/problem?id=1195 题目大意:单点原创 2014-08-14 18:07:01 · 375 阅读 · 0 评论 -
Poj 2155 Matrix 二维树状数组
题目链接:http://poj.org/problem?id=2155 题目大意:给你一个矩阵,原创 2014-08-14 17:34:06 · 449 阅读 · 0 评论 -
Poj 3067 Japan 树状数组
题目链接:http://poj.org/problem?id=3067原创 2014-08-13 18:35:27 · 436 阅读 · 0 评论 -
Poj 2481 Cows 树状数组
题目链接:http://poj.org/problem?id=2481 题目大意:原创 2014-08-13 17:29:19 · 452 阅读 · 0 评论 -
Poj 2352 Stars 树状数组
题目链接:http://poj.org/problem?id=2352 题目大意:按横坐标从小到大,原创 2014-08-13 15:17:05 · 531 阅读 · 0 评论 -
树状数组(归并排序) 之 求逆序数nyoj117
题目信息:点击打开链接 求逆序数 树状数组求逆序数就是不停的向树状数组中插入值,插入的同时更新树状数组,并统计逆序数的个数,在代码中会详细解释;另外大家会发现这种方法很类似于hash标记,即先开一个hash数组(和题上数据范围一样大),然后插入值a,然后标记hash[a]为1,假如a是第5个插入的,那a的逆序数就是5-C[4](C为树状数组),但是这道题的数据范围为10^9,根本开不了这麽大的数原创 2014-03-27 15:07:11 · 653 阅读 · 0 评论 -
树状数组 之 插点问线nyoj116 和插线问点nyoj123
题目信息:点击打开链接 士兵杀敌(二) 此题为插点问线,即在某一点动态更新值,求某一区间的和。 这应该是树状数组最基础的应用了。。。 每次插入的时候向上更新树状数组的值,到求和时,两个区间的值相减就是区间和;代码如下 #include #include using namespace std; int s[1000000]; int N,t; int lowbit(int x) {原创 2014-03-27 12:44:49 · 761 阅读 · 0 评论 -
zoj 3635 Cinema in Akiba 树状数组求第K大
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4803原创 2014-04-15 16:58:41 · 654 阅读 · 0 评论 -
Hdu 4638 Group 离线+树状数组
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4638 题目大意:给你1-N的全排列原创 2014-09-23 11:23:35 · 626 阅读 · 0 评论