
线段树&线状数组
Dust_Heart
这个作者很懒,什么都没留下…
展开
-
HDOJ 1556 Color the ball(线段树 + 线状数组)
Color the ballTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 19051 Accepted Submission(s): 9517Problem DescriptionN个气球排成一排,从左到原创 2017-04-03 21:09:41 · 349 阅读 · 0 评论 -
HDU 5692 Snacks 【DFS序+线段树】
SnacksTime Limit: 10000/5000 MS (Java/Others) Memory Limit:65536/65536 K (Java/Others)Total Submission(s): 3282 Accepted Submission(s): 762Problem Description百度科技园内有n个零食机,零食机之间通过n−1条路相互连通。每个零食机都...原创 2017-08-12 10:52:36 · 483 阅读 · 0 评论 -
2017 ACM-ICPC乌鲁木齐网络赛 G. Query on a string 【KMP+树状数组】
2017 ACM-ICPC乌鲁木齐网络赛 G. Query on a string 【KMP+树状数组】You have two strings S and T in all capitals.Now anefficient program is requiredto maintain a operationand support a query.Theoperation C i ch withgiven integer iandcapital letter ch, changes the i-th原创 2017-09-14 20:07:51 · 557 阅读 · 0 评论 -
Codeforces 900C - Remove Extra One 【树状数组】
Codeforces 900C - Remove Extra One 【树状数组】You are given apermutation p of length n. Remove one element from permutation to make the number of records themaximum possible.We remind thatin a sequence of numbers a1, a2, ..., ak the element ai is a record if原创 2017-12-12 16:53:01 · 628 阅读 · 0 评论 -
Codeforces 920F - SUM and REPLACE【线段树】
Codeforces 920F - SUM and REPLACE【线段树】Let D(x) be the numberof positive divisors of a positive integer x. For example, D(2) = 2 (2 is divisible by1 and 2), D(6) = 4 (6 is divisible by1, 2, 3 and 6).You are given an array a of n integers. Youhave to proce原创 2018-02-05 13:35:12 · 354 阅读 · 0 评论 -
Codeforces 914D - Bash and a Tough Math Puzzle 【线段树】
Codeforces 914D - Bash and a Tough Math Puzzle 【线段树】Bash likesplaying with arrays. He has an array a1, a2, ... an of n integers. Helikes to guess the greatest common divisor (gcd) of different segments of thearray. Of course, sometimes the guess is not co原创 2018-03-16 17:17:46 · 505 阅读 · 0 评论 -
哈尔滨理工大学第八届程序设计竞赛 B GT's Dream 【树状数组】
GT's DreamTime Limit: 2000/1000 MS(Java/Others) Memory Limit: 256000/256000K (Java/Others)Problem Description在现实中认了无数师傅却毫无长进的GT在梦中成为了某武侠世界的神。在这个世界中初始有n个人,他们各成一派。作为世界神GT总共会进行m次操作,每次操作有如下两种情况1 x y表示x...原创 2018-03-25 13:08:01 · 513 阅读 · 0 评论 -
Codeforces 961E - Tufurama 【树状数组】
Codeforces 961E - Tufurama 【树状数组】Educational Codeforces Round 41 (Rated for Div. 2)One day Polycarp decided to rewatch his absolute favourite episode of well-known TV series "Tufurama". He was pretty surprised when he got results only for season 7 episod原创 2018-04-06 10:48:48 · 1487 阅读 · 0 评论 -
Codeforces 620E - New Year Tree 【DFS序+线段树】
Codeforces 620E - New Year Tree 【DFS序+线段树】 Educational Codeforces Round 6The New Year holidays are over, but Resha doesn't want to throw away the New Year tree. He invited his best friendsKerim and Gural to help him to redecorate the New Year tree.The N原创 2018-04-14 10:27:44 · 264 阅读 · 0 评论 -
Codeforces 833B - The Bakery 【DP+线段树】
Codeforces 833B - The Bakery 【DP+线段树】 Some time ago Slastyona the Sweetmaid decided to open her own bakery! She bought required ingredients and a wonder-oven which can bake several types of cakes, and opened the bakery.Soon the expenses started to overco原创 2017-07-31 15:31:38 · 1754 阅读 · 0 评论 -
Codeforces 459D Pashmak and Parmida's problem【树状数组】
Codeforces 459D Pashmak and Parmida's problem【树状数组】 Parmida is a clever girl and she wants to participate inOlympiads this year. Of course she wants her partner to be clever too (although he's not)! Parmida has prepared the following test problem for Pash原创 2017-07-13 19:55:43 · 691 阅读 · 0 评论 -
HDOJ 4893 Wow! Such Sequence! (线段树)
Wow! Such Sequence!Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 4627 Accepted Submission(s): 1324Problem DescriptionRecentl原创 2017-04-03 22:55:33 · 386 阅读 · 0 评论 -
HDOJ 3308 LCIS (线段树之区间合并)
LCISTime Limit: 6000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7349 Accepted Submission(s): 3110Problem DescriptionGiven n integers.You原创 2017-04-03 23:34:12 · 281 阅读 · 0 评论 -
HDOJ 5475 An easy problem(线段树)
An easy problemTime Limit: 8000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1910 Accepted Submission(s): 822Problem DescriptionOne day, a us原创 2017-04-04 00:30:47 · 255 阅读 · 0 评论 -
HDOJ 2795 Billboard (线段树 + 单点更新,求区间最大值)
BillboardTime Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 21320 Accepted Submission(s): 8789Problem DescriptionAt the entrance原创 2017-04-04 19:45:36 · 354 阅读 · 0 评论 -
HDOJ 1540 Tunnel Warfare (线段树之区间合并)
Tunnel WarfareTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8341 Accepted Submission(s): 3219Problem DescriptionDuring the Wa原创 2017-04-04 21:42:40 · 297 阅读 · 0 评论 -
CF Round #413( Div.1/2) Fountains(线状数组查找)
C. Fountainstime limit per test2 secondsmemory limit per test256 megabytesArkady plays Gardenscapes a lot. Arkady wants to build two newfountains. There are n available fountains, fo原创 2017-05-19 22:08:57 · 331 阅读 · 0 评论 -
HDOJ 1394 Minimum Inversion Number(逆序数 + 线段树)
Minimum Inversion NumberTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 19645 Accepted Submission(s): 11803Problem DescriptionT原创 2017-04-03 23:16:49 · 408 阅读 · 0 评论 -
POJ3468(线段树之区间更新)
POJ3468(线段树之区间更新)A Simple Problem with IntegersYou have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other is to ask for the sum of原创 2017-02-16 16:49:10 · 637 阅读 · 0 评论 -
HDOJ 5592 ZYB's Premutation(逆序对变题:树状数组+二分||线段树)
HDOJ 5592 ZYB's Premutation(逆序对变题:树状数组||线段树)ZYB has a premutation P,buthe only remeber the reverse log of each prefix of the premutation,now he askyou to restore the premutation.Pair (i,j)(i<j)is considered as a reverse log if Ai>Ajis matched.原创 2017-06-29 21:56:29 · 340 阅读 · 0 评论 -
2018 Multi-University Training Contest 2 &&HDU6315 Naive Operations【线段树】
Naive Operations Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 502768/502768 K (Java/Others)Problem Description...原创 2018-07-26 02:15:24 · 385 阅读 · 0 评论