当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

5367:digger

题目描述
AFa have n mountains. These mountains in a line。All of mountains have same height initially. Every day , AFa would request ZJiaQ to cut some mountains or put stones in some mountains. And request ZJiaQ report how many mountains belong to “high mountain line”
when all of mountains in a range have same height, and higher than the nearest mountain in left and the nearest mountain in right. the range of mountains called “high mountain line”
of course ,the mountain in the most left and most right can’t be one of “high mountain line”
输入解释
  There are multiply case
In each case, the first line contains 3 integers: n(1<=n<=10^9) , q ( 1 <= q <= 50000), r(0 <= r<= 1000 ).n is the number of mountains. q is the number of days. r is the initial height .
In the next q lines, each line contains 3 integers: l, r, val(1<=l<=r<=n, -1000 <= val <= 1000). Means in the day the mountains’ height in range[l,r] have added by val. but you should let the l,r,val xor ans to get true l,r,val. ans is the answer you printed.

输出解释
Print q lines, each line contains a single answer.
输入样例
5 5 0
4 5 87
2 5 -48
3 3 17
4 5 -171
5 5 -494
输出样例
0
0
0
1
1
来自杭电HDUOJ的附加信息
Recommend hujie

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-5367

最后修改于 2020-10-25T23:22:04+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
8000/4000MS(Java/Others) 131072/131072K(Java/Others)