Mock CCC '19 Contest 1 J2 - CCO

View as PDF

Submit solution

Points: 3 (partial)
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

You have made it to CCO! After two days of competitions, the scores are finalized. You are given the scores of the N contestants. You want to know the index (one-indexed) of the contestant who has the highest score. If there are multiple indices, print the smallest one.

Input Specification

The first line will contain the integer N (2 \le N \le 30), the number of contestants.

The second line will contain N integers, the scores of each contestant s_i (0 \le s_i \le 225).

Output Specification

Output the index (one-indexed) of the contestant with the highest score. If there are multiple indices, print the smallest one.

Subtasks

For 2/15 of the points, N = 2.

For an additional 8/15 points, N \le 10.

Sample Input 1

2
1 3

Sample Output 1

2

Sample Input 2

2
225 225

Sample Output 2

1

Comments

There are no comments at the moment.