Problem F
Jogging Trails
Gord is training for a marathon. Behind his house is a park with a large network of jogging trails connecting water stations. Gord wants to find the shortest jogging route that travels along every trail at least once.
Input
Input consists of several test cases. The first line of
input for each case contains two positive integers:
Output
For each case, there should be one line of output giving the length of Gord’s jogging route.
Sample Input 1 | Sample Output 1 |
---|---|
4 5 1 2 3 2 3 4 3 4 5 1 4 10 1 3 12 0 |
41 |