

Time Limit: 2 sec / Memory Limit: 1024 MB
配点 : 300 点
問題文
高橋くんは N 人の生徒たちのいるクラスの担当教師です。
生徒たちには 1 から N までの出席番号が重複なく割り当てられています。
今日は全ての生徒たちが相異なるタイミングで登校しました。
高橋くんは、出席番号 i の生徒が登校した時点で、教室に A_i 人の生徒たちがいたことを記録しています(出席番号 i の生徒を含む)。
記録された情報を元に、生徒たちの登校した順番を復元してください。
制約
- 1 \le N \le 10^5
- 1 \le A_i \le N
- A_i \neq A_j (i \neq j)
- 入力はすべて整数
入力
入力は以下の形式で標準入力から与えられる。
N A_1 A_2 \ldots A_N
出力
生徒たちの出席番号を登校した順に出力せよ。
入力例 1
3 2 3 1
出力例 1
3 1 2
最初に出席番号 3 の生徒が登校しました。
続いて出席番号 1 の生徒が登校しました。
最後に出席番号 2 の生徒が登校しました。
入力例 2
5 1 2 3 4 5
出力例 2
1 2 3 4 5
入力例 3
8 8 2 7 3 4 5 6 1
出力例 3
8 2 4 5 6 7 3 1
Score : 300 points
Problem Statement
Takahashi is a teacher responsible for a class of N students.
The students are given distinct student numbers from 1 to N.
Today, all the students entered the classroom at different times.
According to Takahashi's record, there were A_i students in the classroom when student number i entered the classroom (including student number i).
From these records, reconstruct the order in which the students entered the classroom.
Constraints
- 1 \le N \le 10^5
- 1 \le A_i \le N
- A_i \neq A_j (i \neq j)
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
N A_1 A_2 \ldots A_N
Output
Print the student numbers of the students in the order the students entered the classroom.
Sample Input 1
3 2 3 1
Sample Output 1
3 1 2
First, student number 3 entered the classroom.
Then, student number 1 entered the classroom.
Finally, student number 2 entered the classroom.
Sample Input 2
5 1 2 3 4 5
Sample Output 2
1 2 3 4 5
Sample Input 3
8 8 2 7 3 4 5 6 1
Sample Output 3
8 2 4 5 6 7 3 1