摘要: WormholesTime Limit:2000MSMemory Limit:65536KTotal Submissions:24910Accepted:8883DescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you ... 阅读全文
posted @ 2013-07-30 15:37 哥的笑百度不到 阅读(181) 评论(0) 推荐(0) 编辑
摘要: #include#include#includeusing namespace std;const int N = 100;const int INF = 0x3f3f3f3f;struct Edge{ //用于记录一组关系 int u,v,w;};vector edge[N]; //用于保存图的关系int flag[N]; //用于标记是否在队列中int dis[N]; //源点到各点的最短距离int path[N]; //源点到各点的路径int road[N]; //用于逆向追中输出路径void init(int n){ for(int... 阅读全文
posted @ 2013-07-30 11:58 哥的笑百度不到 阅读(301) 评论(0) 推荐(0) 编辑
摘要: 确定比赛名次Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8229Accepted Submission(s): 3169Problem Description有N个比赛队(1#include#include#include#includeusing namespace std;int map[505][505],indrgee[505];int main(){ int n,m,i,j; whi... 阅读全文
posted @ 2013-07-30 10:11 哥的笑百度不到 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 畅通工程续Time Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 19475Accepted Submission(s): 6742Problem Description某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路多了也不好,每次要从一个城镇到另一个城镇时,都有许多种道路方案可以选择,而某些方案要比另一些方案行走的距离要短很多。这让行人很困扰。现在,已知起点和终点,请你计算出要从起点到终点,最短需要行走... 阅读全文
posted @ 2013-07-30 09:20 哥的笑百度不到 阅读(211) 评论(0) 推荐(0) 编辑