Canadian Computing Competition: 2003 Stage 2, Day 1, Problem 2
Stan has a deck of

Figure 1: Concentration Cards
Input Specification
The first line of input contains
Output Specification
Your program should produce one line of output per case, giving the minimal perimeter.
Sample Input
Copy
3
3 300 400
4 400 300
7 300 400
Sample Output
Copy
2600
2800
3800
Comments