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 sys


def input(): return sys.stdin.readline().strip()


def main():
    N = int(input())
    nums = map(int, input().split())
    ans = sorted(zip(nums, range(1, N+1)))
    print(*map(lambda x: x[1], ans), sep=' ')


if __name__ == "__main__":
    main()

Submission status: Accepted

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

print(*sorted(range(1, N+1), key=lambda x: A[x-1]))

Submission status: Accepted

Solution code:
N = int(input())

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

# moto NUM
A_NUM = list(enumerate(A, start=1))

A_NUM.sort(key=lambda n:n[1])

ret = [a[0] for a in A_NUM]
print(" ".join(map(str, ret)))

Submission status: Accepted

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

idx = sorted(range(1,N+1), key=lambda x:A[x-1])
print(*idx)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
P = [[i+1, A[i]] for i in range(N)]
P = sorted(P, key = lambda a: a[1])
R = [0 for i in range(N)]
for i in range(N):
    R[i] = P[i][0]
    
for i in range(N):
    print(R[i], end=' ')

Submission status: Accepted

Solution code:

n = int(input())

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

xn = [(i,a) for i,a in enumerate(an)]

#print(xn)

xn.sort(key=lambda a:a[1] )

for i, x in xn:
    print(i+1, end=' ' if x !=n else '\n')

Submission status: Accepted

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

Submission status: Accepted

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

ans = [0] * n

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

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

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
ab=[]
for i in range(n):
    ab1=[a[i],i+1]
    ab.append(ab1)
ab.sort()
ans=[]
for i in range(n):
    ans.append(ab[i][1])
print(*ans)

Submission status: Accepted

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

ans = [0] * n

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

print(" ".join([str(s) for s in ans]))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
''' 
------------------------
author : iiou16
------------------------
'''

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

    s = {}
    for i in range(N):
        s[A[i]-1] = i
    
    out = ""
    for j in range(N):
        out += str(s[j]+1)
        out += " "
    print(out[:-1])

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

li2 = []
for i in range(n):
    li2.append([li[i],i+1])
li2.sort()

for i in range(len(li2)):
    print(li2[i][1],end = " ")

Submission status: Accepted

Solution code:

import sys
input = sys.stdin.readline


def get_key(item):
    return item[1]

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

    for (k, v) in enumerate(A):
        B.append((k,v))

    B = sorted(B, key=get_key)
    B = [i[0]+1 for i in B]

    print(*B)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import heapq
N = int(input())
idx_list = [0] * N
Hn = list(map(int,input().split(' ')))
for i in range(N):
    number = Hn[i]
    idx_list[number -1] = i +1
print(' '.join(map(str,idx_list)))

Submission status: Accepted

Solution code:
N = int(input())
As = [int(x) for x in input().split()]
rs = list(range(1,N+1))
for i,A in enumerate(As):
    rs[A-1] =i+1

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

Submission status: Accepted

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

ans = list(map(lambda p: str(p[1]), sorted([(a[i], i + 1) for i in range(n)])))
print(' '.join(ans))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
a = int(input())
s = input().split()

b = []

for item in s:
    b.append(int(item))

my_dict = dict()

for i in range(len(b)):
    my_dict[b[i]] = i+1

out = []
for i in range(len(b)):
    out.append(str(my_dict[i+1]))

print(" ".join(out))

Submission status: Accepted

Solution code:
import numpy as np

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

C = np.argsort(A) + 1

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

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.readline
N = int(readline())
a = list(map(int, readline().split()))

aa = []
for i in range(N):
    tmp = [a[i], i]
    aa.append(tmp)

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

aaa = []
for i in range(N):
    aaa.append(str(aa[i][1] + 1))

print(' '.join(aaa))

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()))
mydic ={}
for i in range(n):
	mydic[a[i]] = i+1
sortedDict = sorted(mydic.items())
s =[]
for j in range(n):
    s.append(str(sortedDict[j][1]))
print(" ".join(s))

Submission status: Accepted

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


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

ret = [ -1 for x in range(len(arr_a)) ]
for i in range(len(arr_a)):
    ret[arr_a[i]-1] = i+1

print(" ".join([ "{0:d}".format(x) for x in ret ]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
pairs = []
for i in range(len(A)):
    pairs.append((A[i], i))
pairs.sort()
ans = []
for (_, i) in pairs:
    ans.append(i + 1)
    
print(" ".join(map(str, ans)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

B=[0]*len(A)

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

print(B[0],end="")
for i in B[1:]:
    print(" "+str(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:
n=list(range(1,int(input())+1))
a=list(map(int,input().split()))
na=[list(x) for x in zip(*sorted(zip(a, n)))]
asdf=""
for i in na[1]:
  asdf+=str(i)+" "
print(asdf[:-1])

Submission status: Accepted

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

b = []
for i,k in enumerate(a):
	b.append([k,i])
b.sort()
for i in range(n-1):
	print("%d " % (b[i][1]+1),end="")
print("%d" % (b[n-1][1]+1))

Submission status: Accepted

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

ans=[]
for i,a in enumerate(A):
  ans.append([i+1,a])
ans.sort(key=lambda x:x[1])
for a in ans:
  print(a[0],end=' ')

Submission status: Accepted

Solution code:
N = int(input())

a_list = list(map(int,input().split()))
a_n_list = []
for i in range(N):
    a_n_list.append([a_list[i],i+1])
a_n_list.sort()
ans = ""
for i in range(N):
    print(a_n_list[i][1], end=" ")

Submission status: Accepted

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

AA = []

for i in range(N):
    AA.append([i,A[i]])

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

for i in AA:
    print(i[0]+1, end=" ")

Submission status: Accepted

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

import numpy as np
print(' '.join(map(str, np.array(A).argsort() + 1)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
D = dict()
for i in range(N):
    D[A[i]] = (i+1)
ans = []
for i in range(N):
    ans.append(D[i+1])
d = []
for i in range(N):
    d.append(str(ans[i]))
result = ' '.join(d)
print(result)

Submission status: Accepted

Solution code:
from heapq import heappush, heappop

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

q = list()
for i, num in enumerate(A):
    heappush(q, (num, i + 1))

ans = list()
while len(q) > 0:
    _, num = heappop(q)
    ans.append(num)

print(' '.join([str(x) for x in ans]))

Submission status: Accepted

Solution code:
from sys import stdin

n = int(stdin.readline().rstrip())
li = list(map(int,stdin.readline().rstrip().split()))
li2 = [0 for _ in range(n)]
for i in range(len(li)):
    li2[li[i]-1] = i+1
print(' '.join(map(str, li2)))

Submission status: Accepted

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

Submission status: Accepted

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

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

b = []
for i in range(n):
  b.append(str(m[i]))

print(" ".join(b))

Submission status: Accepted

Solution code:
n = int(input())
a = [int(x) for x in input().split()]
b = []
for i in range(n):
    b.append([a[i], i+1])
b.sort()
for x in b[:-1]:
    print(x[1], end=' ')
print(b[n-1][1])

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

n = ni()
a = na()
b = range(n)


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

Submission status: Accepted

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

h = {}
for i in range(len(A)):
    h[A[i]] = i+1

h = sorted(h.items(), key = lambda x: x[0])

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

Submission status: Accepted

Solution code:
N = int(input())
anums = [int(i) for i in input().split()]
order_list = [0]*N
for i in range(N):
    order_list[anums[i]-1] = i+1
print(*order_list,sep=" ")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    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)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import heapq

def main():
    n = int(input())
    ans = [0] * n
    for i, a in enumerate(input().split(' ')):
        ans[int(a)-1] = str(i+1)
    print(' '.join(ans))



if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = [int(i) for i in input().split()]
ans = [0]*N
dic = {}

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

print(' '.join(ans))

Submission status: Accepted

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

Submission status: Accepted

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

B = [0] * N
ans = ''
for i, num in enumerate(A):
    B[num-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_N = list(map(int, input().split()))

print(' '.join([str(i[0]+1) for i in sorted(enumerate(A_N), key=lambda x: x[1])]))

Submission status: Accepted

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

import numpy as np


def solve(N, A):
    return np.array(A).argsort() + 1


if __name__ == '__main__':
    N = int(input())
    A = list(map(int, input().split()))

    ans = solve(N, A)

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

Submission status: Accepted

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

B = (sorted(range(len(A)), key=lambda k: A[k]))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

dic = {}
for i in range(N) :
    dic[i+1] = A_list[i]

dic = sorted(dic.items(), key=lambda x:x[1])
# print(dic)
s = ""
for item in dic :
    s += str(item[0]) + " "
s += "\r\n"
print(s)

Submission status: Accepted

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

ans = sorted(ans)
_ans = [x for (_a, x) in ans]
print(' '.join(map(str, _ans)))

Submission status: Accepted

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

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

pairs.sort()
print(" ".join([str(x[1]) for x in pairs]))

Submission status: Accepted

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

Submission status: Accepted

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

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
    #print(li[A[i]-1])
for i in li:
    print(i,end=" ")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

numdict = {}

for i, Ai in enumerate(list(int(el) for el in input().split(' '))):
  numdict[i+1] = Ai
  
numdict = sorted(numdict.items(), key=lambda x:x[1])

for key, val in numdict:
  print(key)

Submission status: Accepted

Solution code:
import numpy as np

N=int(input())

A=np.array(input().split(),dtype=np.int32)

A_i=np.argsort(A)

result=""

for i in range(N):
    if(i==N-1):
        result=result+"{}".format(A_i[i]+1)
    else:
        result=result+"{} ".format(A_i[i]+1)

print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

s = [0]*n
for i,a_n in enumerate(a):
    s[a_n-1] = i+1

p=""
for b in s:
    p += str(b) + " "

print(str(p[:-1]))

Submission status: Accepted

Solution code:
# n,k=map(int,input().split())
n=int(input())
l=list(map(int,input().split()))
fi=[]
for i in range(n):
  ll=[]
  ll.append(l[i])
  ll.append(i+1)
  fi.append(ll)
fi.sort()
for i in fi:
  print(i[1],end=" ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = input().split()
A_list = [[int(A[i]), i+1] for i in range(len(A))]
A_list.sort()
ans = [0]*N
for i in range(N):
  ans[i] = str(A_list[i][1])
print(' '.join(ans))

Submission status: Accepted

Solution code:
import numpy as np
N=int(input())
A=np.array(list(map(int, input().split())))
list1=list(enumerate(A))
list2 = np.array(sorted(list1, key=lambda x:x[1]))
print(*list2[:,0]+1)

Submission status: Accepted

Solution code:
#A,B=map(int,input().split(" "))
N=int(input())
a=list(map(int,input().split(" ")))
b=[0 for i in range(N)]
for i in range(N):
    b[a[i]-1]=i+1
#print(b)
print(" ".join(repr(e) for e in b))

Submission status: Accepted

Solution code:
N=int(input())
h=list(map(int,input().split()))
tmp=[]
for i,j in enumerate(h):
  tmp.append([i,j])
tmp=sorted(tmp, key=lambda x: x[1])
a=[]
for i in tmp:
  a.append(i[0]+1)
maped_list = map(str,a) 
mojiretu = ' '.join(maped_list)
print(mojiretu)

Submission status: Accepted

Solution code:
num = int(input())

arr = list(map(int,input().split()))
arr1 = []
for i in range(len(arr)):
    arr1.append((arr[i],i+1))

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

arr2 = [i[1] for i in arr1]

print(*arr2)

Submission status: Accepted

Solution code:
N = int(input())
Alist = [int(i) for i in input().split()]
enum = [[i+1,Alist[i]] for i in range(N)]
enum.sort(key = lambda x:x[1])
order = [str(enum[i][0]) for i in range(N)]
print(" ".join(order))

Submission status: Accepted

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

c = sorted(b, key=lambda x: x[1])
ans = [c[i][0] for i in range(n)]
print(*ans)

Submission status: Accepted

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

i_ai_list = []
for index, a in enumerate(a_list):
    i_ai_list.append((index + 1, a))

i_ai_list_sorted = sorted(i_ai_list, key=lambda  x: x[1])
output_list = [i[0] for i in i_ai_list_sorted]
#print(output_list)
print(' '.join(list(map(str, output_list))))

Submission status: Accepted

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

dic = {}
for i in range(len(A)):
    dic[i+1] = A[i]
dic = sorted(dic.items(), key = lambda x:x[1])
st = []
for elem in dic:
    st.append(str(elem[0]))
print(' '.join(st))

Submission status: Accepted

Solution code:
import numpy as np

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

B = np.argsort(A) + 1
B = list(map(str, B))
print(' '.join(B))

Submission status: Accepted

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

i=1
for a in a_list:
    r_list[a] = str(i)
    i+=1

r_list.pop(0)
print(" ".join(r_list))

Submission status: Accepted

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

B = [[i+1,A[i]] for i in range(n)]
C = sorted(B,key=lambda x:x[1])
D = np.array(C).T[0]
print(" ".join(map(str, D)))

Submission status: Accepted

Solution code:
N = int(input())
A = [int(x) for x in input().split()]
B = []
ans = []
for i in range(N):
    B.append([A[i],i])
B.sort()
for i in range(N):
    ans.append(str(B[i][1]+1))
ANS = " ".join(ans)
print(ANS)

Submission status: Accepted

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

import numpy as np
ret = np.argsort(np.array(A)).tolist()+np.ones(N)
for i in range(N):
    print(int(ret[i]),end=' ')

Submission status: Accepted

Solution code:
n=int(input())
ls=[int(s) for s in input().split()]
ls2=[[ls[s],s+1] for s in range(n)]
ls2.sort()
ls3=[ls2[s][1] for s in range(n)]
print(*ls3)

Submission status: Accepted

Solution code:
import numpy as np

n=int(input())
a=np.array(list(map(int,input().split())))
s=np.argsort(a)
s=s+1
print(*s)

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,),a = [list(map(int, s.split())) for s in open(0)]

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

s = sorted(s)
for x in s:
    print(x[1], end=' ')

Submission status: Accepted

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

    dict = {}
    for i, Nstudent in enumerate(A):
        dict[i+1] = Nstudent
    

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

if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
N = int(input())

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

junList = []
for i in range(N):
    junList.append(0)

for i,Ai in enumerate(aList):
    junList[Ai-1] = i+1

for i, e in enumerate(junList):
    print(e, end=" ")

Submission status: Accepted

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

Submission status: Accepted

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

pair=[]
for i, ai in enumerate(a):
    pair.append([i+1, ai])
pair.sort(key=lambda x: x[1])
ans=""
for p in pair:
    ans+=str(p[0])
    ans+=' '
print(ans)

Submission status: Accepted

Solution code:
class Student:
	def __init__(self, index, qtd):
		self.index = index
		self.qtd = qtd
	def __lt__(self, other):
		return self.qtd < other.qtd


n = int(input())
register = [Student(index+1, qtd) for index, qtd in enumerate(list(map(int, input().split())))]
register.sort()

[print(x.index, end=' ') for x in register]
print()

Submission status: Accepted

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

Submission status: Accepted

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

ans_list = ["0" for _ in range(N)]
for i, n in enumerate(nums):
    ans_list[n - 1] = str(i + 1)
print(" ".join(ans_list))

Submission status: Accepted

Solution code:
import numpy as np

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

idx = np.argsort(A) + 1

for x in idx:
    print(x)

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

Submission status: Accepted

Solution code:
n=int(input())
a=[int(_) for _ in input().split()]
aa=[[a[i],i+1] for i in range(n)]
aa.sort()
b=[str(aa[i][1]) for i in range(n)]
print(' '.join(b))

Submission status: Accepted

Solution code:
import math
def A():
    num = int(input())
    odd_nums = math.ceil(num/2.0)
    print(odd_nums/num)

def B():
    temp = [int(i) for i in input().split()]
    N = temp[0]
    K = temp[1]
    heights = [int(i) for i in input().split()]
    ans = 0
    for h in heights:
        ans += 1 if h >= K else 0
    print(ans)

def C():
    N = int(input())
    A = list(enumerate([int(i) for i in input().split()]))
    A.sort(key = lambda x: x[1])
    #print(A)
    print(' '.join([str(a+1) for a, i in A]))

C()

Submission status: Accepted

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

for j in A:
    B[j-1]=i
    i+=1

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

Submission status: Accepted

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

d = {}
for i, s in zip(range(1, N + 1), A):
    d[i] = s
d_sorted = sorted(d.items(), key=lambda x: x[1])

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(" ".join(ans))

Submission status: Accepted

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

Submission status: Accepted

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

dic = {}

for i, a in zip(range(0, n), an):
    dic[a] = i + 1

l = []
for i in range(0,n):
    l.append(str(dic[i+1]))

print(' '.join(l))

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys

n = int(sys.stdin.readline())
A = list(map(int, sys.stdin.readline().split()))
d = {}
for i in range(0, n):
    d[i+1] = A[i]

d = sorted(d.items(), key= lambda x:x[1])
#print(d)
ans = []
for z in d:
    ans.append(z[0])

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[i]=[a[i],i+1]
b=sorted(b, key=lambda x: x[0])
for i in range(n):
    if i!=n-1:
        print(b[i][1],end=" ")
    else:
        print(b[i][1])

Submission status: Accepted

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

order = [0 for _ in range(N+1)]
for i, v in enumerate(A_N):
    order[v] = i + 1

print(' '.join(map(str, order[1:])))

Submission status: Accepted

Solution code:
n = int(input())
student = {}
a = list(input().split())
for c in range(1,n+1):
    student[a[c-1]] = c
for c in range(1,n+1):
    print(student[str(c)],end=" ")

Submission status: Accepted

Solution code:
import sys
def get_array(): return list(map(int, sys.stdin.readline().strip().split()))
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()

n=int(input())
Arr=get_array()
result=[]
for i in range(n):
  result.append((Arr[i],i+1))
result.sort()
ans=[]
for i in result:
  ans.append(i[1])
print(*ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
i8 = np.int64
i4 = np.int32



def main():
    stdin = open('/dev/stdin', 'rb')
    pin = np.fromstring(stdin.read(), i8, sep=' ')
    A = pin[1:]
    ans = np.argsort(A) + 1
    print(*ans.tolist())


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
temp = [0 for _ in range(N)]
ans = [0 for _ in range(N)]
for i,a in enumerate(A):
    temp[i] = [i+1, a]
temp.sort(key=lambda x:x[1])
for i,t in enumerate(temp):
    ans[i] = t[0]
print(*ans)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
a2 = [(a[i], i+1) for i in range(n)]
a2.sort()
a3 = list(map(lambda x: x[1], a2))
print(*a3)

Submission status: Accepted

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

for j,v in enumerate(A):
    Z[v-1] = j+1

for k,v in enumerate(Z):
    print(v,end="")
    if k < N:
        print(" ",end="")
    else:
        print()

Submission status: Accepted

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

print(a[:-1])

Submission status: Accepted

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

A = np.array(A)
X = np.argsort(A)+1

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

Submission status: Accepted

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

ans = [0] * n

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

for j in ans:
    print(j,end=" ")
print()

Submission status: Accepted

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

ind = 1
x = []
for a in A:
    x.append((ind, a))
    ind += 1

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

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(int(1e6))

N = int(input())
A = list(map(int, input().split()))
order = sorted(range(N), key=lambda k: A[k])

for x in order:
    print(x+1)

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

n = ni()
a = na()
d = []
for i in range(len(a)):
    d.append([a[i], i+1])
    
d = sorted(d)

print(' '.join([str(s) for z,s in d]))

Submission status: Accepted

Solution code:
n = int(input())
a_list = list(map(int, input().split()))
a_dict = {}
for i, a in enumerate(a_list):
    a_dict[a] = i
result_list = []
for key in sorted(list(a_dict.keys())):
    result_list.append(str(a_dict[key]+1))
print(' '.join(result_list))

Submission status: Accepted

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

ans = sorted(range(len(a)), key=lambda k: a[k])



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

Submission status: Accepted

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

a_with_index = []
for i, v in enumerate(a):
    a_with_index.append((v, str(i + 1)))

print(' '.join(v[1] for v in sorted(a_with_index)))

Submission status: Accepted

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

li = [0] * n
count = 1
for i in a:
    li[i-1] = count
    count += 1

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

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

for a in ans:
    print(a+1, end = '')
    print(' ', end = '')