~/algor $ cat problems/minmax-10-birinchi-ekstremal-element
First extreme element
Easy
1000 ms
256 MB
25%
A positive integer $N$ and $N$ integers are given. Find the position of the extreme (that is, minimum or maximum) element that occurs first in the sequence.
Input
The first line contains an integer $N$. The next line contains $N$ integers $A_{i}$.
Output
One integer — the position of the first extreme element.
Note
$1 \le N \le 1000$
$-10^{9} \le A_{i} \le 10^{9}$
Examples
Input #1
5 4 2 8 1 9
Output #1
4
Input #2
4 10 3 10 3
Output #2
1