
线段树
文章平均质量分 81
974792789
不要在能吃苦的年纪追求安逸。
展开
-
I Hate It hdu 线段树模板题
I Hate ItTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 36235 Accepted Submission(s): 14257Problem Description很多学校流行一种比较的习惯。原创 2014-07-20 02:03:34 · 462 阅读 · 0 评论 -
Who Gets the Most Candies?+POJ+线段树+反素数
线段树的简单应用,反素数的求解。原创 2014-08-18 10:41:29 · 644 阅读 · 0 评论 -
Buy Tickets+POJ+线段树单点更新的灵活运用
插队问题,要灵活运用线段树。原创 2014-08-07 11:17:26 · 639 阅读 · 0 评论 -
Help with Intervals+POJ+线段树成段更新+lazy标记的应用
Help with IntervalsTime Limit: 6000MS Memory Limit: 131072KTotal Submissions: 10100 Accepted: 2425Case Time Limit: 2000MSDescriptionLogLoader, Inc. is a c原创 2014-08-07 18:28:00 · 503 阅读 · 0 评论 -
LCIS+hdu+线段树简单的区间合并
LCISTime Limit: 6000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4069 Accepted Submission(s): 1836Problem DescriptionGiven n integers.Yo原创 2014-08-08 13:38:07 · 452 阅读 · 0 评论 -
Hotel+POJ+线段树区间合并
HotelTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 11788 Accepted: 5086DescriptionThe cows are journeying north to Thunder Bay in Canada to gain cultu原创 2014-08-07 22:48:21 · 486 阅读 · 0 评论 -
Impossible Boss+SPOJ+线段树区间更新、区间查询
Coder RatingsProblem code: RATINGSome of the more elite (and not-so-elite) coders around take part in a certain unnamed programming contest. In said contest, there are multiple types原创 2014-08-09 16:55:25 · 525 阅读 · 0 评论 -
A Corrupt Mayor's Performance Art+线段树区间更新查询
A Corrupt Mayor's Performance ArtTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 100000/100000 K (Java/Others)Total Submission(s): 185 Accepted Submission(s): 94Problem Descript原创 2014-09-20 20:28:55 · 493 阅读 · 0 评论 -
Billboard+hud+线段树单点更新
BillboardTime Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10965 Accepted Submission(s): 4865Problem DescriptionAt the entranc原创 2014-08-17 22:14:10 · 452 阅读 · 0 评论 -
Count Color+POJ+线段树区间更新+位运算(lazy标志的运用)
线段树成段更新,lazy标记的运用,位运算的运用。原创 2014-08-18 21:10:19 · 619 阅读 · 0 评论 -
Count the Colors+ZOJ+线段树成段更新
Count the ColorsTime Limit: 2000MS Memory Limit: 65536KB 64bit IO Format: %lld & %lluDescriptionPainting some colored segments on a line, some previously painted se原创 2014-09-15 07:33:33 · 472 阅读 · 0 评论 -
Intervals+线段树+贪心+poj
Intervals 线段树+贪心这题可用差分约束法,也可用线段树+贪心的方法。第二种是这样子处理的,先将每个区间按有段坐标从小到大排序,然后每从左到右选取区间进行选点,选点要从该区间右端开始选。每次先看区间已选的点有多少,然后从右端开始把不够的补上。这个过程可用线段树维护,把效率提高了。通过这道题,我对线段树的使用有了进一步的理解。原创 2014-07-30 21:20:40 · 698 阅读 · 0 评论 -
Multiples of 3 线段树+spoj
Multiples of 3Problem code: MULTQ3There are N numbers a[0],a[1]..a[N - 1]. Initally all are 0. You have to perform two types of operations :1) Increase the numbers between in原创 2014-08-04 08:48:47 · 796 阅读 · 0 评论 -
uvalive 3938 - "Ray, Pass me the dishes!" +动态最大连续和+线段树
"Ray, Pass me the dishes!"After doing Ray a great favor to collect sticks for Ray, Poor Neal becomes very hungry. In return for Neal's help, Ray makes a great dinner for Neal. When it is time for原创 2014-07-20 14:07:42 · 600 阅读 · 0 评论 -
Fast Matrix Operations uva+线段树区间修改
Fast Matrix OperationsThere is a matrix containing at most 106 elements divided into r rows and c columns. Each element has a location (x,y) where 1<=x<=r,1<=y<=c. Initially, all the elements are原创 2014-07-21 01:45:42 · 385 阅读 · 0 评论 -
RMQ with Shifts 线段树+点修改
RMQ with Shifts In the traditional RMQ (Range Minimum Query) problem, we have a static array A. Then for eachquery (L, R) (LR), we report the minimum value among A[L],A[L + 1], ...,原创 2014-07-21 15:59:49 · 482 阅读 · 0 评论 -
SKYLINE uva+线段树+区间的修改+lazy标记
SKYLINETime Limit:3000MS Memory Limit:Unknown 64bit IO Format:%lld & %llu[Submit] [Go Back] [Status] DescriptionThe skyline of Singapore as viewed from the M原创 2014-07-21 16:11:58 · 560 阅读 · 0 评论 -
Minimum Inversion Number 线段树+单点修改
Minimum Inversion NumberTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10117 Accepted Submission(s): 6203Problem Description原创 2014-07-22 12:07:56 · 430 阅读 · 0 评论 -
Mayor's posters +poj+线段树离散化
Mayor's postersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 40506 Accepted: 11781DescriptionThe citizens of Bytetown, AB, could not stand that the ca原创 2014-07-22 14:51:10 · 417 阅读 · 0 评论 -
hdu1166 敌兵布阵+线段树模板题+单点修改
敌兵布阵Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 41008 Accepted Submission(s): 17331Problem DescriptionC国的死对头A国这段时间正在进行军事演原创 2014-07-22 11:22:29 · 486 阅读 · 0 评论 -
Permutation +uva+线段树+点修改
Problem FPermutationInput: Standard InputOutput: Standard Output Given N and K find the N’th permutation of the integers from 1 to K when those permutations are lexicographically ordered. N原创 2014-07-22 01:23:30 · 409 阅读 · 0 评论 -
Just a Hook +线段树区间更新模板题
Just a HookTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 16351 Accepted Submission(s): 8140Problem DescriptionIn the game o原创 2014-07-22 14:54:37 · 498 阅读 · 0 评论 -
A Simple Problem with Integers +poj+线段树区间更新
A Simple Problem with IntegersTime Limit: 5000MS Memory Limit: 131072KTotal Submissions: 59510 Accepted: 18127Case Time Limit: 2000MSDescriptionYou have N i原创 2014-07-28 12:46:06 · 510 阅读 · 0 评论 -
Problem 1581 - Union of cubes+武大校赛+线段树维护
题目 http://acm.whu.edu.cn/land/problem/detail?problem_id=1581题意:在一个三维空间里,有N*(K*N)*(K*K*N)个点,每个点有一定的值,然后有M个长方体,每个长方体以固定位置((x1,y1,z1)(x2,y2,z2)为对角位置,其中(x1code:#include #include#includeusing namesp原创 2015-04-30 16:50:15 · 698 阅读 · 1 评论