摘要: 最敏捷的机器人 Description Wind设计了很多机器人。但是它们都认为自己是最强的,于是,一场比赛开始了……机器人们都想知道谁是最敏捷的,于是它们进行了如下一个比赛。首先,他们面前会有一排共n个数,它们比赛看谁能最先把每连续k个数中最大和最小值写下来,当然,这些机器人运算速度都很快,它们比 阅读全文
posted @ 2017-12-16 21:04 LHR-LHR 阅读(382) 评论(0) 推荐(0) 编辑
摘要: 线段树之Sum Description 给定一数列,规定有两种操作,一是修改某个元素,二是求区间的连续和。 Input 输入数据第一行包含两个正整数n,m(n<=100000,m<=500000),以下是m行, 每行有三个正整数k,a,b(k=0或1, a,b<=n).k=0时表示将a处数字加上b, 阅读全文
posted @ 2017-12-16 21:01 LHR-LHR 阅读(173) 评论(0) 推荐(0) 编辑
摘要: Pku2110 Mountain Walking Description Farmer John and Bessie the cow have embarked on one of those 'active' vacations. They spend entire days walking i 阅读全文
posted @ 2017-12-16 20:58 LHR-LHR 阅读(192) 评论(0) 推荐(0) 编辑
摘要: Description N (2 <= N <= 8,000) cows have unique brands in the range 1..N. In a spectacular display of poor judgment, they visited the neighborhood 'w 阅读全文
posted @ 2017-12-16 11:36 LHR-LHR 阅读(239) 评论(0) 推荐(0) 编辑