线段树 && RMQ
SDUTyangkun
这个作者很懒,什么都没留下…
展开
-
poj 3368 Frequent values(RMQ)
Frequent values Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 17812 Accepted: 6417 Description You are given a sequence of n integers a1 , a2 , ... , an原创 2016-11-30 15:38:49 · 227 阅读 · 0 评论 -
Just a Hook(线段树 区间更新)
Just a Hook Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 29771 Accepted Submission(s): 14696 Problem Description In the game原创 2017-02-04 00:16:03 · 256 阅读 · 0 评论 -
Billboard(线段树 单点更新)
Billboard Time Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 20627 Accepted Submission(s): 8546 Problem Description At the entranc原创 2017-02-03 15:23:27 · 573 阅读 · 0 评论 -
Minimum Inversion Number (单点更新 线段树 )
Minimum Inversion Number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 19112 Accepted Submission(s): 11525 Problem Description原创 2017-02-03 11:44:16 · 1316 阅读 · 0 评论 -
I Hate It(单点更新区间求最值)
I Hate It Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 69004 Accepted Submission(s): 26773 Problem Description 很多学校流行一种比较的习惯。原创 2017-01-27 12:37:30 · 236 阅读 · 0 评论 -
敌兵布阵(单点更新)
敌兵布阵 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 82179 Accepted Submission(s): 34690 Problem Description C国的死对头A国这段时间正在进行军事演原创 2017-01-27 11:02:37 · 411 阅读 · 0 评论 -
poj 2892 hdu 1540Tunnel Warfare(poj 线段树 区间合并)
Tunnel Warfare Time Limit: 1000MS Memory Limit: 131072K Total Submissions: 8021 Accepted: 3325 Description During the War of Resistance Against Japan, tunnel warfare原创 2017-02-07 20:47:37 · 340 阅读 · 0 评论 -
poj 2352 Stars(线段树 )
Stars Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 45051 Accepted: 19558 Description Astronomers often examine star maps where stars are represented by原创 2017-02-07 11:01:25 · 325 阅读 · 0 评论 -
poj 1750Potted Flower(线段树 区间合并 动态规划 区间求最大连续和)
Potted Flower Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 4786 Accepted: 1827 Description The little cat takes over the management of a new park. There原创 2017-02-07 08:46:15 · 719 阅读 · 0 评论 -
Mayor's posters(线段树 成段更新)
Mayor's posters Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 61557 Accepted: 17790 Description The citizens of Bytetown, AB, could not stand that the ca原创 2017-02-05 19:33:33 · 393 阅读 · 0 评论 -
A Simple Problem with Integers(线段树 成段更新)
A Simple Problem with Integers Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 102892 Accepted: 32121 Case Time Limit: 2000MS Description You have N原创 2017-02-04 21:34:44 · 692 阅读 · 0 评论 -
树状数组模板+poj1195(二维树状数组)
在数组长度为n的树状数组中: 寻找下一个需要添加的数的下标: int lowbit(int x) { return x&(-x); } 一维树状数组更新是这样的: void add(int x,int val) { for(;x<=n;x+=lowbit(x)) { num[x]+=val; }原创 2016-12-07 21:10:04 · 382 阅读 · 0 评论 -
poj 3321Apple Tree(树状数组+dfs映射)
Apple Tree Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 27505 Accepted: 8152 Description There is an apple tree outside of kaka's house. Every autumn, a原创 2016-12-07 21:03:49 · 671 阅读 · 0 评论 -
A Simple Problem with Integers(线段树 做的我想哭)
A Simple Problem with Integers Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 101173 Accepted: 31557 Case Time Limit: 2000MS Description You have N原创 2016-12-12 20:13:54 · 313 阅读 · 0 评论 -
poj 2828POJ2828 Buy Tickets【线段树,逆序遍历】
Buy Tickets Time Limit: 4000MS Memory Limit: 65536K Total Submissions: 19036 Accepted: 9454 Description Railway tickets were difficult to buy around the Lunar New Y原创 2016-12-02 19:48:01 · 558 阅读 · 0 评论 -
RMQ(算法)
1. 概述 RMQ(Range Minimum/Maximum Query),即区间最值查询,是指这样一个问题:对于长度为n的数列A,回答若干询问RMQ(A,i,j)(i,j算法。当然,该问题也可以用线段树(也叫区间树)解决,算法复杂度为:O(N)~O(logN),这里我们暂不介绍。 2.RMQ算法 对于该问题,最容易想到的解决方案是遍历,复杂度是O(n)。但当数据量转载 2016-11-28 20:46:50 · 253 阅读 · 0 评论 -
L2-014. 列车调度(线段树 || set维护最小值)
L2-014. 列车调度 时间限制 300 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 陈越 火车站的列车调度铁轨的结构如下图所示。 Figure 两端分别是一条入口(Entrance)轨道和一条出口(Exit原创 2017-03-14 19:06:51 · 627 阅读 · 0 评论