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 func(N, A_i):
    array = [0]*N
    for i in range(N):
        array[A_i[i]-1] = i+1
    ans = str(array[0])
    for i in range(N-1):
        ans += " " + str(array[i+1])
    return ans

N = int(input())
A_i = list(map(int, input().split(" ")))
print(func(N, A_i))

Submission status: Accepted

Solution code:
n = input()
arr = map(int, raw_input().split())
new = [0 for i in range(n)]


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

for k in new:
    print k,

Submission status: Accepted

Solution code:
import numpy as np

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

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

Submission status: Accepted

Solution code:
from heapq import heappush, heappop
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations,combinations
import sys
import bisect
import string
#import math
#import time
import random
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def StoI():
    return [ord(i)-97 for i in input()]
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['Yes','No']
mo=10**9+7
#ts=time.time()
#sys.setrecursionlimit(10**6)
#input=sys.stdin.readline
show_flg=False
show_flg=True


n=I()
a=LI()
b=[]
b=[(i+1,j) for i,j in enumerate(a)]
b.sort(key=lambda x: x[1])


print(*[i for i,j in b])

Submission status: Accepted

Solution code:
n = int(input())

member = list(map(int, input().split()))
ans = [0]*n

for i,num in enumerate(member):
    ans[num-1] = i+1

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

Submission status: Accepted

Solution code:
def resolve():
    n = int(input())
    a = list(map(int, input().split()))
    b = sorted([(i, ai) for i, ai in enumerate(a)], key=lambda x: x[1])
    print(" ".join([str(i + 1) for i, _ in b]))


if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
n = int(input())
a = tuple(map(int, input().split()))
b = dict((j,i + 1) for i, j in enumerate(a))
for i in sorted(a):
    print(b[i], end=' ')

Submission status: Accepted

Solution code:
from math import *

def next_int():
    return int(input())

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

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split(" ")))
dic = {}
i = 0
for a_s in a:
    dic.setdefault(i, a_s)
    i += 1
for k, v in sorted(dic.items(), key=lambda x: x[1]):
    print(k + 1)

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:
import numpy as np
N = int(input())
A = list(map(int, input().split()))
print(' '.join([str(one) for one in np.argsort(A)+1]))

Submission status: Accepted

Solution code:
n = int(input())
a = [[int(i), j + 1] for j, i in enumerate(input().split())]
a.sort()
t = []
for aa in a:
    t.append(str(aa[1]))
print(*t)

Submission status: Accepted

Solution code:
N = int(input())
S = list(map(int, input().split()))
indexed_S = sorted([[i,s] for i,s in enumerate(S)], key = lambda x: x[1])
print(" ".join([str(iS[0]+1) for iS in indexed_S]))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    A_l = [int(i) for i in input().split()]
    order = [-1 for _ in range(N)]

    for index, A in enumerate(A_l):
        order[A-1] = index+1
    print(" ".join([str(i) for i in order]))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    list = []
    tmp = []
    sort_list = []
    num = int(input())
    list = input().split()
    for i,v in enumerate(list):
        tmp.append([int(v),i+1])
    sort_list=sorted(tmp)
    ans = [str(i[1]) for i in sort_list ]
    print(" ".join(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
li = []
for i in range(1,N+1):
    li.append([A[i-1],i])
li.sort()
for j in li:
    print(j[1],end=" ")

Submission status: Accepted

Solution code:
def resolve():
    N = input()
    targets = list(map(int,input().split()))
    ans = sorted(range(len(targets)), key=lambda k: targets[k])
    for k in ans:
        print(k+1,end=" ")
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]=str(i+1)

mojiretsu=" ".join(ans)
print(mojiretsu)

Submission status: Accepted

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

for a in items:
    print(a[1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(n):
    #print(i)
    a[l[i]-1] = i + 1 #each_numのi番目のインデックスに代入, -1 はi 番目が1,2,3 ...

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

Submission status: Accepted

Solution code:
#import numpy as np
N = int(input())
A = list(map(int, input().split()))
#A = np.array(A)
B = [0]*N
#indices = [*range(len(A))]
#sorted_indices = sorted(indices, key=lambda i: A[i])
#for i in range(1, N+1):
#    B.append(A.index(i)+1)
#print(B)
#sorted_indices = sorted_indices + B
for i in range(N):
    B[A[i]-1] = i + 1
print(*B)
#print(*sorted_indices)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

h = []

for i in range(len(A)):
    heapq.heappush(h,(A[i],i+1))

ans = []
for i in range(len(A)):
    ans.append(heapq.heappop(h)[1])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from functools import reduce
import copy
import math
from pprint import pprint


sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def int_inputs(num_of_input):
    ins = [int(input()) for i in range(num_of_input)]
    return ins


def solve(inputs):
    A = string_to_int(inputs[0])
    order = {x: i for i, x in enumerate(A)}
    r = []
    for i in range(len(A)):
        r.append(order[i+1]+1)
    return r


def string_to_int(string):
    return list(map(int, string.split()))


if __name__ == "__main__":
    input()
    ret = solve(inputs(1))
    for i, r in enumerate(ret):
        if i == len(ret) - 1:
            print(r)
        else:
            print('{} '.format(r), end='')

Submission status: Accepted

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

arr = [0]*N

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

print(*arr)

Submission status: Accepted

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

def sort(N, A):
    l = [None] * N
    for i, v in A:
        l[v-1] = str(i)
    return l

print(' '.join(sort(N, A)))

Submission status: Accepted

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

def sort(N, A):
    l = [None] * N
    setitem = l.__setitem__
    for i, v in A:
        setitem(v-1, str(i))
    return l

print(' '.join(sort(N, A)))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

map = {a[i]:str(i+1) for i in range(n)}
print(" ".join(map[i] for i in range(1, n+1)))

Submission status: Accepted

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

map = {a[i]:str(i+1) for i in range(n)}
print(" ".join([map[i] for i in range(1, n+1)]))

Submission status: Accepted

Solution code:

n=int(input())
print(" ".join(list(map(lambda x: str(x[1]),sorted(zip(list(map(int,input().split())),range(1,n+1)),key=lambda x: x[0])))))

Submission status: Accepted

Solution code:

n=int(input())
l=[]
tem=list(map(int,input().split()))

print(" ".join(list(map(lambda x: str(x[1]),sorted(zip(tem,range(1,n+1)),key=lambda x: x[0])))))

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

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
answer = sorted(B.items())
ac=[]
for i in range(N):
    ac.append(answer[i][1])
print(' '.join(map(str, ac)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
comb = [(a,i) for a, i in zip(A, range(1,N+1))]
comb = sorted(comb)
ans = " ".join([str(c[1]) for c in comb])
print(ans)

Submission status: Accepted

Solution code:

n=int(input())
l=[]
tem=list(map(int,input().split()))
for i in range(n):
    l.append((tem[i],i+1))
l=sorted(l,key=lambda s: s[0])
for x in range(n):
    if x==0:
        print(l[x][1],end="")
    else:
        print(" %d"%l[x][1],end="")

Submission status: Accepted

Solution code:
# coding: utf-8
N = int(input())
A = list(map(int, input().split()))
for i in range(N):
    A[i] = [A[i]]
    A[i].append(i+1)
A.sort(key=lambda x: x[0])
for i in range(N):
    print(A[i][1], end=" ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,*a=map(int,open(0).read().split());print(*[i+1for x,i in sorted([(x,i)for i,x in enumerate(a)])])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time
sys.setrecursionlimit(10**7)
inf = 10**20

N = int(input())
A = list(map(int,input().split()))
answers = [-1 for _ in range(N)]
for i in range(N):
    answers[A[i]-1] = i+1
print(" ".join(map(str,answers)))

Submission status: Accepted

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

Submission status: Accepted

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

Alist.sort()

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

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

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
a = list(map(int, input().split()))
a = np.argsort(np.array(a)) + 1
for i in range(len(a)):
    print(a[i], end=' ')

Submission status: Accepted

Solution code:
n = int(input())

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

numbers = []
for i, j in enumerate(attendees, 1):
    numbers.append([i, j])

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

for i in numbers:
    print(i[0], end=' ')

Submission status: Accepted

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


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

a.sort()
for i in range(n):
    a[i]=a[i][1]
print(*a)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
A = sorted([(a, i+1) for i, a in enumerate(list(map(int, input().split())))])
print(' '.join(map(str, [j for a, j in A])))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
l = input().split()
a = []
for i in range(N):
	a.append(0)
for i in range(N):
	a[int(l[i])-1] = str(i+1)
print(" ".join(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:
import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N,num):
    if N<=0:
        return [[]]*num
    elif num==1:
        return [I() for _ in range(N)]
    else:
        read_all = [tuple(II()) for _ in range(N)]
        return map(list, zip(*read_all))

#################

from operator import itemgetter
def index_sort(A):
    return sorted(enumerate(A),key=itemgetter(1))

N = I()
A = III()

x = index_sort(A)
y = []
for i in range(N):
    y.append(x[i][0]+1)

print(*y)

Submission status: Accepted

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

print(*[t[1] for t in sorted(zip(A, range(1, N + 1)))])

Submission status: Accepted

Solution code:
from operator import itemgetter

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

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

Submission status: Accepted

Solution code:
N = int(input())
L = list(map(int, input().split()))
 
M = []
 
for i in range(len(L)):
    l = (L[i], i+1)
    M.append(l)
 
M = sorted(M)
 
for x in M:
    print(x[1])

Submission status: Accepted

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

M = []

for i in range(len(L)):
    l = (L[i], i+1)
    M.append(l)

M = sorted(M)

for x in M:
    print(x[1])

Submission status: Accepted

Solution code:
#!/usr/bin/python3

import math
import os
import sys


DEBUG = 'DEBUG' in os.environ


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


def dprint(*value, sep=' ', end='\n'):
    if DEBUG:
        print(*value, sep=sep, end=end)


def main():
    N = int(inp())
    A = [int(e) for e in inp().split()]

    S = [(a, i + 1) for i, a in enumerate(A)]
    S.sort()
    print(*[s[1] for s in S])


if __name__ == '__main__':
    main()

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,a=open(0);a=a.split();print(*sorted(range(1,int(n)+1),key=lambda x:int(a[x-1])))

Submission status: Accepted

Solution code:
n = int(input())
ary = []
for i,j in enumerate(list(map(int,input().split()))):
    ary.append([i+1,j])
ary.sort(key=lambda l:(l[1]))
print(*[ary[i][0] for i in range(n)],sep=" ")

Submission status: Accepted

Solution code:
import numpy as np

n = int(input())
a = np.array(list(map(int, input().split())), dtype=np.int)
i = a.argsort() + 1
for sid in i:
  print(sid, end=' ')

Submission status: Accepted

Solution code:
n,*a=map(int,open(0).read().split());print(*list(zip(*sorted([[i+1,j]for i,j in enumerate(a)],key=lambda x:x[1])))[0])

Submission status: Accepted

Solution code:
# ABC142C - Go to School
def main():
    N, *A = map(int, open(0).read().split())
    ans = [0] * (N + 1)
    for i, j in enumerate(A, 1):
        ans[j] = i
    print(" ".join(map(str, ans[1:])))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# ABC142C - Go to School
def main():
    N, *A = map(int, open(0).read().split())
    ans = [0] * (N + 1)
    for i, j in enumerate(A, 1):
        ans[j] = i
    print(*ans[1:])


if __name__ == "__main__":
    main()

Submission status: Accepted

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

ans = [0] * N

# enumerate関数
# enumerate(イテラブル)
# 前の変数には0, 1, 2, ...のように0から開始して1ずつ増える数が入る
# 後ろの変数にはイテラブルの要素が入る
# enumerate関数は(番号, イテラブルの要素)というtupleを作るので
# それをアンパックして前の変数と後ろの変数に代入している
for i, a in enumerate(A):
    ans[a-1] = i+1

# アスタリスクをつけると中身だけを出力できる
# 細かい原理はよくわからん
# listだけでなくtupleでもできる
print(*ans)

Submission status: Accepted

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

# A = list(enumerate(A))
# A.sort(key = lambda x: x[1])
# for i in range(N):
#     print(A[i][0] + 1, end = " ")

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

Submission status: Accepted

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

Submission status: Accepted

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

l = [0] * N

for i, a in enumerate(A):
    l[int(a - 1)] = str(i + 1)
print(*l)

Submission status: Accepted

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

A = list(enumerate(A))
A.sort(key = lambda x: x[1])

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

Submission status: Accepted

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

sjun=dict(zip(s,jun))
ssj=sorted(sjun.items(), key=lambda x:x[1])
for i in range(n):
    print(ssj[i][0], end=' ')

Submission status: Accepted

Solution code:
input_line_no = 0
N = int(input())
A = list(map(int, input().split()))
B = [(A[i],i+1) for i in range(N)]
B.sort()
C = [str(b[1]) for b in B]
print(' '.join(C))

Submission status: Accepted

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

for i in range(N):
    ans[i][0]=A[i]

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

ANS=sorted(ans)

ans_new=''

for i in range(N):
    ans_new+=str(ANS[i][1])
    ans_new+=' '
    
print(ans_new)

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] = str(i + 1)
 
print(' '.join(b))

Submission status: Accepted

Solution code:
import heapq as hq

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

q = []
hq.heapify(q)
for i in range(len(p)):
    hq.heappush(q, p[i])

while len(q) != 0:
    print(q[0][1], end=' ')
    hq.heappop(q)

Submission status: Accepted

Solution code:
n = int(input())
a = tuple(map(int, input().split()))
b = map(lambda x: x[0], sorted(enumerate(a, 1), key=lambda x: x[1]))
print(*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] = str(i + 1)

print(' '.join(b))

Submission status: Accepted

Solution code:
n=int(input())
a = list(map(int,input().split()))
enumerate(a,1)
b=sorted(range(len(a)), key=lambda k: a[k])
for i in range(len(b)):
  print(b[i]+1)

Submission status: Accepted

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

ans = [0]*n

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

print(*ans)

Submission status: Accepted

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

student = {str(i + 1):num_list[i] for i in range(N)}

# returnはリスト 型になる
sorted_student = sorted(student.items(), key=lambda x:x[1])

result = ""
for j in range(N):
    result += sorted_student[j][0] + " "

print(result.strip())

Submission status: Accepted

Solution code:
from collections import Counter
mod = 1000000007


def inverse(a):
    return pow(a, mod - 2, mod)


def usearch(x, a):
    lft = 0
    rgt = len(a) + 1
    while rgt - lft > 1:
        mid = (rgt + lft) // 2
        if a[mid] <= x:
            lft = mid
        else:
            rgt = mid
    return lft


def update(x, y, new_value, dp):
    if 0 <= x < len(dp) and 0 <= y < len(dp):
        dp[x][y] = min(dp[x][y], new_value)

def main():
    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(str(i)  for i in b))

main()

Submission status: Accepted

Solution code:
# C - Go to School
N = int(input())
A = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
from numpy import*;_,a=open(0);print(*argsort(int32(a.split()))+1)

Submission status: Accepted

Solution code:
from numpy import*;_,a=open(0);print(*argsort(list(map(int,a.split())))+1)

Submission status: Accepted

Solution code:
input()
print(' '.join([str(y[1]) for y in sorted([(int(x),i+1) for i, x in enumerate(input().split())])]))

Submission status: Accepted

Solution code:
N = int(input())
A = input().split(' ')

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

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

print(' '.join(t))

Submission status: Accepted

Solution code:
n = int(input())

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

res = [0] * (n+1)

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

print(*res[1:])

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc142/tasks/abc142_c
import sys
sys.setrecursionlimit(12345678)
import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop


def main():
    n = int(input())
    al = list(map(int, input().split()))
    al = [(i, a) for i, a in enumerate(al)]
    al.sort(key=lambda a: a[1])
    al = [i + 1 for i, a in al]
    print(' '.join(map(str, al)))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
attends = dict(enumerate(list(map(int, input().split())), start=1))
attends_sorted = sorted(attends.items(), key=lambda x: x[1])
arr = [x[0] for x in attends_sorted]
print(*arr)

Submission status: Accepted

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

ans = [0]*(N+1)
for i, a in enumerate(A_list):
    ans[a] = i + 1

[print(ANS) for ANS in ans[1:]]

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(n):
    h.append([h_kari[i],i+1])
    
h.sort()    
    
ans = [h[i][1] for i in range(n)]    

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

Submission status: Accepted

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


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import numpy as np;input();print(' '.join(map(str,np.argsort(list(map(int,input().split())))+1)))

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

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

Submission status: Accepted

Solution code:
n = int(input())
a = [(i+1, v) for i, v in enumerate(map(int, input().split()))]
print(' '.join([str(i) for i, _ in sorted(a, key=lambda x: x[1])]))

Submission status: Accepted

Solution code:
def MAP(): return list(map(int,input().split()))
def INT(): return int(input())
def FLOAT(): return float(input())
MOD = 10**9+7

n = INT()
a = MAP()
res=[0]*n

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
T = [0 for i in range(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()))
b = []
for i in range(n):
    b.append((a[i], i + 1))
b = sorted(b)
for i in b:
    print(str(i[1]))

Submission status: Accepted

Solution code:
N=int(input())
 
li=list(map(int,input().split()))
 
ans=sorted(range(N), key=lambda a: li[a])
 
for n in range(N):
  ans[n]+=1
      
print(*ans)

Submission status: Accepted

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

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

for m in range(n):
    print(b[m],end="")
    print(" ",end="")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
 
li=list(map(int,input().split()))
 
ans=sorted(range(N), key=lambda k: li[k])
 
for n in range(N):
  ans[n]+=1
      
print(*ans)

Submission status: Accepted

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

ans = [0]*n

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = [(i, idx) for idx, i in enumerate(map(int, input().split()))]
a.sort()
last = a.pop()
for i, idx in a:
    print(idx+1, end=" ")
print(last[1]+1)

Submission status: Accepted

Solution code:
import copy

N=int(input())

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

ans=copy.copy(li)

ans=sorted(range(N), key=lambda k: li[k])

for n in range(N):
  ans[n]+=1
      
print(*ans)

Submission status: Accepted

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

B = [int(0) for n in range(N)]

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


#print('N', N)
#print('A', A)
#print('B', B)

B = [str(n) for n in B]

result = ' '.join(B)

print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
li = list(map(int, input().split()))
arr = np.array(li)
ans = arr.argsort() + 1
st = map(str,ans)
x = " ".join(st)
print(x)

Submission status: Accepted

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

ans = [0] * N

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

Submission status: Accepted

Solution code:
from sys import stdin

input = stdin.readline
mi = lambda: map(int, input().split())
lmi = lambda: list(mi())
si = lambda: input().strip('\n')
ii = lambda: int(input())


n = int(input())
arr = [0 for i in range(n+1)]
nums = lmi()
for i in range(n):
    arr[nums[i]] = i+1
print(*arr[1:])

Submission status: Accepted

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


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

  
print(" ".join(List))

Submission status: Accepted

Solution code:
import numpy as np
n=int(input())
s=list(map(int,input().split()))
x=np.argsort(s)
print(*x+1)

Submission status: Accepted

Solution code:
N=int(input())
L=[[b,a+1] for a,b in enumerate(map(int,input().split()))]
X=[b for a,b in sorted(L)]
print(" ".join(map(str,X)))