Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 13500Accepted: 6968DescriptionBulls are so much better at math than the cows. They can multip...
分类:
其他好文 时间:
2015-05-28 12:26:17
阅读次数:
140
题目链接:http://poj.org/problem?id=2387题目大意:求点1到点n的最短距离1、Dijkstras算法#include #include #include using namespace std;#define maxn 1010#define INF 0x3f3f3fin...
分类:
其他好文 时间:
2015-05-27 18:41:08
阅读次数:
127
Round Numbers
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 10008
Accepted: 3628
Description
The cows, as you know, have no fingers or thumbs and thu...
分类:
其他好文 时间:
2015-05-27 14:05:42
阅读次数:
794
Distance Queries
Time Limit: 2000MS
Memory Limit: 30000K
Total Submissions: 10142
Accepted: 3575
Case Time Limit: 1000MS
Description
Farmer John's cows refused to ...
分类:
其他好文 时间:
2015-05-25 22:34:49
阅读次数:
160
Cows
Time Limit: 3000MS
Memory Limit: 65536K
Total Submissions: 13920
Accepted: 4607
Description
Farmer John's cows have discovered that the clover growing along the ri...
分类:
编程语言 时间:
2015-05-25 10:13:33
阅读次数:
148
链接 :http://poj.org/problem?id=2186
一个联通分量里的所有的牛满足任何一个被其他牛认为是红人。强联通缩点之后 只需要找到一个且只有一个联通分量且它的出度为0 答案就是这个强联通分量点的个数。
#include
#include
#include
#include
#include
#include
#include
#include ...
分类:
移动开发 时间:
2015-05-21 14:14:19
阅读次数:
155
Description
The cows are journeying north to Thunder Bay in Canada to gain cultural enrichment and enjoy a vacation on the sunny shores of Lake Superior. Bessie, ever the competent travel agent, ha...
分类:
其他好文 时间:
2015-05-20 14:51:48
阅读次数:
114
题目大意:有N个牛舍在同一条直线上,每个牛舍都有相应的坐标
现在有C头牛,要求放在这牛舍中,使得相邻两头牛之间的距离的最小值达到最大解题思路:直接二分距离,然后再进行判断
这题得反省一下了:因为我把cur重复定义了,所以一直找不到错误,标记一下。。。#include
#include
#include
using namespace std...
分类:
其他好文 时间:
2015-05-16 21:56:12
阅读次数:
117
poj2186:题目链接
题目大意:有n头奶牛,m个关系,A B表示A奶牛认为B是备受关注的,这个关系具有继承性,比如:A B 和 B C那么A奶牛也会认为C是备受关注的,问有多少头奶牛是受到除自己以外所以人关注的
首先进行强连通,那么每个连通块中的点都是受到该连通块中其它点的关注的,进行缩点,原图变成一颗树,如果有且只有一个缩点以后的点的出度为0,那么这个点就是受到所有人关注的。记录下该点代...
分类:
其他好文 时间:
2015-05-16 16:37:21
阅读次数:
130
Cow Acrobats
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 3207
Accepted: 1264
Description
Farmer John's N (1 <= N <= 50,000) cows (numbered 1..N) are pl...
分类:
其他好文 时间:
2015-05-16 12:00:23
阅读次数:
84