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
# sys.setrecursionlimit(10 ** 6)
# import bisect
# from collections import deque
# from decorator import stop_watch
# 
# 
# @stop_watch
def solve(N, As):
    students = [(As[i], i) for i in range(N)]
    students.sort()
    ans = ''
    for n, s in students:
        ans += ' ' + str(s + 1)
    print(ans.strip())


if __name__ == '__main__':
    # S = input()
    N = int(input())
    # N, M = map(int, input().split())
    As = [int(i) for i in input().split()]
    # Bs = [int(i) for i in input().split()]
    solve(N, As)

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()))
res=[0]*N
for i in range(N):
  res[A[i]-1]=i+1
for j in res:
  print(j,end=" ")

Submission status: Accepted

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

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

d = dict(zip(a,b))

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

print(' '.join([str(sorted_d[i][1]) for i in range(n)]))

Submission status: Accepted

Solution code:
from heapq import heappush,heappop
n=int(input())
a=list(map(int,input().split()))
b=[]
for i in range(n):
  heappush(b,(a[i],i+1))
a=[]
for i in range(n):
  c,d=heappop(b)
  a.append(d)
print(*a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
D = {i: j for i, j in enumerate(A, 1)}
D = sorted(D.items(), key = lambda x: x[1])
print(*list(x[0] for x in D))

Submission status: Accepted

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

c=list(range(1,a+1))
d=[]
for i in range(a):
    d.append([c[i],b[i]])
d.sort(key=lambda x: x[1])
ans=[]
for i in range(a):
    ans.append(d[i][0])
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(N):
    B[A[i]-1] = i+1

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

Submission status: Accepted

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

ans = [""]*n

for i in range(n):
    ans[a[i]-1] = str(i+1) #aのi番インデックスの値から１引いたものがans配列のインデックスになる。値は出席番号(i+1)

print(" ".join(ans))

Submission status: Accepted

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

ans = [""]*n

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

print(" ".join(ans))

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from collections import defaultdict, deque

n, s = int(input()), list(map(int, input().split()))
res = [0 for i in range(n)]
for i in range(n): res[s[i]-1] = i + 1
print(' '.join(str(i) for i in res))

Submission status: Accepted

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

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

print(' '.join(t))

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 = map(int, input().split())

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

print(' '.join(result))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

ans=" ".join(map(str,ans))
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

# import bisect
# import numpy as np
# from collections import deque
from collections import deque
# map(int, sys.stdin.read().split())
# import heapq
#import bisect
#import math


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


def main():
    N = int(input())
    A = list(map(int, input().split()))
    l = list()
    for i in range(N):
        l.append((A[i],i+1))
    l.sort()
    for i in range(N):
        print(l[i][1],end=" ")

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys

def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり

N = I()
A = LI()

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

A.sort()

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

print(*B)

Submission status: Accepted

Solution code:
# Coding is about expressing your feeling, and
# there is always a better way to express your feeling_feelme
import sys
import math
# sys.stdin=open('input.txt','r')
# sys.stdout=open('output2.txt','w')
from sys import stdin,stdout
from collections import deque,defaultdict
from math import ceil,floor,inf,sqrt,factorial,gcd,log2
from copy import deepcopy
ii1=lambda:int(stdin.readline().strip())
is1=lambda:stdin.readline().strip()
iia=lambda:list(map(int,stdin.readline().strip().split()))
isa=lambda:stdin.readline().strip().split()
mod=int(1e9 + 7)

n=ii1()
dp=[0]*(n+1)
arr=iia()
a=list(zip(arr,range(1,n+1)))
a.sort()
for i in range(n):
    print(a[i][1],end=' ')
print()

Submission status: Accepted

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

Submission status: Accepted

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

lst = [[] for _ in range(n)]
for i in range(1,n+1):
  lst[al[i-1]-1] = i
print(*lst)

Submission status: Accepted

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

N = int(input())
A = list(map(int,input().split()))
Ac = list(range(1,N+1))
Alis = [[i,j]  for i,j in zip(A,Ac)]
As = sorted(Alis)
for a in As:
    print(a[1],end = " ")

Submission status: Accepted

Solution code:
import sys

N = int(sys.stdin.readline())
A = list(map(int, sys.stdin.readline().split()))

tmp = {v: k+1 for k, v in enumerate(A)}
ans = []
for v, k in sorted(tmp.items(), key=lambda x: x[0]):
    ans.append(k)

print(*ans)

Submission status: Accepted

Solution code:

def solve():
    dp = [0] * N
    for i in range(N):
        dp[A[i]-1] = i+1
    for i in range(N):
        print(dp[i], end=" ")


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

Submission status: Accepted

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

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] = i

print(*ans)

Submission status: Accepted

Solution code:
N = int(input())
Alist = list(map(int, input().split()))
 
Alist = [[idx+1, a] for (idx, a) in enumerate(Alist)]
 
Alist.sort(key=lambda x:x[1])
 
ans = [str(a) for a, _ in Alist]
print(" ".join(ans))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(*newa, sep=" ")

Submission status: Accepted

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

# ans=[]
ans=[0]*N

# for i in range(1,N+1):
    # a=Ai.index(i)+1
    # ans.append(str(a))
for i in range (N):
    ans[Ai[i]-1]=str(i+1)

print(' '.join(ans))

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    inlis = list(map(int, input().split()))
    anslis = [0] * n
    for i in range(n):
        num = inlis[i]
        anslis[num-1] = i+1
    print(*anslis)
    
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())

al = list(map(int, input().split()))
ail = []
for i,a in enumerate(al):
    ail.append((a,i+1))

ail.sort()
ans = []
for a,i in ail:
    ans.append(i)

print(*ans)

Submission status: Accepted

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

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

print(" ".join(alist))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = input()
    A = [(a, idx) for idx, a in enumerate(map(int, input().split()), start=1)]
    A.sort(key = lambda x: x[0])
    print(" ".join([str(a[1]) for a in A]))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n, *a = map(int, open(0).read().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())

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

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


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

a = [li[i][1] for i in range(N)]
print(*a)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
for i, a in enumerate(A.copy(), 1):
    A[a - 1] = i
for a in A:
    print(str(a) + ' ', end='')
print()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
A = list(map(int, input().strip().split()))
arr = np.array(A)


print(' '.join(map(str, np.argsort(arr) + 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)

Submission status: Accepted

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

import sys

input = sys.stdin.buffer.readline

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

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

Ans = list()
for x,y in XY:
    Ans.append(y)

print(*Ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

A = np.argsort(A)

for a in A:
    print(a+1, end=" ")

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
d = {a:i for i,a in enumerate(A,1)}
ans = [d[i] for i in range(1,N+1)]
print(*ans)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
ans = {a:i for i,a in enumerate(A,1)}

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

Submission status: Accepted

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

for i in range(N):  # 生徒番号i はA[i]番目に来た
    order[A[i]-1] = i+1

print(*order)

Submission status: Accepted

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

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

for i in range(n):
    ans = ans + str(dic[i+1]) + ' '

print(ans)

Submission status: Accepted

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

A2 = [0]*N

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

print(*A2)

Submission status: Accepted

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

A2 = [0]*N

i =1
for a in A:
  A2[a-1] = i
  i+=1

print(*A2)

Submission status: Accepted

Solution code:
from math import gcd
n=int(input())
a=list(map(int,input().split()))
dic={}
for i,v in enumerate(a):
    dic[i+1]=v
#print(dic)
dic_sorted = list(sorted(dic.items(), key=lambda x:x[1]))
for i in range(n):
    if i!=n-1:
        print(dic_sorted[i][0],end=' ')
    else:
        print(dic_sorted[i][0])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
import sys
input=sys.stdin.readline

n=int(input())
lst=list(map(int,input().split()))
for i in range(n):
    lst[i]=[lst[i]]
for i in range(n):
    lst[i].append(i)
lst=sorted(lst,key=lambda x:x[0])
ans=[]
for i in lst:
    ans.append(i[1]+1)
print(" ".join(map(str,ans)))

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n=int(input())
l=list(map(int, input().split()))
l2 = [[l[i], i+1] for i in range(n)]
for i in sorted(l2):
  print(i[1], sep=' ', end=' ')

Submission status: Accepted

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

# return tuple
sortedNum = sorted(d.items(), key=lambda x:x[1])
print(*[s[0] for s in sortedNum])

Submission status: Accepted

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

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, *aa = map(int, open(0).read().split())

print(*(x[1] for x in sorted(zip(aa, range(1,n+1)))))

Submission status: Accepted

Solution code:
# Vicfred
# https://atcoder.jp/contests/abc142/tasks/abc142_c
# implementation
n = int(input())
a = list(map(int,input().split()))

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

#print(sorted(students, key=lambda x: x[1]))
students.sort(key=lambda x: x[1])

for student in students:
    print(student[0], end=' ')
print()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
S = [0] * (10 ** 5 + 2)
for i,a in enumerate(A):
    S[a] = i + 1
    # print(A[i] + 1)
    # print(a)

for n in range(1,N + 1):
    if n == N + 1 or n == N:
        print(S[n])
    else:
        print(S[n],end=" ")

Submission status: Accepted

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

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

L = " ".join([str(i) for i in X])
print(L)

Submission status: Accepted

Solution code:
n = int(input())
lst = list(map(int, input().split()))
dic = {}
for i in range(n):
  dic[lst[i]] = i + 1
s = ''
for i in range(n):
  s += str(dic[i + 1]) + ' '
print(s[:-1])

Submission status: Accepted

Solution code:
from operator import itemgetter
n = int(input())
lst = list(map(int, input().split()))
lst2 = []
for i in range(n):
  lst2.append((i + 1, lst[i]))
lst2.sort(key=itemgetter(1))
s = ''
for i in lst2:
  s = s + str(i[0]) + ' '
print(s[:-1])

Submission status: Accepted

Solution code:
N = int(input())
A = [[int(n), i] for i,n in enumerate(input().split(), 1)]
A.sort()
print(" ".join(map(str, [i[1] for i in A])))

Submission status: Accepted

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

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

del ans[0]
print(*ans)

Submission status: Accepted

Solution code:
"""
    こんにちは。これはクシャルです
    
    Author : thekushalghosh (クシャル)
    Team   : CodeDiggers
 
    I prefer Python language over the C++ language :p :D
        
    Visit my website : thekushalghosh.github.io
"""
import sys,math,cmath,time
start_time = time.time()
##########################################################################
################# ---- THE ACTUAL CODE STARTS BELOW ---- #################

def solve():
    n = inp()
    a = inlt()
    q = sorted([[a[i],i + 1] for i in range(n)])
    print(*[q[i][1] for i in range(n)])
            
################## ---- THE ACTUAL CODE ENDS ABOVE ---- ##################
##########################################################################
 
def main():
    global tt
    if not ONLINE_JUDGE:
        sys.stdin = open("input.txt","r")
        sys.stdout = open("output.txt","w")
    t = 1
    for tt in range(t):
        solve()
    if not ONLINE_JUDGE:
        print("Time Elapsed :",time.time() - start_time,"seconds")
        sys.stdout.close()
    
#---------------------- USER DEFINED INPUT FUNCTIONS ----------------------#
def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    return(input().strip())
def invr():
    return(map(int,input().split()))
 
#------------------ USER DEFINED PROGRAMMING FUNCTIONS ------------------#
def counter(a):
    q = [0] * max(a)
    for i in range(len(a)):
        q[a[i] - 1] = q[a[i] - 1],1
    return(q)
 
def string_counter(a):
    q = [0] * 26
    for i in range(len(a)):
        q[ord(a[i]) - 97] = q[ord(a[i]) - 97],1
    return(q)

def factors(n):
    q = []
    for i in range(1,int(n ** 0.5) + 1):
        if n % i == 0: q.append(i); q.append(n // i)
    return(list(sorted(list(set(q)))))

def prime_factors(n):
    q = []
    while n % 2 == 0: q.append(2); n = n // 2
    for i in range(3,int(n ** 0.5) + 1,2):
        while n % i == 0: q.append(i); n = n // i
    if n > 2: q.append(n)
    return(list(sorted(q)))
#-----------------------------------------------------------------------#
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
    input = sys.stdin.readline
main()

Submission status: Accepted

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

Submission status: Accepted

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

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

print(" ".join(map(str,T[1:])))

Submission status: Accepted

Solution code:
n=int(input())
l=list(map(int,input().split()))
s=list(range(n))
s.sort(key=lambda i: l[i])
newl=""
for i in range(n):
    newl+=str(s[i]+1)+" "
newl=newl.strip()
print(newl)

Submission status: Accepted

Solution code:

N = int(input())
a = list(map(int, input().split()))
s = [-1]
s.extend(0 for _ in range(N))

for i, item in enumerate(a):
    s[item] = i+1

result = " ".join(map(str, s[1:]))
print(result)

Submission status: Accepted

Solution code:
N = int(input())

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

student = list(range(0,N))

student.sort(key = lambda x:A[x])

for s in student:
    print(s+1,end= " ")

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
B = [[i, (idx + 1)] for idx, i in enumerate(A)]
B.sort()
for idx, j in enumerate(B):
    if idx != 0:
        print(" ", end="")
    print(j[1], end="")
print()

Submission status: Accepted

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

# list_n = list(map(int, input().split()))

# n = input()
# list = [input() for i in range(N)

# list = [[i for i in range(N)] for _ in range(M)]

N = int(input())
list_A = list(map(int, input().split()))
student = list(range(N))

student.sort(key=lambda i: list_A[i])

ans = ""
for i in range(N):
    ans += str(student[i]+1) + " "
    # print(ans)
ans = ans.strip()

print(ans)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
n = int(input())
a_li = [int(w) for w in input().split()]
student = list(range(0, n))
student.sort(key=lambda x: a_li[x])
for n in student:
    print(n + 1, end=" ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
print(' '.join([str(s[1]) for s in sorted([(ai,bi) for ai,bi in zip(map(int,input().split()),range(1,N+1))],key=lambda x:x[0])]))

Submission status: Accepted

Solution code:
def INT():
    return int(input())

def MI():
    return map(int, input().split())

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

N = INT()
A = LI()

for i in range(N):
    A[i] = [i + 1, A[i]]
    
A.sort(key = lambda x : x[1])

ans = []

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

a = np.argsort(A)

a = list(a)

a = map(lambda x: x+1, a)

print(*a)

Submission status: Accepted

Solution code:
import sys
n= int(input())
an = list(map(int, sys.stdin.readline().split()))
ans = ['']*n
for i in range(n):
    ans[an[i]-1] = str(i+1)

print(' '.join(ans))

Submission status: Accepted

Solution code:
import sys
n= int(input())
an = list(map(int, sys.stdin.readline().split()))
ans = [0]*n
for i in range(n):
    ans[an[i]-1] = str(i+1)

print(' '.join(ans))

Submission status: Accepted

Solution code:
import sys
n= int(input())
an = list(map(int, sys.stdin.readline().split()))
ans = [0]*n
for i in range(n):
    ans[an[i]-1] = i+1

print(*ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N, *A = map(int, read().split())

    B = [(a, i) for i, a in enumerate(A, 1)]
    B.sort()

    ans = [i for a, i in B]
    print(' '.join(map(str, ans)))

    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
A = np.array([int(x) for x in input().split()])
Sort = [str(x) for x in np.argsort(A)+1]
print(' '.join(Sort))

Submission status: Accepted

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

Submission status: Accepted

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

a_ind_val_l = []
for i, a in enumerate(al):
    a_ind_val_l.append((a,i))

a_ind_val_l.sort()
ans = []
for aiv in a_ind_val_l:
    ans.append(aiv[1]+1)

print(*ans)

Submission status: Accepted

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

for i in range(N):
    ans_list[A[i]-1]= i+1
print(' '.join(map(str,ans_list)))

Submission status: Accepted

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

print(' '.join(a))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A_s = list(map(int, input().split()))
A_s = list(map(lambda x:(x[1],x[0]+1), enumerate(A_s)))
A_s = sorted(A_s, key=lambda x:x[0])
print(" ".join(list(map(lambda x:str(x[1]), A_s))))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from collections import deque

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

ans=[]

A_dict={}

for n in range(N):
    a = A.popleft()
    A_dict[a]=n+1
    
for n in range(N):
    ans.append(A_dict[n+1])

print(*ans, sep=' ')

Submission status: Accepted

Solution code:
N=int(input())
A=[int(x) for x in input().split()]
B={int(A[i]):i for i in range(N)}
text=''
for i in range(1,N+1):
  text=text+' '+str(B[i]+1)
print(text)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    a = [int(x) for x in input().split()]
    ans = [None] * n
    for idx, ea in enumerate(a):
        ans[ea-1] = idx+1
    print(*ans)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

print(*ans,sep=' ')

Submission status: Accepted

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

junban = {}

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

a.sort()

for i in range(n):
    ans = junban[a[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(0,N):
    B[A[i]-1] = i+1

for i in B:
    print(i)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
keys = list(map(int,input().split()))
values = [i for i in range(1,n+1)]
d = dict(zip(keys,values))
for i in range(1,1+n):
    print(d[i])

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())
keys = list(map(int, input().split()))
values = [i for i in range(1, n+1)]

d = dict(zip(keys, values))

for i in range(1, n+1):
    print(d[i])

Submission status: Accepted

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

ans = [0]*N
for i in range(N):
    ans[S[i]-1] = i+1
print(" ".join(map(str, ans)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# C - Go to School
def main():
    n = int(input())
    a = list(map(int, input().split()))
    ans = [0] * n

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

if __name__ ==  "__main__":
    main()

Submission status: Accepted

Solution code:
# C - Go to School
def main():
    import numpy as np
    n = int(input())
    a = list(map(int, input().split()))
    a = np.array(a)
    a = np.argsort(a)
    for i in a:
        print(i+1,end=" ")

if __name__ ==  "__main__":
    main()