GO Solution For UVa 10600 - ACM Contest and Blackout. In this post we will see how we can solve this challenge in GoLang for UVa Online Judge.

Problem Description

In order to prepare the “The First National ACM School Contest” (in 20??) the major of the city decided to provide all the schools with a reliable source of power. (The major is really afraid of blackoutsJ). So, in order to do that, power station “Future” and one school (doesn’t matter which one) mu

...

You can find the full details of the problem ACM Contest and Blackout at UVa Online Judge

Sample Input

2
5 8
1 3 75
3 4 51
2 4 19
3 2 95
2 5 42
5 4 31
1 2 9
3 5 66
9 14
1 2 4
1 8 8
2 8 11
3 2 8
8 9 7
8 7 1
7 9 6
9 3 2
3 4 7
3 6 4
7 6 2
4 6 14
4 5 9
5 6 10

Sample Output

110 121
37 37

Solution: Please check the main.go snippet for the solution.

Solution originally posted at: Github by @codingsince1985