HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Unsorted > problem:


Skiers

Section problems

• Игра в числа
• КВН
• Сoordinate quarters
• Копилка
• Коррекция кода
• Куб
• Maze
• Лесенки
• Skiers
• Максимум из минимумов
• Маршрут
• Find all duplicates in array
• Find the Missing number
• Matrix
• Range Minimum Query
• Министерство правды
• Coins and nests

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 1000/1000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.

Problem description

N sportmen participated in ski racing. They all started in different time but in increasing order of their numbers from 1 to N. Every skier remembered how many skiers who started before him finished after him. Write a program that outputs numbers of skiers in the order in which they came to the finish.

Input

On the first line there is one integer N (1 <= N <= 1000) - number of skiers. On the second line N integers k1, k2, k3, ..., kN where ki is number of skiers who started before i-th skier and finished after him.

Output

Write numbers of skiers ordered according to their finishing time.

Example

stdin stdout

5
0 0 2 1 1

3 1 4 5 2

Для отправки решений необходимо выполнить вход.

www.contester.ru