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())
order = [int(x) for x in input().split()]

arr = [-1] * N

for i in range(len(order)):
	arr[order[i] - 1] = i + 1

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

Submission status: Accepted

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

a = sorted(range(n), key=lambda x: a[x])
a = [print(i+1, end=' ') for i in a]

Submission status: Accepted

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

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

AA.sort(key=lambda x: x[1])

for a, b in AA:
    print(a, 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)

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=[]
for i, val in enumerate(a,1):
  l.append([i,val])
l=sorted(l, key = lambda x:x[1])
for x in l:
  print(x[0], end=" ")

Submission status: Accepted

Solution code:
N = int(input())
K = list(map(int,input().split()))
M = dict(zip(range(1,N+1),K))
M = sorted(M.items(), key = lambda x:x[1])
newM = []
for i in M:
  newM.append(i[0])
print(*newM)

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    a = [[v, i + 1] for i, v in enumerate(list(map(int, input().rstrip('\n').split())))]
    a.sort()
    print(*[a[i][1] for i in range(n)])


if __name__ == '__main__':
    slove()

Submission status: Accepted

Solution code:

_ = input()
arrive = {}
n = list(map(int,input().split()))
for i,n in zip(range(len(n)),n):
	arrive[i+1] = n
arrive = sorted(arrive.items(),key=lambda x:x[1])
for ar_tuple in  arrive :
	print(ar_tuple[0],end=" ")
print("")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
A = list(map(int, input().split()))
print(*[i+1 for i in np.argsort(A)])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# 入力OK
n = int(input())
a = list(map(int,input().split()))

# 辞書に入れたほうがやりやすそう
dic = {}
for i in range(len(a)):
      dic.update([(i,a[i])]) #辞書に 要素，その番号を入れていく
      #print(d)
new_dic = sorted(dic.items(),key=lambda x:x[1])

li = []
for i in range(len(a)):
      li.append(new_dic[i][0] +1) #0から始めるからプラスしとく
print(' '.join(map(str, li))) #リストpの数値を文字列に変換する，そして''空白刻みで表示させる

Submission status: Accepted

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

Submission status: Accepted

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

d={}
for i in range(len(a)):
      d.update([(i,a[i])])
new_d = sorted(d.items(),key=lambda x:x[1])

p=[]
for i in range(len(a)):
      p.append(new_d[i][0]+1)
print(' '.join(map(str,p)))

Submission status: Accepted

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

classmate = [[0] * 2 for i in range(N)]

for i in range(len(number_classmate)):
    classmate[i][0] = number_classmate[i]
    classmate[i][1] = i+1

classmate.sort(key=lambda s: s[0])

mapped_list = map(str, list(i[1] for i in classmate))
first_index = ' '.join(mapped_list)

print(first_index)

Submission status: Accepted

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

cnt = 1
for i in A:
    A_dict[cnt] = i
    cnt += 1

A_dict_sorted = sorted(A_dict.items(),key= lambda x:x[1])

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

Submission status: Accepted

Solution code:
from operator import itemgetter
n = int(input())
ordered_info = [ [i, int(num)] for i, num in zip(range(n), input().split(' '))]
ordered_info.sort(key = itemgetter(1))
ans = ''
for i, _ in ordered_info:
    print(i+1, end=' ')

Submission status: Accepted

Solution code:
n=int(input())
a=input()
A=a.split()
B=a.split()
C=[]
for i in range(len(A)):
    C.append(0)
for j in range(len(A)):
    A[j]=int(A[j])
for k in range(len(A)):
    C[A[k]-1]=k+1
for l in range(len(C)):
    C[l]=str(C[l])
s = ' '.join(C)
print(s)

Submission status: Accepted

Solution code:
N = int(input())
A_list = list(map(int,input().split()))
A_dict = {}

cnt = 1
for i in A_list:
    A_dict[cnt] = i
    cnt += 1

A_dict_sorted = sorted(A_dict.items(),key= lambda x:x[1])
#print(A_dict)
#print(A_dict_sorted)
#print(A_dict_sorted[0][0])

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

Submission status: Accepted

Solution code:
from operator import itemgetter
def main():
    N = int(input())
    A = [[i,int(inp)] for i,inp in zip(range(N),input().split(' '))]
    A.sort(key = itemgetter(1))
    for i,a  in A:
        print(i+1,end = ' ')
    return
main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
d = []

A = list(map(int, input().split()))
k = []
ANS = []
for i in range(1, N+1):
  k.append(i)

d = list(zip(k, A))
d.sort(key=lambda x:x[1])

for b in range(N):
  print(d[b][0], end=" \n"[b + 1 == N])

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
lis =[]
for i, val in enumerate(a):
	lis.append([val , i])
lis = sorted( lis ,key = lambda x: x[0])
for x in lis:
	print( x[1]+1 , end=" ")

Submission status: Accepted

Solution code:
N=int(input())
Ai = list(map(int, input().split()))
student_numbers = [i+1 for i in range(N)]
Ai_n_stu_num = list(zip(Ai, student_numbers))
Ai_n_stu_num.sort(key = lambda x:x[0])
i = 0
while (i < N):
    print(Ai_n_stu_num[i][1], end=" ")
    i+=1

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
b=[i+1 for i in range(n)]
c=list(zip(a,b))
c.sort(key=lambda x: x[0])
i=0
while(i<n):
	print(c[i][1],end=" ")
	i+=1

Submission status: Accepted

Solution code:
from sys import stdin
N = int(input())
A = list(map(int,stdin.readline().rstrip().split()))
B = [0] * N

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

for i in B:
    print(i)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
tmp = []
for idx, val in enumerate(A):
    tmp.append((val, idx + 1))

tmp.sort()

for i in tmp:
    print(i[1])

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    n = II()
    ans = 0
    for i in range(1, n + 1):
        ans += i & 1
    print(ans/n)
    return

#B
def B():
    n, k = LI()
    h = LI()
    ans = 0
    for i in h:
        ans += i >= k
    print(ans)
    return

#C
def C():
    n = II()
    a = LI()
    d = defaultdict(int)
    for i in range(n):
        d[a[i] + 1] = i + 1
    for _, v in sorted(d.items()):
        print(v, end=" ")
    print()
    return

def primes(n):
    """ Input n>=6, Returns a list of primes, 2 <= p < n """
    """ 6以上の数であれば p (素数) <= n のlistを返す """
    n, correction = n-n%6+6, 2-(n%6>1)
    sieve = [True] * (n//3)
    for i in range(1,int(n**0.5)//3+1):
        if sieve[i]:
            k=3*i+1|1
            sieve[      k*k//3      ::2*k] = [False] * ((n//6-k*k//6-1)//k+1)
            sieve[k*(k-2*(i&1)+4)//3::2*k] = [False] * ((n//6-k*(k-2*(i&1)+4)//6-1)//k+1)
    return [2,3] + [3*i+1|1 for i in range(1,n//3-correction) if sieve[i]]

#D
def D():
    a, b = LI()
    p = primes(int(math.sqrt(max(a, b))) + 1)
    ans = 1
    for i in p:
        if a % i == b % i == 0:
            ans += 1
    print(ans)
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    C()

Submission status: Accepted

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

Submission status: Accepted

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

S = [' ']*N

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

print(" ".join(S))

Submission status: Accepted

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

sort = [1]*N
for k in range(0,len(A)):
    sort[A[k]-1] = k + 1
    
sort = list(map(str, sort))
ans = " ".join(sort)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = [(int(a), num) for a, num in zip(input().split(" "), list(range(1,n + 1)))]
a.sort()
m = len(a)
for i in range(m):
    print(a[i][1],end="")
    if(i + 1 < m):
        print(" ",end="")
print()

Submission status: Accepted

Solution code:
N = int(input())

A = [int(i) for i in input().split()]

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

for i in range(N):
    print(B[i])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

N = int(input())

A = np.array([int(i) for i in input().split()])

x = np.argsort(A)
x += 1

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

Submission status: Accepted

Solution code:
n = int(input())
li = list(map(int, input().split()))
li2 = [[0 for i in range(2)] for j in range(n)]

for i, item in enumerate(li):
    li2[i][0] = i + 1
    li2[i][1] = item

sortedList = sorted(li2, key=lambda x: x[1])
line = ""
for i in range(n):
    line += str(sortedList[i][0]) + ' '
print(line[:-1])

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 
for i in range(n):
  print(B[i])

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

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

lst2 = [0 for i in range(N)]

for i in range(N):
	lst2[lst[i]-1] = i+1

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

Submission status: Accepted

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

p.sort(key=lambda x: x[1])
q = list(map(str,[x[0] for x in p]))
r = ' '.join(q)


print (r)

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
a=[[a[x],x+1] for x in range(len(a))]
a.sort()
for x in a:
    print(x[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] = str(i + 1)

print(' '.join(b))

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
arrive_pair = []
for idx in range(len(A)):
	arrive_pair.append([A[idx], idx])
arrive_pair.sort()
arrival = list(map(lambda x: str(x[1] + 1), arrive_pair))
print(' '.join(arrival))

Submission status: Accepted

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

Submission status: Accepted

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

N = int(input())
A = list(map(int, input().split()))
r = [0] * N

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

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
Ai = list(zip(A, list(range(1, N + 1))))
Ai.sort()
ans = []
for a in Ai:
    ans.append(a[1])
print(*ans)

Submission status: Accepted

Solution code:
N = int(input())
A = [a for a in map(int, input().split())]
R = {}
for i in range(1,N+1):
    R[i] = A[i-1]

R_sorted = sorted(R.items(), key=lambda x: x[1])

Ans = ""
for a in R_sorted:
    Ans = Ans + "{0} ".format(str(a[0]))

print(Ans)

Submission status: Accepted

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

aa = [0]*N

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

Submission status: Accepted

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

aa = sorted(range(N), key=lambda k:A[k])

for x in aa:
    print(x+1,end=" ")

Submission status: Accepted

Solution code:
n = int(input())
a_array = [int(x) for x in input().split()]
counter = dict()
for index, a in enumerate(a_array, 1):
    counter[a] = index

a = sorted(counter.items(), key=lambda x: x[0])
for i, j in a:
    print(j, end=" ")
print("")

Submission status: Accepted

Solution code:
n=int(input())
arr=list(map(int,input().split()))
arr2=[(arr[i],i+1) for i in range(n)]
arr2=sorted(arr2,key=lambda x:x[0])
ans=[]
for i in range(n):
  ans.append(arr2[i][1])
print(*ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
note = [int(j) for j in input().split()]

a = dict()
for index, num in enumerate(note):
    a[num] = index+1


b = sorted(a.items(), key=lambda x: x[0])
for i in b:
    print(i[1], end=" ")
print()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a = int(input())
b = list(map(int,input().split()))

ret = [0] * a
for i,v in enumerate(b):
    ret[v-1] = i+1
print(" ".join(map(str,ret)))

Submission status: Accepted

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

O=[0]*N

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

print(*O)

Submission status: Accepted

Solution code:
import numpy as np

n = int(input())
stu = list(map(int, input().split()))
stu = np.argsort(stu)

[print(i + 1, end=" ") for i in stu]
print()

Submission status: Accepted

Solution code:
n = int(input())
a_list = map(int,input().split())
a_dict = {}
for i,a in enumerate(a_list):
  a_dict[a] = i+1
sorted_a = sorted(a_dict.items(),key=lambda x:x[0])
for j in sorted_a:
  print(j[1], end=" ")

Submission status: Accepted

Solution code:
N = int(input())
INF = 10**6

ans = [INF] * N
num = 1
for i in input().split():
    x = int(i) - 1

    ans[x] = num
    num += 1

print(*ans)

Submission status: Accepted

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

print(*attend_list)

Submission status: Accepted

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

students = [[i+1, A[i]] for i in range(N)]
students = sorted(students, key = lambda s : s[1])
print(' '.join(list(map(str,[s[0] for s in students]))))

Submission status: Accepted

Solution code:
#y,m,d=map(int,input().split())
#a,b=map(int,input().split())
n=int(input())
#a=int(input())
#b=int(input())
#s=list(input())
#T=input()
#recipe=[list(input().split())for _ in range(n)]
#m=int(input())
#have=[list(input().split())for _ in range(m)]
#s=[list(input())for _ in range(n)]
#b=list(map(int,input().split()))
#b=list(map(int,input().split()))
a=list(map(int,input().split()))
#c=list(map(float,input().split()))
#n=int(input())
#s=[list(map(int,input().split()))for _ in range(n)]
#s=[list(input().split())for _ in range(n)]
dic={}
for i in range(n):
    dic[a[i]]=i+1
dic=sorted(dic.items(),key=lambda x:x[0])
ans=[]
for i in range(n):
    ans.append(dic[i][1])
print(*ans)

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int,input().split()))
pr = []
for i in range(n):
    pr.append([l[i],i+1])
pr.sort()
ans = ""
for i in range(n):
    ans += str(pr[i][1])+ " "
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(N: int, A: "List[int]"):
    l = [0] * N
    for i, v in enumerate(A):
        l[v - 1] = i + 1
    print(' '.join([str(i) for i in l]))
    return


# Generated by 1.1.5 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

list=[]
for i, student in enumerate(Students, 1):
    list.append([i, student])

K=sorted(list, key=lambda x: x[1])

list2=[]
for t in range(N):
        list2.append(K[t][0])

print(*list2)

Submission status: Accepted

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

N = int(input())
As = [int(i) for i in input().split()]
order = [0]*N

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

Submission status: Accepted

Solution code:
import heapq

n = int(input())
priority_list = []

student = 0
for priority in list(map(int, input().split())):
    student += 1
    priority_list.append((priority, str(student)))

heapq.heapify(priority_list)

print(' '.join([ heapq.heappop(priority_list)[1] for _ in range(n) ]))

Submission status: Accepted

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

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

for i in range(n):
    print(ans_list[i], end=' ')
print('\n')

Submission status: Accepted

Solution code:
N = int(input())
Ai_list = [number for number in map(int, input().split())]
Ai_And_i_list = {}
for i, Ai in enumerate(Ai_list):
    Ai_And_i_list[Ai] = i + 1
sorted_list = sorted(Ai_And_i_list.items())
for key, value in sorted_list:
    print(value)

Submission status: Accepted

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

data = [[0 for i in range(2)] for j in range(n)]
for i in range(n):
    data[i][0] = a[i]
    data[i][1] = i + 1
data.sort()
for i in range(n):
    print(data[i][1], end = " ")

Submission status: Accepted

Solution code:
N=int(input())
n=[list(range(2)) for i in range(N)]
h=list(map(int,input().split()))
for i in range(N):
    n[i][0]=h[i]
    n[i][1]=i+1
std=sorted(n)
for i in range(N):
    print(std[i][1], end=' ')

Submission status: Accepted

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

Submission status: Accepted

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

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())
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()))
B=[[0,0] for i in range(N)]
for i in range(N):
    B[i][0]=i
    B[i][1]=A[i]
B.sort(key=lambda x:x[1])
Ans=[]
for i in range(N):
    Ans.append(B[i][0]+1)
print(*Ans)

Submission status: Accepted

Solution code:
def main():
  d = {}
  input()
  l = list(map(int, input().split()))
  result_list = [0] * len(l)
  for i in range(len(l)):
    result_list[l[i] - 1] = i+1
  print(' '.join(map(str,result_list)))

main()

Submission status: Accepted

Solution code:
n, *a = map(int, open(0).read().split())

ans=[0]*(n)
for i, j in enumerate (a, 1):
  ans[j-1] = i
print(" ".join(map(str,ans)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = int(input())
list = [int(item) for item in input().split()]
 
order = dict(zip(range(1,num+1), list))
p_order = sorted(order.items(), key=lambda x:x[1])
 
 
 
[print(item[0], end=' ') for item in p_order]

Submission status: Accepted

Solution code:
num = int(input())
list = [int(item) for item in input().split()]
 
order = dict(zip(range(1,num+1), list))
p_order = sorted(order.items(), key=lambda x:x[1])
 
 
 
for i in [item[0] for item in p_order]:
    print(str(i) + ' ', end='')

Submission status: Accepted

Solution code:
n = int(input())
order = input().split(" ")
ans = [0 for _ in range(n)]

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

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

Submission status: Accepted

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

ordered = [0 for _ in range(len(a))]
for i, item in enumerate(a, 1):
    ordered[item - 1] = i

for item in ordered:
    print(item, end=' ')

Submission status: Accepted

Solution code:
n=int(input())
A=list(zip(list(map(int,input().split())),list(range(1,n+1))))
A.sort(key=lambda x:x[0])
for a in A:
    print(a[1],end=" ")

Submission status: Accepted

Solution code:
N = int(raw_input())
O = list(map(int, raw_input().split()))

res = {}
for i in range(N):
    res[O[i]] = i

result = []
for i in range(N):
    result.append(res[i+1])

print(' '.join(str(x+1) for x in result))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]

N = int(input())
l = list(map(int, input().split()))
L = [None]*N

for i in range(N):
    n = l[i]
    L[i] = [n,i+1]

L.sort()
ans = [None]*N
for i in range(N):
    ans[i] = str(L[i][1])
print(' '.join(ans))

Submission status: Accepted

Solution code:
n = int(input())
a = map(int,input().split())
f = {}
count = 1
for i in a:
  f[count] = i
  count+=1
inv_map = {v: k for k, v in f.items()}
[print(inv_map[i],end=' ') for i in range(1,n+1)]

Submission status: Accepted

Solution code:
N=int(input())
A=map(int,input().split())
A=list(A)
B={}
for i in range(1,N+1):
    B[i]=A[i-1]

B=sorted(B.items(),key=lambda x:x[1])
for k in B:
    print(k[0],end=" ")

Submission status: Accepted

Solution code:
input()
li=list(map(int,input().split()))
enu_li=[[i,value] for i,value in enumerate(li,1)]

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

result=[str(value[0]) for value in enu_li]

print(' '.join(result))

Submission status: Accepted

Solution code:
from functools import reduce
from itertools import *

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

N = int(input())
A = read()

ans = [None for _ in range(N)]
for i, v in enumerate(A):
    ans[v-1] = str(i+1)
print(" ".join(ans))

Submission status: Accepted

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

num_list = attend_list.copy()

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

print("{}".format(" ".join(num_list)))

Submission status: Accepted

Solution code:

N    = int(input())
order=list(map(int,input().split()))
output=[0]*N

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

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

Submission status: Accepted

Solution code:
def main():
    N = input()
    L = [int(i) for i in input().split()]
    
    siL = sorted(range(len(L)), key=lambda k: L[k])
    for i in siL:
        print(i + 1, end=" ")

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
#C
N = int(input())
As = list((map(int, input().split())))
ardic = {}
for i in range(N):
    ardic[As[i]] = i + 1 
result = [ardic[i] for i in range(1,N+1)]
print(' '.join(list(map(str,result))))

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in input().split()] 
answer = [0 for _ in range(n)]
 
for index, aa in enumerate(a):
  answer[aa-1] = index+1

for an in answer:
  print(an)

Submission status: Accepted

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

index_order = sorted(range(len(A)), key=lambda x: A[x])

res = [0]*N

for i,index in enumerate(index_order):
    res[i] = index + 1

print(*res)

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    n = int(input())
    a = list(map(int, input().split(' ')))
    b = sorted(list(zip(a, range(len(a)))), key=lambda x: x[0])
    [print(x[1] + 1, end=' ') for x in b]

Submission status: Accepted

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

X = list(range(1,N+1))

d = dict(zip(A, X))
d_sort = dict(sorted(d.items(), key=lambda x: x[1]))

ans_list = list(d_sort.values())
B = map(str, ans_list)
ans = ' '.join(B)
print(ans)

Submission status: Accepted

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

inc = 0
for val in a:
    p[val-1] = inc
    inc+=1

ans = ""
for x in p:
    ans += str(x + 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):
    ans[a[i]-1] = i + 1

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

Submission status: Accepted

Solution code:

N = int(input())
lis = []
lis = list(map(int,input().split()))
first = [0]*N

for i in range(N):
    num = lis[i] - 1
    first[num] = i

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#map(int, input().split())
N=int(input())
a=list(map(int, input().split()))
A={a[i] : i+1 for i in range(N)}
A=sorted(A.items(), key=lambda x:x[0])
s=''
for i, j in A:
    s+=str(j)+' '
print(s[0:-1])

Submission status: Accepted

Solution code:
import heapq
N = int(input())

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

list = [(A_list[i],i+1) for i in range(N)]
heapq.heapify(list)

for i in range(N):
    print(heapq.heappop(list)[1], end=" ")

Submission status: Accepted

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

B = [0 for _ in range(N)]
for i, a in enumerate(A):
    B[a - 1] = str(i + 1)

print(' '.join(B))

Submission status: Accepted

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

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

li = [0 for _ in range(N)]
for i, a in enumerate(A):
    li[a-1] = str(i+1)
    
print(" ".join(li))

Submission status: Accepted

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

#%%
N =  int(a)
A = [int(x) for x in b.split()]

come_order = [[A[x],x+1] for x in range(len(A))]
come_order.sort()
#%%
result = [x[1] for x in come_order]
print(*result)

Submission status: Accepted

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

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

print(*B[1:])

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)
print(*[B[i][1] for i in range(N)])

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import numpy as np
import sys
input = sys.stdin.readline


def main():
    n = int(input())
    a = list(map(int, input().split()))
    a = np.argsort(np.array(a))+1
    # print(a)
    # result = []
    # for i in range(1, n + 1):
    #     result.append(a.where(lambda x: x == i))
    print(*a, sep=' ')


if __name__ == '__main__':
    main()