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 = list(map(int,input().split()))
array = []
for i in range(N):
  array.append(0)

for i,o in enumerate(order):
  array[o-1] = i + 1

for i in range(len(array)):
  print( array[i] ,end=' ')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
n = int(stdin.readline().rstrip())
a = [int(x) for x in stdin.readline().rstrip().split()]
b = [0] * n
for i in range(n):
    b[a[i] - 1] = i + 1
b = [str(x) for x in b]
b = ' '.join(b)
print(b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

input = stdin.readline


def p_a():
    n = int(input())
    print(((n + 1) // 2) / n)


def p_b():
    n, k = map(int, input().split())
    h = list(map(int, input().split()))

    print(sum(map(lambda x: x >= k, h)))


def p_c():
    n = int(input())
    k = list(map(int, input().split()))

    print(*[i[0] for i in sorted(enumerate(k, start=1), key=lambda x: x[1])])


if __name__ == '__main__':
    p_c()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(1,n+1):
    b.append(a.index(i)+1)
"""
b=[[a[i],i+1] for i in range(n)]
b.sort(key=lambda x: x[0])
for bb in b:
    print(bb[1],end =" ")
print("")

Submission status: Accepted

Solution code:
n = int(input())
a = [int(x) for x in 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:
raw_input()
v = sorted((int(e), k) for k, e in enumerate(raw_input().split(), 1))
_, w = zip(*v)
print ' '.join(map(str, w))

Submission status: Accepted

Solution code:
n = int(input())
nums = map(int,input().split())
dics = {}
result = []
i = 1

for num in nums:
  dics[num] = i #num番目がi
  i += 1

for x in range(1,n+1):
  result.append(dics[x])
  
for p in result:
  print(p,end=" ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
L=list(map(int,input().split()))
D=sorted(dict([(i,L[i]) for i in range(N)]).items(),key=lambda x:x[1])
for k in range(N):
  print(D[k][0]+1,end=" ")

Submission status: Accepted

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

Submission status: Accepted

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

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

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

ans = []
for t in sorted_dict:
    ans.append(t[0])
print(' '.join(map(str, ans)))

Submission status: Accepted

Solution code:
n = int(input())
a=[]

b = list(map(int, input().split()))
for i in range(n):
    a+=[[i+1, b[i]] ]
    
    
import operator as op
a.sort(key = op.itemgetter(1))

x=""
for i in range(n):
    x+=str(a[i][0])
    if i!=n-1:
        x+=" "

print(x)

Submission status: Accepted

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

num_list = [i + 1 for i in range(N)]
for i in range(N):
    ans_list[index_list[i]] = num_list[i]

print(*ans_list)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from functools import cmp_to_key
import heapq
N = int(input())
A = list(map(int,input().split()))
B = [(A[i],i+1) for i in range(0,len(A))]
B.sort()
print(' '.join([str(n[1]) for n in B]))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())

al = []
i = 1
for a in input().split():
    a = int(a)
    al.append((a,i))
    i += 1
al = sorted(al)
print(" ".join([str(al[i][1]) for i in range(n)]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

x=np.argsort(a)
x=x+1
print(*x)

Submission status: Accepted

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

ia = sorted(range(len(a)), key=lambda k: a[k])
ia1 = [i+1 for i in ia]
[print(i, end=" ") for i in ia1]

Submission status: Accepted

Solution code:
from enum import Enum
from queue import Queue

import numpy as np

import collections
import bisect
import sys
import math

from scipy.sparse.csgraph import floyd_warshall

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

B = [0]*N

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

print(*B)

Submission status: Accepted

Solution code:
N = int(input())
A = input().split()
import numpy as np
A = [int(a) for a in A]
s = ""
toukou = list(np.argsort(np.array(A)))
for i in range(N):
    num = int(toukou[i])+1
    if(s == ""):
        s = str(num)
    else:
        s += " "+str(num)
print(s)

Submission status: Accepted

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

print(' '.join(b))

Submission status: Accepted

Solution code:
N = int(input())
a = [int(i) for i in input().split()]
b = sorted(a)
c = []

dic = dict(zip(a , b))

for i in range(1,N+1):
    c.append(dic[i])

print(*c)

Submission status: Accepted

Solution code:
import numpy as np

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

ans = np.argsort(A_list) + np.ones(N)
ans_int = ans.astype(np.int64)
ans_str = ans_int.astype(str)
print(' '.join(ans_str))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
a = list(map(int, input().split()))
A = np.zeros(n)
for i in range(n):
  A[a[i] - 1] = i

print(str([int(A[i]) + 1 for i in range(n)]).replace('[', '').replace(']', '').replace(',', ''))

Submission status: Accepted

Solution code:
N = int(input())
keys = range(1,N+1)
values = list(map(int, input().split()))
d = dict(zip(keys, values))
d = list(sorted(d.items(), key=lambda x:-x[1], reverse=True))
print(*[i for i,_ in d])

Submission status: Accepted

Solution code:
n=int(input())

S=input().split()
s=list(S)

ans=[]
for i in range(n):
    
  ans.append(0)
  s[i]=int(s[i])


for i in range(n):
  #１番の生徒は８番目にやってきている　s[i]のiは生徒の番号、中身は何番目か
  
  s[i]#i=0,s[i]=8 
  ans[s[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()))

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

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 = sorted(L)
for i in range(N):
    print(L[i][1])

Submission status: Accepted

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

dict = {}
count = 1

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

Submission status: Accepted

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

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


print(' '.join(map(str, 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 ] = 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

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

Submission status: Accepted

Solution code:
import numpy as np
ii = lambda: int(input())
mis = lambda: map(int,input().split())
lmis = lambda: list(mis())
INF = float('inf')

N = ii()
x = lmis()

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

Submission status: Accepted

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

A = [[x,i+1] for i,x in enumerate(A)]
A.sort()
B = [X for x,X in A]
print(*B)

Submission status: Accepted

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

for i in range(n):
  A[i].append(i)
A=sorted(A, key=lambda x:x[0])
B=[A[i][1]+1 for i in range(n)]

print(*B)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

out=[0]*N

for n in range(N):
    out[a[n]-1]=n+1

for o in out:
    print(o,end=" ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# C - Go to School
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()))

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
I = [i for i in range(1, N + 1)]
d = dict(zip(A, I))
dd = sorted(d.items())
ans = []
for a, i in dd:
    ans.append(str(i))
print(' '.join(ans))

Submission status: Accepted

Solution code:
n = int(input())
a_list = list(map(int, input().split()))
a_list = list(enumerate(a_list))
a_list = sorted(a_list, key=lambda x: x[1])
result = ''
sum = 0
for a in a_list:
    sum = a[0] + 1
    result += str(sum) + ' '

print(result)

Submission status: Accepted

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

#インデックス番号とセットにする

A2 = {}
num = []

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

A2 = dict(zip(num,A))

#人数でソート
A3 = sorted(A2.items(),key = lambda x:x[1])

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

Submission status: Accepted

Solution code:
import sys
import numpy as np

Num = int(sys.stdin.readline().rstrip())
list_stu_Num = list(sys.stdin.readline().rstrip().split())
list_stu_Num_int = [int(s) for s in list_stu_Num]
print(*np.argsort(list_stu_Num_int) + 1)

Submission status: Accepted

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

N=int(input())
c=list(map(int, input().split()))
v=[0]*N
for i in range(N):
    v[c[i]-1]=i

for i in v:
    print(i+1)
    print(" ")

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

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

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

print(" ".join(r))

Submission status: Accepted

Solution code:
import numpy as np
N=int(input())
A=np.array(list(map(int,input().split())))
index=np.argsort(A)
for i in list(index):
    print(i+1,end=" ")

Submission status: Accepted

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

for i in range(n):

    ans[l[i]-1]=i+1

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

Submission status: Accepted

Solution code:
N= int(input())
H = [int(i) for i in input().split( )]
J = [0]*N
for i in range(N):
    J[H[i]-1] = i
for j in range(N):
    print(J[j]+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 permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy,copy
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 LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

def main():
    n = INT()
    a = LIST()
    l = [[a[i], i+1] for i in range(n)]
    l.sort()
    ans = [x[1] for x in l]
    print(*ans)

if  __name__=='__main__':
    main()

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 permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect

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

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

print(*ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())
y = [int(i) for i in input().split()]
students = []
for (i, v) in enumerate(y):
  seat = i + 1
  students.append([v, seat])
s_dict = dict(students)
result = []
for i in range(x):
  num = i + 1
  result.append(s_dict[num])
print(*result)

Submission status: Accepted

Solution code:
n=int(input())
a=[int(_) for _ in 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, = map(int, input().split())
ans = [0]*N


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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))
ANS=map(str,sorted(range(1,N+1), key=lambda k: A[k-1]))
print(' '.join(ANS))

Submission status: Accepted

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

ans = [ i for i in range(n)]
for i,j in enumerate(aes):
    ans[j-1] = i+1
print(*ans)

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
b = []
a = [int(i) for i in input().split()]
A = np.array(a)
B = A.argsort()
for i in B:
  b.append(i+1)
for i in b:
  print("{} ".format(i), end="")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from operator import itemgetter
n = int(input())
a = list(map(int,input().split()))
ans = []
for i in range(0,n):
  ans.append([a[i],i+1])
ans= sorted(ans,key = itemgetter(0))
for j in range(n):
  print(ans[j][1],end = " ")

Submission status: Accepted

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

Submission status: Accepted

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

reply = [None for i in range(len(a_list))]

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

print(' '.join(reply))

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 = [[A[i],i+1] for i in range(N)]
B.sort()
ans = ""
for i in range(N):
    ans = ans+str(B[i][1])
    if i != N-1:
        ans = ans + " "
print(ans)

Submission status: Accepted

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

x = [0] * len(a)

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

print(' '.join(x))

Submission status: Accepted

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

x = [0 for i in range(len(a))]

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

print(' '.join(x))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n1 = int(input())
n2 = [int(i) for i in input().split()]
n3 = [[] for i in range(n1)]

for i1 in range(n1):
    n3[i1].append(i1 + 1)
    n3[i1].append(n2[i1])

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

r1 = ""
for i3 in range(n1):
    r1 += str(n3[i3][0]) + " "

print(r1[0:len(r1) - 1])

Submission status: Accepted

Solution code:
N = int(input())
L = list(map(int,input().split()))
a = []
for i in range(len(L)):
    t = (L[i],i)
    a.append(t)
a = sorted(a)
for i in a:
    print(i[1]+1,end = ' ')

Submission status: Accepted

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

Submission status: Accepted

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

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

from operator import itemgetter
A_ = sorted(A_, key=itemgetter(1))

for key, _ in A_:
    print(key + 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:
N = int(input())
A = list(map(int, input().split()))

idx = list(enumerate(A))

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

for i in range(N):
    print(sorted_lst[i][0]+1)

Submission status: Accepted

Solution code:
N = int( input() )
s_list = [ int(i) for i in input().split() ]
b = [0] * (10**5)
for i in range( N ):
    b[s_list[i]-1] = i + 1
for i in b:
    if i == 0:
        break
    else:
        print(i,end = " ")

Submission status: Accepted

Solution code:
#142改
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(str(b[i])+' ', 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:
x = int(input())
num = [i for i in range(1,x+1)]
y = input().split()

for i,num_arrive in enumerate(y):
  num[int(num_arrive) - 1] = i + 1
    
print(str(num).replace(",","").replace("[","").replace("]",""))

Submission status: Accepted

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

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

for i in range(n):
    print(b[i][1],end='')
    if i != n-1:
        print(' ',end='')
print()

Submission status: Accepted

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

ans=[0]*n

for i, x in enumerate(a):
  ans[x-1] = str(i+1)
print(' '.join(ans))

Submission status: Accepted

Solution code:
import numpy as np

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

order = np.argsort(A_lis)

ans = ""
for elem in order:
    ans+=str(elem+1)
    ans+=" "
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int, input().split()))
#print(N)
#print(a)
b = a.copy()
for i in range(0, len(a)):
    b[a[i]-1] = str(i+1)
strb = ' '.join(b)
print(strb)

Submission status: Accepted

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

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

A.sort()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
a = np.array(list(map(int, input().split(" "))))
b = list(np.argsort(a) + 1)
b = [str(s) for s in b]
print(" ".join(b))

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int, input().split()))
list1,list2 = [],[]
for i in range(N):
    list1.append((a[i],i+1))
list1.sort()
# print(list1)
for i in range(N):
    list2.append(str(list1[i][1]))
# print(list2)
print(" ".join(list2))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from operator import itemgetter
n=int(input())
a=list(map(int,input().split()))

print(*[t[0] +1 for t in sorted(enumerate(a),key=itemgetter(1))])

Submission status: Accepted

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

Submission status: Accepted

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

a = [[i + 1, a[i]] for i in range(len(a))]

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

Submission status: Accepted

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

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

print(*B)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

N = int(input())
l = [int(x) for x in input().split()]
l_dict = {k: v for v, k in enumerate(l)}
l.sort()

for i, x in enumerate(l):
    if i == 0:
        print(l_dict[x] + 1, end="")
    else:
        print(" {}".format(str(l_dict[x] + 1)), end="")

Submission status: Accepted

Solution code:
N = int(input())
A = [(int(a), i) for i, a in enumerate(input().strip().split(" "))]
A.sort()
res = [str(tup[1] + 1) for tup in A]
print(' '.join(res))

Submission status: Accepted

Solution code:
# Contest: AtCoder Beginner Contest 142 (https://atcoder.jp/contests/abc142)
# Problem: C: Go to School (https://atcoder.jp/contests/abc142/tasks/abc142_c)

def rint():
    return int(input())


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


n = rint()
a = rints()
s = list(range(1, n + 1))
s.sort(key=lambda i: a[i - 1])
print(' '.join(map(str, s)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

A = []

line = input().split(" ")
for i in range(n):
	A.append((int(line[i]), i + 1))

A.sort()

ans = [0] * n
for i in range(n):
	ans[i] = str(A[i][1])

print(" ".join(ans))

Submission status: Accepted

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

mod_li=[[i,num] for i,num in enumerate(li,1)]
result_li=sorted(mod_li, key=lambda x: x[1])

result=[str(num[0]) for num in result_li]
print(" ".join(result))

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))
num=[i+1 for i in range(N)]
l=[[x,y] for x,y in zip(A,num)]
ll=sorted(l)
x=[ll[i][1] for i in range(N)]
print(" ".join(repr(e) for e in x))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

l = []

for i, a in enumerate(A):
    l.append((a,i+1))

l.sort()

ans = ''

for ll in l:
    ans += str(ll[1]) + ' '

ans.rstrip(' ')
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
lst = list(map(int, input().split()))
arr = []
for i in range(N):
    arr.append([lst[i],i+1])
arr.sort()
arr2 = []
for i in range(N):
    arr2.append(arr[i][1])
print(*arr2)

Submission status: Accepted

Solution code:
a = int(input())
b = [int(i) for i in input().split()]
ans = {}
for i, s in enumerate(b):
    ans[s] = i+1

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

Submission status: Accepted

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



res_list = [0] * N

syu = 1
for a in A_list:
        res_list[a-1]  = syu
        syu+=1

#print(res_list)

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

Submission status: Accepted

Solution code:
import numpy

N=int(input())
str1=input().split(' ')
A=[0]*N
for i in range(N):
	A[i]=int(str1[i])

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

result=""
for i in range(N):
	result+=(str(order[i])+" ")

print(result)

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

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

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

keys_values_dict=dict(zip(keys,values))

keys_values_dict_sorted_as_list=sorted(keys_values_dict.items(),key=lambda x:x[1])

ans=[str(keys_values_dict_sorted_as_list[i][0]) for i in range(N)]
ans=' '.join(ans)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

ans = [0]*n

#print(ans)

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

print(*ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

b = list(range(1, N+1))
c = list(zip(a, b))
c.sort()
for i in range(N):
    print(c[i][1], end=' ')

Submission status: Accepted

Solution code:
from operator import itemgetter
N = int(input())
A = [(i+1, int(x)) for i, x in enumerate(input().split())]
A_ = sorted(A, key=itemgetter(1))
A__ = [a[0] for a in A_]
for i in A__[:-1]:
    print(i, end=' ')
print(A__[-1])

Submission status: Accepted

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

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

sorted_dic = sorted(dic.items(), key=lambda x:x[1])

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

Submission status: Accepted

Solution code:
N=raw_input()
n=int(N)

AN=raw_input().split()
an=[int(i) for i in AN]

on = [(i+1,an[i]) for i in range(len(an))]

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

on = [str(i[0]) for i in on]



print " ".join(on)

Submission status: Accepted

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

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

sortedIndex = sorted(index_a.items(), key=lambda x:x[1])

for i in sortedIndex:
    print(i[0])

Submission status: Accepted

Solution code:
N = int(input())
A_list = list(map(int, input().split()))
A_dict = {A_list[i-1]:i for i in range(1, N+1)}
ans = str(A_dict[1])
for j in range(2, N+1):
    ans += ' '+str(A_dict[j])
print(ans)

Submission status: Accepted

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

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

print(*order)

Submission status: Accepted

Solution code:
N = int(input())
ret = ['0'] * N
lst = map(int, input().split())
for idx, n in enumerate(lst, start=1):
    ret[n - 1] = str(idx)
print(' '.join(ret))