![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
树状数组
Timeclimber
这个作者很懒,什么都没留下…
展开
-
poj 2352 Stars (树状数组)
StarsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 48298 Accepted: 20847DescriptionAstronomers often examine star maps where stars are represented b原创 2017-08-08 19:37:27 · 226 阅读 · 0 评论 -
ACM-ICPC 2018 沈阳赛区网络赛 J. Ka Chang(分块+树状数组+dfs序)
Given a rooted tree ( the root is node 11 ) of NN nodes. Initially, each node has zero point.Then, you need to handle QQ operations. There're two types:1\ L\ X1 L X: Increase points by XX of all n...原创 2018-09-11 16:56:50 · 393 阅读 · 0 评论 -
洛谷 P2344 奶牛抗议 (树状数组+DP)
题目背景Generic Cow Protests, 2011 Feb题目描述约翰家的N 头奶牛正在排队游行抗议。一些奶牛情绪激动,约翰测算下来,排在第i 位的奶牛的理智度为Ai,数字可正可负。约翰希望奶牛在抗议时保持理性,为此,他打算将这条队伍分割成几个小组,每个抗议小组的理智度之和必须大于或等于零。奶牛的队伍已经固定了前后顺序,所以不能交换它们的位置,所以分在一个小组里的奶牛必须...原创 2018-08-01 21:26:27 · 536 阅读 · 0 评论 -
洛谷 P1966 火柴排队(树状数组求逆序)
题目描述涵涵有两盒火柴,每盒装有 nn 根火柴,每根火柴都有一个高度。 现在将每盒中的火柴各自排成一列, 同一列火柴的高度互不相同, 两列火柴之间的距离定义为: 其中 a_iai 表示第一列火柴中第 ii 个火柴的高度, b_ibi 表示第二列火柴中第 ii 个火柴的高度。每列火柴中相邻两根火柴的位置都可以交换,请你通过交换使得两列火柴之间的距离最小。请问得到这个最小的距离,最少需...原创 2018-08-01 12:13:33 · 308 阅读 · 0 评论 -
hdu 4267 A Simple Problem with Integers(树状数组)
A Simple Problem with IntegersTime Limit: 5000/1500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6241 Accepted Submission(s): 2012Problem DescriptionLet A1, A2,...原创 2018-04-17 21:26:49 · 234 阅读 · 1 评论 -
poj 2299 Ultra-QuickSort(树状数组+离散化)
Ultra-QuickSortTime Limit: 7000MS Memory Limit: 65536KTotal Submissions: 62342 Accepted: 23200DescriptionIn this problem, you have to analyze a particular sorting algorithm. The algorithm processes a原创 2017-08-09 10:54:52 · 472 阅读 · 0 评论 -
nefu 1330 树上计算 (dfs序+树状数组)
树上计算Problem:1330Time Limit:1000msMemory Limit:65535KDescription给出一棵以 1 为根的树,初始每个顶点的权值为 0 。现有两种操作: 1 x 代表将顶点 x 的权值加一 2 x 询问顶点 x 的子原创 2018-02-01 13:13:00 · 486 阅读 · 0 评论 -
hdu 5517 Triple (二维树状数组)
TripleTime Limit: 12000/6000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1127 Accepted Submission(s): 403Problem DescriptionGiven the finite multi-原创 2018-01-15 18:27:28 · 330 阅读 · 0 评论 -
poj 2155 Matrix(二维树状数组)
MatrixTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 30316 Accepted: 11094DescriptionGiven an N*N matrix A, whose elements are either 0 or 1. A[i, j]原创 2018-01-15 12:14:54 · 210 阅读 · 0 评论 -
hdu 5975 Aninteresting game (树状数组)
Aninteresting gameTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 542 Accepted Submission(s): 220Problem DescriptionLet’s play a原创 2018-01-14 10:51:26 · 454 阅读 · 0 评论 -
hdu 2642 Stars (二维树状数组)
StarsTime Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/65536 K (Java/Others)Total Submission(s): 1996 Accepted Submission(s): 848Problem DescriptionYifenfei is a romantic gu原创 2017-08-15 23:17:43 · 458 阅读 · 1 评论 -
poj 3067 Japan(树状数组)
JapanTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 29345 Accepted: 7917DescriptionJapan plans to welcome the ACM ICPC World Finals and a lot of road原创 2017-08-09 16:42:33 · 295 阅读 · 0 评论 -
hdu 1166 敌兵布阵(树状数组裸题)
敌兵布阵Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 96034 Accepted Submission(s): 40555Problem DescriptionC国的死对头A国这段时间正在进行军事演原创 2017-08-09 10:33:50 · 581 阅读 · 0 评论 -
poj 2481 Cows (树状数组)
CowsTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 19677 Accepted: 6702DescriptionFarmer John's cows have discovered that the clover growing along th原创 2017-08-08 21:29:30 · 245 阅读 · 0 评论 -
ACM-ICPC 2018 徐州赛区网络赛 H. Ryuji doesn't want to study(树状数组)
Ryuji is not a good student, and he doesn't want to study. But there are n books he should learn, each book has its knowledge a[i]a[i].Unfortunately, the longer he learns, the fewer he gets.That m...原创 2018-09-10 18:25:59 · 211 阅读 · 0 评论