#P16405. [Algo Beat Contest 004 A] Always the Winner
[Algo Beat Contest 004 A] Always the Winner
Problem Description
There are people playing cards, numbered . One game has rounds. After round ends, person gets points. If someone gets points in a round, then they will get no points, and the other three people each get points. After rounds, all people with the lowest total score win.
Little D will give you the scores of each person in these rounds. Please determine who wins in the end.
Input Format
The first line contains a positive integer .
The next lines each contain integers, representing .
Output Format
Output one line: print the winners' indices in increasing order.
3
4 8 10 4
6 0 7 13
8 8 8 2
2
3
0 2 10 14
1 1 12 12
4 2 9 11
1 2
1
0 0 26 0
3
Hint
[Sample #1 Explanation]
The final scores of the four people are .
[Sample #2 Explanation]
In the end, both have a score of , so their indices should be printed in increasing order.
[Sample #3 Explanation]
Because got points in the first round, they will get no points, and each get points.
[Constraints]
- .
- .
Translated by ChatGPT 5