树状数组
文章平均质量分 82
jerans
这个作者很懒,什么都没留下…
展开
-
codeforces 8VC Venture Cup 2017 - Elimination Round D PolandBall and Polygon
D. PolandBall and Polygontime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolandBall has such a convex poly原创 2017-01-16 16:01:05 · 572 阅读 · 0 评论 -
HDU - 1394 Minimum Inversion Number 树状数组求逆序数
Minimum Inversion NumberTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 19156 Accepted Submission(s): 11548Problem Description原创 2017-02-09 00:17:48 · 297 阅读 · 0 评论 -
POJ - 2182 D - Lost Cows 暴力//树状数组加二分
Lost CowsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 11614 Accepted: 7465DescriptionN (2 <= N <= 8,000) cows have unique brands in the range 1..N.原创 2017-03-15 12:55:33 · 307 阅读 · 0 评论 -
Nested Segments CodeForces - 652D 树状数组
D. Nested Segmentstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given n segments on a line. Ther原创 2017-05-26 22:24:54 · 323 阅读 · 0 评论 -
Codeforces Round #424 (Div. 2)C. Jury Marks 暴力 D. Office Keys 二分 E. Cards Sorting 树状数组
C:http://codeforces.com/contest/831/problem/C。题意:给两个序列a和b有一个初始值,不断的加ai,要求是在加的过程中b的所有值都出现过,求这样满足条件的初始值有几个。崩了,这么水的暴力竟然没想出来??先把所有的b值标记出来,随便选一个b,暴力放到某一个a后面,这样就可以直接找出原序列,看看b数组里的值是不是都出现过,如果出现过则这个序列满原创 2017-07-17 16:22:51 · 539 阅读 · 0 评论 -
Codeforces Round #439 (Div. 2) E. The Untended Antiquity 二维线段树||二维树状数组
http://codeforces.com/contest/869/problem/E题意:n*m的矩阵,q次操作,三种类型类型1:给指定矩阵加上围栏类型2:给指定矩阵去掉围栏类型3:查询两点是否存在一条不通过围栏的路加围栏是全包,也就相当于加了围栏后只能是里面走向里面,外面走向外面,这样就可以给这块平面附一个值,判断能不能走直接判相等就可以了,因为有矩阵叠加的情况,也就是围栏原创 2017-10-07 21:58:09 · 373 阅读 · 0 评论 -
hdu-4777Rabbit Kingdom 树状数组
http://acm.split.hdu.edu.cn/showproblem.php?pid=4777题意:给一段序列,多个查询,查询某段区间内和其他数都互质的数的个数接触过类似的题目,但训练时竟没有想到树状数组,搜了发题解,看到树状数组四个字,立马就把题解关掉了,想了想,好像不难做必然是离线处理,套路类似spoj D-query需要修改的地方就是,以因子为索引寻找前驱,w原创 2017-10-05 17:39:48 · 282 阅读 · 0 评论