题目描述 Bessie is planning the annual Great Cow Gathering for cows all across the country and, of course, she would like to choose the most convenient lo ...
分类:
其他好文 时间:
2017-11-11 21:32:56
阅读次数:
187
题目描述 N (1 <= N <= 50,000) cows conveniently numbered 1..N are driving in separate cars along a highway in Cowtopia. Cow i can drive in any of M differ ...
分类:
其他好文 时间:
2017-11-07 22:09:08
阅读次数:
175
P1709 [USACO5.5]隐藏口令Hidden Password P1709 [USACO5.5]隐藏口令Hidden Password P1709 [USACO5.5]隐藏口令Hidden Password 题目描述 有时候程序员有很奇怪的方法来隐藏他们的口令。Binny会选择一个字符串S( ...
分类:
其他好文 时间:
2017-11-07 16:18:02
阅读次数:
200
题目背景 给定长度为2N的序列,1~N各处现过2次,i第一次出现位置记为ai,第二次记为bi,求满足ai<aj<bi<bj的对数 题目描述 The layout of Farmer John's farm is quite peculiar, with a large circular road r ...
分类:
编程语言 时间:
2017-11-06 11:24:02
阅读次数:
246
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