P27037 [AtCoder] Blonde Girls
普及+
题目描述

Problem Description

After helping her sister with her homework, Joisino decided to watch some TV to relax.

However, when she noticed, she found herself in a town that looked like England. It seems she had somehow come to a different world without realizing it.

There were $ N $ blonde girls there, and since Joisino loves blonde girls, she wanted to hug them.

However, there were too many of them, so she couldn't hug all the girls. Therefore, Joisino decided to hug the girl with the most beautiful blonde hair among them. The beauty of the blonde hair of girl $ i(1 ≦ i ≦ N) $ is $ A_i $.

However, there were too many girls, so Joisino thought of writing a program to find the girl with the most beautiful blonde hair.

Input Format

The input is given from the standard input in the following format:

$ N $ $ A_1 $ $ A_2 $ : $ A_N $

  • The first line contains the number of girls $ N(1 ≦ N ≦ 10^5) $.
  • The next $ N $ lines contain the beauty of the blonde hair of the $ i $-th girl $ A_i(0 ≦ A_i ≦ 10^9) $.

Output Format

Output the number of the girl with the most beautiful blonde hair. If there are multiple such girls, output the smallest number among them.

Also, include a newline at the end of the output.

Sample Input and Output

Sample Input #1

2
123
146

Sample Output #1

2

Sample Input #2

4
124
23
145
145

Sample Output #2

3

Sample Input #3

10
41
467
334
0
169
224
478
358
462
464

Sample Output #3

7

Notes/Hints

Scoring

There are no partial points for this problem. Correctly solving it will earn you 40 points.

Sample Explanation 1

In this case, there are $ 2 $ girls, and the beauty of the blonde hair of the $ 1 $-st girl is $ 123 $, and the $ 2 $-nd girl is $ 146 $. Therefore, the $ 2 $-nd girl has the most beautiful blonde hair.

Sample Explanation 2

In this case, there are $ 4 $ girls, and both the $ 3 $-rd and $ 4 $-th girls have the most beautiful blonde hair. Therefore, output the smaller number, which is $ 3 $.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
2 123 146
样例输出
2