
树状数组
文章平均质量分 90
尒轩窗
这个作者很懒,什么都没留下…
展开
-
Different Integers
链接:https://www.nowcoder.com/acm/contest/139/J 题目描述 Given a sequence of integers a1, a2, ..., an and q pairs of integers (l1, r1), (l2, r2), ..., (lq, rq), find count(l1, r1), count(l2, r2), ..., c...原创 2018-07-19 21:21:23 · 375 阅读 · 0 评论 -
Swaps and Inversions
Problem Description Long long ago, there was an integer sequence a. Tonyfang think this sequence is messy, so he will count the number of inversions in this sequence. Because he is angry, you will ha...原创 2018-07-25 21:31:11 · 136 阅读 · 0 评论 -
farm
链接:https://www.nowcoder.com/acm/contest/140/J 来源:牛客网 题目描述 White Rabbit has a rectangular farmland of n*m. In each of the grid there is a kind of plant. The plant in the j-th column of the i-th row...原创 2018-07-22 21:53:34 · 349 阅读 · 0 评论 -
2016 ACM/ICPC大连区域赛 E—Aninteresting game【树状数组】
题目链接:http://acm.hdu.edu.cn/contests/contest_showproblem.php?pid=1005&cid=736 Aninteresting game Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submissi...原创 2018-10-03 21:25:04 · 272 阅读 · 0 评论 -
【树状数组入门】hdu1556 Color the ball【区间更新 单点查询】【树状数组】
http://acm.hdu.edu.cn/showproblem.php?pid=1556 Color the ball Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 29052 Accepted Submission(s)...原创 2018-10-12 19:47:23 · 138 阅读 · 0 评论 -
hdu 1166 敌兵布阵【单点更新 区间查询】【树状数组】
敌兵布阵 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 126415 Accepted Submission(s): 52978 Problem Description C国的死对头A国这段时间正在进行军事演习,所以C国...原创 2018-10-12 20:26:25 · 143 阅读 · 0 评论 -
1082 线段树练习 3【区间更新 区间查询】【树状数组】
题目链接:http://codevs.cn/problem/1082/ 题目描述 Description 给你N个数,有两种操作: 1:给区间[a,b]的所有数增加X 2:询问区间[a,b]的数的和。 输入描述 Input Description 第一行一个正整数n,接下来n行n个整数, 再接下来一个正整数Q,每行表示操作的个数, 如果第一个数是1,后接3个正整数, 表示在区间[a,...原创 2018-10-12 21:21:39 · 165 阅读 · 0 评论