线段树&树状数组
疯狂的橡树
code can change world
展开
-
hdu 3255 Farming(线段树求体积并)
FarmingTime Limit: 12000/6000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1445 Accepted Submission(s): 428Problem DescriptionYou have a big farm, a原创 2015-08-15 20:12:57 · 843 阅读 · 0 评论 -
hdu 4893 (多校1007)Wow! Such Sequence!(线段树&二分&思维)
Wow! Such Sequence!Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 352 Accepted Submission(s): 104Problem DescriptionRecently, D原创 2014-07-29 19:44:55 · 1262 阅读 · 0 评论 -
Codeforces 19 D. Points(线段树&set好题)
D. Pointstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPete and Bob invented a new interesting game. Bob原创 2014-08-02 11:54:16 · 1357 阅读 · 0 评论 -
Codeforces 12D. Ball(线段树&多维排序)
D. Balltime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputN ladies attend the ball in the King's palace. Ever原创 2014-08-02 11:34:02 · 1157 阅读 · 0 评论 -
hdu 1255 覆盖的面积(线段树&扫描线&重复面积)
覆盖的面积Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3375 Accepted Submission(s): 1645Problem Description给定平面上若干矩形,求出被这些矩形覆盖过至少两原创 2014-07-01 18:25:23 · 1107 阅读 · 0 评论 -
hdu 1828 Picture(线段树&扫描线&周长并)
Picture Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2578 Accepted Submission(s): 1363Problem DescriptionA number of rectangul原创 2014-07-01 18:40:17 · 1399 阅读 · 0 评论 -
hdu 1542 Atlantis(线段树&扫描线&面积并)
AtlantisTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6386 Accepted Submission(s): 2814Problem DescriptionThere are several anc原创 2014-07-01 18:08:08 · 1024 阅读 · 0 评论 -
hdu 4521 小明系列问题——小明序列(线段树+DP或扩展成经典的LIS)
小明系列问题——小明序列Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 1553 Accepted Submission(s): 457Problem Description 大家都知道小明最喜欢研究跟序列有原创 2014-04-22 14:52:39 · 1704 阅读 · 1 评论 -
hdu 2492 Ping pong(线段树+思维)
Ping pongTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3560 Accepted Submission(s): 1312Problem DescriptionN(3<=N<=20000) ping原创 2014-04-22 13:42:25 · 1078 阅读 · 0 评论 -
poj 1769 Minimizing maximizer(线段树&dp)
Minimizing maximizerTime Limit: 5000MS Memory Limit: 30000KTotal Submissions: 3118 Accepted: 1224DescriptionThe company Chris Ltd. is preparing a new sorting hard原创 2014-01-24 21:07:57 · 1299 阅读 · 0 评论 -
hdu 4037 Development Value(线段树维护数学公式)
Development ValueTime Limit: 5000/3000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 609 Accepted Submission(s): 118Problem DescriptionStarCraft 2 (S原创 2014-09-19 13:24:31 · 1523 阅读 · 2 评论 -
hdu 5029 Relief grain(树链剖分好题)
Relief grainTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 100000/100000 K (Java/Others)Total Submission(s): 295 Accepted Submission(s): 66Problem DescriptionThe soil is crack原创 2014-09-22 17:26:56 · 2516 阅读 · 1 评论 -
zoj 3772 Calculate the Function(线段树+矩阵乘法)
Calculate the FunctionTime Limit: 2 Seconds Memory Limit: 65536 KB You are given a list of numbers A1 A2 ..AN and M queries. For the i-th query: The query has two parameters L原创 2015-04-23 15:37:09 · 906 阅读 · 0 评论 -
hdu 4819 Mosaic(二维线段树)
MosaicTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 102400/102400 K (Java/Others)Total Submission(s): 647 Accepted Submission(s): 245Problem DescriptionThe God of sheep decid原创 2014-10-21 10:09:44 · 1532 阅读 · 0 评论 -
hdu 4268 Alice and Bob(multiset|线段树)
Alice and BobTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2901 Accepted Submission(s): 941Problem DescriptionAlice and Bob's原创 2014-10-29 13:39:09 · 1149 阅读 · 0 评论 -
UvaLive 6667 Longest Chain (分治求三元组LIS&树状数组)
题目链接:here题意:和hdu4742类似。区别就是一部分三元组是直接给出的。还有一部分是用他给的那个函数生成的。还有就是这里的大于是严格的大于a>b必须ax>bx,ay>by,az>bz。思路:思路也和hdu4742here类似。只是有几个比较棘手的问题。现在变成严格大于了。对于y还是很好办的。我们在排序y的时候可以使的标号大的排在前面这样就可以防止y和它一样的更新它了原创 2014-10-10 00:10:30 · 1663 阅读 · 0 评论 -
hdu 4742 Pinball Game 3D(三维LIS&cdq分治&BIT维护最值)
Pinball Game 3DTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 688 Accepted Submission(s): 276Problem DescriptionRD is a smart b原创 2014-10-08 23:05:51 · 2042 阅读 · 0 评论 -
hdu 4031 Attack(树状数组区间更新单点求值&暴力)
AttackTime Limit: 5000/3000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 1890 Accepted Submission(s): 554Problem DescriptionToday is the 10th Annual原创 2014-09-17 23:17:02 · 1249 阅读 · 0 评论 -
hdu 4417 Super Mario(离线树状数组|划分树)
Super MarioTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2584 Accepted Submission(s): 1252Problem DescriptionMario is world-fam原创 2014-09-26 20:22:57 · 1110 阅读 · 0 评论 -
hdu 4699 Editor(双向链表+随便维护前缀和)
EditorTime Limit: 3000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1532 Accepted Submission(s): 480Problem Description Sample Inpu原创 2014-09-13 00:15:21 · 2017 阅读 · 0 评论 -
hdu 4777 Rabbit Kingdom(离线树状数组&思维)
Rabbit KingdomTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 964 Accepted Submission(s): 315Problem Description Long long ago,原创 2014-09-12 23:58:11 · 1296 阅读 · 0 评论 -
uva 10635 - Prince and Princess(线段树)
Problem DPrince and PrincessInput: Standard InputOutput: Standard OutputTime Limit: 3 Seconds In an n x n chessboard, Prince and Princess plays a game. The squares in the chessboard are原创 2014-01-24 21:33:33 · 1196 阅读 · 0 评论 -
hdu 4578 Transformation(线段树维护区间次方和)
TransformationTime Limit: 15000/8000 MS (Java/Others) Memory Limit: 65535/65536 K (Java/Others)Total Submission(s): 1378 Accepted Submission(s): 303Problem DescriptionYuanfang is puz原创 2013-08-12 20:52:11 · 1514 阅读 · 0 评论 -
hdu 2871 Memory Control (线段树&vector)
Memory ControlTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3900 Accepted Submission(s): 936Problem DescriptionMemory units are原创 2013-09-13 20:00:03 · 1177 阅读 · 0 评论 -
hdu 2795 Billboard(有点思维的线段树水题)
BillboardTime Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7529 Accepted Submission(s): 3345Problem DescriptionAt the entrance to原创 2013-08-06 11:18:46 · 820 阅读 · 0 评论 -
poj 2777 Count Color 线段树成段更新区间统计
Count ColorTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 31008 Accepted: 9291DescriptionChosen Problem Solving and Program design as an optional cours原创 2013-08-05 08:21:21 · 942 阅读 · 0 评论 -
poj 3468 A Simple Problem with Integers经典区间更新区间查询
A Simple Problem with IntegersTime Limit: 5000MS Memory Limit: 131072KTotal Submissions: 46553 Accepted: 13655Case Time Limit: 2000MSDescriptionYou have N i原创 2013-08-05 16:35:01 · 766 阅读 · 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): 7503 Accepted Submission(s): 4610Problem DescriptionThe i原创 2013-08-04 19:15:52 · 892 阅读 · 0 评论 -
poj 2299 Ultra-QuickSort
Ultra-QuickSortTime Limit: 7000MS Memory Limit: 65536KTotal Submissions: 33807 Accepted: 12101DescriptionIn this problem, you have to analyze a particular sorting原创 2013-08-03 23:07:19 · 763 阅读 · 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): 2533 Accepted Submission(s): 822Problem Description原创 2013-07-25 14:12:04 · 978 阅读 · 0 评论 -
hdu 1556 Color the ball
Color the ballTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5328 Accepted Submission(s): 2839Problem DescriptionN个气球排成一排,从左到右依次编号为1,2原创 2013-06-03 17:14:54 · 763 阅读 · 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): 11857 Accepted Submission(s): 5890Problem DescriptionIn the game of DotA, Pu原创 2013-06-17 23:04:30 · 793 阅读 · 0 评论 -
hdu 1754 I Hate It
I Hate ItTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 24595 Accepted Submission(s): 9759Problem Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某原创 2013-06-08 17:30:25 · 802 阅读 · 0 评论 -
poj 2528 Mayor's posters(线段树+离散化+区间统计)
Mayor's postersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 34477 Accepted: 9985DescriptionThe citizens of Bytetown, AB, could not stand that the can原创 2013-08-06 08:52:59 · 989 阅读 · 0 评论 -
poj 3667 Hotel(线段树区间分配)
HotelTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 9550 Accepted: 4089DescriptionThe cows are journeying north to Thunder Bay in Canada to gain cultur原创 2013-08-06 22:30:21 · 1030 阅读 · 0 评论 -
hdu Moles(线段树&KMP)
MolesTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1936 Accepted Submission(s): 496Problem DescriptionA mole is a strange mamm原创 2013-11-06 22:52:34 · 1376 阅读 · 0 评论 -
hdu 3016 Man Down(简单线段树&简单DP)
Man DownTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1410 Accepted Submission(s): 492Problem DescriptionThe Game “Man Down 100原创 2013-10-21 21:21:56 · 1475 阅读 · 0 评论 -
3308 LCIS(线段树水题&最长连续递增序列)
LCISTime Limit: 6000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3261 Accepted Submission(s): 1438Problem DescriptionGiven n integers.You ha原创 2013-10-26 23:24:53 · 1165 阅读 · 0 评论 -
Open Ural FU Championship 2013 G. Nested Segments(线段树&离散化)
G. Nested SegmentsTime limit: 1.0 secondMemory limit: 64 MBYou are given n segments on a straight line. For each pair of segments it is known that they either have no common points or al原创 2013-10-20 14:02:44 · 1710 阅读 · 1 评论 -
hdu 3397 Sequence operation(很有意思的线段树题)
Sequence operationTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4952 Accepted Submission(s): 1452Problem Descriptionlxhgww got原创 2013-10-16 17:05:34 · 1181 阅读 · 0 评论