Alex has n matches, followed by the number n represents the length of each match. The
problem is that can these matches form a polygon, and the perimeter of the polygon is the
largest.
Input starts with an integer T(T <= 100), denoting the number of test cases.
Each case contains one integer N(3 <= N <= 1000) denoting the number of matches. The
next line contains N space separated integers which form the array. These integers range
in [1,10000].
For each test case, If a polygon can be formed, output the largest perimeter,
otherwise output -1.
2
3
2 3 5
4
2 2 2 7
-1
6