Problem:


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



Sample input:
3
2 3 1


Sample output:
3 1 2

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    N = int(input())
    A = list(map(int, input().split()))
    D = [0]*(N)
    for i, a in enumerate(A):
        D[a-1] = i+1
    
    print(*D)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
ans = [0] * N
for i,val in enumerate(A):
    ans[val-1] = i+1
print(*ans)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
answer = [0] * n

for i in range(n):
	answer[a[i]-1] = i + 1 

for i in range(n):
	print(answer[i], end = " ")

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))

# a = np.array(a)
# ans = []
# while a.min() != 9999999:
#     min_index = a.argmin()
#     ans.append(min_index+1)
#     a[min_index] = 9999999

# print(' '.join([str(_) for _ in ans]))

l = []
for i in range(n):
    l.append([i+1, a[i]])

sl = sorted(l, key=lambda x: x[1])
sl0 = [r[0] for r in sl]
print(' '.join([str(_) for _ in sl0]))

Submission status: Accepted

Solution code:
import math
import numpy as np

n = int(input())
a = list(map(int, input().split()))

# a = np.array(a)
# ans = []
# while a.min() != 9999999:
#     min_index = a.argmin()
#     ans.append(min_index+1)
#     a[min_index] = 9999999

# print(' '.join([str(_) for _ in ans]))

l = []
for i in range(n):
    l.append([i+1, a[i]])

sl = sorted(l, key=lambda x: x[1])
sl0 = [r[0] for r in sl]
print(' '.join([str(_) for _ in sl0]))

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
dic = {}
for i in range(n):
    dic.setdefault(a[i],i+1)
ans = []
for i in range(1,n+1):
    print(str(dic[i]),end='')
    print(' ',end='')

Submission status: Accepted

Solution code:
from operator import itemgetter
N = int(input())
A = list(map(int, input().split()))
# a= []
# for i in range(N):
#     a.append((i+1, A[i]))
#     a.sort(key=itemgetter(1))
# print(' '.join([str(i[0]) for i in a]))
a = [0] * N
for i in range(N):
    a[ A[i] -1 ] = str(i + 1)
print(' '.join(a))

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int,input().split()))

S=[0]*n
for i in range(len(A)):
    S[A[i]-1] = i+1

for s in S:
    print(s,end=" ")

Submission status: Accepted

Solution code:
n = int(input())
nbr = list(map(int,input().split()))
ans = [0] * n
for i in range(n):
    ans[nbr[i] - 1] = i + 1
print(*ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import numpy as np

n = int(input())
a = list(map(int, input().split()))
ans = np.zeros(n, dtype=np.int)

for i in range(n):
    ans[a[i]-1] = i + 1

print(' '.join([str(i) for i in ans]))

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
ans = [i for i in range(N)]

for i in range(N):
    ans[A[i] - 1] = i + 1
print(*ans)

Submission status: Accepted

Solution code:
# C - Go to School TLE
N = int(input())
A = list(map(int, input().split()))

attend = [i for i in range(1,N+1)]
for j in range(1,N+1):
    attend[A[j-1] - 1] = j
print(*attend)

Submission status: Accepted

Solution code:
N = int(input())
l = list(map(int,input().split()))
ans = [i for i in range(len(l))]
for i in range(N):
  ans[l[i] - 1] = i + 1
print(*ans)

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
aa=[[1+i,x] for i,x in enumerate(a)]
aa.sort(key=lambda x:x[1])
aaa=[str(x[0]) for x in aa]
print(' '.join(aaa))

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))

res = [0]*n
for i in range(n):
  res[a[i]-1] = i + 1

result = ' '.join(map(str,res))
print(result)

Submission status: Accepted

Solution code:
n = int(input())
a = [0] + list(map(int, input().split()))

l = ["0"] * n
for i in range(1, n+1):
    l[a[i]-1] = str(i)

print(" ".join(l))

Submission status: Accepted

Solution code:
N=int(input())
import numpy as np
h=np.array(list(map(int,input().split())))
print(*(np.argsort(h)+1).tolist(), sep=' ')

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
b = [0] * n
for i, x in enumerate(a):
    b[x - 1] = i + 1
print(' '.join(map(str, b)))

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
l=[0]*n
for i in range(n):
    l[a[i]-1]=i+1
print(*l)

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


def main():
    N = int(input())
    A = list(map(int, input().split()))

    ans = [0] * N
    for i, a in enumerate(A, 1):
        ans[a - 1] = i

    print(" ".join(map(str, ans)))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))

B = [(i+1, k) for i, k in enumerate(A)]


def func(x):
    return x[1]


B.sort(key=func)
res = ""
for b in B:
    res += str(b[0]) + " "

print(res)

Submission status: Accepted

Solution code:
import math
from math import gcd
INF = float("inf")

import sys
input=sys.stdin.readline
import itertools
from collections import Counter

def main():
    n = int(input())
    a = list(map(int , input().split()))
    ans = [0]*n
    for i, num in enumerate(a):
        ans[num-1] = i+1
    print(" ".join(map(str,ans)))

if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
import math
from math import gcd
INF = float("inf")

import sys
input=sys.stdin.readline
import itertools
from collections import Counter

def main():
    n = int(input())
    a = list(map(int , input().split()))
    ans = [0]*n
    cnt = 1
    for i in a:
        ans[i-1] =cnt
        cnt += 1
    print(" ".join(map(str,ans)))

if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
n=int(input())
ans=[[] for i in range(n)]
a=list(map(int,input().split()))
for i in range(n):
    ans[i].append(a[i])
    ans[i].append(i+1)
ans=sorted(ans)
x=[]
for i in range(n):
    x.append(str(ans[i][1]))

print(" ".join(x))

Submission status: Accepted

Solution code:
import math


def resolve():
    import sys
    input = sys.stdin.readline
    # row = [int(x) for x in input().rstrip().split(" ")]
    n = int(input().rstrip())
    ans = ["" for _ in range(n)]
    a_list = [int(x) for x in input().rstrip().split(" ")]
    for i, a in enumerate(a_list):
        ans[a-1] = str(i+1)

    print(" ".join(ans))



if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
B = [0]*N

for i in range(len(A)):
    B[A[i]-1] = i+1

s = ""
for i in B:
    s = s + str(i) + " "

print(s.strip())

Submission status: Accepted

Solution code:
import math
from collections import defaultdict,deque
#from itertools import permutations
ml=lambda:map(int,input().split())
ll=lambda:list(map(int,input().split()))
ii=lambda:int(input())
ip=lambda:list(input())
ips=lambda:input().split()

"""========main code==============="""

n=ii()
a=ll()
lol=[]
for i in range(n):
    lol.append([a[i],i+1])
lol.sort()
for i in lol:
    print(i[1],end=" ")

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
ans = [0] * n

for i in range(n):
    ans[a[i]-1] = i + 1
    
print(*ans)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))

l = {a: i for i, a in enumerate(A, start=1)}
print(' '.join([str(l[i+1]) for i in range(N)]))

Submission status: Accepted

Solution code:
n = int(input())
m = [(x, 0) for x in range(1, n+1)]

for i, x in enumerate(map(int, input().split())):
  m[i] = (m[i][0], x)
m.sort(key=lambda x : x[1])
print(' '.join([str(x[0]) for x in m]))

Submission status: Accepted

Solution code:
N = int(input())
A = [int(i) for i in input().split()]

ans = []
for i in range(N):
    ans.append([A[i],i+1])

ans.sort()
for i in range(N-1):
    print(ans[i][1],end=' ')
print(ans[-1][1])

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))

res = [0]*N

for i in range(N):
  res[A[i]-1] = i+1
  
print(" ".join(map(str,res)))

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
ans = [None]*n
for i in range(n):
    ans[a[i]-1] = i+1
print(' '.join(map(str,ans)))

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
y = sorted([(i+1, A[i]) for i in range(N)], key=lambda x: x[1])
print(" ".join(map(str, [z[0] for z in y])))

Submission status: Accepted

Solution code:
N = int(input())
A = tuple(map(int, input().split()))
ans = [str(i + 1) for a, i in sorted((a, i) for i, a in enumerate(A))]
print(" ".join(ans))

Submission status: Accepted

Solution code:
n=int (input())
a= list(map(int, input().strip().split()))
b=[0]*n
for i in range(n):
    b[a[i]-1]=i+1
print(*b)

Submission status: Accepted

Solution code:
N=int(input())
*A,=map(int,input().split())
T=[0]*N
for i in range(N):
 T[~-A[i]]=i+1
print(*T)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
a_dict = {}
for i, value in enumerate(a):
    a_dict[i+1] = value
print(*[key for key, value in sorted(a_dict.items(), key=lambda k:k[1])])

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
B = N*[0]

for n in range(N):
  B[A[n]-1]=n+1

print(*B)

Submission status: Accepted

Solution code:
import sys


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instr = lambda: sys.stdin.readline()
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

n = inint()
A = inintl()

st = [""]*n

cnt = 0

for a in A:
    cnt += 1
    st[a-1] = str(cnt)

print(" ".join(st))

Submission status: Accepted

Solution code:
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
import math
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math as M
MOD=10**9+7
import random
#####################################
n=int(input())
A=INPUT()
D=[0]*(n+1)
for i in range(n):
    D[A[i]]=(i+1)
print(*D[1:])

Submission status: Accepted

Solution code:
import sys
import collections
import bisect


def main():
    n = int(input())
    A = list(map(int, input().split()))
    B = [0] * n
    for i in range(n):
        B[A[i] - 1] = str(i + 1)
    print(" ".join(B))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))
ls=[0]*N
for i in range(N):
    ls[A[i]-1] = i+1
print(" ".join(map(str,ls)))

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
AA = [0 for i in range(N)]
 
for i in range(N):
  AA[A[i]-1] = i + 1
  
L=[str(a) for a in AA]
L=" ".join(L)
print(L)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
B = list(range(1, N + 1))

A = dict(zip(A, B))
A = sorted(A.items())
ans = [str(x[1]) for x in A]


print(" ".join(ans))

Submission status: Accepted

Solution code:
n = int(input())
A = tuple(map(int, input().split()))
A = [(idx+1, a) for idx, a in enumerate(A)]
A = sorted(A, key=lambda x: x[1])
print(*[idx for idx, a in A])

Submission status: Accepted

Solution code:
N = int(input())
A = []
for i, a in enumerate(map(int, input().split())):
    A.append((a, i))
A.sort()
print(*[i+1 for _, i in A])

Submission status: Accepted

Solution code:

N = int(input())
X = list(map(int, input().split()))

ans = []
for i, _ in sorted(enumerate(X), key=lambda x: x[1]):
    ans.append(i + 1)

print(*ans)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))

a = [0] * N

for i in range(N):
    a[A[i] - 1] = str(i + 1)

res = " ".join(a)

print(res)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))

dic = {i:0 for i in range(1, N + 1)}


for i in range(N):
    a = A[i]
    dic[a] = i + 1

for i in range(1, N + 1):
    print(dic[i], end="")
    if i != N:
        print(" ", end="")

print()

Submission status: Accepted

Solution code:
N=int(input())
L=list(map(int,input().split()))
S=[0]*N
c=1
for i in L:
    S[i-1]=c
    c+=1
for i in range(N):
    print(S[i],end=' ')

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
ans = [[] for i in range(n)]
for i in range(n):
    ans[i] = [a[i], i+1]
#print(ans)
ans.sort()
#print(ans)
for i in range(n):
    print(ans[i][1], end=" ")

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
t = [(i + 1, A[i]) for i in range(N)]
t_sorted = sorted(t, key=lambda a: a[1])
ans = ''
for i in range(N):
    ans += str(t_sorted[i][0]) + ' '
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
d = {}
ans = ''

for i in range(0,n):
  d[a[i]] = i+1

d_sorted = sorted(d.items(), key=lambda x:x[0])

for i in range(n):
  if ans != '':
    ans = ans + ' '
  ans = ans + str(d_sorted[i][1])

print(ans)

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import numpy as np
from numba import njit
import sys
sys.setrecursionlimit(10**7)

def _S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

N = I()
A = LI()

B = range(1,N+1)
AB = zip(A,B)
# print(*AB)
sAB = sorted(AB)
# print(*sAB)
_,ans=zip(*sAB)
print(*ans)


#AB = [LI() for _ in range(N)]
#A,B = zip(*AB)
#Ap = np.array(A)
#C = np.zeros(N + 1)
# index 順 要素のindex

# ans = []
# for i in range(N):
#     ans.append(A.index(i+1)+1)
# print(*ans)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))

b = [0]*n
for i in range(n):
    b[a[i]-1]=i+1
print(*b)

Submission status: Accepted

Solution code:
N = int(input())
A = [int(i) for i in input().split()]
A_tupple = [(idx+1, value) for idx, value in enumerate(A)]
A_tupple.sort(key=lambda x:x[1])
for a in A_tupple:
  print(a[0], end=" ")

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
ans = [0]*n
for i in range(n):
    ans[a[i]-1] = i+1
print(*ans)

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))

import numpy as np
x = np.argsort(a)

for i in range(n):
  print(x[i]+1)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))

dicA =  {}
for i in range(1, N+1):
    dicA[i] = A[i-1]

sort_dicA = sorted(dicA.items(), key=lambda x:x[1])
for i in range(N):
    print(sort_dicA[i][0], end=' ')

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int, input().split()))
N = sorted(range(1, n + 1), key=lambda x: A[x - 1])
print(*N)

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int, input().split()))

N = list(range(1, n + 1))
c = sorted(zip(A, N))
A, N = zip(*c)

print(*N)

Submission status: Accepted

Solution code:
from sys import stdin

n = int(stdin.readline().rstrip())
A = [int(x) for x in stdin.readline().rstrip().split()]

ans = [0] * n

for i, a in enumerate(A):
    ans[a-1] = i+1

print(' '.join(map(str, ans)))

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))

order = [0] * (n + 1)
for i in range(n):
    order[a[i]] = i + 1

print(*order[1:])

Submission status: Accepted

Solution code:
n = int(input())
an = [int(num) for num in input().split()]

answer = [0 for _ in range(n)]
for index in range(n):
  answer[an[index] - 1] = str(index + 1)

print(" ".join(answer))

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))

arr = [0] * N
for i in range(N):
    arr[A[i] - 1] = i + 1

print(*arr)

Submission status: Accepted

Solution code:
# abc142_c.py
# https://atcoder.jp/contests/abc142/tasks/abc142_c

# C - Go to School /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点 : 300点

# 問題文
# 高橋くんは N人の生徒たちのいるクラスの担当教師です。
# 生徒たちには 1から Nまでの出席番号が重複なく割り当てられています。
# 今日は全ての生徒たちが相異なるタイミングで登校しました。
# 高橋くんは、出席番号 iの生徒が登校した時点で、教室に Ai 人の生徒たちがいたことを記録しています(出席番号 iの生徒を含む)。
# 記録された情報を元に、生徒たちの登校した順番を復元してください。

# 制約
#     1≤N≤105
#     1≤Ai≤N
#     Ai≠Aj
#     (i≠j)
#     入力はすべて整数

# 入力
# 入力は以下の形式で標準入力から与えられる。
# N
# A1 A2 … AN

# 出力
# 生徒たちの出席番号を登校した順に出力せよ。

# 入力例 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


global FLAG_LOG
FLAG_LOG = False


def log(value):
    # FLAG_LOG = True
    # FLAG_LOG = False
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    # S = lines[0]
    N = int(lines[0])
    # N, M = list(map(int, lines[0].split()))
    values = list(map(int, lines[1].split()))
    # values = list(map(int, lines[2].split()))
    # values = list()
    # for i in range(N):
    #     values.append(int(lines[i]))
    # valueses = list()
    # for i in range(N):
    #     valueses.append(list(map(int, lines[i+1].split())))

    lst = [0] * N

    for n in range(N):
        lst[values[n]-1] = str(n+1)

    return [' '.join(lst)]


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['3', '2 3 1']
        lines_export = ['3 1 2']
    if pattern == 2:
        lines_input = ['5', '1 2 3 4 5']
        lines_export = ['1 2 3 4 5']
    if pattern == 3:
        lines_input = ['8', '8 2 7 3 4 5 6 1']
        lines_export = ['8 2 4 5 6 7 3 1']
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode


# 主処理
def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(2)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')
    # finished = time.time()
    # duration = finished - started
    # print(f'duration=[{duration}]')


# 起動処理
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input());a=list(map(int,input().split()));dict={i+1:a[i] for i in range(n)}
print(*[i[0] for i in sorted(dict.items(),key=lambda x:x[1])],sep=' ')

Submission status: Accepted

Solution code:
n=int(input())
a=[int(x) for x in input().rstrip().split()]
ans=[0 for i in range(n)] 
for i in range(n):
    ans[a[i]-1]=i+1
print(*ans)

Submission status: Accepted

Solution code:
N = int(input())

Order = []

for i in range(N+1):
    Order.append(0)

A = list(map(int, input().split()))

for n in range(N):
    i = A[n]
    Order[i] = n + 1

ans = ""

for i in range(1, N+1):
    ans += str(Order[i])
    if i != N + 1:
        ans += " "

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
number = [0 for _ in range(N)]

for i, a in enumerate(A):
  number[a-1] += i+1
  
print(*number)

Submission status: Accepted

Solution code:
def readinput():
    n=int(input())
    a=list(map(int,input().split()))
    return n,a

def main(n,a):
    aa=[]
    for i in range(n):
        aa.append((i+1,a[i]))
    aa.sort(key=lambda x:x[1])
    b=[]
    for i in range(n):
        b.append(aa[i][0])
    return b

if __name__=='__main__':
    n,a=readinput()
    ans=main(n,a)
    print(' '.join(map(str,ans)))

Submission status: Accepted

Solution code:
import sys, math, itertools, collections, bisect 
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8') 
inf = float('inf') ;mod = 10**9+7 
mans = inf ;ans = 0 ;count = 0 ;pro = 1

n = int(input())
A = list(map(int, input().split()))
ans = [-1]*n
for i, a in enumerate(A):
    ans[a-1] = i+1
    #print(i, a)
print(*ans)

Submission status: Accepted

Solution code:
import sys, math, itertools, collections, bisect 
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8') 
inf = float('inf') ;mod = 10**9+7 
mans = inf ;ans = 0 ;count = 0 ;pro = 1

n=int(input())
A=[(e,i) for i,e in enumerate(list(map(int,input().split())))]
#print(A)
A.sort(key=lambda tup: tup[0])
#print(A)
for e,i in A:
    print(i+1)

Submission status: Accepted

Solution code:
n = int(input())
a = sorted([(i, int(ai)) for i, ai in zip(range(1, n + 1), input().split())], key=lambda x: x[1])
for i in range(n):
    print(a[i][0], end=' ')

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int, input().split()))

ans = [0] * n

for i, a in enumerate(A):
    ans[a-1] = i+1

print(*ans, sep=' ')

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
A = [int(a) for a in input().split()]
ans = np.argsort(A) + 1

for a in ans:
    print(a, end=' ')
print()

Submission status: Accepted

Solution code:
def main():
  n = int(input())
  h = tuple(map(int, input().split()))
  ans = [0]*n
  for i in range(n):
    ans[h[i]-1] = i+1
  print(" ".join(map(str, ans)))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def main():
  n = int(input())
  h = tuple(map(int, input().split()))
  ans = [0]*n
  for i in range(n):
    ans[h[i]-1] = i+1
  print(*ans)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
t = 1
# t = input()
# t = int(t)
def max(a,b):
	if a > b:
		return a
	return b
while t > 0:
	t -= 1
	n = int(input())
	# n,k = map(int,input().strip().split())
	v = list(map(int,input().strip().split()))[0:n]
	# m = {}
	l = []
	for i in range(n):
		l.append(0)
	# ans = 0
	j = 1
	for i in v:
		l[i-1] = j
		j += 1
	# print(ans)
	for i in l:
		print(i,end=" ")

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))
B=[1]*N
for x in range(N):
  B[A[x]-1]+=x
for y in B:
  print(y,end="")
  if y!=B[N-1]:
    print(" ",end="")
print("\n")

Submission status: Accepted

Solution code:
N = int(input())
ls = list(map(int,input().split()))
ls2 = []
for i in range(N):
    ls2.append([i,ls[i]])

ls3 = sorted(ls2, key=lambda x: x[1])
ls4 = []
for i in ls3:
    ls4.append(i[0]+1)

L=[str(a) for a in ls4]
L = ' '.join(L)
print(L)

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
b=[0]*n
for i in range(0,n):
  b[a[i]-1]=i+1
ans=''
for i in range(n):
  ans+=str(b[i])+' '
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int, input().split()))

D = {}
for i in range(1, n+1):
    D[A[i-1]] = i

for k, v in sorted(D.items()):
    print(v, end=" ")

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))

B = [0] * N
for i in range(0, N):
    B[A[i]-1] = i+1
[print(x, end=' ') for x in B]

Submission status: Accepted

Solution code:
N=int(input())
C=list(map(int,input().split()))
ans=[0]*(N+1)
for i in range(N):
  ans[C[i]]=i+1
ans.remove(0)
ans=' '.join([str(n) for n in ans])
print(ans)

Submission status: Accepted

Solution code:
#
# 172C Go to school
#
a = []
n = input()
nums = [int(e) for e in input().split()]

for i in range(int(n)):
    a.append([i, nums[i]])

a_sorted = sorted(a, key=lambda x: x[1])

for i in range(int(n)):
    print(str(a_sorted[i][0]+1), end=' ')

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))

pairs = list(zip(range(1,N+1),A))
pairs = sorted(pairs, key=lambda x:x[1])
print(*(list(zip(*pairs))[0]))

Submission status: Accepted

Solution code:
N = int(input())
aaa = list(map(int, input().split()))
x = [(a, i) for i, a in enumerate(aaa, 1)]
x.sort()
ans = []
for a, i in x:
    ans.append(i)
print(*ans)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
X = sorted([[i+1, A[i]] for i in range(N)], key=lambda x: x[1])
print(*[x[0] for x in X])

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))
t=[0]*N
for idx,i in enumerate(A):
    t[i-1]=idx+1

print(*t)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
ans = [0] * n
for i in range(n):
  ans[a[i]-1] = i+1
for j in range(n):
  print(ans[j],end=" ")

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
ans=[None]*n

for i in range(n):
    ans[a[i]-1]=i+1

for i in range(n):
    print(ans[i], end=" ")

Submission status: Accepted

Solution code:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入
import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
n = I()
A = readInts()
nya = []
for i in range(n):
    nya.append((i+1,A[i]))
nya = sorted(nya,key = lambda x:x[1])
ans = []
for (idx,po) in nya:
    ans.append(idx)
print(*ans)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
l = [0] * n
for i in range(n):
    l[a[i]-1] = i+1
for i in range(n):
    print(l[i],end = ' ')

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
ans = [0]*n
for index,aa in enumerate(a):
  ans[aa-1] = index+1
print(*ans)

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int, input().split()))

B = [(a, i + 1) for i, a in enumerate(A)]
B.sort()

ans = [j for _, j in B]

print(*ans)

Submission status: Accepted

Solution code:
# 2020/07/18
# AtCoder Beginner Contest 142 - C

# Input
n = int(input())
a = list(map(int,input().split()))
al = [0] * (n+1)

# Calc
for i in range(n):
    al[a[i]] = i+1

al.remove(0)

# Output
print(' '.join([str(j) for j in al]))

Submission status: Accepted

Solution code:
n = int(input())
A = list(enumerate(list(map(int, input().split()))))
A.sort(key=lambda x:x[1])
ans = []
for i in A: ans.append(str(i[0]+1))
print(" ".join(ans))

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
A.insert(0,0)
A = [(i,A[i]) for i in range(N+1)]
A = sorted(A,key=lambda x:x[1])
B = []
for i in range(1,N+1):
    B.append(A[i][0])
print(*B)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
ans = [0]*N
for i,a in enumerate(A):
  ans[a-1] = i+1
print(*ans)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))

B = [0]*N

for i in range(N):
    B[A[i]-1] = i+1

print(*B)

Submission status: Accepted

Solution code:
N = int(input())
student = 1
ans = [0]*N
for i in input().split():
    i = int(i)
    ans[i-1] = student
    student += 1

for i in ans:
    print(i, end=" ")

Submission status: Accepted

Solution code:
n,*a=map(int,open(0).read().split())
b=[0]*n
for i in range(n):
    b[a[i]-1]=str(i+1)
print(' '.join(b))

Submission status: Accepted

Solution code:
def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    ords = []
    for i, a in enumerate(A):
        ords.append((i, a))
    ans = list(map(lambda x: x[0]+1, sorted(ords, key=lambda x: x[1])))
    print(*ans)
    
        
    


    
if '__main__' == __name__:
    resolve()

Submission status: Accepted

Solution code:
def resolve():
    
    N=int(input())
    A=list(map(int,input().split()))

    d={}
    for i in range(N):
        d[A[i]]=i+1

    dict2=sorted(d.items())

    for i in range(N):
        print(dict2[i][1], end=" ")        


resolve()

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int, input().split()))
ans=[0]*n
for i in range(n):
    ans[a[i]-1]=i+1
print(*ans)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
ans = [0] * N

for i,a in enumerate(A):
    ans[a-1] = i + 1
print(*ans)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
d = []
for n in range(N):
    d.append([A[n], n])
d = sorted(d, key=lambda x:x[0])
for i, j in d:
    print(j+1, end=" ")

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))

b = ['0']*n
for i in range(n):
    m = a[i]
    b[m-1] = str(i+1)

print(' '.join(b))

Submission status: Accepted

Solution code:
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

n=int(input())
a=lmp()
l=[]
for i in range(n):
    l.append([a[i],1+i])
l=sorted(l,key=lambda x:x[0])
ans=[]
for i in range(n):
    ans.append(l[i][1])
print(*ans)

Submission status: Accepted

Solution code:
from sys import stdin
input = stdin.readline


def main():
  N = int(input())
  A = list(map(int, input().split()))

  order = sorted(range(1, N+1), key=lambda i: A[i-1])

  print(*order, sep=' ')


if(__name__ == '__main__'):
  main()

Submission status: Accepted

Solution code:
from sys import stdin
input = stdin.readline


def main():
  N = int(input())
  A = list(map(int, input().split()))

  order = []
  for i in range(N):
    order.append((i+1, A[i]))
  order = sorted(order, key=lambda x: x[1])
  for i in range(N-1):
    print(order[i][0], end=' ')
  print(order[N-1][0])


if(__name__ == '__main__'):
  main()