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:
import numpy as np
n=int(input())
a=np.array(list(map(int,input().split())))
l=np.argsort(a)
ans=[i+1 for i in l]
print(*ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
l=sorted([[inx+1,j] for inx,j in enumerate(a)],key=lambda x:x[1])
ans=[i for i,j in l]
print(*ans)

Submission status: Accepted

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

b = [[0, 0]] * n
c = [0] * n

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

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

print(*[b[i][1] for i in range(n)])

Submission status: Accepted

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

ans = sorted(a)
print(*[ans[i][1] for i in range(n)])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

A = sorted([[A[i], i+1] for i in range(N)])
Entr = [str(i[1]) for i in A]
Comp = " ".join(Entr)
print(Comp)

Submission status: Accepted

Solution code:
N = int(input())
A = [[0]*2 for i in range (N)]
tmp = list(map(int,input().split()))
for i in range (N):
    A[i][0] = tmp[i]
#print(A)

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

#print(A)
A.sort()
#print(A)

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

output=" ".join(ans)

print(output)

Submission status: Accepted

Solution code:
n=int(input())
s=list(map(int,input().split()))
d={}
for x in range(len(s)):
    d[x]=s[x]
d=sorted(d.items(),key=lambda e: e[1])
p=list(map(str,[i+1 for i,j in d]))
print(" ".join(p))

Submission status: Accepted

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

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

ains = sorted(ain)
#print(ains)

#print(*ains)
print(*[x[1] for x in ains])

Submission status: Accepted

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

for i in range(n):
    seq = a_lst[i]
    seq_lst[seq-1] = i+1

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

CL = sorted(enumerate(AL, 1), key=lambda x : x[1])
print(" ".join(map(lambda x : str(x[0]), CL)))

Submission status: Accepted

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

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

print(' '.join(ans))

Submission status: Accepted

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

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

A.sort()
print(' '.join([str(a[1]) for a in A]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
         
ans = [0] * N
for i 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 = []

for i in range(n):
    b.append([a[i],i + 1])
    
b.sort()
for j in b:
    print(j[1],end=' ')
print()

Submission status: Accepted

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

# 登校した順番のリスト
B = []

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

# 2番目の要素に注目してソート
B.sort(key=lambda x: x[1])

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

# 改行
print()

Submission status: Accepted

Solution code:
N=int(input())
D={}
ans=[]
numlist=list(map(int,input().split()))
for i,j in zip(numlist,range(1,N+1)):
    D.update({i:j})
for k in range(1,N+1):
    ans.append(D[k])
 
a=" ".join(map(str,ans))
print(a)

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))
n=int(N)
ans=[]
while n>0:
    ans.append(0)
    n-=1
for i, j in enumerate(A):
    ans[j-1]=str(i+1)
print(" ".join(ans))

Submission status: Accepted

Solution code:
n=int(input())
p=list(map(int,input().split()))
q=[]
r=[]
for i in range(n):
  q.append([p[i],i+1])
q.sort()
for i in range(n):
  r.append(q[i][1])
res=map(str,r)
t=' '.join(res)
print(t)

Submission status: Accepted

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

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

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

print(*l,sep=" ")

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 4, Feb, 2020
"""

import sys

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N, *A = map(int, read().split())
ans = [None] * N
for num, i in enumerate(A):
    ans[i-1] = num + 1
print(*ans)

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    a = list(map(int, input().split()))
    d = {}
    for i, num in enumerate(a, start=1):
        d[num] = i
    lst = []
    for _, num in sorted(d.items()):
        lst.append(num)
    print(*lst, sep=" ")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

arr = [0] * (n+1)

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

for i in range(1,len(arr)-1):
    print(arr[i],end = ' ')
print(arr[-1])

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
order = [0 for i in range(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()))
b = [0 for i in range(n)]
cnt = 1
for i in a:
  b[i-1] = cnt
  cnt += 1
for i in b:
  print(i)

Submission status: Accepted

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

b = [0]*n

num = 1
for i in a:
  b[i-1] = num
  num += 1
  
s = ""
for j in range(n):
  s += str(b[j]) + " "
  
print(s)

Submission status: Accepted

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

for i in range(n):
	A2[i][0] = A[i]
#print(A2)
A2 = sorted(A2,key = lambda x:x[0])

for i in range(n):
	ans.append(A2[i][1])
print(*ans)

Submission status: Accepted

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

x = [[0 for _ in range(2)] for _ in range(n)]
for i in range(n):
    x[i][0] = a[i]
    x[i][1] = i+1
    
x.sort()
print(*[x[i][1] for i in range(n)])

Submission status: Accepted

Solution code:
def main():
  import sys
  a=int(input())
  b=tuple(map(int,sys.stdin.readline().split()))
  c=[[i,b[i-1]] for i in range(1,a+1)]
  d=sorted(c,key=lambda x:x[1])
  e=[i[0] for i in d]
  print(" ".join(map(str,e)))
if __name__=="__main__":
  main()

Submission status: Accepted

Solution code:
def main():
  import sys
  a=int(input())
  b=tuple(map(int,sys.stdin.readline().split()))
  c=[None]*a
  d=1
  for e in b:
    c[e-1]=d
    d=d+1
  print(" ".join(map(str,c)))
if __name__=="__main__":
  main()

Submission status: Accepted

Solution code:
def main():
  import sys
  a=int(input())
  b=tuple(map(int,sys.stdin.readline().split()))
  c=[None]*a
  d=1
  for e in b:
    c[e-1]=d
    d+=1
  print(" ".join(map(str,c)))
if __name__=="__main__":
  main()

Submission status: Accepted

Solution code:
def main():
  import sys
  n=int(input())
  AA=tuple(map(int,sys.stdin.readline().split()))
  b=[None]*n
  I=1
  for index in AA:
    b[index-1]=I
    I+=1
  print(" ".join(map(str,b)))
if __name__=="__main__":
  main()

Submission status: Accepted

Solution code:
def main():
  import sys
  numberOfStudent=int(input())
  orderOfArrive=tuple(map(int,sys.stdin.readline().split()))
  studentArrive=[None]*numberOfStudent
  count=1
  for arrive in orderOfArrive:
    studentArrive[arrive-1]=count
    count+=1
  print(" ".join(map(str,studentArrive)))
if __name__=="__main__":
  main()

Submission status: Accepted

Solution code:
def main():
  import sys
  n=int(input())
  a=tuple(map(int,sys.stdin.readline().split()))
  b=[None]*n
  i=1
  for j in a:
    b[j-1]=i
    i+=1
  print(" ".join(map(str,b)))
if __name__=="__main__":
  main()

Submission status: Accepted

Solution code:
def main():
  import sys
  
  n=int(input())
  a=tuple(map(int,sys.stdin.readline().split()))
  b=[None]*n
  
  for number,index in enumerate(a,1):
    b[index-1]=number
  
  print(" ".join(map(str,b)))
  
if __name__=="__main__":
  main()

Submission status: Accepted

Solution code:
def main():
  n, *a = map(int, open(0).read().split())
  b=[None]*n
  i=1
  for index in a:
    b[index-1]=i
    i+=1
  print(" ".join(map(str,b)))
if __name__=="__main__":
  main()

Submission status: Accepted

Solution code:
def main():
  import sys
  n=int(input())
  a=tuple(map(int,sys.stdin.readline().split()))
  b=[None]*n
  i=1
  for index in a:
    b[index-1]=i
    i+=1
  print(" ".join(map(str,b)))
if __name__=="__main__":
  main()

Submission status: Accepted

Solution code:
def main():
  import sys
  n=int(input())
  a=tuple(map(int,sys.stdin.readline().split()))
  b=[0]*n
  i=1
  for index in a:
    b[index-1]=i
    i+=1
  print(" ".join(map(str,b)))
if __name__=="__main__":
  main()

Submission status: Accepted

Solution code:
import sys
n=int(input())
a=tuple(map(int,sys.stdin.readline().split()))
b=[0]*n
i=1
for index in a:
  b[index-1]=str(i)
  i+=1
print(" ".join(b))

Submission status: Accepted

Solution code:
def main():
  import sys
  n=int(input())
  a=tuple(map(int,sys.stdin.readline().split()))
  b=[0]*n
  i=1
  for index in a:
    b[index-1]=str(i)
    i+=1
  print(" ".join(b))
if __name__=="__main__":
  main()

Submission status: Accepted

Solution code:
def main():
  import sys
  n=int(input())
  l=[0]*n
  i=1
  for o in map(int,sys.stdin.readline().split()):
    l[o-1]=str(i)
    i+=1
  print(" ".join(l))
if __name__=="__main__":
  main()

Submission status: Accepted

Solution code:
def main():
  n=int(input())
  l=[0]*n
  i=1
  for o in map(int,input().split()):
    l[o-1]=str(i)
    i+=1
  print(" ".join(l))
if __name__=="__main__":
  main()

Submission status: Accepted

Solution code:
def main():
  import sys
  n=int(input())
  l=[0]*n
  i=1
  for o in map(int,input().split()):
    l[o-1]=str(i)
    i+=1
  print(" ".join(l))
if __name__=="__main__":
  main()

Submission status: Accepted

Solution code:
def main():
  n,*a = map(int, open(0).read().split())
  b=[0]*n
  for index,number in enumerate(a,1):
    b[number-1]=str(index)
  print(" ".join(b))
if __name__=="__main__":
  main()

Submission status: Accepted

Solution code:
def main():
  import sys
  n=int(input())
  a=tuple(map(int,sys.stdin.readline().split()))
  b=[0]*n
  for index,number in enumerate(a):
    b[number-1]=str(index+1)
  print(" ".join(b))
if __name__=="__main__":
  main()

Submission status: Accepted

Solution code:
def main():
  n=int(input())
  a=list(map(int,input().split()))
  b=[0]*n
  for index,number in enumerate(a):
    b[number-1]=str(index+1)
  print(" ".join(b))
if __name__=="__main__":
  main()

Submission status: Accepted

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

Submission status: Accepted

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

order_dict = {a: i+1 for i, a in enumerate(A)}
oreder_list = [order_dict[i] for i in range(1, N+1)]

print(*oreder_list)

Submission status: Accepted

Solution code:
import numpy as np
from sys import stdin
from copy import deepcopy
from functools import reduce
from fractions import gcd
import math
import itertools
from collections import Counter
from itertools import chain  ##list(chain.from_iterable(l)) ##flatten
from heapq import heappush, heappop

"""
N = int(input())
A, B = map(int,input().split())
A = list(map(int,input().split())) ## 横一列
A = [int(input()) for _ in range(N)] ## 縦一列
lst = [list(map(int,input().split())) for i in range(M)] ## 二次元
"""

N = int(input())
A = list(map(int,input().split())) ## 横一列

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

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

for i in range(N):
  print(lst_sorted[i][0])

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
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)]

def main():
	N = II()
	A = LI()
	order = [0]*N
	for i,a in enumerate(A):
		order[a-1] = i+1
	order = list(map(str,order))
	print(" ".join(order))

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())

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

dp = [0 for j in range(a)]

for i in range(a):
    dp[t[i]-1] += i+1

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

l = [0]*n
for i, a in enumerate(a_list,1):
    l[a-1] = i
    
print(*l)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

mapping = {ai : i for i, ai in enumerate(A, 1)}
print(" ".join(str(mapping[ai]) for ai in range(1, N + 1)))

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
A = LIST()

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

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

Submission status: Accepted

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

B=[0]*(N+1)
for i in range(0,N):
    B[A[i]]=i+1
B.remove(0)
print(*B)

Submission status: Accepted

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

sdict = {}
count = 1
for x in students:
  sdict[x] = count
  count += 1

sdict = sorted(sdict.items())

ans = ""
for x in sdict:
  ans += (str(x[1])+" ")
print(ans[:-1])

Submission status: Accepted

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

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

answer=" ".join(answer_list)
print(answer)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
arr = {}
for i in range(N):
  arr[A[i]] = i + 1
for i in range(N):
  print(arr[i+1], end="")
  if i == N-1:
    print("\n", end="")
  else:
    print(" ",end="")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
l = [(i,j) for i,j in enumerate(map(int, input().split()), start=1)]
print(*[i for i, j in sorted(l, key=lambda x:x[1])])

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()))
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=[int(x) for x in 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 numpy as np
n = int(input())
a = np.array(list(map(int, input().split())))

print(*list(map(lambda x : x + 1, np.argsort(a))))

Submission status: Accepted

Solution code:
N=int(input())
A = list(map(int,input().split()))
ans = []
for i,n in enumerate(A):
    ans.append((i+1,n))
ans.sort(key = lambda x:x[1])
for i,j in ans:
    print(i,end= ' ')

Submission status: Accepted

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


students = {}
for i in range(n):
  students[AS[i]] = i
for i in range(n):
  print(students[i+1]+1, end = ' ')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
people_count = list(map(int, input().split()))


people_count = np.array(people_count)
arg = people_count.argsort()
for i in arg:
    print(i+1, end=" ")

Submission status: Accepted

Solution code:
N = int(input())
a_list = list(map(int, input().split()))
dic = {}
for i in range(N):
  dic[a_list[i]] = i + 1
  
for i in range(1, N + 1):
  print(dic[i], end=' ')

Submission status: Accepted

Solution code:
d = int(input())
nums = map(int, input().split(' '))
num_dict = {}
for i, n in enumerate(nums):
  num_dict[i+1] = n
sorted_num_dict = sorted(num_dict.items(), key=lambda x:x[1])
l = [str(a[0]) for a in sorted_num_dict]
s = ' '.join(l)
print(s)

Submission status: Accepted

Solution code:
N = int(input())
L = [_ for _ in map(int,input().split())]
res = []
for student,people in enumerate(L):
    res.append([people,student])
res.sort()
for s in res:
    print(s[1]+1,end = " ")

Submission status: Accepted

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

for i in range(a):
  b[c[i]-1]+=i+1
print(' '.join(map(str, b)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
nums = list(map(int,input().split(" ")))
res = [0 for _ in range(len(nums))]
for i in range(len(nums)):
    index = i+1
    cnt = nums[i]
    res[cnt-1] = index
print(*res,sep=" ")

Submission status: Accepted

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

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



print(" ".join(ans))

Submission status: Accepted

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

Submission status: Accepted

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

[print(i[1],end=' ') for i in A]

Submission status: Accepted

Solution code:
n = int(input())
his = list(map(int, input().split()))
gs  = {}
for i in range(1, n+1):
  gs[i] = his[i-1]
for k, v in sorted(gs.items(), key=lambda x: x[1]):
  print(k, end=" ")

Submission status: Accepted

Solution code:
n=int(input())
A=list(map(int,input().split()))
tmp=[]
for r,s in enumerate(A):
    tmp.append([s,r])
tmp=sorted(tmp)
for t in tmp:
    print(t[1]+1)

Submission status: Accepted

Solution code:
n=int(input())
A=list(map(int,input().split()))
tmp=[]
ans=[]
for r,s in enumerate(A):
    tmp.append([s,r])
tmp=sorted(tmp)
for t in tmp:
    ans.append(t[1]+1)
for a in ans:
    print(a)

Submission status: Accepted

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

Submission status: Accepted

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

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 main1(N, A):
    dic = {}
    res = ""
    for i in range(0, N):
        dic[A[i]] = i+1
    for i in range(1, N+1):
        res += " {}".format(dic[i])
    print(res[1:])

def main2(N, A):
    lst = list()
    res = ""
    for i in range(0, N):
        lst.append({"rank":A[i], "No":i+1})
    lst.sort(key = lambda x:x["rank"])
    for i in range(0, len(lst)):
        res += " {}".format(lst[i]["No"])
    print(res[1:])

N = int(input())
A = list(map(int, input().split()))
main1(N, A)
#main1(3,[2,3,1])#3 1 2
#main1(5,[1,2,3,4,5])#1 2 3 4 5
#main1(8,[8,2,7,3,4,5,6,1])#8 2 4 5 6 7 3 1

Submission status: Accepted

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

dic = {}
ans = ''
for i in range(N):
    dic[A[i]] = i+1
for i in range(1,N+1):
    ans += " {}".format(dic[i])
print(ans[1:])

Submission status: Accepted

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

dic={}
ans=""

for i in range(N):
    dic[list[i]]=i+1
    
for i in range(1, N+1):
    ans += " " + str(dic[i])
    
print(ans)

Submission status: Accepted

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

def main1(N, A):
    dic = {}
    res = ""
    for i in range(0, N):
        dic[A[i]] = i+1
    for i in range(1, N+1):
        res += " {}".format(dic[i])
    print(res[1:])

main1(N, A)

Submission status: Accepted

Solution code:
N = int(input())
A = [-1] + input().split()
A_dic = {n : int(A[n]) for n in range(1, N+1)}

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = [0] * N

for index, i in enumerate(li):
  ans[i-1] = index + 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,a in enumerate(A):
  ans[a-1] = i+1

print(*ans)

Submission status: Accepted

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

ans = [''] * N

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

for s in ans:
  print(s)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
import os
import itertools
import _collections
import string
from functools import lru_cache
import heapq

class cin():
    def int():
        return int(sys.stdin.readline().rstrip())
    def string():
        return sys.stdin.readline().rstrip()
    def mapInt():
        return [int(x) for x in cin.string().split()]
    def stringList(n):
        return [input() for i in range(n)]
    def intListList(n):
        return [cin.mapInt() for i in range(n)]
    def intColsList(n):
        return [int(input()) for i in range(n)]
        
class Math():
    def gcd(a,b):
        if b == 0:
            return a
        return Math.gcd(b,a % b)
    def lcm(a,b):
        return (a * b) // Math.gcd(a,b)
    def roundUp(a,b):
        return -(-a // b)
    def toUpperMultiple(a,x):
        return Math.roundUp(a,x) * x
    def toLowerMultiple(a,x):
        return (a // x) * x
    def nearPow2(n):
        if n <= 0:
            return 0
        if n & (n - 1) == 0:
            return n
        ret = 1
        while(n > 0):
            ret <<= 1
            n >>= 1
        return ret

MOD = int(1e09) + 7

def main():
    N = cin.int()
    A = cin.mapInt()
    T = [0] * N
    for i in range(N): 
        T[A[i] - 1] = i + 1
    print(*T,sep =" ")
    return

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
ans=' '.join([str(j) for j in ans])
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

print(*b)

Submission status: Accepted

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

for j in range(N):
  k = A[j]-1
  B[k] = j+1
  
print(*B)

Submission status: Accepted

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
A = LIST()

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

print(*ans)


# L = []
# for i, a in enumerate(A):
#     L.append([i+1, a])
# L = sorted(L,key=lambda x: x[1])

# ans = []
# for i in range(N):
#     ans.append(L[i][0])
# print(*ans)

Submission status: Accepted

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
A = LIST()
L = []
for i, a in enumerate(A):
    L.append([i+1, a])
L = sorted(L,key=lambda x: x[1])

ans = []
for i in range(N):
    ans.append(L[i][0])
print(*ans)

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    num_list = list(map(int, input().split()))
    
    ls = [0] * n

    for i in range(n):
        ls[num_list[i]-1] = i + 1

    print(*ls)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

l = [[] for x in range(n)]
for i, num in enumerate(a):
    l[num-1] = (int(i) + 1)

print(*l)

Submission status: Accepted

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

ans = [0] * n

for idx, i in enumerate(A):
    ans[i-1] = idx + 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, j in enumerate(A, 1):
  ans[j - 1] = i
print(" ".join(map(str, ans)))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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