{ID: anniel11PROG: milk2LANG: PASCAL}Program milk2;Var ans1,ans2,i,j,n,sum,head,tail:longint; a:array[1..5000,1..2] of longint; map:array[1.....
分类:
其他好文 时间:
2014-09-11 15:10:02
阅读次数:
179
Language:Lost CowsTime Limit:1000MSMemory Limit:65536KTotal Submissions:9207Accepted:5922DescriptionN (2 #include#include#include#define L(x) (x>1)usi...
分类:
其他好文 时间:
2014-09-05 21:01:21
阅读次数:
295
POJ 2186 Popular Cows
链接:http://poj.org/problem?id=2186
题意:每头奶牛都梦想着成为牧群中最受奶牛仰慕的奶牛。在牧群中,有N 头奶牛,1≤N≤10,000,给定M 对(1≤M≤50,000)有序对(A, B),表示A 仰慕B。由于仰慕关系具有传递性,也就是说,如果A 仰慕B,B 仰慕C,则A 也仰慕C,即使在给定的M 对关系中并没...
分类:
其他好文 时间:
2014-09-05 18:18:21
阅读次数:
224
强连通缩点,统计入度为1的缩点后的点的个数个数1的话输出这个强连通分量的点的数量否则输出0;code/* Kosaraju算法,无向图的强连通分量,时间复杂度O(n+m) 思路: 按照图G的深度遍历序列,在G的反图上进行深搜 能够搜到的点集就是一个强联...
分类:
其他好文 时间:
2014-09-04 20:46:40
阅读次数:
241
DescriptionFarmer John's cows have discovered that the clover growing along the ridge of the hill (which we can think of as a one-dimensional number l...
分类:
其他好文 时间:
2014-09-04 16:16:59
阅读次数:
244
題目:有m+n個們,每個門後面有牛或者車;有n只牛,m輛車,你選擇其中1個;
然後打開其中的k你沒有選中的門後是牛的,問你改變選時得到車的概率。
說明:數學題,概率。全概率公式即可:
說明:第1001了O(∩_∩)O~
#include
int main()
{
int cow,car,show;
while (~scanf("...
分类:
其他好文 时间:
2014-09-04 13:23:39
阅读次数:
184
Cheapest Palindrome
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 5868
Accepted: 2853
Description
Keeping track of all the cows can be a tricky task so...
分类:
其他好文 时间:
2014-09-03 15:01:56
阅读次数:
289
Milking Grid
Time Limit: 3000MS
Memory Limit: 65536K
Total Submissions: 6317
Accepted: 2648
Description
Every morning when they are milked, the Farmer John's cows for...
分类:
其他好文 时间:
2014-09-01 19:37:13
阅读次数:
198
1677: [Usaco2005 Jan]Sumsets 求和Time Limit:5 SecMemory Limit:64 MBSubmit:570Solved:310[Submit][Status]DescriptionFarmer John commanded his cows to sear...
分类:
其他好文 时间:
2014-08-28 14:35:21
阅读次数:
126
题目链接:http://poj.org/problem?id=2456题目翻译: 农夫约翰搭建了一间有N间牛舍得小屋,牛舍排在一条直线上,第i号牛舌在Xi的位置。但是他的M头牛对小屋很不满意,因此经常互相攻击。约翰为了防止牛之间互相伤害,因此决定把每头牛都放在离其他牛尽可能远的牛舍。也就是要最大化....
分类:
其他好文 时间:
2014-08-27 20:30:18
阅读次数:
181