#P16405. [Algo Beat Contest 004 A] Always the Winner

[Algo Beat Contest 004 A] Always the Winner

Problem Description

There are 44 people playing cards, numbered 1∼41 \sim 4. One game has nn rounds. After round ii ends, person jj gets ai,ja_{i,j} points. If someone gets 2626 points in a round, then they will get no points, and the other three people each get 2626 points. After nn rounds, all people with the lowest total score win.

Little D will give you the scores of each person in these nn rounds. Please determine who wins in the end.

Input Format

The first line contains a positive integer nn.

The next nn lines each contain 44 integers, representing ai,1,ai,2,ai,3,ai,4a_{i,1}, a_{i,2}, a_{i,3}, a_{i,4}.

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 18,16,25,1918,16,25,19.

[Sample #2 Explanation]

In the end, both 1,21,2 have a score of 55, so their indices should be printed in increasing order.

[Sample #3 Explanation]

Because 33 got 2626 points in the first round, they will get no points, and 1,2,41,2,4 each get 2626 points.

[Constraints]

  • 1≤n≤100,0≤ai,j≤261 \le n \le 100, 0 \le a_{i,j} \le 26.
  • ai,1+ai,2+ai,3+ai,4=26a_{i,1}+a_{i,2}+a_{i,3}+a_{i,4}=26.

Translated by ChatGPT 5