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:
N = int(input())
A = list(map(int, input().split()))
An = [[i+1, A[i]] for i in range(N)]
An = sorted(An, key=lambda x: x[1])
for i in range(N):
    print(An[i][0], end=" ")

Submission status: Accepted

Solution code:
from operator import itemgetter
N = int(input())
*A, = map(int, input().split())
dic = {}
init = 1
for i in A:
    dic[i] = init
    init += 1
print(' '.join([str(y) for x, y in sorted(dic.items(), key=itemgetter(0))]))

Submission status: Accepted

Solution code:
n = int(input())
tmp = list(map(int, input().split()))
dic = {}
for i, j in zip(range(n), tmp):
    dic[i] = j
new = sorted(dic.items(), key = lambda x:x[1])
for i in new:
    print(i[0] + 1, end=" ")

Submission status: Accepted

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

Submission status: Accepted

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

for i, num in enumerate(An):
    ans[num-1] = i+1

print(*ans)

Submission status: Accepted

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

def argsort(seq):
    return sorted(range(len(seq)), key=seq.__getitem__)

# Aを昇順arg sort
ans = argsort(A)

# すべてに1を足す
ans = [x+1 for x in ans]

print(*ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
D = {}
n = int(input())
a = list(map(int, input().split()))
for i in range(n):
    D[str(i + 1)] = a[i]

D2 = {k: v for v, k in D.items()}
S = []
for j in range(1, n+1):
    S.append(D2[j])
print(" ".join(S))

Submission status: Accepted

Solution code:
a=input()
b=input()


N=int(a)
An = [int(b0) for b0 in b.split(' ')]

Cn=[0]*len(An)
for i in range(len(An)):
    Cn[An[i]-1] = i+1

for i in Cn:
    print(i, end=' ')

Submission status: Accepted

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

ll = []
for i, j in enumerate(l):
  ll.append([i+1, j])
ll.sort(key=lambda x:x[1])

la = []
for i in range(n):
  la.append(ll[i][0])

print(*la)

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] = str(i+1)
  
print(" ".join(ans))

Submission status: Accepted

Solution code:
n=int(input())
a=(input().split())
a1={}
for i in range(n):
    a1[(a[i])]=i+1
str1=""
for i in range(n):
    print(str(a1[str(i+1)]),end=" ")
print()

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:
def main():
    n = int(input())
    alist = map(int, input().split())

    print(" ".join(
        [str(i + 1) for i, _ in sorted(enumerate(alist), key=lambda x: x[1])]))


main()

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:
import numpy as np
n = int(input())
a = list(map(int, input().split()))
ans = [0 for _ in range(n)]
for i in range(n):
  ans[a[i]-1] = i + 1
for i in ans:
  print(i, end=' ')

Submission status: Accepted

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

    ans = [0 for _ in range(n)]
    for i in range(n):
        ans[a[i]-1] = i+1
    print(' '.join(map(str,ans)))

if __name__ == "__main__":
    main()

Submission status: Accepted

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

'''
p,m=map(int,input().split())
s=bin(p)
s=s[2:]
n=len(s)


ans=pow(2,n) -1
if(m>=2):
    print(ans)
else:
    print(p)


m,n=map(int,input().split())
a=[False]*(n+1)
a[0]=True
for i in range(m):
    temp=list(map(int,input().split()))
    for kk in temp[1:]:
        a[kk]=True
ans=True
for nn in a:
    ans = nn and ans
if(ans):
    print("YES")
else:
    print("NO")



y,b,r = map(int,input().split())

if(r>b):
    if(b>y):
        print(int((3*y)+3))
    else:
        print(int(3*b))
else:
    if(b<y):
        print(int((3*y)-3))
    else:
        print()


  '''

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

new_list = []

for i in range(1, n+1):
    new_list.append([enter[i-1], i])

new_list.sort()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = {}

def LI():
  return [int(s) for s in input().split()]

a = LI()

for i in range(N):
  A[i] = a[i]
  
A = sorted(A.items(), key = lambda x: x[1])

for i in range(N):
  if i < N-1:
    print(A[i][0]+1,end = ' ')
  else:
    print(A[i][0]+1)

Submission status: Accepted

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

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

l.sort()

ans = [str(v[1]) for v in l]
print(" ".join(ans))

Submission status: Accepted

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

tmp_As = []
for i, A in enumerate(As):
    tmp_As.append([i, A])

As = sorted(tmp_As, key=lambda x: x[1])
for a in As:
    print(a[0] + 1, end=" ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input());print(*list(zip(*sorted([[i+1,b]for i,b in enumerate(map(int,input().split()))],key=lambda x:x[1])))[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import numpy as np

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
LIST = lambda: list(map(int, INPUT().split()))

sys.setrecursionlimit(10 ** 9)


def main():
    _ = INT()
    A = np.array(LIST())
    ans = A.argsort() + 1
    print(*ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))
L=[[0 for i in range(2)]for i in range(N)]
for i in range(N):
    L[i][0]=A[i]
    L[i][1]=i+1
L=sorted(L)

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

Submission status: Accepted

Solution code:
N = int(input())
nums = [(int(i), int(num)) for i, num in enumerate(input().split(), 1)]

print(' '.join([str(idx) for idx, _ in sorted(nums, key=lambda x: x[1])]))

Submission status: Accepted

Solution code:
n=int(input())
alis=list(map(int,input().split()))
aalis=[]
for i in range(1,n+1):
	aalis.append([i,alis[i-1]])
aalis.sort(key=lambda aalis:(aalis[1],aalis[0]))
list=[]
for i in range(n):
	list.append(aalis[i][0])
print(*list)

Submission status: Accepted

Solution code:
import sys


def solve(inp):
    N = int(inp.readline().strip())
    A = list(map(int, inp.readline().strip().split(' ')))

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

    return " ".join(map(str, r))


def main():
    result = solve(sys.stdin)
    if result:
        print(result)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
ans=[0] * (n + 1)

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

for i in range(1, n+1):
  chakujunn = a[i-1]
  ans[chakujunn] = i
  
print(" ".join(map(str,ans[1:])))

Submission status: Accepted

Solution code:
def solve():
  n = int(input())
  s = list(map(int, input().split()))
  orders = {v: i+1 for i, v in enumerate(s)}
  
  r = []
  for i in range(n):
    r.append(str(orders[i+1]))
    
  return r

print(' ' .join(solve()))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

n = int(input())
a = [int(ai) for ai in input().split()]
order = {a[i]: i+1 for i in range(len(a))}

print(' '.join(map(str, list(order.values()))))

Submission status: Accepted

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

print(*ans)

Submission status: Accepted

Solution code:
import itertools

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

    ans = [0 for _ in range(N)]

    for i in range(N):
        ans[A[i]-1] = i+1
    for a in ans:
        print(a, end=" ")
    return 0
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())
a=[int(i) for i in input().split()]
b=list(enumerate(a,start=1))
s=sorted(b,key=lambda x:x[1],reverse=False)
c=[]
for i in s:
  c.append(str(i[0]))
print(" ".join(c))

Submission status: Accepted

Solution code:
N = int(input())
A = [((i+1),int(s)) for i,s in enumerate(input().split())]

for a in sorted(A, key = lambda x : x[1]):
	print(a[0],end = ' ')

Submission status: Accepted

Solution code:
N = int(input())
A =[int(x) for x in 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()))
b = [0]*n

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

N = int(input())
stair = list(range(1, N+1))
A = list(map(int, input().split()))

list = [[stair[i], A[i]] for i in range(N)]

list2 = sorted(list, key=lambda x : x[1])
list3 = [x for x,y in list2]

for i in list3 : 
    print(i)

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int, input().split()))
B = [0 for _ in range(n)]
for i, v in enumerate(A):
    B[v-1] = i+1
print(*B)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#142
import numpy as np
N = int(input())
S = list(map(int,input().split()))

l = []
for i, j in enumerate(S,1):
    l_tem = [i,j]
    l += l_tem
l = np.array(l).reshape(N,2)
l = list(l[np.argsort(l[:,1])][:,0])

print(' '.join(list(map(str,l))))

Submission status: Accepted

Solution code:
import sys

[n] = [int(x) for x in sys.stdin.readline().split(" ")]

ais = [int(h) for h in sys.stdin.readline().split(" ")]

a_is = sorted([(i + 1, a) for i, a in enumerate(ais)], key=lambda ai: ai[1])

result = [str(i) for i, a in a_is]

print(" ".join(result))

Submission status: Accepted

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

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

    print(*res)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans_list = list(range(1,N+1))
ans_dict = dict(zip(A, ans_list))

for i in ans_dict:
  print(ans_dict[i], end=" ")

Submission status: Accepted

Solution code:
x = int(input())
num_list = list(map(int, input().split()))

li = list("A" * x)

for index, num in enumerate(num_list):
	li[num-1] = str(index+1)

print(" ".join(li))

Submission status: Accepted

Solution code:
num = int(input())
li = list(map(int, input().split()))

number = list(range(num))
data = dict(zip(number, li))
data_sorted = sorted(data.items(), key = lambda x:x[1])
data_key = [str(i[0] + 1) for i in data_sorted]
print(" ".join(data_key))

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int, input().split()))
A = [(A[i], i+1) for i in range(n)]
A = sorted(A)
print(' '.join(map(lambda p: str(p[1]), A)))

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
student  = {}
for i in range(N):
    student[A[i]] = i
for i in sorted(student):
    print((student[i]+1), end=" ")

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    A = map(int, input().split(" "))
    list = [""] * (N + 1)
    for i, a in enumerate(A, 1):
        list[a] = str(i)
    print(" ".join(list[1:]))


if __name__ == '__main__':
    main()

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(" ".join(map(str, ans)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = [i for i in map(int,input().split())]
from collections import defaultdict
d = defaultdict(int)

for i,num in enumerate(a):
  d[num] = str(i+1)
  
ans = [d[i+1] for i in range(n)]
print(" ".join(ans))

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:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    n = I()
    a = LI()
    t = sorted([(a[i], i) for i in range(n)])
    r = []
    for _,i in t:
        r.append(i+1)

    return JA(r, " ")


print(main())

Submission status: Accepted

Solution code:
def get_order_of_arrival(ar: list) -> list:
    lst = [None for _ in range(len(ar))]
    for i, s in enumerate(ar):
        lst[s - 1] = i + 1
    return lst


if __name__ == '__main__':
    N = int(input())
    array = list(map(int, input().split()))
    result = get_order_of_arrival(array)
    print(" ".join(list(map(str, result))))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = [None]*n

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

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

Submission status: Accepted

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

print(*ans)

Submission status: Accepted

Solution code:
import sys

N = int(sys.stdin.readline())
A = list(map(int, sys.stdin.readline().split()))

ans = [None]*N
for i, order in enumerate(A, 1):
        ans[order-1] = i
print(" ".join(map(str, ans)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
N=int(input())
A=list(map(int,input().split()))
B=[0]*N
for index, num in enumerate(A):
    B[num-1]=index+1
print(*B)

Submission status: Accepted

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

ans_list = [0] * N
for i, num in enumerate(a):
    ans_list[num-1] = i + 1
print(' '.join(map(str, ans_list)))

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]=str(i+1)

print(' '.join(b))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
d = {}
ans = ""
for i in range(N):
	d[A[i]] = i+1
for i in range(1, N+1):
	ans += str(d[i]) + " "
print(ans)

Submission status: Accepted

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

for i in range(N):
    B[i][0]=A[i]
    B[i][1]=i+1
B.sort()

for i in range(N):
    ans[i] = B[i][1]

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

Submission status: Accepted

Solution code:
n = int(input())
li = list(map(int,input().split()))
li_ans = list(enumerate(li))
li_sorted = sorted(li_ans,key = lambda x :x[1])
ans =[str(x[0]+1) for x in li_sorted]
print(' '.join(ans))

Submission status: Accepted

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

roster = {}
for i in range(n):
    roster[a[i]] = i+1

ans = ""
for i in range(1, n+1):
    ans += str(roster[i]) + " "

print(ans.rstrip())

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in input().split()]

b = [None for i in range(n)]

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

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

Submission status: Accepted

Solution code:
N = int(input())
A = str(input()).split(" ")

target_list = []
for i in range(len(A)):
    target_list.append([int(A[i]), i + 1])

target_list = sorted(target_list)

result = ""
for target in target_list:
    result += str(target[1]) + " "

print(result)

Submission status: Accepted

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

Submission status: Accepted

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

from operator import itemgetter
def main():
    Ans = [0]*N
    A.sort(key = itemgetter(0))
    for i in range(N):
        Ans[i] = A[i][1] + 1
    print(*Ans,sep =" ")
    return
if __name__ == "__main__":
    main()

Submission status: Accepted

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

B_i = [0 for s in range(N)]

for i in range(1, N + 1):
    B_i[A_i[i - 1] - 1] = str(i)


print(" ".join(B_i))

Submission status: Accepted

Solution code:
N = int(input())
num = list(map(int,input().split()))
S = {}
for i in range(N):
	S[num[i]] = i+1
S_sorted = sorted(S.items(),key=lambda x:x[0])
for i in range(N):
	print(S_sorted[i][1],end=" ")

Submission status: Accepted

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

for i, e in enumerate(l):
    l2[e-1] = i+1

print(*l2)

Submission status: Accepted

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

tmp=list(enumerate(A))
tmp.sort(key=lambda x: x[1])
b = [str(x[0]+1) for x in tmp]
print(' '.join(b))

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
target = []
for i in range(0, N):
    target.append([A[i], i + 1])

target.sort()

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

Submission status: Accepted

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

pairs = []
for i, Ai in enumerate(A):
    pairs.append((Ai, i + 1))

pairs.sort()

ans = [i for Ai, i in pairs]
print(' '.join(map(str, ans)))

Submission status: Accepted

Solution code:
N=int(input())
a=list(map(int, input().split()))
l=[]
for x in range(len(a)):
  l.append(0)
  
for i in range(N):
  j=a[i]-1
  l[j]=str(i+1)
o=" ".join(l)
print(o)

Submission status: Accepted

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

attend = [0]*N


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

print(*attend)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

B = []
for i, b in enumerate(A):
    B.append((b, i+1))

B.sort(key=lambda x: x[0])

for i in B:
    print(i[1], end=" ")

print()

Submission status: Accepted

Solution code:
import sys

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

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

    lis.sort()
    for li in lis:
        print(li[1], end=" ")

    print()

main()

Submission status: Accepted

Solution code:
n1 = int(input())
l1 = [int(x) for x in input().split()]
l2 = [""] * n1

for i, v in enumerate(l1):
  l2[v -1] = i + 1

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

Submission status: Accepted

Solution code:
import numpy as np

_ = input()
A = [inp for inp in map(int, input().split())]

A = np.array(A).argsort() + 1
A = [str(a) for a in A]
A = ' '.join(A)
print(A)

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:
# pythonっぽい書き方
N = int(input())
A = list(map(int, input().split()))
tmp = sorted([(a, n) for n, a in enumerate(A, start=1)])
print(*[x[1] for x in tmp])

Submission status: Accepted

Solution code:
# pythonっぽい書き方
N = int(input())
A = list(map(int, input().split()))


# まつり縫いみたいなやり方
# aの要素でアクセスできる形式で、何番目の要素だったのかを保持しておけば良い
tmp = [None] * (N + 1)
for i, a in enumerate(A, start=1):
    tmp[a] = i
A.sort()
print(*[tmp[a] for a in A])

Submission status: Accepted

Solution code:
# pythonっぽい書き方
N = int(input())
A = list(map(int, input().split()))
#tmp = sorted([(a, n) for n, a in enumerate(A, start=1)])
#print(*[x[1] for x in tmp])


# まつり縫いみたいなやり方
# aの要素でアクセスできる形式で、何番目の要素だったのかを保持しておけば良い
tmp = [None] * (N + 1)
for i, a in enumerate(A, start=1):
    tmp[a] = i
A.sort()
print(*[tmp[a] for a in A])

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc142/tasks/abc142_c
# 最小コストソートの際に使った、ソートしたあとの要素についてソート前の並び順が知りたい

#  AとA_sortedでA_sorted[j]はA[i]の要素であるiの配列が知りたい

# pythonっぽい書き方
N = int(input())
A = list(map(int, input().split()))
tmp = []
for n, a in enumerate(A, start=1):
    tmp.append((a, n))

tmp.sort()
print(*[x[1] for x in tmp])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, m=DVSR): return pow(x, m - 2, m)
def DIV(x, y, m=DVSR): return (x * INV(y, m)) % m
def LI(): return [int(x) for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()
def II(): return int(input())
def FLIST(n):
    res = [1]
    for i in range(1, n+1): res.append(res[i-1]*i%DVSR)
    return res

N=II()
As=LI()

for i, j in sorted(map(lambda pair: (pair[1], pair[0]), enumerate(As))):
    print(j+1, end=' ')
print("")

Submission status: Accepted

Solution code:
N = int(input().strip())
A = [int(a) - 1 for a in input().strip().split()]

S = [0 for n in range(N)]
c = 1
for i in A:
    S[i] = c
    c += 1

[print(s, end=" ") for s in S]
print()

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(' '.join(map(str, b)))

Submission status: Accepted

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

list_Ai = []
for i in range(N):
    list_Ai.append((list_A[i], i + 1))
list_Ai.sort()

list_i = []
for i in list_Ai:
    list_i.append(str(i[1]))

print(" ".join(list_i))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    _ = input()
    A = [(i+1, int(a)) for (i, a) in enumerate(input().split())]
    A.sort(key=lambda x: x[1])
    ans = list(zip(*A))[0]
    print(*ans, sep=" ", end="\n")
    
    
if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans = [0 for i in range(n)]

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

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

Submission status: Accepted

Solution code:
import sys

n = int(input())
a = list(map(int,input().split()))
b = [0] * n

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

[print(x,end=" ") for x in(b)]

Submission status: Accepted

Solution code:
N = int(input())
li = list(map(int, input().split()))
ans = dict()
for i in range(len(li)):
    ans[li[i]] = i + 1
ali = []
for j in sorted(ans.keys()):
    ali.append(ans[j])
print(*ali)

Submission status: Accepted

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

out = sorted(range(1, len(a)+1 ), key=lambda i: a[i-1])
print(" ".join(map(str, out)))

Submission status: Accepted

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

Submission status: Accepted

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

ans = list(range(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 = [int(i)-1 for i in input().split()]
rslt = [0]*N
for idx, val in enumerate(A):
    rslt[val] = idx+1
print(str(rslt)[1:-1].replace(',', ''))

Submission status: Accepted

Solution code:
N = int(input())
A = [int(i)-1 for i in input().split()]
rslt = [0]*N
for i in range(N):
    rslt[A[i]] = i+1
print(str(rslt)[1:-1].replace(',', ''))

Submission status: Accepted

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

Submission status: Accepted

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

students = []

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

students = sorted(students, key=lambda s: s[1])
ids = [str(s[0]) for s in students]

print(' '.join(ids))

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(" ".join(map(str,b)))

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
z = list(range(1, n+1))
az = list(zip(a, z))
az.sort()
for i in az:
    print(i[1], end=' ')

Submission status: Accepted

Solution code:
n = int(input())
ls_a = [int(_) for _ in input().split()]

ans = [0] * n

for i in range(n):
    ans[ls_a[i] - 1] = i + 1
    
print(" ".join(map(str, ans)))

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]=str(i+1)
print(" ".join(ans))

Submission status: Accepted

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

memo = [0 for _ in range(n+1)]

for index, i in enumerate(id_list, 1):
    memo[i] = index

del memo[0]
print(*memo)

Submission status: Accepted

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

output = list(range(0,N))

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

print(*output)

Submission status: Accepted

Solution code:
# 23:53 事前にスマホで問題は読んでいる
n = int(input())
a = list(map(int,input().split()))
p = ['0']*n
for i in range(n):
    p[a[i]-1] = str(i+1)
print(' '.join(p))

Submission status: Accepted

Solution code:
n = int(input())
d = dict()

for i,x in enumerate(input().split(" ")):
    d[str(i+1)] = int(x)


d_sorted = sorted(d.items(), key=lambda x:x[1])
ans = []
for i in range(n):
    ans.append(d_sorted[i][0])
print(' '.join(ans))

Submission status: Accepted

Solution code:
n=int(input())
s=input().split()
a=[]
for i in range(n):
    x=int(s[i])
    a.append([x,i+1])
a.sort(key=lambda x:x[0])
for i in range(n):
    if i==n-1:
        print(a[i][1])
    else:
        print(a[i][1],end=" ")

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
indices = [i + 1 for i in range(n)]
ans = list(map(lambda x: str(x[1]), sorted(zip(a, indices))))
print(" ".join(ans))

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
indices = [i + 1 for i in range(n)]
result = sorted(zip(a, indices))
ans = "{}".format(result[0][1])
for i in range(n)[1::]:
    ans += " {}".format(result[i][1])
print(ans)

Submission status: Accepted

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

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

print(*result)

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(" ".join(map(str,B)))

Submission status: Accepted

Solution code:
import numpy as np

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

print(' '.join([str(_+1) for _ in np.argsort(np.array(a))]))

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda:sys.stdin.readline().rstrip()
def resolve():
    n=int(input())
    AI=[(a,i) for i,a in enumerate(map(int,input().split()),1)]
    AI.sort()
    I=[i for a,i in AI]
    print(*I)
resolve()