LCC '25 Contest 2 J1 - Duck Duck Duck
View as PDFDuck duck duck duck duck? All ducks have duckness value, indicating their duck superiority over others; the greater the duckness the greater the duck! Given ducks with distinct duckness values
, find the index (from
to
) of the greatest duck.
Input Specification
The first line of input contains one integer , the number of ducks.
The second line of input contains space-separated integers, representing each duck's duckness.
Output Specification
Output one integer, indicating the correct index of the duck with greatest duckness.
Constraints
Subtask 1 [10%]
Subtask 2 [90%]
Sample Input
5
1 4 5 2 3
Sample Output
3
Sample Explanation
The duck at position is the greatest duck.
Comments