
线段树&树状数组
文章平均质量分 84
Pira
追求梦想的人,难免有些不切实际。。。
展开
-
hdu 2795 Billboard(线段树 求最值的位置)
BillboardTime Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3119 Accepted Submission(s): 1506Problem DescriptionAt the entrance原创 2012-04-24 19:33:28 · 711 阅读 · 0 评论 -
poj 1177 & hdu 1828 Picture(线段树+离散化)
PictureTime Limit: 6000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1095 Accepted Submission(s): 608Problem DescriptionA number of rectang原创 2011-04-09 16:18:00 · 768 阅读 · 0 评论 -
poj 2482 Stars in Your Window(扫描线+区间最值)
Stars in Your WindowTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7013 Accepted: 1871DescriptionFleeting time does not blur my memory of you. Can it原创 2012-05-13 23:25:51 · 1191 阅读 · 0 评论 -
hdu 3265 Posters(矩形面积并 扫描线+线段树)
PostersTime Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2312 Accepted Submission(s): 515Problem DescriptionTed has a new house原创 2012-05-14 13:00:03 · 1022 阅读 · 0 评论 -
hdu 1255 覆盖的面积(矩形面积并,多次覆盖)
覆盖的面积Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1949 Accepted Submission(s): 960Problem Description给定平面上若干矩形,求出被这些矩形覆盖过原创 2012-05-14 14:07:50 · 1177 阅读 · 0 评论 -
poj 2464 Brownie Points II(两棵线段树——线段树区间和)
Brownie Points IITime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 1354 Accepted: 478DescriptionStan and Ollie play the game of Odd Brownie Points. Some原创 2012-05-16 11:51:44 · 973 阅读 · 0 评论 -
hdu 3642 Get The Treasury(线段树求体积并)
Get The TreasuryTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 892 Accepted Submission(s): 293Problem DescriptionJack knows原创 2012-05-18 11:05:31 · 1005 阅读 · 0 评论 -
hdu 3255 Farming(矩形面积并 多种矩形)
FarmingTime Limit: 12000/6000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 588 Accepted Submission(s): 151Problem DescriptionYou have a big farm原创 2012-05-18 12:10:40 · 1049 阅读 · 0 评论 -
hdu 4331 Image Recognition(DP+线段树)2012 Multi-University Training Contest 4
Image RecognitionTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 377 Accepted Submission(s): 137Problem DescriptionNow there原创 2012-08-04 11:38:03 · 996 阅读 · 0 评论 -
hdu 4348 To the moon(线段树成段更新) 2012 Multi-University Training Contest 5
To the moonTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 38 Accepted Submission(s): 6Problem DescriptionBackgroundTo The原创 2012-08-07 18:55:55 · 1780 阅读 · 12 评论 -
poj 3667 Hotel(线段树区间合并&Splay解法)
HotelTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 6224 Accepted: 2546DescriptionThe cows are journeying north to Thunder Bay in Canada to gain cult原创 2012-04-30 11:18:11 · 1326 阅读 · 0 评论 -
hdu 2871 Memory Control(线段树的各种操作&Splay解法)
Memory ControlTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2043 Accepted Submission(s): 480Problem DescriptionMemory units原创 2012-05-01 15:01:30 · 920 阅读 · 0 评论 -
ZOJ 2900 Icecream(线段树)
题意:给你一个长度为n的串,从中选出字串,使得长度至少为k,且相邻的数值差的绝对值小于等于p,求这样的字串的个数mod m的值地址:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2900分析:我们可以马上想到,以前i个数,长度为j的字串个数为f[ i ][ j ],那么有f[ [i ][ j ]=sum{ f[ i原创 2013-03-18 17:51:41 · 1329 阅读 · 0 评论 -
zoj 3540 Adding New Machine(map+离散化)
地址:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4495题意:给你w*h个格子,并且一些矩形块占用着一些格子,问剩下的空间,能装下1*m的矩形的方案数分析:我们可以枚举一个下标,然后维护另一个下标构成的线段,由于题目的特殊性,线段不会重叠,所以变得简单了许多,对于每次添加一条线段l~r,它的左边第一条线段的右边界是原创 2013-06-15 16:01:05 · 2253 阅读 · 0 评论 -
ZOJ 3018 Population(二维线段树?矩形树?)
地址:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3018题意:在平面内最多又32768个点,现在有两种操作,1:在一些点上加上一个数n,2:询问一个矩形区域内的点的数的和分析:这题一看像线段树,想离线搞,发现不好处理,也许可以,不过我是做不来了,后来自己YY了下二维的线段树,从来没写过= =,一开始发现空间会爆原创 2013-07-14 09:18:30 · 2782 阅读 · 1 评论 -
poj 1151 Atlantis(线段树 扫描线)
AtlantisTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 8759 Accepted: 3457DescriptionThere are several ancient Greek texts that contain descriptions of t原创 2011-04-11 18:22:00 · 919 阅读 · 0 评论 -
hdu 1540 Tunnel Warfare(线段树 连续区间)
Tunnel WarfareTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2069 Accepted Submission(s): 766Problem DescriptionDuring the W原创 2012-05-01 15:34:17 · 928 阅读 · 0 评论 -
CF 46 D. Parking Lot(线段树)
D. Parking Lottime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputNowadays it is becoming increasingly difficu原创 2012-05-01 17:37:24 · 1251 阅读 · 0 评论 -
poj 2828 Buy Tickets(线段树 区间和的应用)
Buy TicketsTime Limit: 4000MS Memory Limit: 65536KTotal Submissions: 6858 Accepted: 3298DescriptionRailway tickets were difficult to buy around the Lunar New Ye原创 2012-04-24 22:23:11 · 989 阅读 · 0 评论 -
hdu 1166 敌兵布阵(线段树——单点更新)
敌兵布阵Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13585 Accepted Submission(s): 5903Problem DescriptionC国的死对头A国这段时间正在进行军事演习原创 2012-04-24 17:22:00 · 843 阅读 · 0 评论 -
hdu 1754 I Hate It(splay入门题)
I Hate ItTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11703 Accepted Submission(s): 4478Problem Description很多学校流行一种比较的习惯。老原创 2011-11-15 15:12:44 · 1385 阅读 · 4 评论 -
hdu 1394 Minimum Inversion Number(线段树求逆序对)
Minimum Inversion NumberTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3336 Accepted Submission(s): 2026Problem DescriptionT原创 2012-04-24 18:39:36 · 719 阅读 · 0 评论 -
hdu 1698 Just a Hook(线段树成)
Just a HookTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7560 Accepted Submission(s): 3653Problem DescriptionIn the game of原创 2012-04-25 14:33:28 · 607 阅读 · 0 评论 -
poj 2886 Who Gets the Most Candies?(反质数+线段树模拟约瑟夫)
Who Gets the Most Candies?Time Limit: 5000MS Memory Limit: 131072KTotal Submissions: 5528 Accepted: 1579Case Time Limit: 2000MSDescriptionN children are s原创 2012-04-25 13:27:24 · 1014 阅读 · 0 评论 -
poj 3468 A Simple Problem with Integers(线段树成段更新)
A Simple Problem with IntegersTime Limit: 5000MS Memory Limit: 131072KTotal Submissions: 29597 Accepted: 8312Case Time Limit: 2000MSDescriptionYou have N原创 2012-04-25 15:15:08 · 545 阅读 · 0 评论 -
poj 2528 Mayor's posters(扫描线+堆维护||离散化+线段树)
Mayor's postersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 25116 Accepted: 7263DescriptionThe citizens of Bytetown, AB, could not stand that the c原创 2012-04-25 18:30:19 · 768 阅读 · 0 评论 -
poj 3225 Help with Intervals(线段树 区间的并 交 减 替换 等)
Help with IntervalsTime Limit: 6000MS Memory Limit: 131072KTotal Submissions: 5802 Accepted: 1285Case Time Limit: 2000MSDescriptionLogLoader, Inc. is a原创 2012-04-26 12:33:01 · 863 阅读 · 0 评论 -
poj 1436 Horizontally Visible Segments(线段树 区间的覆盖关系)
Horizontally Visible SegmentsTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 1942 Accepted: 736DescriptionThere is a number of disjoint vertical line原创 2012-04-26 17:14:06 · 982 阅读 · 0 评论 -
uestc 1425 Another LCIS(线段树 最长递增序列)
Another LCISTime Limit: 1000 ms Memory Limit: 65536 kB Solved: 100 Tried: 1593DescriptionFor a sequence S1,S2,...,SN, and a pair of integers (i, j), if 1 i i+1 i+2 j-1 j, then th原创 2012-04-28 14:22:01 · 1197 阅读 · 4 评论 -
poj 2991 Crane(向量旋转+线段树成段更新)
CraneTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 1609 Accepted: 416 Special JudgeDescriptionACM has bought a new crane (crane -- jeřáb) . The原创 2012-04-27 15:15:47 · 933 阅读 · 0 评论 -
uestc 1546 Bracket Sequence(线段树 括号匹配)
Bracket SequenceTime Limit: 3000 ms Memory Limit: 65536 kB Solved: 28 Tried: 380DescriptionThere is a sequence of brackets, which supports two kinds of operations.1. we can cho原创 2012-04-29 20:35:14 · 1235 阅读 · 0 评论 -
hdu 3308 LCIS(线段树 最长连续递增)
LCISTime Limit: 6000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1478 Accepted Submission(s): 665Problem DescriptionGiven n integers.You原创 2012-04-30 18:15:31 · 927 阅读 · 3 评论 -
hdu 3397 Sequence operation(线段树的各种操作)
Sequence operationTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2790 Accepted Submission(s): 806Problem Descriptionlxhgww原创 2012-04-30 19:23:14 · 1066 阅读 · 3 评论