Elitedj and his three roommates like to play Left 4 Dead 2. Left 4 Dead 2 is a shooting game withfour special monsters.
There is a contest of Left 4 Dead 2 in this weekend. There are n teams in the competition, every two teams will play a match, each team will have 4 numbers indicating the team’s performance, whichare the number of four monsters killed by the player.The ranking of the game is as follows
输入
The first line contains a single integer T \ (1≤T≤10) — the number of test cases.
For each case, the first line contains a single integer n \ (1≤n≤100) — the number of teams.
Next is an n \times n matrix a, the row number and column number of the matrix start from 1, therow number from top to bottom, and the column number from left to right. Each item of the matrix consists of 4 integers — t, b, w, s \ (0≤t, b, w, s≤10^5), which are separated by spaces. The a[i][j][t], a[i][j][b], a[i][j][w], a[i][j][s] represents the number of Tank, Boomer, Witch and Smoker killed by team i in the match between team i and team j. Items in the same row of the matrix are separated by character ’|’.
输出
The output contains T rows, and the output of the i−th row represents the result of case i . If multiple teams have the most wins and the largest hurt difference, print ”No winner” (without the quotes), else print the index of the winning team
样例
标准输入 复制文本 |
2 2 0 0 0 0 | 1 2 3 4 2 1 4 3 | 0 0 0 0 2 0 0 0 0 | 1 1 1 1 1 1 1 1 | 0 0 0 0 |
标准输出 复制文本 |
2 No winner |
提示
For the first case, there are two teams, the sum of HP of the monsters killed by the first team is 1 \times 98000 + 2 \times 9800 + 3 \times 980 + 4 \times 98 = 120932, the sum of HP of the monster killed by the second team is 2 \times 98000 + 1 \times 9800 + 4 \times 980 + 3 \times 98 = 210014, so the number of wins for the first team is 0, for the second team is 1, so the second team is the winner, print 2 .
For the second case, there are two teams, the sum of HP of the monsters killed by the first team andby the second team is the same, so the number of wins for these two team is 0. The hurt differencefor the first team is (1 \times 98000 + 1 \times 9800 + 1 \times 980 + 1 \times 98)−(1 \times 98000 + 1 \times 9800 + 1 \times 980 + 1 \times 98) = 0 ,the hurt difference for the second team is also 0, so print ”No winner” (without the quotes) in this case.
来源
SCNUCPC 2020 现场赛