P3111 [USACO14DEC]牛慢跑Cow Jog_Sliver P3111 [USACO14DEC]牛慢跑Cow Jog_Sliver P3111 [USACO14DEC]牛慢跑Cow Jog_Sliver 题目描述 The cows are out exercising their hoo ...
分类:
其他好文 时间:
2017-11-06 11:21:13
阅读次数:
198
传送门 题目大意: n头牛,其中最高身高为h,给出r对关系(x,y) 表示x能看到y,当且仅当y>=x并且x和y中间的牛都比 他们矮的时候,求每头牛的最高身高. 题解:贪心+差分 将每头牛一开始都设为最高高度。 每一对关系(x,y),我们将[x+1,y-1]这个区间的身高变为 min(x,y)-1. ...
分类:
其他好文 时间:
2017-11-05 20:12:55
阅读次数:
190
传送门 题目大意:n头牛在单行道n个位置,开始用不同的速度跑步。 当后面的牛追上前面的牛,后面的牛会和前面的牛以一样的速度 跑,称为一个小团体。问:ts后有多少个小团体。 题解:模拟 倒着扫一遍,因为某头牛后面的牛对这头牛的速度没影响。 计算出ts后牛的终点,如果能撞上前面最慢的牛,那么小团体数+1 ...
分类:
其他好文 时间:
2017-11-05 20:01:34
阅读次数:
179
FJ is surveying his herd to find the most average cow. He wants to know how much milk this 'median' cow gives: half of the cows give as much or more t ...
分类:
其他好文 时间:
2017-11-02 20:00:56
阅读次数:
146
//神题目(题目一开始就理解错了)。。。 题目描述 Why did the cow cross the road? Well, one reason is that Farmer John's farm simply has a lot of roads, making it impossible ...
分类:
其他好文 时间:
2017-10-30 14:19:58
阅读次数:
251
日常刷水题。。。 题目链接: http://www.lydsy.com/JudgeOnline/problem.php?id=3389 Solution 每一只奶牛的空余时间都有一个 start 和 end 。。 刚开始时间 t = 0 ,每一次取 start 小于或等于 t + 1 的牛当中end ...
分类:
其他好文 时间:
2017-10-28 21:58:37
阅读次数:
141
单调队列优化dp; 对于每个点开个单调队列,按转移到它的点到它的距离从大到小,得分也从大到小排列。 每次枚举当前点前面的所有点,对于每个点的队列中二分一个距离小于等于它到当前点的答案值,放到当前点的队列中。 ...
分类:
其他好文 时间:
2017-10-27 21:32:25
阅读次数:
130
n<=250个大写字母和m<=250个小写字母,给p<=200个合法相邻字母,求用这些合法相邻字母的规则和n+m个字母能合成多少合法串,答案mod 97654321. 什么鬼膜数。。 f(i,j,k)--i个大写字母,j个小写字母,最后一个字母是k,,其中k是小写字母,p是能接在k前面的任意字母,k ...
分类:
其他好文 时间:
2017-10-26 20:03:25
阅读次数:
145
Farmer John knows that an intellectually satisfied cow is a happy cow who will give more milk. He has arranged a brainy activity for cows in which the ...
分类:
其他好文 时间:
2017-10-26 19:03:09
阅读次数:
200
ng the other ends of her ropes (if she has any), along with the cows holding the other ends of any ropes they hold, etc. When Bessie dances clockwise ...
分类:
其他好文 时间:
2017-10-24 14:52:42
阅读次数:
207