Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|

Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |

Language: Cow Relays
Description For their physical fitness program, Each trail connects two different intersections (1 ≤ length ≤ 1,000), the two intersections the trail connects, and they know that no two intersections are directly connected by two different trails. The trails form a structure known mathematically as a graph._{i}To run the relay, the Write a program to help position the cows. Find the shortest path that connects the starting intersection ( Input * Line 1: Four space-separated integers: I_{1i} , and I_{2i} Output * Line 1: A single integer that is the shortest distance from intersection Sample Input 2 6 6 4 11 4 6 4 4 8 8 4 9 6 6 8 2 6 9 3 8 9 Sample Output 10 Source |

[Submit] [Go Back] [Status] [Discuss]

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di

Any problem, Please Contact Administrator