The Hearthstone Masters Tour is a tournament for the famous card-collecting game Hearthstone, consisting of live and online events hosted every year in which Masters Qualifiers winners, Hearthstone Grandmasters, and other invitees compete for massive prize money.
In the Hearthstone Masters Tour, pla
Now you are playing a match in some Hearthstone Masters Tour where each pla
You want to know, what is the maximum probability you will win the match, supposing your opponent knows your strategy and chooses the deck optimally in each round.
Then a game is played by the two pla
The first line contains an integer T, denoting the number of test cases. (1≤T≤5).
For each test case, the first line contains an integer n(1≤n≤8), denoting the number of decks each pla
Then nn lines describing the matrix AA follow, where the i(1≤i≤n)-th line contains nnumbers with at most two decimal places Ai,1,Ai,2,…,Ai,n(0≤Ai,j≤1).
For each test case, output a number in one line, denoting the answer. Your answer is considered correct, if its absolute or relative error does not exceed 10−6.
Formally, let your answer be a, and the jury's answer be b. Your answer is considered correct if ∣a−b∣min(1,∣b∣)≤10−6.
3
1
0.50
3
1.00 1.00 1.00
1.00 1.00 1.00
0.00 0.00 0.00
3
1.00 0.00 0.00
0.00 1.00 0.00
0.00 0.00 1.00
0.5000000000
0.0000000000
0.1666666667