线段树
文章平均质量分 78
安庆闪耀
这个作者很懒,什么都没留下…
展开
-
hdu 5678 ztr loves trees(求子树第k大 线段树套主席树)
ztr loves treesProblem DescriptionSuper Deity ztr likes trees from childhood,CCTV-children:"The apple on the apple tree.You and I under the apple tree.Play games in front of the apple tree.S原创 2016-05-01 14:30:54 · 11030 阅读 · 0 评论 -
hdu 4288 Coder(线段树)
CoderTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4993 Accepted Submission(s): 1920Problem Description In mathematics a原创 2016-06-10 19:25:08 · 747 阅读 · 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): 16802 Accepted Submission(s): 10219Problem Description原创 2016-06-10 19:16:38 · 752 阅读 · 0 评论 -
bzoj 1012: [JSOI2008]最大数maxnumber(线段树)
Description 现在请求你维护一个数列,要求提供以下两种操作:1、 查询操作。语法:Q L 功能:查询当前数列中末尾L个数中的最大的数,并输出这个数的值。限制:L不超过当前数列的长度。2、 插入操作。语法:A n 功能:将n加上t,其中t是最近一次查询操作的答案(如果还未执行过查询操作,则t=0),并将所得结果对一个固定的常数D取模,将所得答案插入到数列的末尾。限制:原创 2016-04-23 09:48:35 · 451 阅读 · 0 评论 -
poj 1389Area of Simple Polygons(矩形面积并)
Area of Simple PolygonsDescriptionThere are N, 1 <= N <= 1,000 rectangles in the 2-D xy-plane. The four sides of a rectangle are horizontal or vertical line segments. Rectangles are defined原创 2015-12-22 11:50:49 · 529 阅读 · 0 评论 -
hdu 1757 I Hate It(线段树求区间最值)
I Hate ItTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 55716 Accepted Submission(s): 21740Problem Description很多学校流行一种比较原创 2015-12-24 16:29:24 · 284 阅读 · 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): 24532 Accepted Submission(s): 12230Problem DescriptionIn the g原创 2015-12-24 16:37:03 · 517 阅读 · 0 评论 -
hdu 1166 敌兵布阵(线段树单点更新求和)
Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视原创 2016-03-30 14:14:50 · 488 阅读 · 0 评论 -
hdu 1754 I Hate It(线段树单点更新求区间最大值)
Problem Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input本题目包含多组测试,请处理到文件结束。在每个测试的第一行,有两个正整数 N原创 2016-03-30 14:17:40 · 415 阅读 · 0 评论 -
hdu 1698 Just a Hook(线段树成段更新lazy)
Problem DescriptionIn the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic sticks which are of the sa原创 2016-03-30 14:20:54 · 251 阅读 · 0 评论 -
poj 3468 A Simple Problem with Integers(线段树成段更新lazy)
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 is原创 2016-03-30 14:22:44 · 244 阅读 · 0 评论 -
hdu 3795 Billboard(线段树)
Problem DescriptionAt the entrance to the university, there is a huge rectangular billboard of size h*w (h is its height and w is its width). The board is the place where all possible announcement原创 2016-04-10 20:26:19 · 480 阅读 · 0 评论 -
hdu 1542 Atlantis(矩形面积并)
Problem DescriptionThere are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include maps of parts of the island. But unfortunately, t原创 2016-04-10 20:31:42 · 448 阅读 · 0 评论 -
hdu 1556 Color the ball(线段树lazy)
Problem DescriptionN个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a Input每个测试实例第一行为一个整数N,(N 当N = 0,输入结束。 Output每个测试实例输出一行,包括N个整数,第I个数代表第I个气球总共被涂色的次数。 Sample Inpu原创 2016-04-10 20:34:21 · 410 阅读 · 0 评论 -
hdu 5381 The sum of gcd(线段树)
The sum of gcdTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1056 Accepted Submission(s): 465Problem DescriptionYou have an原创 2016-05-28 14:33:09 · 470 阅读 · 0 评论 -
hdu 5790 Prefix(字典树+主席树)
Problem DescriptionAlice gets N strings. Now she has Q questions to ask you. For each question, she wanna know how many different prefix strings between Lth and Rth strings. It's so easy right? So原创 2016-08-03 16:52:13 · 1000 阅读 · 1 评论