Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/massiv-maksimum-orinlari

Positions of the largest element

Easy 1000 ms 64 MB 32%
Share

An array of $n$ integers is given. Print the places of the array where the largest element stands — all its positions in increasing order (positions are counted from $1$).

The array as bars; the tallest bars and their positions are highlighted

Input

The first line contains a positive integer $n$.
The second line contains $n$ integers — the elements of the array.

Output

The positions separated by spaces.

Note

$1 \le n \le 1000$
the elements are from $-10^{6}$ to $10^{6}$

Examples

Input #1
7
4 9 2 9 7 9 1
Output #1
2 4 6
Input #2
1
-5
Output #2
1

Sign in to submit a solution

Signing up is free and takes a minute.