#K6811. Highest Score First Index

    ID: 32792 Type: Default 1000ms 256MiB

Highest Score First Index

Highest Score First Index

Given an integer sequence representing the scores achieved by friends in order, your task is to determine the 1-indexed position of the friend who first achieved the highest score. In other words, if the maximum score appears more than once, return the index of its first occurrence.

Mathematically, given scores \(a_1, a_2, \ldots, a_n\) with \(n \geq 1\), find the smallest index \(i\) such that \(a_i = \max\{a_1, a_2, \ldots, a_n\}\).

inputFormat

Input is read from stdin and consists of two lines. The first line contains a single integer n (\(1 \leq n \leq 10^5\)), the number of friends. The second line contains n space-separated integers representing the scores.

outputFormat

Output the 1-indexed position of the friend with the highest score to stdout.

## sample
5
100 200 200 150 100
2

</p>