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 |
Для отправки решений необходимо выполнить вход.
|