#P1781. 宇宙总统

宇宙总统

Description

In the Earth calendar year 6036 AD, the entire universe is electing the most capable person as president. There are nn extraordinary candidates running for president. The votes have been fully counted; please determine who becomes the president.

Input Format

The first line contains an integer nn, the number of candidates.

The next nn lines contain the vote counts for candidates 11 through nn.

Output Format

Output two lines. The first line is an integer mm, the index of the elected candidate.

The second line is the elected candidate’s vote count.

5
98765
12365
87954
1022356
985678

4
1022356

Hint

The vote count can be very large, up to 100100 digits.

1n201 \leq n \leq 20.

Translated by ChatGPT 5