
线段树
文章平均质量分 83
wenjie2012
这个作者很懒,什么都没留下…
展开
-
hdu 1166 敌兵布阵
敌兵布阵 Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些原创 2012-08-13 21:18:21 · 198 阅读 · 0 评论 -
hdu 1754 I Hate It
I Hate ItProblem Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input本题目包含多组测试,请处理到文件结束。在每个测试的第一行,有两个正整原创 2012-08-15 11:44:23 · 173 阅读 · 0 评论 -
hdu 1540 Tunnel Warfare
Tunnel WarfareTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2393 Accepted Submission(s): 883Problem DescriptionDuring the War o原创 2012-08-15 19:50:08 · 217 阅读 · 0 评论 -
poj 3468 A Simple Problem with Integers
DescriptionYou 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原创 2012-10-07 11:29:10 · 192 阅读 · 0 评论 -
POJ2528 Mayor's posters
DescriptionThe citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all places at their whim. The city council原创 2012-10-26 17:52:03 · 568 阅读 · 0 评论 -
hdu 1823 Luck and Love 二维线段树
第一次写二维线段树,题目算是简单,就是很多的陷阱;题意比较的简单,就不说了;二维线段树:就是在线段树里面嵌套一个线段树,可是由于结构的原因,一层线段树必须更新到底。如果各位大神有在一维不更新到底的方法,请提出来,我一定改正!代码:#include #include #include #include using namespace std;#define maxn 1原创 2013-04-11 09:31:55 · 438 阅读 · 0 评论