Face The Right Way
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 2721
Accepted: 1246
Description
Farmer John has arranged his N (1 ≤ N ≤ 5,000) cows in...
分类:
其他好文 时间:
2014-11-06 17:32:23
阅读次数:
212
Aggressive cows
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 6510
Accepted: 3263
Description
Farmer John has built a new long barn, with N (2
His ...
分类:
其他好文 时间:
2014-11-06 13:08:13
阅读次数:
150
题目地址:POJ 3683
第一次做需要输出可行解的题目。。。大体思路是先用强连通来判断是否有可行解,然后用逆序建图,用拓扑排序来进行染色,然后输出可行解。具体思路见传送门
因为判断的时候少写了一个等号。。检查了好长时间。。sad。。。
代码如下:
#include
#include
#include
#include
#include
#include
#include
#...
分类:
其他好文 时间:
2014-11-05 23:10:02
阅读次数:
218
描述
有一个神奇的口袋,总的容积是40,用这个口袋可以变出一些物品,这些物品的总体积必须是40。John现在有n个想要得到的物品,每个物品的体积分别是a1,a2……an。John可以从这些物品中选择一些,如果选出的物体的总体积是40,那么利用这个神奇的口袋,John就可以得到这些物品。现在的问题是,John有多少种不同的选择物品的方式。
输入
输入的第一行是正整数n (1 1,a2……an的...
分类:
其他好文 时间:
2014-11-05 19:49:19
阅读次数:
130
DescriptionFarmer John'sN(1 ≤N≤ 10,000) cows are lined up to be milked in the evening. Each cow has a unique "grumpiness" level in the range 1...100,0...
分类:
其他好文 时间:
2014-11-05 16:53:49
阅读次数:
204
DescriptionFarmer John and Betsy are playing a game with N (1 #includeusing namespace std;int fa[30001]={0},sum[30001]={0},len[30001]={0};int rool(int...
分类:
其他好文 时间:
2014-11-05 16:27:40
阅读次数:
208
DescriptionFarmer John's pastoral neighborhood has N farms (2 #include#include#include#includeusing namespace std;struct use{int st,en,ti,yu;}a[40001]...
分类:
Web程序 时间:
2014-11-05 16:23:53
阅读次数:
255
DescriptionFarmer John最近得到了一些新的农场,他想新修一些道路使得他的所有农场可以经过原有的或是新修的道路互达(也就是说,从任一个农场都可以经过一些首尾相连道路到达剩下的所有农场)。有些农场之间原本就有道路相连。 所有N(1 #include #include #include...
分类:
其他好文 时间:
2014-11-05 00:21:43
阅读次数:
255
Description清早6:00,Farmer John就离开了他的屋子,开始了他的例行工作:为贝茜挤奶。前一天晚上,整个农场刚经受过一场瓢泼大雨的洗礼,于是不难想见,FJ 现在面对的是一大片泥泞的土地。FJ的屋子在平面坐标(0, 0)的位置,贝茜所在的牛棚则位于坐标(X,Y) (-500 #in...
分类:
其他好文 时间:
2014-11-05 00:11:48
阅读次数:
196
题目1672: [Usaco2005 Dec]Cleaning Shifts 清理牛棚Time Limit:5 SecMemory Limit:64 MBDescriptionFarmer John's cows, pampered since birth, have reached new hei...
分类:
其他好文 时间:
2014-11-04 22:35:54
阅读次数:
332