
线段树
文章平均质量分 87
UMR小豪
这个作者很懒,什么都没留下…
展开
-
POJ2777(线段树)Count Color
Count ColorTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 43131 Accepted: 13068DescriptionChosen Problem Solving and Program design as an optional co原创 2016-08-18 18:44:22 · 323 阅读 · 0 评论 -
Range Minimum Queries
You are given an array of N integers. You should support the following queries on this array.0 L R : Find the minimum integer in the range AL, AL+1, ..., AR.1 L R X : You should apply the assignme原创 2017-06-23 15:06:54 · 414 阅读 · 0 评论 -
HDU-4027 Can you answer these queries?
A lot of battleships of evil are arranged in a line before the battle. Our commander decides to use our secret weapon to eliminate the battleships. Each of the battleships can be marked a value of end原创 2017-06-18 13:43:13 · 315 阅读 · 0 评论 -
poj2828 Buy Tickets
Buy TicketsTime Limit: 4000MS Memory Limit: 65536KTotal Submissions: 19422 Accepted: 9616DescriptionRailway tickets were difficult to buy around the Lunar New Y原创 2017-02-07 16:41:22 · 319 阅读 · 0 评论 -
L3-002. 堆栈
大家都知道“堆栈”是一种“先进后出”的线性结构,基本操作有“入栈”(将新元素插入栈顶)和“出栈”(将栈顶元素的值返回并从堆栈中将其删除)。现请你实现一种特殊的堆栈,它多了一种操作叫“查中值”,即返回堆栈中所有元素的中值。对于N个元素,若N是偶数,则中值定义为第N/2个最小元;若N是奇数,则中值定义为第(N+1)/2个最小元。输入格式:输入第一行给出正整数N(5)。随后N行,每行给出原创 2017-03-15 20:55:40 · 372 阅读 · 0 评论 -
poj2750 Potted Flower(区间连续子序列的和)
Potted FlowerTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 4793 Accepted: 1830DescriptionThe little cat takes over the management of a new park. The原创 2017-02-10 11:21:39 · 358 阅读 · 0 评论 -
poj2482 Stars in Your Window
Stars in Your WindowTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 12087 Accepted: 3303DescriptionFleeting time does not blur my memory of you. Can i原创 2017-02-16 19:52:20 · 298 阅读 · 0 评论 -
poj 2886 Who Gets the Most Candies?
Who Gets the Most Candies?Time Limit: 5000MS Memory Limit: 131072KTotal Submissions: 14121 Accepted: 4461Case Time Limit: 2000MSDescriptionN children are原创 2017-02-08 08:49:11 · 332 阅读 · 0 评论 -
poj2528 Mayor's posters
Mayor's postersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 61616 Accepted: 17812DescriptionThe citizens of Bytetown, AB, could not stand that the原创 2017-02-07 10:31:44 · 211 阅读 · 0 评论 -
poj 3468(线段树) A Simple Problem with Integers
A - A Simple Problem with IntegersTime Limit:5000MS Memory Limit:131072KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionYou have N integers, A1, A2, ... , AN. You ne原创 2016-08-17 15:41:20 · 283 阅读 · 0 评论 -
poj3264(线段树) Balanced Lineup
C - Balanced LineupTime Limit:5000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionFor the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000)原创 2016-08-17 19:53:21 · 281 阅读 · 0 评论 -
CodeForces - 343D Water Tree
Mad scientist Mike has constructed a rooted tree, which consists of n vertices. Each vertex is a reservoir which can be either empty or filled with water.The vertices of the tree are numbered from 1 to原创 2017-08-11 19:20:23 · 334 阅读 · 0 评论