题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2066题目意思:给出T条路,和草儿家相邻的城市编号,以及草儿想去的地方的编号。问从草儿家到达草儿想去的地方的最短时间是多少。
一开始自己写的只能处理单边出发的情况,对于以下这幅图,只能处理箭头所示的方向....
分类:
其他好文 时间:
2014-05-21 23:34:06
阅读次数:
303
题目大意:Tomato要玩一个游戏,他需要排队,一开始这个队列共有N个人,而他在队列的第M个位置,每当有玩家尝试激活登陆游戏时,会概率性触发四个事件。p1的概率注册失败,队列无变化。p2的概率连接失败,排在队首的人排到队尾。p3的概率成功,队首出队。p4的概率服务器瘫痪,停止激活!这时候如果排在To...
分类:
其他好文 时间:
2014-05-21 20:20:37
阅读次数:
222
SightseeingTime Limit: 3000/1000 MS
(Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s):
639Accepted Submission(s): 249Problem D...
分类:
其他好文 时间:
2014-05-21 20:16:45
阅读次数:
551
BeansTimeLimit:2000/1000MS(Java/Others)MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):2518AcceptedSubmission(s):1250ProblemDescription
Bean-....
分类:
其他好文 时间:
2014-05-21 20:14:17
阅读次数:
222
题目:
链接:点击打开链接
题意:
给出n个直接认识的朋友,最大的直接或间接认识的朋友。
思路:
算法:
并查集,,,
代码:
#include
#include
#include
using namespace std;
#define MAXN 100010
int root[MAXN];
int member[MAXN];//表示在i结点处的,认识的...
分类:
其他好文 时间:
2014-05-21 10:59:57
阅读次数:
254
Big Event in HDU
Problem Description
Nowadays, we all know that Computer College is the biggest department in HDU. But, maybe you don't know that Computer College had ever been split into Comp...
分类:
其他好文 时间:
2014-05-21 10:51:55
阅读次数:
300
请不要随便指点别人该怎么做、每个人的人生都应该自己掌握、你给不了别人一切、你也不懂别人的忧伤、
微笑不代表快乐、哭泣不一定悲伤
不努力怎么让关心你的人幸福、不努力怎么让看不起你的...
分类:
其他好文 时间:
2014-05-21 10:31:31
阅读次数:
202
Piggy-Bank
Problem Description
Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes from Irreversibly Bound M...
分类:
其他好文 时间:
2014-05-21 10:17:35
阅读次数:
289
FATE
Problem Description
最近xhd正在玩一款叫做FATE的游戏,为了得到极品装备,xhd在不停的杀怪做任务。久而久之xhd开始对杀怪产...
分类:
其他好文 时间:
2014-05-21 10:16:18
阅读次数:
194
Catch That Cow
Problem Description
Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number li...
分类:
其他好文 时间:
2014-05-21 07:02:40
阅读次数:
312