线段树/树状数组/RMQ
文章平均质量分 71
TLECODE
这个作者很懒,什么都没留下…
展开
-
【poj3264】Balanced Lineup 【USACO 2007 January Silver】
DescriptionFor the daily milking, Farmer John's N cows (1 ≤N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultimate Frisbee with some of the cows.原创 2017-07-28 23:26:48 · 450 阅读 · 0 评论 -
【bzoj 1452】 Count 【JSOI2009】
Description一个N*M的方格,初始时每个格子有一个整数权值,接下来每次有2个操作:改变一个格子的权值求一个子矩阵中某个特定权值出现的个数Input每一行有两个数字N,M接下来N行,每行M个数字。第i+1行第j个数字表示格子(i,j)的初值接下来输入一个Q,后面Q行每行描述一个操作操作1:1 x y c,表示将格子(x,y)的值变为c操作2:2 ...原创 2018-09-06 22:38:57 · 145 阅读 · 0 评论 -
【bzoj 4392】 Counting Haybales 【Usaco2015 dec】
DescriptionFarmer John is trying to hire contractors to help rearrange his farm, but so far all of them have quit when they saw the complicated sequence of instructions FJ wanted them to follow. Lef...原创 2018-08-18 18:17:39 · 213 阅读 · 0 评论 -
【bzoj 3212&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 is to...原创 2018-08-15 12:25:55 · 149 阅读 · 0 评论 -
【poj 2777】 Count Color(同luogu1558色板游戏)
DescriptionChosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we get a new problem. There is a very long board with length L cen...原创 2018-08-09 15:08:33 · 154 阅读 · 0 评论 -
【bzoj 1699】 Balanced Lineup排队 【Usaco2007 Jan】
Description每天,农夫 John 的N(1 <= N <= 50,000)头牛总是按同一序列排队. 有一天, John 决定让一些牛们玩一场飞盘比赛. 他准备找一群在对列中为置连续的牛来进行比赛. 但是为了避免水平悬殊,牛的身高不应该相差太大. John 准备了Q (1 <= Q <= 180,000) 个可能的牛的选择和所有牛的身高 (1 <= 身高 ...原创 2018-08-03 16:22:31 · 272 阅读 · 0 评论 -
【bzoj 4627】 回转寿司 【BeiJing2016】
Description酷爱日料的小Z经常光顾学校东门外的回转寿司店。在这里,一盘盘寿司通过传送带依次呈现在小Z眼前。不同的寿司带给小Z的味觉感受是不一样的,我们定义小Z对每盘寿司都有一个满意度,例如小Z酷爱三文鱼,他对一盘三文鱼寿司的满意度为10;小Z觉得金枪鱼没有什么味道,他对一盘金枪鱼寿司的满意度只有5;小Z最近看了电影“美人鱼”,被里面的八爪鱼恶心到了,所以他对一盘八爪鱼刺身...原创 2018-07-26 09:49:59 · 199 阅读 · 0 评论 -
【bzoj 1012】 最大数maxnumber 【JSOI2008】
Description 现在请求你维护一个数列,要求提供以下两种操作:1、 查询操作。语法:Q L 功能:查询当前数列中末尾L个数中的最大的数,并输出这个数的值。限制:L不超过当前数列的长度。2、 插入操作。语法:A n 功能:将n加上t,其中t是最近一次查询操作的答案(如果还未执行过查询操作,则t=0),并将所得结果对一个固定的常数D取模,将所得答案插入到数列的末尾。限制:原创 2018-02-01 21:03:10 · 221 阅读 · 0 评论 -
【hdu 4970】 Killing Monsters 【2014 Multi-University Training Contest 9 】
Problem DescriptionKingdom Rush is a popular TD game, in which you should build some towers to protect your kingdom from monsters. And now another wave of monsters is coming and you need again to原创 2017-11-21 22:08:06 · 239 阅读 · 0 评论 -
【poj 2352】 Stars 【Ural Collegiate Programming Contest 1999】
DescriptionAstronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars that are no原创 2017-11-17 23:04:05 · 247 阅读 · 0 评论 -
【poj 2481】 Cows
DescriptionFarmer John's cows have discovered that the clover growing along the ridge of the hill (which we can think of as a one-dimensional number line) in his field is particularly good. Farmer ...原创 2018-11-04 18:09:53 · 231 阅读 · 0 评论