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

n = int(input())

ai = list(map(int, input().split()))
dic = {}
for i in range(1, n + 1):
    dic[ai[i-1]] = i

ans = sorted(dic.items())


for i in range(len(ans)):
    print(ans[i][1], end="")
    if i != len(ans)-1:
        print(end=" ")
    else:
        print()

Submission status: Accepted

Solution code:
from operator import itemgetter

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

x = [(A[i - 1], i) for i in range(1, N + 1)]
x.sort(key=itemgetter(0))
y = [t[1] for t in x]
print(*y)

Submission status: Accepted

Solution code:
import math
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):
    if i != N - 1:
        print(B[i], end = " ")
    else:
        print(B[i])

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="")
    if i!=n-1:
        print(" ",end="")
print()

Submission status: Accepted

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

D = {(i+1):a for i,a in enumerate(A)}
#print(D)

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

Submission status: Accepted

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

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

print(" ".join(newA))

Submission status: Accepted

Solution code:
import sys

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

L=[]
for i,a in enumerate(A):
	L.append((a,i+1))

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

for x,y in L:
	print y,

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from operator import itemgetter

def main():
    N = int(input())
    A = [int(x) for x in input().split()]
    B = []
    for i in range(1, N + 1):
        B.append([A[i - 1], i])

    B_sorted = sorted(B, key=itemgetter(0))

    for x in B_sorted:
        print(x[1], end=" ")
    

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))
tmp=[-1 for _ in range(N)]
for ind,i in enumerate(A):
    tmp[i-1]=ind+1
ans=list(map(str,tmp))
print(" ".join(ans))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
from io import StringIO
import unittest

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """3
2 3 1"""
        output = """3 1 2"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """5
1 2 3 4 5"""
        output = """1 2 3 4 5"""
        self.assertIO(input, output)
    def test_入力例_3(self):
        input = """8
8 2 7 3 4 5 6 1"""
        output = """8 2 4 5 6 7 3 1"""
        self.assertIO(input, output)
def resolve():
    N=int(input())
    A=[int(i) for i in input().split()]
    B=[[A[i],i+1] for i in range(N)]

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

    C=[str(i[1]) for i in B]
    print(" ".join(C))


if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
#!/usr/bin/env python
import string
import sys
from itertools import chain, dropwhile, takewhile

INF = float("inf")


def read(
    *shape, f=int, it=chain.from_iterable(sys.stdin), whitespaces=set(string.whitespace)
):
    def read_word():
        w = lambda c: c in whitespaces
        nw = lambda c: c not in whitespaces
        return f("".join(takewhile(nw, dropwhile(w, it))))

    if not shape:
        return read_word()
    elif len(shape) == 1:
        return [read_word() for _ in range(shape[0])]
    elif len(shape) == 2:
        return [[read_word() for _ in range(shape[1])] for _ in range(shape[0])]


def readi(*shape):
    return read(*shape)


def readi1(*shape):
    return [i - 1 for i in readi(*shape)]


def readf(*shape):
    return read(*shape, f=float)


def reads(*shape):
    return read(*shape, f=str)


def arr(*shape, fill_value=0):
    if len(shape) == 1:
        return [fill_value] * shape[0]
    elif len(shape) == 2:
        return [[fill_value] * shape[1] for _ in range(shape[0])]


def dbg(**kwargs):
    print(
        ", ".join("{} = {}".format(k, repr(v)) for k, v in kwargs.items()),
        file=sys.stderr,
    )


def main():
    N = readi()
    A = readi(N)
    print(
        " ".join(str(i) for i, _ in sorted(enumerate(A, start=1), key=lambda p: p[1]))
    )


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def argsort(seq):
    return sorted(range(len(seq)), key=seq.__getitem__)

def read():
    N = int(input().strip())
    A = list(map(int, input().strip().split()))
    return N, A

def solve(N, A):
    keys = argsort(A)
    keys = [k+1 for k in keys]
    return ' '.join(list(map(str, keys)))

if __name__ == '__main__':
    inputs = read()
    print("%s" % solve(*inputs))

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

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

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

ans_list = []
for i in range(len(ans_dict)):
    ans_list.append(ans_dict[i][0])

hoge = map(str, ans_list)
ans = " ".join(hoge)
print(ans[:len(ans)])

Submission status: Accepted

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

res = [-1]*(n+1)
for _i, _a in zip(range(n), a):
    res[_a] = str(_i+1)
        
print(' '.join(res[1:]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = map(int, input().split())
iA= list(enumerate(A, start=1))
iA.sort(key=lambda x: x[1])
print(' '.join([str(x[0]) for x in iA]))

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 2019/09/28

n=int(input())
a=list(map(int,input().split()))
res=[]
for i,e in enumerate(a,1):
    res.append((i,e))

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

for e in res:
    print(e[0],end=' ')
print()

Submission status: Accepted

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

import numpy as np
a = np.array(a)
a_sort = np.argsort(a)
a_sort = a_sort + 1

print(*a_sort)

Submission status: Accepted

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

for i in range(1, n+1):
  print(ans[i], sep='', end=' ')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

m = [0 for i in range(0, N)]
for i in range(0, N):
    a = A[i] - 1
    m[a] = str(i + 1)

print(" ".join(m))

Submission status: Accepted

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

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

B.sort(key=lambda x: x[0])
print(' '.join([str(x[1]) for x in B]))

Submission status: Accepted

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

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

ans.sort()

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

C = []
for b in B:
    C.append(b[0])

print(*C)

Submission status: Accepted

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

index = sorted(range(len(a)), key=lambda k: a[k])
for i in range(n):
    index[i] += 1
print(*index)

Submission status: Accepted

Solution code:
import numpy as np
import math
import sys
sys.setrecursionlimit(10000000)

def main():
    N = int(input())
    A = [int(c) for c in input().split()]
    B = [0] * (N + 1)

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

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



if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
G = {i:A[i-1] for i in range(1,N+1)}
B = list(G.items())
B = sorted(B,key=lambda x:x[1])
C = [B[i][0] for i in range(len(B))]
print(*C)

Submission status: Accepted

Solution code:
n = int(input())
h_list = input().split()
h_list = [int(one) for one in h_list]

st_dict = dict()

for i,one in enumerate(h_list):
    st_dict[i+1] = one

tmp = sorted(list(st_dict.items()),key=lambda x:x[1])

out_str = ""
for one in tmp:
    out_str += "{} ".format(one[0])
print(out_str[:-1])

Submission status: Accepted

Solution code:
import math
import queue
import bisect
import heapq

mod = 1e9+7

def swap(a,b):
    return (b,a)

def gcd(a,b):
    if (a<b):
        a,b = swap(a,b)
    if (b==0):
        return a
    else:
        return gcd(b,a%b)

def divisors(a):
    divisors = []
    for i in range(1,int(a**0.5)+1):
        if a%i==0:
            divisors.append(i)
            if i!=a//i:
                divisors.append(a//i)
    return divisors

def main():
    n = int(input())
    a = [x for x in map(int,input().split())]
    A = []
    for i in range(1,n+1):
        A.append([a[i-1],i])
    A.sort()
    for i in range(n):
        print(A[i][1])
    return

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    n=int(input())
    a=list(map(int,input().split(' ')))
    t=[0]*n
    for n,i in enumerate(a):
        t[i-1]=n+1
    for i in t:
        print(i,'',end="")
if __name__ == '__main__':
    main()

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])
l.sort(key=lambda x:x[0])

for i,j in l:
  print(j,end=" ")

Submission status: Accepted

Solution code:
import sys
from heapq import heappush, heappop

def main():
    input = sys.stdin.readline
    N = int(input())
    A = list(map(int, input().split()))
    heap = []
    for i, a in enumerate(A, start=1):
        heappush(heap, (a, i))
    
    ans = []
    while heap:
        _, a = heappop(heap)
        ans.append(a)

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

B = []
for idx, val in enumerate(A):
    B.append((val, idx+1))
B = sorted(B)


for i in range(len(B)):
    if i < N - 1:
        print(B[i][1], end=" ")
    else:
        print(B[i][1])

Submission status: Accepted

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

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

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

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 sys
from bisect import *
from collections import *
from copy import deepcopy
from heapq import *
from itertools import *
from math import *
from operator import *
from pprint import *

sys.setrecursionlimit(10**8)

input = sys.stdin.readline

def main():
    """ main """
    N = int(input())
    AS = list(map(int, input().split()))
    ans = []
    for i in range(N):
        ans.append((AS[i],i+1))
    ans.sort()
    ans2 = []
    for a,b in ans:
        ans2.append(b)
    print(*ans2)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())						# 5
A =        list( map(int, input().split()) )	# 1 2 3 4 5 ...

B=[]
i=0
for a in A:
	i+=1
	B.append([i,a])

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

for i,a in C:
	print(i, end=' ')

print()

Submission status: Accepted

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

B = [(a, i+1) for i, a in enumerate(A)]
B = list(sorted(B))

ans = []
for _, i in B:
    ans.append(str(i))
print(' '.join(ans))

Submission status: Accepted

Solution code:

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

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

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

def list_print(A):
	length = len(A)
	for i in range(length - 1):
		print(A[i], end="")
		print(" ", end="")
	print(A[- 1])

list_print(s_list)

Submission status: Accepted

Solution code:
#coding:utf-8
import sys
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = False
def main(given = sys.stdin.readline):
    input = lambda : given().rstrip()
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())
    XLMIIS = lambda x : [LMIIS() for _ in range(x)]

    N = II()
    A = LMIIS()
    for i in range(N):
        A[i] = [A[i],i]
    A.sort()


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

        

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# from math import factorial
# from collections import defaultdict, deque
#  from heapq import heappush, heappop, heapify

# A, B = [int(i) for i in input().split(" ")]
# A = int(input())
# As = [int(i) for i in input().split(" ")]
# Ss = ["".join(sorted(input())) for _ in range(N)]
# edges = defaultdict(list)
# for _ in range(N - 1):
#     a, b = [int(i) for i in input().split(" ")]
#     edges[a-1].append(b-1)

N = int(input())
As = [int(i) for i in input().split(" ")]
for i in [i + 1 for i, j in sorted(enumerate(As), key=lambda x: x[1])]:
  print(i)

Submission status: Accepted

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

b = {}
for i, aa in enumerate(a):
    b[aa] = i + 1
b = sorted(b.items())
ans = ''
for k, v in b:
    if ans != '':
        ans += ' '
    ans += str(v)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()
n=int(input())
aa=map(int,input().split())
indexed=sorted(list(zip(range(1,n+1),aa)), key=lambda x: x[1])
print(' '.join(str(x[0]) for x in indexed))

Submission status: Accepted

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

Submission status: Accepted

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

lss=[]
for idx,seito in enumerate(ls):
    lss.append([seito,idx+1])
lsss=sorted(lss)
mapped_list = list(map(lambda x: x[1], lsss))
print(" ".join(list(map(str,mapped_list))))

Submission status: Accepted

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

tlist=[]
for i in range(N):
    tlist.append([A[i],i])
tlist.sort()

tmp=[]
for i in range(N):
    tmp.append(str(tlist[i][1]+1) )
print(' '.join(tmp))

Submission status: Accepted

Solution code:
N=int(input())

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

r=list(zip(a,[i+1 for i in range(N)]))
x=sorted(r)

initFlag=False
for it in x:
    if initFlag==False:
        initFlag=True
    else:
        print(" ",end="")
    
    print(it[1],end="")
print()

Submission status: Accepted

Solution code:
from sys import stdin
N = int(stdin.readline().rstrip())
A = [int(x) for x in stdin.readline().rstrip().split()]
a = [(i,ind+1)  for ind,i in enumerate(A)] 
for j in sorted(a):
    print(j[1],end=" ")

Submission status: Accepted

Solution code:
n=int(input())
a=[int(x) for x in input().split()]
ll=list(zip(a,list(range(1,n+1))))
ll.sort()
print(*[x[1] for x in ll])

Submission status: Accepted

Solution code:
N = int(input())
A = [int(a) for a in input().split()]
go_school = []
for i in range(N):
    go_school.append([A[i], i+1])
go_school.sort()
for i in go_school:
    print(i[1],end=" ")
print()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
#ABC142C
import sys
#sys.setrecursionlimit(100000)

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

b=[]
for i in range(n):
	b.append(str(0))
#print(b)

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

print(*b)

Submission status: Accepted

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

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N = INT()
A = []
A.append(LIST())
A.append(list(range(N)))

A = list(zip(*A))
A.sort()
A = list(zip(*A))
A[1] = [a+1 for a in A[1]]

print(*A[1])

Submission status: Accepted

Solution code:
import sys


def main():
    n = int(sys.stdin.readline().strip())
    a = [int(s) for s in sys.stdin.readline().strip().split()]

    tuples = []
    for i in range(n):
        ai = a[i]
        tuples.append((ai, i+1))
    tuples.sort()
    ans_list = [str(tup[1]) for tup in tuples]
    print(' '.join(ans_list))


main()

Submission status: Accepted

Solution code:
from collections import defaultdict as dd
N = int(input())
A = list(map(int, input().split()))

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

Submission status: Accepted

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

cnt = 1
for x in A:
    ans[x-1] = cnt
    cnt += 1

print(*ans)

Submission status: Accepted

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

li = []
for idx, ele in enumerate(a):
    li.append((ele, idx+1))

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

print(*ans)

Submission status: Accepted

Solution code:
input = raw_input


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

L = [[0,0] for i in range(N)]
for i in range(N):
    L[i][0] = i + 1
    L[i][1] = A[i]
L.sort(key = lambda x: x[1])
print(" ".join(map(lambda x: str(x[0]), L)))

Submission status: Accepted

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

Submission status: Accepted

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

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())
an = [int(i) for i in input().split()]

print(' '.join([str(i+1) for i, j in sorted(enumerate(an), key=lambda a: a[1])]))

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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

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

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


# Run main
if __name__ == '__main__':
    AtCoder().main()

Submission status: Accepted

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

Submission status: Accepted

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

lst = []
for i, a in enumerate(A):
    lst.append((a, i))
lst.sort()

ans = []
for a, i in lst:
    ans.append(i + 1)
print(' '.join(map(str, ans)))

Submission status: Accepted

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

for i in range(0, n):
	ys.append((xs[i], i + 1))

ys.sort()

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

print()

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

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

Submission status: Accepted

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

N = int(input().split()[0])
a_list = list(map(int, input().split()))

w_list = [(i+1, n) for i, n in enumerate(a_list)]
w_list = sorted(w_list, key=lambda x: x[1])
w_list = [str(w[0]) for w in w_list]
ans = ' '.join(w_list)
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
print(*b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
words = lambda t : list(map(t, input().split()))
n = int(input())
a = words(int)
ab = []
for i in range(1,n+1):
    ab.append((a[i-1],i))

ab.sort()
b = []
for (a,i) in ab:
    b.append(i)

#print(ab)
print(" ".join(map(str,b)))

Submission status: Accepted

Solution code:

N = int(input())

Tmp = []
Tmp = input().rstrip().split(' ')

nAns = [ 0 for i in range(N)]


for i in range(N):
  TmpN = int(Tmp[i])
  nAns[TmpN - 1] = (i+1)

for i in range(N):
  print('%d' %(nAns[i]), end='')
  if i != N - 1:
    print(' ' , end='')
  else:
    print('')

Submission status: Accepted

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

Submission status: Accepted

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

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

for si in s:
    print(si[0],end=' ')
print()

Submission status: Accepted

Solution code:
import sys
import heapq
import bisect
import itertools

mod = 10**9+7
dd = ((-1,0),(1,0),(0,-1),(0,1))

def I(): return(int(sys.stdin.readline()))
def LI(): return([int(x) for x in sys.stdin.readline().split()])
def LI_(): return([int(x)-1 for x in sys.stdin.readline().split()])
def S(): return(sys.stdin.readline()[:-1])
def IR(n): return([I() for _ in range(n)])

def GCD(a,b):
    while b!=0:
        a,b = b,a%b
    return a

def LCM(a,b):
    return a * b // GCD(a,b)

def Eratosthenes(N):
    r = [True]*(N+1)
    r[0] = False
    r[1] = False
    i = 2
    while i*i<=N:
        if r[i]: 
            j = i
            while i*j<=N:
                prime[i*j]=False
                j+=1
        i+=1
    return(r)

def main():
    N = I()
    A = LI()

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

    print(*[IA[i][0] for i in range(N)])

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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


print(*buff)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys


input = sys.stdin.readline


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

##### リストの 二分木検索 #####
# bisect_left(lists, 3)
# bisect_right(lists, 3)

##### プライオリティキュー #####
# heapq.heapify(a) #リストaのheap化
# heapq.heappush(a,x) #heap化されたリストaに要素xを追加
# heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力

# heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
# heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと

##### タプルリストのソート #####
# sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順
# sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順
# sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順
# sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順

# sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順
# sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

def main():
	N = inputInt()
	A = inputList()

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

	#print(dis)
	ans = []
	for i in range(1,N+1):
		ans.append(dis[i])

	print(*ans)


if __name__ == "__main__":
	main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

tmp = sorted(range(len(a)), key=a.__getitem__)
ans = ''
for i in range(n):
    ans += str(tmp[i] + 1) + ' '
print(ans[:-1])

Submission status: Accepted

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

List = []
for i in range(len(A)):
    List.append([A[i],i+1])


List.sort()
ans = []
for i in range(len(List)):
    ans.append(List[i][1])
print(*ans)

Submission status: Accepted

Solution code:
# coding: UTF-8
import sys
#sys.setrecursionlimit(n)
import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

readl= lambda: list(map(int, sys.stdin.readline().split()))
readt= lambda: tuple(map(int, sys.stdin.readline().split()))
read = lambda: sys.stdin.readline().rstrip()
readi = lambda: int(read())
readmi = lambda: map(int, sys.stdin.readline().split())
readms = lambda: map(str, sys.stdin.readline().split())

h = []
n = readi()
t = readl()
index = 1
for i in t:
    heapq.heappush(h, (i, index))
    index += 1
for i in range(n):
    p1, p2 = heapq.heappop(h)
    print(p2,end=" ")

Submission status: Accepted

Solution code:
n = int(input())
a_list = list(map(int, input().split()))
a_map = {}
for i in range(n):
    a_map[i + 1] = a_list[i]
ans = sorted(a_map.items(), key=lambda x:x[1])
for i in range(n-1):
    print(str(ans[i][0]), end=" ")
print(ans[n-1][0])

Submission status: Accepted

Solution code:
import numpy as np

def main():
    N = int(input())
    a = [int(i) for i in input().split()]

    A = np.argsort(a)
    A += 1

    print(*A)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

r = [0] * n
for i,ki in enumerate(list_k):
    r[ki-1] = i + 1

print(*r)

Submission status: Accepted

Solution code:
import heapq

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

Q = []
for i,a in enumerate(A):
    heapq.heappush(Q, (a, i+1))
for i in range(N):
    print(heapq.heappop(Q)[1], end=' ')