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()))
nA = []
for i in range(N):
    nA.append([A[i], i + 1])
nA.sort(key=lambda x: x[0])
ans = list(map(list, zip(*nA)))[1]
ans = list(map(str, ans))
print(' '.join(ans))

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
printV = lambda x: print(*x, sep="\n")
printH = lambda x: print(" ".join(map(str,x)))
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]
mo = 10**9+7

def main():
	n = II()
	a = LI()
	ans=[]
	for i,x in enumerate(a,1):
		ans.append([i,x])
	ans.sort(key=lambda x: x[1])
	printH(row[0] for row in ans)

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

print(" ".join(ans))

Submission status: Accepted

Solution code:
# sys.stdin.readline()
import itertools
import numpy as np
import sys
n = int(input())
A= np.array(list(map(int,input().split())))
B = A.argsort()+1

C=' '.join(map(str,list(B)))
print(C)

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
b = dict()
for i, ai in enumerate(a):
    b[ai] = i + 1
c = list()
for i in range(n):
    c.append(b[i + 1])
print(*c)

Submission status: Accepted

Solution code:
def q3():
    N = int(input())
    A = [int(i) for i in input().split()]
    ans = [0] * N
    for i, a in enumerate(A):
        ans[a-1] = i + 1
    print(' '.join([str(i) for i in ans]))


if __name__ == '__main__':
    q3()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
C - Go to School
https://atcoder.jp/contests/abc142/tasks/abc142_c

"""
import sys


def solve(N, students):
    res = sorted([(s, i) for i, s in zip(range(1, N+1), students)])
    ans = [i for _, i in res]
    return ans


def main(args):
    N = int(input())
    students = [int(s) for s in input().split()]
    ans = solve(N, students)
    print(*ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

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

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 sys
from operator import itemgetter
def input(): return sys.stdin.readline().rstrip()
def main():
    n=int(input())
    A=[(int(i),int(a)) for i,a in enumerate(input().split())]
    A.sort(key=itemgetter(1))
    s=""
    for a in A:
        s+=str(a[0]+1)+" "
    print(s)
if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:

def myAnswer(N:int,A:list) -> int:
   dic ={}
   for i in range(1,N+1):
      dic[i]=A[i - 1]
   ans = sorted(dic.items(), key=lambda x:x[1])
   for a in ans:
      print(a[0],end=" ")
   print()
def modelAnswer():
   tmp=1
def main():
   N = int(input())
   A = list(map(int,input().split()))

   myAnswer(N,A[:])

if __name__ == '__main__':
   main()

Submission status: Accepted

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

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:
"""
int(input())
map(int,input().split())
list(map(int,input().split()))

"""

n=int(input())
B=list(map(int,input().split()))
A=[]
for i in range(n):
    A.append([B[i],i+1])
A.sort()
for i in range(n):
    print(A[i][1],end=" ")

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
A = np.array(list(map(int, input().split())))
ans = np.argsort(A) + 1
print(' '.join([str(a) for a in ans]))

Submission status: Accepted

Solution code:
N=int(input())
a=list(map(int, input().split()))
b=[0]*N
c=1
while c<=N:
	d=a[c-1]
	b[d-1]=c
	c+=1
for i in range(N):
	print(b[i])

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
lists = [i for i in range(1, n + 1)]
dicts = {j:i for i, j in zip(lists, a)}
for i in range(1, n + 1):
    print(dicts[i], end=' ')
print()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(1, N + 1):
    print(A[i], end=' ')

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
num = {}
ans = []
for i in range(1,len(A)+1):
    num[A[i-1]]=i
num = sorted(num.items())
for k,v in num:
    ans.append(str(v))
print(' '.join(ans))

Submission status: Accepted

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

students = [None] * N

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

print(' '.join(iter(students)))

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int, input().split(' ')))
B = []
i = 0
while i < n:
    B.append((A[i],i+1))
    i += 1
B.sort()
ans = ''
for b in B:
    ans += str(b[1]) + ' '
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
ans = [x[1] for x in sorted([(a, i + 1) for i, a in enumerate(A)])]
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] = i+1
print(*ans)

Submission status: Accepted

Solution code:
import math

n = int(input())
aLi = list(map(int, input().split(" ")))
sLi = list(range(n))

for i, a in enumerate(aLi):
    sLi[a - 1] = str(i + 1)

print(" ".join(sLi))

Submission status: Accepted

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

ans = [0]*n
for a in list(enumerate(l)):
  a = list(a)
  ans[a[1]-1] = a[0]+1

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

Submission status: Accepted

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

A = sorted(A)

L = [str(x[1]) for x in A]

print(" ".join(L))

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
#h, w = list(map(int, input().split()))
ans=[0]*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:
N = int(input())
A = list(map(int, input().split()))
a = [0]*N
for i in range(N):
    a[A[i]-1] = str(i+1)
print(' '.join(a))

Submission status: Accepted

Solution code:
def ri(): return int(input())
def rli(): return list(map(int, input().split()))
def rls(): return list(map(str, input().split()))
def pl(a): print(" ".join(list(map(str, a))))
def ma():return map(int,input().split())
def nli(x):return [input for _ in range(x)]
def hukusuu(): 
  listA=[] #appendのために宣言が必要
  while True:
    try:listA.append(list(map(int,input().split())))
    except:break #または、quit(),os.exit()をして止める。
  return listA
from itertools import accumulate as acc 
import operator as op
import copy as cp
import math
from bisect import bisect_left as bisl
from bisect import bisect_right as bisr
def ifif(s):
  if s:print("Yes")
  else:print("No")

n=ri()  
a=rli()
b=[0]*n
for k in range(len(a)):
  b[a[k]-1]=str(k+1)

print(" ".join(b))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# coding: utf-8

from collections import Counter

def ri():
    return int(input())

def rl():
    return list(input().split())

def rli():
    return list(map(int, input().split()))

def main():
    n = ri()
    la = rli()
    lb = []
    for i in range(n):
        lb.append((la[i],i))
    lb.sort()
    for b in lb:
        print(b[1]+1)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#C
#入力
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
    

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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    a = list(map(int, input().split()))
    ans = [k[0] for k in sorted({i:ai for i, ai in enumerate(a, 1)}.items(), key=lambda x: x[1])]
    print(*ans)

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(*ans)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
# C = [str(i) for j in range(1, N+1) for i in A if i == j]
# index と　value を入れ替える
C = [0]*N
# print(C)
for k in range(N):
    C[A[k]-1] = str(k+1)
    # C[k] = k
# print(C)
# C = [str(A.index(i)+1) for i in range(1,N+1)]
L = ' '.join(C)
print(L)

Submission status: Accepted

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

Submission status: Accepted

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


for i, j in enumerate(a):
    l[j - 1] = i + 1

print(*l)

Submission status: Accepted

Solution code:
n = int(input())
l = [[0]*2 for _ in range(n)]
a = list(map(int, input().split()))


for i in range(n):
    l[i][0] = a[i]
    l[i][1] = i

l.sort()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
A = [int(x) for x in input().split()]

tmp = [x for x in zip(A, range(1, N+1))]
tmp = np.array(sorted(tmp))
print(*tmp[:,1])

Submission status: Accepted

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

ans = [0] * N

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

Submission status: Accepted

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

ans = [0] * N

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

print(*ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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(*ans)

Submission status: Accepted

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

answer = [0] * N
for i, Ai, in enumerate(A):
    answer[Ai - 1] = str(i + 1)
answer = ' '.join(answer)

print(answer)

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
out = [0] * n
for i in range(len(a)): out[a[i] - 1] = i + 1
print(' '.join([str(i) for i in out]))

Submission status: Accepted

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

a_l = [0] * N

for i,v in enumerate(A):
    a_l[v-1] = i + 1

print(*a_l)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
ns = map(int, input().split())
dic = {}
for index, num in enumerate(ns):
    dic[str(index+1)] = num
print(' '.join(str(i) for i,j in sorted(dic.items(), key=lambda x:x[1])))

Submission status: Accepted

Solution code:
n = int(input())
s = list(map(int,input().split()))
num = list(i+1 for i in range(n))
tp = list(zip(s,num))
tp1 =[]
for i in tp :
  tp1.append(list(i))
tp1 = sorted(tp1)
tp1 =[tp1[i][1] for i in range(n)]
print(*tp1)

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
dic={}
for i in range(1,n+1):
  dic[a[i-1]]=i
sorted_dict=sorted(dic.items(), key=lambda x:x[0])
ans=""
for i in range(n):
  ans+=str(sorted_dict[i][1])+" "
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
lis = np.array(list(map(int, input().split())))
lis2 = np.argsort(lis).tolist()
for i in range(n):
    print(lis2[i]+1, end=' ')

Submission status: Accepted

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

attendance_list = [0] * n
cnt = 1
for i in l:
  attendance_list[ i - 1 ] = cnt
  cnt += 1
alist = str( attendance_list[0] )
for a in attendance_list[1:]:
  alist += " " + str( a )
print( alist )

Submission status: Accepted

Solution code:
from collections import deque
from collections import Counter
from itertools import product, permutations,combinations
from operator import itemgetter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right, bisect
#pypyではscipy, numpyは使えない
#from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson, minimum_spanning_tree
#from scipy.sparse import csr_matrix, coo_matrix, lil_matrix
import numpy as np
from fractions import gcd
from math import ceil,floor, sqrt, cos, sin, pi, factorial, log, log10, log2
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')
from datetime import datetime as dt

def main():
  n = int(readline())
  A=list(map(int, readline().split()))
  B = [0]*n
  for shusseki, rank in enumerate(A):
    B[rank-1] = shusseki + 1
  print(' '.join(map(str, B)))
  
  
  
  
if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

uoo = {}

cnt = 1
for i in a:
    uoo[i] = cnt

    cnt += 1


ans = ''

for j in range(1,n+1):
    if j == 1:
        ans += str(uoo[j])
    else:
        ans += ' '
        ans += str(uoo[j])

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

Submission status: Accepted

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))
n = ii()
A = iil()
ans = [0]*n
for i,item in enumerate(A):
    ans[item-1] = i+1

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

Submission status: Accepted

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

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:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby
    #from itertools import product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

    n = int(input())
    a = list(map(int, input().split()))
    res = []
    for i, x in enumerate(a):
        res.append([x, i])
    res.sort()
    ans = []
    for x, i in res:
        ans.append(i+1)
    print(" ".join(map(str,ans)))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby
    #from itertools import product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

    n = int(input())
    a = list(map(int, input().split()))
    res = []
    for i, x in enumerate(a):
        res.append([x, i])
    res.sort()
    ans = []
    for x, i in res:
        ans.append(i+1)
    print(*ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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 = list(map(int,input().split()))
b = [0 for j in range(n)]

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

print(*b)

Submission status: Accepted

Solution code:
n = int(input())
k = list(map(int,input().split()))
l = [0 for i in range(n)]
for i in range(n):
    l[k[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()))

out = [0] * N

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

Submission status: Accepted

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

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

s_dic_a = sorted(dic_a.items(), key=lambda x:x[1])

for s_dic_a in s_dic_a:
    print(s_dic_a[0], end=" ")

Submission status: Accepted

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

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

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

B = [AB[i][1]+1 for i in range(N)]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

B=[0]*N
i=0
while i<=N-1:
    B[i]=[A[i],i+1]
    i+=1

B=sorted(B)
C = [x[1] for x in B]
print(*C)

Submission status: Accepted

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

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

for a in ans:
    print(a)

Submission status: Accepted

Solution code:
N = int(input()) 
A =  [int(x) for x in input().split()]
B =  [[0 for i in range(2)] for j in range(N)]
for i in range(N):
    B[i][0]=A[i]
    B[i][1]=i+1

B.sort()
for i in range(N):
    if i != N-1:
        print(B[i][1], end=" ")
    else:
        print(B[i][1], end="")

Submission status: Accepted

Solution code:
from collections import namedtuple


Record = namedtuple('Record', 'number id')

N = int(input())

records = [
  Record(n, i)
  for i, n in enumerate(map(int, input().split()), 1)
]

records.sort()

print(' '.join(map(str, [r.id for r in records])))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
A = [int(i) for i in input().split()]
li = ["" for i in range(N)]
for i in range(N):
    li[A[i]-1] = str(i+1)
print(" ".join(li))

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()))
a = [[i+1, a[i]] for i in range(n)]
a = sorted(a, key=lambda x: x[1])
for a_ in a:
  print(a_[0], 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:
import numpy as np

N = int(input())
A = list(map(int, input().split()))
rank = {}
for i in range(N):
    rank[A[i]] = str(i+1)
    
print(' '.join(rank.values()))

Submission status: Accepted

Solution code:
import sys
import numpy as np
input = sys.stdin.readline

N = int(input())
A = list(map(str, np.argsort(np.array(list(map(int, input().split())))) + 1))

print(' '.join(A))

Submission status: Accepted

Solution code:
import numpy as np
from sys import stdin

def main():
  n = map(int,input().split())
  a = list(map(int, input().split()))
  b = np.argsort(a)+1
  str_ = ""
  for i in b:
    str_ = str_ + "{:d} ".format(i)  
  print(str_)
  
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


order=[None]*N
for i in range(0,N):
    order[A[i]-1]=str(i+1)
print(' '.join(order))

Submission status: Accepted

Solution code:
import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
A = np.array(lr())
B = np.argsort(A)
B += 1
print(*B)

Submission status: Accepted

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

d = {}
for i in range(n):
    d[nums[i]] = i+1

ans = []
for j in range(1, n+1):
    ans.append(str(d[j]))

print(" ".join(ans))

Submission status: Accepted

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

n = int(input())
a = list(map(int, input().split()))
memo = [[0, 0] for i in range(n)]
for i, j in enumerate(a):
    memo[i][0] = j
    memo[i][1] = i + 1
memo.sort()
for i in range(n):
    print(memo[i][1], end=' ')
print()

Submission status: Accepted

Solution code:
from operator import itemgetter
n, *A = map(int, open(0).read().split())
B = sorted(list(enumerate(A, 1)), key=itemgetter(1))
print(*map(itemgetter(0), B))

Submission status: Accepted

Solution code:
n = int(input()) #クラスの人数
a = list(map(int,(input().split()))) # 2 3 1

result = [0 for i in range(n+1)]

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

Submission status: Accepted

Solution code:
n = int(input())
*a, = map(int, input().split())
b = [(j, i) for i, j in enumerate(a)]
b.sort()
print(*[j+1 for i, j in b])

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)

b = ' '.join(b)
print(b)

Submission status: Accepted

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

Submission status: Accepted

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

from collections import defaultdict
 
counter = defaultdict(int)
 
for i in range(N):
    counter[i+1] += A[i]

ans = sorted(counter.items(), key=lambda x: x[1])

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

Submission status: Accepted

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

import numpy as np

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

Submission status: Accepted

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

    lst = [0 for _ in range(n)]
    for idx, a in enumerate(A):
        lst[a-1] = str(idx + 1)

    print(' '.join(lst))


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
ans = ['']*N
for id,name in enumerate(A):
  ans[name-1] = str(id+1)
print(' '.join(ans))

Submission status: Accepted

Solution code:
import sys
import math

from collections import defaultdict
from collections import deque
def load(vtype=int):
    return vtype(input().strip())
def load_list(seplator=" ", vtype=int):
    return [vtype(v) for v in input().strip().split(seplator)]
def exit():
    import sys
    sys.exit(0)
def perm_sub(li, used):
    if len(li) == len(used):
        return [deque()]
    k = []
    for i in range(len(li)):
        if i in used:
            continue
        used.add(i)
        sub_list = perm_sub(li, used)
        for sub in sub_list:
            sub.appendleft(li[i])
        k.extend(sub_list)
        used.discard(i)
    return k
def perm_li(li):
    return perm_sub(li, set())
def perm_n(n):
    return perm_sub(list(range(n)), set())
def join_i(li, sep=""):
    return sep.join([str(e) for e in li])
def li2n(li):
    n, base = 0, 1
    for i in range(len(li)-1, -1, -1):
        n += li[i] * base
        base *= 10
    return n
def sli2ili(li):
    return [int(s) for s in li] 
def prime_list(n):
    li = [i for i in range(2, n+1)]
    for i in range(len(li)):
        if li[i] >= int(math.sqrt(n)):
            break
        if li[i] == -1:
            continue
        for j in range(i+1, len(li)):
            if li[j] % li[i] == 0:
                li[j] = -1
    return [n for n in li if n != -1]
def gcd(a, b):
    a, b = max(a, b), min(a, b)
    while True:
        r = a % b
        if r == 0: return b
        a, b = b, r
def lcm(a, b):
    return int(a * b / gcd(a,b))
def all_subset(li):
    s = []
    n = len(li)
    for bit in range(0, (1<<(n+1))):
        ss = set()
        for i in range(0, n):
            if (bit & (1 << i)):
                ss.add(li[i])
        s.append(ss)
    return s

n = load()
A = load_list()

result = [0 for i in range(n+1)]
for i in range(n):
    result[A[i]] = i+1

print(join_i(result[1:], " "))

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 sys
input = sys.stdin.readline
N = int(input())
A = list(map(int,input().split()))

ans = [0] * N
for k,v in enumerate(A):
    ans[v-1] = k+1

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

Submission status: Accepted

Solution code:
n = int(input())
L = list(map(int,input().split()))
li = []
for i,j in enumerate(L):
    li.append((i+1,j))

li.sort(key = lambda x:x[1])
ans = []
for i in range(n):
    ans.append(li[i][0])
print(*ans)

Submission status: Accepted

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

Submission status: Accepted

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

if __name__=='__main__':
    main()

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 = [int(i) for i in input().split()]
order = [0] * n
for i in range(n):
    order[a[i] - 1] = i + 1
for i in range(n - 1):
    print(str(order[i]), end=' ')
print(order[n - 1])

Submission status: Accepted

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

order = [ [a_i, i + 1] for i, a_i in enumerate(a)]
order.sort(key=lambda x: x[0])

arr = [str(j[1])for j in order]
print(' '.join(arr))