题意: 给出n个点m条公路k条铁路. 接下来m行 u v w //u->v 距离w 然后k行 v w //1->v 距离w 如果修建了铁路并不影响两点的最短距离,那么修铁路是没必要的 求能删掉多少条铁路 题解: 把公路和铁路放一起构成一个图,然后跑一边最短路.最后如果最短路结果小于铁路的长度,那么这条铁路就没必要修 如果最短路结果等于铁路的长度,要先判断一下这个最短路是不是一条,如果这条最短路个数多于一条那么这条铁路就没必要修 怎么判断最短路路径数是不是大于1? 1…
Wormholes Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 24249 Accepted: 8652 Description While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way pa…
题目链接: http://poj.org/problem?id=1679 Description Given a connected undirected graph, tell if its minimum spanning tree is unique. Definition 1 (Spanning Tree): Consider a connected, undirected graph G = (V, E). A spanning tree of G is a subgraph of G…
Description Given a connected undirected graph, tell if its minimum spanning tree is unique. Definition 1 (Spanning Tree): Consider a connected, undirected graph G = (V, E). A spanning tree of G is a subgraph of G, say T = (V', E'), with the followi…
题目链接 Description Given a connected undirected graph, tell if its minimum spanning tree is unique. Definition 1 (Spanning Tree): Consider a connected, undirected graph G = (V, E). A spanning tree of G is a subgraph of G, say T = (V', E'), with the fol…
Wormholes Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 58153 Accepted: 21747 Description While 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…
题目连接 http://poj.org/problem?id=1679 The Unique MST Description Given a connected undirected graph, tell if its minimum spanning tree is unique. Definition 1 (Spanning Tree): Consider a connected, undirected graph G = (V, E). A spanning tree of G is a…
http://poj.org/problem?id=1679 The Unique MST Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 23339 Accepted: 8284 Description Given a connected undirected graph, tell if its minimum spanning tree is unique. Definition 1 (Spanning Tree…
http://poj.org/problem?id=1679 The Unique MST Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 17726 Accepted: 6150 Description Given a connected undirected graph, tell if its minimum spanning tree is unique. Definition 1 (Spanning Tree…
链接: http://poj.org/problem?id=1679 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=82831#problem/K Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 24594 Accepted: 8751 Description Given a connected undirected graph, tell if its m…
链接: http://poj.org/problem?id=2253 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=22010#problem/D Frogger Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 21206 Accepted: 6903 Description Freddy Frog is sitting on a stone in the…
题目链接:http://poj.org/problem?id=2449 "Good man never makes girls wait or breaks an appointment!" said the mandarin duck father. Softly touching his little ducks' head, he told them a story. "Prince Remmarguts lives in his kingdom UDF – Unite…