Last saturday, Paul, Ivo and Nick went to a bowling alley. The hired a lane for one hour, and played three games. In this casual game play, the guys were simply counting the number of games they won: the overall winner would be the one who won the most games. (In case of a tie, they would have had to figure out another way to pronounce the winner.)
This time, Paul won two games and Nick one, so Paul was pronounced the winner. Ivo wondered how it was possible he lost all three games even though he felt his scores were not too bad. So he looked again at the scoreboard and saw this:
Game | 1 | 2 | 3 |
Paul | 102 | 86 | 94 |
Ivo | 98 | 73 | 112 |
Nick | 95 | 84 | 125 |
The first line of the input contains a single number: the number of test cases to follow. Each test case has the following format:
For every test case in the input, the output should contain P lines, one for each player in the input. On the ith line should be two integers, separated by a single space: mi, followd by Mi.
2 3 3 102 86 94 98 73 112 95 84 125 3 4 100 110 112 116 98 112 110 112 90 98 113 113
0 2 0 2 1 2 1 3 0 2 1 2
Migrated from old NTUJ.
No. | Testdata Range | Score |
---|