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:

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


N=int(input())
A=acinput()

x=list(zip(A,range(1,N+1)))

x=sorted(x,key=lambda x:x[0])
res=list(map(lambda y:str(y[1]),x))
print(" ".join(res))

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
A = input().split()
B = [[],[]]
for i in range(N):
  B[0].append(i + 1)
  B[1].append(int(A[i]))

C = np.array(B).T  
C = C.tolist()
D = sorted(C,key=lambda x: x[1])

E = []
for i in range(N):
  E.append(D[i][0])
  print(E[i],end=" ")

Submission status: Accepted

Solution code:
n = int(input())
toko_li = list(map(int,input().split()))
ans = [0] * n
for i in range(n):
    ans[toko_li[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 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())
H = input().split()
h = []
cnt = 0
for i in range(N):
  h.append(int(H[i]))

h1 = [0 for i in range(N)]
for i in range(N):
  h1[h[i] - 1] = i+1
  
      
str1 = map(str, h1)
str1 = " ".join(str1)
print(str1)

Submission status: Accepted

Solution code:
import numpy as np


N=int(input())

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


B=np.argsort(A[0,:])
for b in B:
  print(b+1, end=' ')

Submission status: Accepted

Solution code:
import numpy as np

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

npa = np.array(a)
print(*(np.argsort(npa) + 1))

Submission status: Accepted

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

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

l.sort()

print(" ".join([str(l[i][1]) for i in range(0, n)]))

Submission status: Accepted

Solution code:
from operator import itemgetter

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

result =[]
for i in range(len(entry)):
    result.append([i+1, entry[i]])
result2 = sorted(result, key=itemgetter(1))
    
for i in range(len(result)):
    print(result2[i][0], " ", end="")

Submission status: Accepted

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

for i, kita in enumerate(l):
    kitazyun.append([kita,i+1])
# 0 Alice
# 1 Bob
# 2 Charlie

ll=sorted(kitazyun)


for i in range(n):
    print(ll[i][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(*ans,sep=" ")

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
A_dict = dict(zip(A,range(1, N+1)))

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

Submission status: Accepted

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

dict = {}
for i in range(n):
    dict[str(i)] = h[i]

dict_sorted = sorted(dict.items(), key=lambda x:x[1])


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

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 range(n):
  b[i]+=1
print(' '.join(map(str,b)))

Submission status: Accepted

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

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

res = zip(Ai, i)
res2 = sorted(res)

res3 = []
for i in range(len(res2)):
    res3.append(str(res2[i][1]))

print(' '.join(res3))

Submission status: Accepted

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

l = [0] * n
for i, x in enumerate(A):
    l[x-1] = i+1
for i in l:
    print(i, end=' ')

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(N):
    tmp=[i,A[i]]
    B.append(tmp)

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

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

Submission status: Accepted

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

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

al.sort(key=lambda al:al[1])

s = ""

for i in range(n):
    s += str(al[i][0]+1)+" "

print(s[:len(s)-1])

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
# C - Go to School
n = (int)(input())

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

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

a.sort()

result = ""
for j in a:
    print(map[j], end="")
    if len(a) != j:
        print(' ', end="")

Submission status: Accepted

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

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

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

for i in range(N):
    B[A[i]-1] = i+1
      
for s in B:
  print(s, end =" ")

Submission status: Accepted

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

A_dict = {}
for i, a in enumerate(A):
    A_dict[i+1] = a
A_dict = sorted(A_dict.items(), key=lambda x:x[1])

A_list = []
for i in range(len(A_dict)):
    A_list.append(A_dict[i][0])

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

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int, input().split()))
d = {}
for i, n in enumerate(a):
    d[n] = str(i+1)
print(' '.join(list(d.values())))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import numpy as np

def main():
    N, *d = map(int, open(0).read().split())
    print(*np.argsort(d)+1)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

    d = {}

    for i, AA in enumerate(A):
        d[AA] = i

    for i, dd in enumerate(d):
        if i < len(d) - 1:
            print(str(d[i+1] + 1) + ' ', end="")
        else:
            print(str(d[i+1] + 1))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
#C

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

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

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

Submission status: Accepted

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

print(" ".join(res))

Submission status: Accepted

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

ans = [0]*n
for i,num in enumerate(a):
    #print(a.index(i+1)+1," ",end="")
    ans[num-1] = i+1
for i in ans:
    print(i," ",end="")

Submission status: Accepted

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

#ソートして配列番号を持ってくる
b = {}
for index,x in enumerate(a):
    b[x] = index

ans = sorted(b.items(), key=lambda x: x[0])
for k,v in ans:
     print(str(v+1)+" ",end="")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

import numpy as np

arg = list(np.argsort(l)+1)
arg = list(map(str,arg))
print(" ".join(arg))

Submission status: Accepted

Solution code:
n = int(input())

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

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

ans = {}    
for i, j in zip(a, jun):
    ans[i] = j

ans = sorted(ans.items())
ans = [str(i[1]) for i in ans]

print(' '.join(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def test():
    n = int(input())
    a = list(map(int,input().split()))
    b = {}
    for i,j in enumerate(a):
        b[j] = i+1
    c = sorted(b.keys())
    for i in c:
        print(b[i],end=" ")


if __name__ == "__main__":
    test()

Submission status: Accepted

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

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

a2 = sorted(a.items(), key=lambda x:x[1])

for key in range(n):
    print(a2[key][0], end=" ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
s = input().split(" ")
b = [int(i) for i in s]
c =[0 for i in range(a)]
for i,d in enumerate(b):
  c[d-1] = i+1
for i in c:
  print(i,end=" ")

Submission status: Accepted

Solution code:
import sys

def add1(v):
    return str(v+1)

n = int(raw_input())
a = map(int, raw_input().split(" "))

print " ".join(map(add1, sorted(range(len(a)), key=lambda k: a[k])))

Submission status: Accepted

Solution code:

a = int(input())
do = [0]*a
l = list(map(int,input().split()))
for i,x in enumerate(l):
        do[x-1]+=i+1
print(*do)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
dic = {}
for i, a in enumerate(A):
  dic[i+1] = a
sort_dic = sorted(dic.items(), key= lambda x:x[1])
print(" ".join(str(x[0]) for x in sort_dic))

Submission status: Accepted

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


def solve(N: int, A: "List[int]"):
    npA = np.array(A)
    std = np.argsort(npA)+1
    std = std.tolist()
    n = [str(n) for n in std]
    print(' '.join(n))




def main():
    
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
sort_l = sorted(range(len(A)), key=lambda k: A[k])
sort_l = list(map(lambda x:x+1,sort_l))
sort_l = [str(i) for i in sort_l] 
print(" ".join(sort_l))

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

print(*[t[1] for t in l])

Submission status: Accepted

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

a = np.array(a)



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

Submission status: Accepted

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

N_list = [0] * N
for i,index in enumerate(n_index):
    N_list[index - 1]= i+1

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

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()
c = [str(b[i][1]) for i in range(n)]

print(' '.join(c))

Submission status: Accepted

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

Submission status: Accepted

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

orders = [0] * n
for i, p in enumerate(li):
    orders[p-1] = i+1
order = ' '.join([str(n) for n in orders])
print(order)

Submission status: Accepted

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

B = [0] * len(A)
for i in range(len(A)):
    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()))

out = [[] for _ in range(N)]

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

print(" ".join( repr(e) for e in out ) )

Submission status: Accepted

Solution code:
n = int(input())
lis_a = list(map(int,input().split()))
dict_a = {}
ans = []

for i in range(n):
    dict_a[i] = lis_a[i]

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

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

Submission status: Accepted

Solution code:
N = int(input())
A = [int(s) for s in input().split()]
ans = sorted(range(len(A)), key=lambda k: A[k])
ans = [str(i+1) for i in ans]

print(' '.join(ans))

Submission status: Accepted

Solution code:
n = int(input())
st = list(map(int,input().split()))
srtkey = lambda x: x[1] 
ans = []
for i,j in zip(range(n),st):
  ans.append([i+1,j])
srt = sorted(ans,key=srtkey)
for i,j in srt:
  print(i,end=" ")

Submission status: Accepted

Solution code:
from sys import stdin

data = [stdin.readline().rstrip().split() for _ in range(2)]
N = [int(n) for n in data[0]]
A = [int(n) for n in data[1]]
n = N[0]

l = dict()
for i in range(n):
    l[i+1] = A[i]
ans = []
for k, v in sorted(l.items(), key=lambda x: x[1]):
    ans.append(str(k))
print(' '.join(map(str, ans)))

Submission status: Accepted

Solution code:
n=int(input())
lista = [int(i) for i in input().split()]
listb=[1]*n
for i in range(n):
    listb[lista[i]-1]=i+1


for i in range(n):

    print(str(listb[i])+" ", end="")

Submission status: Accepted

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

s=[]
i=1
for _a in a:
    s.append([i, _a])
    i+=1
s.sort(key=lambda x: x[1])

ans=""
for i, _ in s:
    ans+=str(i)+" "

print(ans)

Submission status: Accepted

Solution code:
n=int(input())
a_list = list(map(int,input().split()))
index_list = []
for i in range(n):
    tmp_list = []
    tmp_list.append(i+1)
    tmp_list.append(a_list[i])
    index_list.append(tmp_list)
index_list.sort(key=lambda x:x[1])
ans_list = []
for j in range(len(index_list)):
    ans_list.append(index_list[j][0])
print(*ans_list)

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(' '.join(map(str,b)))

Submission status: Accepted

Solution code:
n, = map(int,input().split())
li = input().split()
h_list = [int(li[i]) for i in range(n)]


sorted_indices = sorted(range(n), key=lambda i: h_list[i])
answer = [str(sorted_indices[i] + 1) for i in range(n)]
print(' '.join(answer))

Submission status: Accepted

Solution code:
a = int(input())
array = list(map(int, input().split()))
 
array2 = [0] * a
 
for i in range(a):
	array2[array[i]-1] = i + 1
    
for i in range(len(array2)):
	print("{}".format(array2[i]),  end = " ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = [int(x) for x in input().split()]
B = list(enumerate(A, 1))
B.sort(key=lambda x:x[1])

for i, v in B:
    print(i)

Submission status: Accepted

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

ans = [0 for _ in range(N)]

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

  
print(*ans)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))	
F = {}
for a,_ in zip(A,range(1,N+1)):
    F[a]=_
F_s = sorted(F.items(), key=lambda x:x[0])
print(" ".join(map(str,[v for k,v in F_s])))

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
B = []
for i in range(N):
    B.append([A[i]])
    B[i].append(i + 1)  # 出席番号をそれぞれ追加している
B = sorted(B)  # 人数でソート
ans = []
for ai in range(N):
    ans.append(B[ai][1])  # 人数順に出席番号で出力
print(" ".join(map(str, ans)))

Submission status: Accepted

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

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

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

a = []
for v in dic_sorted:
    a.append(v[0])

a_str = [str(w) for w in a]

print(' '.join(a_str))

Submission status: Accepted

Solution code:
N = int(input())

numlist = list(input().split(" "))
numdict = dict()

for i in range(N):
  numdict[int(numlist[i])] = i + 1

for i in range(N-1):
  print(numdict[i+1], end =" ")
print(numdict[N])

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):
  B[A[j]-1] = j+1
print(' '.join(map(str, B)))

Submission status: Accepted

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

P = ['']*N

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


print(' '.join(P))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import heapq
n = int(input())
a = list(map(int, input().split()))
dic = {}; ans = []
for i in range(n+1)[1:]:
    dic.setdefault(a[i-1],[]).append(i)
heapq.heapify(a)
for i in range(n):
    res = heapq.heappop(a)
    ans.append(dic[res][0])
print(*ans)

Submission status: Accepted

Solution code:
n = int(input())

a = list(map(lambda x:int(x), input().split()))

junban = []
for i in range(n):
    junban.append(0)

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



print(" ".join(junban))

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):
    b[a[j]-1]=j+1
print(*b)

Submission status: Accepted

Solution code:
import numpy as np

N = int(input())
strA = list(map(int, input().split()))
newstrA = np.array(strA)
ans = np.argsort(newstrA)+1
print(' '.join(map(str, ans)))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
A = list(map(int, input().split()))
Ai = []
for i in range(N):
    Ai.append([A[i], i+1])
for i in sorted(Ai):
    print("{} ".format(i[1]), end='')

Submission status: Accepted

Solution code:
def q_C(N, arrA):
	res = [0] * N
	for i in range(N):
		res[arrA[i] - 1] = i + 1
	print(*res)

N = int(input())
arrA = [int(x) for x in input().split()]
q_C(N, arrA)

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
from operator import itemgetter

N = int(input())
A_list = list(map(int,input().split()))
A_list2 = []
for i in range(N):
    A_list2.append([str(i+1), A_list[i]])

A_list_sorted = sorted(A_list2, key=itemgetter(1))
B = [x[0] for x in A_list_sorted]
L = " ".join(B)
print(L)

Submission status: Accepted

Solution code:
import numpy as np

n = int(input())
a = [int(x) for x in input().split()]
np_a = np.array(a)

a_idx = np.argsort(np_a)
#print(a_idx)

res = [str(1+int(x)) for x in a_idx.tolist()]
#print(res)

print(' '.join(res))

Submission status: Accepted

Solution code:
n=int(input())
ans=[0]*n
for num,i in zip(input().split(),range(n)):
  ans[int(num)-1]=str(i+1)
print(' '.join(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
temp = list(map(int, input().split()))
b = {}
for i in range(N):
  b[temp[i]] = i+1
c = sorted(b.items(), key=lambda x:x[0])
for i in range(N):
  print(c[i][1], end=" ")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import os

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

l = []

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

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

for i in nl:
    print(i[0], end='')
    if i != nl[-1]:
        print(' ', end='')
    else:
      	print('')

Submission status: Accepted

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

d = dict(zip(range(N), A))

ans = [str(k + 1) for k, _ in sorted(d.items(), key=lambda x: x[1])]
print(" ".join(ans))

Submission status: Accepted

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

dict = {}
newdict = {}
key = 1
for i in a:
  dict.setdefault(key,i)
  key += 1
newdict = sorted(dict.items(), key=lambda x: x[1])

for a in newdict:
  print(a[0], end="")
  if(a[1] != n):
    print(" ", end="")

Submission status: Accepted

Solution code:
n = int(input())

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

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


for i in range(n):
    	print(str(result[i]))

Submission status: Accepted

Solution code:
import numpy as np

N = int(input())
A = list(map(int, input().split()))
tmp = np.argsort(A)+1
print(*tmp)

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=' ')
print()

Submission status: Accepted

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

l = sorted([[n, str(i+1)] for i,n in enumerate(A)])
print(' '.join([n for i,n in l]))

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int, input().split(' ')))
d = {}
for i in range(n):
  d[l[i]] = i+1

t = []
for i in range(1, n+1):
    t.append(str(d[i]))
print(' '.join(t))

Submission status: Accepted

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

AA = dict(zip(A, range(1, len(A) + 1)))
AAA = list(map(lambda x: str(x[1]), sorted(AA.items())))
print(' '.join(AAA))

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))
K=list(range(1,N+1))

d=dict(zip(A,K))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

n = int(input())
a_list = np.array(list(map(int, input().split())))
# a_list = np.array([3,4,2,1,5])

ans_list = a_list.argsort() + 1
print(' '.join(map(str, ans_list)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

Submission status: Accepted

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

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

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


for i in range(N):
    if i == N-1:
        print(all[i][1])
    else:
        print(all[i][1], end=' ')

Submission status: Accepted

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

import sys, os
def ac_input(*args):
    return map(int, input().split())

def main():
    ans = []
    N = int(input())
    A = input().split()
    for i in range(N):
        ans.append(0)
    for i in range(N):
        ans[int(A[i])-1] = i+1
    for i in range(N):
        print(str(ans[i]) + " ",end="")
    print("")
if __name__ == "__main__" :
    main()

Submission status: Accepted

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

ans_list = [0] * N

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

print(*ans_list)

Submission status: Accepted

Solution code:
N = int(input())
A = [int(a) for a in input().split()]
order = [None] * N
for i in range(N):
    order[i] = (A[i], i + 1)
order.sort()
ans = [None] * N
for i in range(N): ans[i] = order[i][1]
print(" ".join(map(str, ans)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()
A = list(map(int, input().split()))
Adic = {num + 1: i for num, i in enumerate(A)}
A_sorted = sorted(Adic.items(), key=lambda x: x[1])
ans = [i[0] for i in A_sorted]
print(" ".join(map(str, ans)))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
N = int(input())
# スペース区切りの整数の入力
A = [int(a) for a in input().split()]

order = sorted(range(len(A)), key=lambda k: A[k])
sorted_order = [_a + 1 for i, _a in enumerate(order)]
print(*sorted_order)

Submission status: Accepted

Solution code:
n = int(input())


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

d = {}

for val in range(n):
    d[val] = a_L[val]

#print(d)
ans = sorted(d.items(),key=lambda x:x[1])
#print(ans)

ans_L = []

for val in ans:
    ans_L.append(str(val[0]+1))

print(" ".join(ans_L))

Submission status: Accepted

Solution code:
n = int(input())
people = list(map(int, input().split()))
number = []
fast = []

for i in range(1, n+1):
    number.append(i)

dic = dict(zip(people, number))
dic = sorted(dic.items())

for i in dic:
    k = str(i[1])
    fast.append(k)
fast = ' '.join(fast)
print(fast)

Submission status: Accepted

Solution code:
n = int(input())
a = {}
a_list = list(map(int,input().split()))
for i in range(n):
    a[a_list[i]] = i+1
a_sorted = sorted(a.items(), key=lambda x:x[0])
b = []
for j in range(n):
    b.append(str(a_sorted[j][1]))
print(' '.join(b))

Submission status: Accepted

Solution code:
size = int(input())
ans = []
li = list(map(int,input().split()))
a = list(enumerate(li))
list2 = sorted(a, key=lambda x:x[1])
for i,j in list2:
    print(i+1,end=" ")

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
#from collections import deque

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

Submission status: Accepted

Solution code:
N=int(input())
L=list(map(int,input().split()))
to=[]
for i in range(N):
  to.append([i,L[i]])
to=sorted(to, key=lambda x:x[1])
for i in range(N):
       print(to[i][0]+1,end=' ')

Submission status: Accepted

Solution code:
#import sys

#input = sys.stdin.readline

import heapq

def main():
#    h,w,a,b = map(int, input().split())
    n=int(input())
    a = list(map(int,input().split()))
    b=[]
    for i in range(n):
        b.append([a[i],i+1])
#    print(b)
#    heapq.heapify(b)
#    print(heapq.heappop(b))
#    print(b)
    b=sorted(b,key=lambda x: x[0])
    for i in range(n):
        print(b[i][1], end=" ")


#    for i in range(h):
#            print(aaa)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

num_box.sort(key=lambda x: x[1])
for i in range(N):
    ans.append(num_box[i][0])

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

Submission status: Accepted

Solution code:
N = int(input())

# print(N)

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

dct = {}

for i in range(len(A_list)):
    a = A_list[i]
    # print(A_list[i])
    
    key = a
    value = i + 1
    
    dct[key] = value
    
# print(dct)

dct2 = dict(sorted(dct.items(), key=lambda x: x[0]))
# print(dct2)

list1 = dct2.values()
# print(list1)

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

Submission status: Accepted

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

a.insert(0,0);

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

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

Submission status: Accepted

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

Submission status: Accepted

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

list = {}

i = 1
while i <= N:
  list[i] = num[i-1]
  i += 1
  
list_sorted = sorted(list.items(), key=lambda x:x[1])

m = 0
while m <= N-1:
  print(list_sorted[m][0], end=' ')
  m+=1

Submission status: Accepted

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

l = {}
for i in range(N):
    l[i] = a[i]

sorted_l = sorted(l.items(), key=lambda x: x[1])

res = ""
for key, value in sorted_l:
    res += str(key + 1) + " "


print(res)

Submission status: Accepted

Solution code:
N = int(input())

A = [a for a in zip(map(int,input().split()),range(1, N+1))]

A.sort()

print(" ".join([str(i[1]) for i in A]))

Submission status: Accepted

Solution code:

N= int(input())
A=[[int(i), ind] for ind, i in enumerate(input().split())]

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

Submission status: Accepted

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

ans = [0 for _ in range(N)]

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

print(" ".join(ans))

Submission status: Accepted

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

list = [0]*N

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

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

Submission status: Accepted

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

ans = [0] * N 

for i, num in zip(range(1, N+1), nums):
    ans[num-1] = i
print(*ans)

Submission status: Accepted

Solution code:
n = int(input())
a_s = input().split()

d = {}
for i in range(len(a_s)):
  d[int(a_s[i])] = str(i+1)
  
l = list(d.values())
print(' '.join(l))

Submission status: Accepted

Solution code:
import numpy as np

n = int(input())
s = np.array(list(map(int, input().split(' '))))
r = list(map(str, s.argsort()+1))

print(' '.join(r))

Submission status: Accepted

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

d = sorted(c.items())
e = dict(d)
e1 = e.values()

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

Submission status: Accepted

Solution code:
import numpy as np

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

x = np.argsort(A) + 1

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