#C2649. Highest Scoring Contestant

    ID: 45988 Type: Default 1000ms 256MiB

Highest Scoring Contestant

Highest Scoring Contestant

Given \(N\) contestants and \(M\) dishes prepared by each contestant, each scored independently, your task is to determine which contestant achieved the highest total score. Each contestant's total score is the sum of the scores for their \(M\) dishes. If there is a tie, output the contestant with the smallest index (1-indexed).

The first line of input contains two integers \(N\) and \(M\). The following \(N\) lines each contain \(M\) integers representing the scores for each contestant.

Your program should output a single integer representing the 1-indexed position of the contestant with the highest total score.

inputFormat

The first line contains two integers \(N\) and \(M\) separated by a space:

  1. \(N\): The number of contestants.
  2. \(M\): The number of dishes each contestant has prepared.

Each of the next \(N\) lines contains \(M\) integers, which are the scores awarded for each dish.

outputFormat

Output a single integer — the 1-indexed contestant number with the highest total score. In case of a tie, output the contestant with the smallest index.

## sample
3 4
10 20 30 40
5 15 25 35
7 14 21 28
1