P16405 [Algo Beat Contest 004 A] Always the Winner
Description
There are $4$ people playing cards, numbered $1 \sim 4$. One game has $n$ rounds. After round $i$ ends, person $j$ gets $a_{i,j}$ points. If someone gets $26$ points in a round, then they will get no points, and the other three people each get $26$ points. After $n$ rounds, all people with the lowest total score win.
Little D will give you the scores of each person in these $n$ rounds. Please determine who wins in the end.
Input Format
The first line contains a positive integer $n$.
The next $n$ lines each contain $4$ integers, representing $a_{i,1}, a_{i,2}, a_{i,3}, a_{i,4}$.
Output Format
Output one line: print the winners' indices in increasing order.
Explanation/Hint
#### [Sample #1 Explanation]
The final scores of the four people are $18,16,25,19$.
#### [Sample #2 Explanation]
In the end, both $1,2$ have a score of $5$, so their indices should be printed in increasing order.
#### [Sample #3 Explanation]
Because $3$ got $26$ points in the first round, they will get no points, and $1,2,4$ each get $26$ points.
#### [Constraints]
- $1 \le n \le 100, 0 \le a_{i,j} \le 26$.
- $a_{i,1}+a_{i,2}+a_{i,3}+a_{i,4}=26$.
Translated by ChatGPT 5