线段树
yinyeqiqi
只因岁月蒙尘。
展开
-
敌兵布阵
敌兵布阵Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都原创 2014-12-30 20:21:45 · 528 阅读 · 0 评论 -
Just a Hook
In 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 same length. No原创 2015-04-01 20:54:30 · 373 阅读 · 0 评论 -
防守阵地 II
Description部队中总共有N个士兵,每个士兵有各自的能力指数Xi,在一次演练中,指挥部确定了M个需要防守的地点,指挥部将选择M个士兵依次进入指定地点进行防守任务,获得的参考指数即为M个士兵的能力之和。随着时间的推移,指挥部将下达Q个指令来替换M个进行防守的士兵们,每个参加完防守任务的士兵由于疲惫等原因能力指数将下降1。现在士兵们排成一排,请你计算出每次进行防守的士兵的参考指数。原创 2015-04-01 20:57:34 · 445 阅读 · 0 评论 -
Flipping Parentheses
题目来源:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=138130输入:6 3((()))431输出:221题意:输入n,q (2第二行再输入长度为n(下标从1开始)的字符串,只含‘(’和‘)’,且是匹配好的。再输入q个下标查询。问改变输入下标位置的字符,如‘原创 2015-05-22 08:02:13 · 865 阅读 · 0 评论 -
Count the Colors(两种)
DescriptionPainting some colored segments on a line, some previously painted segments may be covered by some the subsequent ones.Your task is counting the segments of different colors you can se转载 2015-05-22 08:57:40 · 551 阅读 · 0 评论 -
JuQueen
题目来源:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=134851 输入:10 10 5state 0groupchange 2 9 7state 9groupchange 0 2 10change 0 -5输出:0773-3题意: 输入:n,top,Q原创 2015-05-22 09:05:06 · 514 阅读 · 0 评论