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:
N = int(input())
A = list(map(int,input().split()))
i_a = [[a,i+1] for i,a in enumerate(A)]
i_a.sort()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
##C - Go to School
N = int(input())
A = list(map(int, input().split()))
print(' '.join( str(a) for a in [y for x,y in sorted({A[i]:i+1 for i in range(N)}.items(), key = lambda x:x[0])]))

Submission status: Accepted

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

n=int(input())
a=list(map(int,input().split()))
ans=[0 for _ in range(n)]

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

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

Submission status: Accepted

Solution code:
N = int(input())
arr= [0]
arr.extend(list(map(int,input().split())))
arr2 = [0 for _ in range(N+1)]
for i in range(len(arr)):
	arr2[arr[i]]=i
for i in range(1,N+1):
	print(arr2[i],end=" ")

Submission status: Accepted

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

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

ansdic=sorted(B.items(), key=lambda x:x[0])
l=[]
for i in ansdic:
    l.append(i[1])

print(*l)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
A = np.array(list(map(int, input().split())))
print(*(np.argsort(A)+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:
n=int(input())
b =list(map(int,input().split()))

res=[0] * n

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

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

Submission status: Accepted

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

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

for i in range(n):
    print(dict_b[i][0])

Submission status: Accepted

Solution code:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

N = I()

A = LI()

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

sa = sorted(A)

result = []
for v in sa:
    result.append(a_index[v])

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,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 = list(map(int, input().split()))
l = list("")
for i in range(n):
    l.append([a[i], i + 1])
l.sort()
ans = ""
for i in range(n):
    if i == n - 1:
        ans += str(l[i][1])
    else:
        ans += str(l[i][1]) + " "
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

result = []

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

result.sort()
li = []

for i in range(N):
    li.append(result[i][1])

print(*li)

Submission status: Accepted

Solution code:
N = int(input())
A_list = list(map(int, input().split()))
index_add_A_list = []
for i, A in enumerate(A_list):
    index_add_A_list.append([i, A])
sorted_index_add_A_list = sorted(index_add_A_list, key=lambda x: x[1])
for a in sorted_index_add_A_list:
    print(a[0] + 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:
N = int(input())
As = list(map(int, input().split()))
ordList = [None] * N
noCount = 1
for i in As:
    ordList[i-1] = str(noCount)
    noCount += 1
print(' '.join(ordList))

Submission status: Accepted

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

def readlines(n):
    for _ in range(n):
        yield map(int, input().split())


def main():
    N = int(input())
    A = sorted(enumerate(map(int, input().split()), 1), key=lambda x: x[1])
    print(" ".join(str(i) for i, a in A))

main()

Submission status: Accepted

Solution code:
N = int(input())
A = [int(x) for x in input().split()]
ans = sorted(range(1, N+1), key=lambda x: A[x-1])


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

Submission status: Accepted

Solution code:
import os

def main():
	n = int(input())
	a_list = list(map(int, input().split()))
	count = 0
	result = [0]*n
	result_str = ""
	for i,v in enumerate(a_list):
		result[v-1] = i+1
	for i in result:
		result_str += str(i) + " "	
	print(result_str)

if __name__ == "__main__":
	main()

Submission status: Accepted

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

print(' '.join(s))

Submission status: Accepted

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

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

Submission status: Accepted

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

key = 1
d = {}

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


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

for i in range(len(d)):
    print(d[i][0], end=" ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 2020/04/22
# AtCoder Beginner Contest 142 - C

# Input
n = int(input())
a = list(map(int,input().split()))
tbl = [-1] * (n+1)

# Calc
for i in range(n):
    tbl[a[i]] = i+1

tbl.pop(0)

# Output
print(' '.join(map(str, tbl)))

Submission status: Accepted

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

an = []
for i in range(1, n+1):
        an.append(str(dd[i]))

ans = ' '.join(an)
print(ans)

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    A = [int(a) for a in input().split()]
    P = list()
    for i in range(N):
        P.append([A[i], i+1])
    P = sorted(P, key=lambda x: x[0])
    for i in range(N):
        stu = P[i]
        print(stu[1], end=" ")
    print()
if __name__ == "__main__":
    main()

Submission status: Accepted

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

import numpy as np

ll = np.array(nn)
p = list(ll.argsort())

for i in p:
  print(i+1)

Submission status: Accepted

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

for i in range(N):
    Answer.append(0)

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

print(*Answer)

Submission status: Accepted

Solution code:
from math import factorial as fact
import math
import fractions
import sys
import itertools
import numpy as np
from collections import Counter
import datetime
#入力:N(int:整数)
def input1():
	return int(input())

#入力:N,M(int:整数)
def input2():
	return map(int,input().split())

#入力:[n1,n2,...nk](int:整数配列)
def input_array():
	return list(map(int,input().split()))

def keta(N):
	return len(str(N))


def input_daytime(input_time):
	time,distance=input_time.split()
	t=time.split(":")
	se=str(t[-1]).split(".")
	dt1 = datetime.timedelta(hours=int(t[0]),minutes=int(t[1]),seconds=int(se[0]),milliseconds=int(se[1]))
	return dt1

def combinations(n,r):
	return list(itertools.combinations(n,r))

def all_sets(num_list):
	subsets=[]
	for i in range(2,len(num_list) + 1):
		for c in combinations(num_list, i):
			subsets.append(c) 
	return subsets


def CountOneRoots(x,y):
	#x:縦，y:横
	return fact(x+y)/fact(x)/fact(y)



n=input1()
A=input_array()

result=[0 for _ in range(n)]
for i in range(n):
	result[A[i]-1]=str(i+1)
print(" ".join(result))

Submission status: Accepted

Solution code:

n = int(input())

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

B = [0] * n

for i in range(n):
    B[A[i]] = i

print(' '.join(map(lambda x: str(x + 1), B)))

Submission status: Accepted

Solution code:
import sys
from io import StringIO
import unittest


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

    b = [(aa, i + 1) for i, aa in enumerate(a)]

    b.sort()

    print(' '.join([str(bb) for i, bb in b]))

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)

if __name__ == "__main__":
    # unittest.main()
    resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict
d = defaultdict(int)
N = int(input())
A = list(map(int, input().split()))
for i, v in enumerate(A):
    d[i + 1] = v
ans = []
d_swap = {v: k for k, v in d.items()}
sd = sorted(d_swap.items())
for i, v in enumerate(sd):
    ans.append(v[1])
print(' '.join(map(str, ans)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a_list = [int(x) for x in input().split()]

temp_list = []
for i, a in enumerate(a_list):
    temp_list.append([a, i + 1])
temp_list.sort()

print(" ".join([str(temp[1]) for temp in temp_list]))

Submission status: Accepted

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

Submission status: Accepted

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

for i, name in enumerate(a):
  a_sort[name-1] = str(i + 1)
print(' '.join(a_sort))

Submission status: Accepted

Solution code:
n = int(input())
a_list = [int(x) for x in input().split()]

o_list = [0] * (n + 1)
for i, a in enumerate(a_list):
    o_list[a] = i + 1

print(" ".join([str(o) for o in o_list[1:]]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
aa = list(map(int, input().split()))
oo = [str(a) for a in np.argsort(aa)+1] 
print(" ".join(oo))

Submission status: Accepted

Solution code:
#Coding:Utf-8
import sys
input=sys.stdin.readline

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

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

for l in range(N):
    print(ans[l],end=" ")

print("")

Submission status: Accepted

Solution code:
import sys
from bisect import bisect_right as bsr
from collections import Counter as cnt
from collections import defaultdict as dd
from collections import deque
from fractions import gcd
from itertools import combinations as comb
from itertools import permutations as perm
from math import ceil, factorial, floor
from operator import itemgetter as ig

sys.setrecursionlimit(1000000)

# お約束
args = None
INF = float("inf")
MOD = int(1e9 + 7)


def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]


def yesno(v, yes="Yes", no="No", upper=False):
    if upper:
        print([yes.upper(), no.upper()][not v])
    else:
        print([yes, no][not v])


def main():
    """エントリーポイント"""
    N = input(int)
    A = input([int, N])

    a = list(zip(A, [x for x in range(1, N + 1)]))
    ans = [str(x[1]) for x in sorted(a)]
    print(" ".join(ans))


if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    main()

Submission status: Accepted

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

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

print(*ans , sep=' ')

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    n = int(input())
    A = list(map(int, input().split()))

    B = []
    for i in range(n):
        B.append([i + 1, A[i]])
    B = sorted(B, key=lambda x: x[1])

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

    print(*res)


if __name__ == '__main__':
    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 = 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())
D = list(map(int, input().split()))
ans = [0 for i in range(N)]
for i, d in enumerate(D):
    ans[d-1] = i+1
print(' '.join(map(str, ans)))

Submission status: Accepted

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

Z = sorted(zip(A, B), key = lambda x: x[0])

print(*list(zip(*Z))[1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import itertools
##print(ord("A"))
n = int(input())
#n,k = map(int,input().split())
h = list(map(int,input().split()))	
ans = [0]*n
for i in range(n):
    ans[h[i]-1]= i+1
#print(ans)
for i in range(n):
    print(ans[i],end=" ")
"""
for i in range(1,n+1):
    #print(i)
    for j in range(n):
        
        if h[j] == i:
            ans.append(j+1)
#print(ans)
for i in range(len(ans)):
    print(ans[i],end=" ")
"""

Submission status: Accepted

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

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

Submission status: Accepted

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

data.sort()
answer = []
for ele in data:
    answer.append(str(ele[1]))

print(" ".join(answer))

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    a = list(map(int, input().split()))     # 出席番号順
    turn = [0]*(n+1)

    for index, j in enumerate(a, 1):
        turn[j] = index
    print(*turn[1:], sep=" ")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import numpy as np

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

ans = np.argsort(la) + 1

print(*ans)

Submission status: Accepted

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

dit = {}

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

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

for i in range(N):
    print(dic2[i][0], end=' ')

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
c=[str(i) for i in b]
print(" ".join(c))

Submission status: Accepted

Solution code:
n = int(input())
a_li = list(map(int,input().split()))
res = [ x for x in zip([i+1 for i in range(n)],a_li)]
res.sort(key=lambda x:x[1])
print(' '.join(list(map(lambda x: str(x[0]), res))))

Submission status: Accepted

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

d={}

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

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

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
b=list(range(1,n+1))
ab=list(zip(a,b))
ab.sort()
l=(str(ab[i][1]) for i in range(n))
l=list(l)
print(' '.join(l))

Submission status: Accepted

Solution code:
# solution

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

Submission status: Accepted

Solution code:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list
#from itertools import combinations # (string,3) 3回
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def main():
    n = int(input())
    A = zip(map(int,input().split()), range(1,n+1))
    print(*[a[1] for a in sorted(A)])
if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
A = LIST()
a = []

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

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

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

Submission status: Accepted

Solution code:
import numpy as np
_ = input()
hoge = np.array(list(map(int, input().split())))

res = ''
for i in np.argsort(hoge):
  res += str(i + 1) + ' '
print(res[:-1])

Submission status: Accepted

Solution code:
import sys

n, *a = map(int, sys.stdin.read().split())

def main():
    res = [x[0] for x in sorted(enumerate(a, 1), key=lambda x: x[1])]
    print(*res, sep=' ')

if __name__ ==  '__main__':
    main()

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc142/tasks/abc142_c
n = int(input())
nums = [int(i) for i in input().split()]

students = []
for i in range(n):
    students.append((nums[i], i + 1))
students.sort(key=lambda x: x[0])

ans = []
for i in range(n):
    ans.append(students[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(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()))
idx = sorted(range(1, N + 1), key=lambda x: A[x - 1])
for i in idx:
    print(i, end=" ")
print("")

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
A_sort = []
for i in range(N):
    A_sort.append((i + 1, A[i]))
A_sort.sort(key=lambda x: x[1])
for i, _ in A_sort:
    print(i, end=" ")

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    A = sorted([[int(t), i + 1] for i, t in enumerate(input().split())])
    print(' '.join(map(str, [row[1] for row in A])))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

tmp = [[num,i+1] for i,num in enumerate(a)]
tmp.sort(key=lambda x: x[0])

ans = [str(i) for j,i in tmp]

print(" ".join(ans))

Submission status: Accepted

Solution code:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list
#from itertools import combinations # (string,3) 3回
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#AB = sorted(AB,key = lambda x:x[0]) # Aに着目して安いやつ Aが値段でBが在庫や！！

mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def main():
    n = int(input())
    A = readInts()
    Al = []
    for i in range(n):
        Al.append([A[i],i+1])
    Al = sorted(Al,key = lambda Al:Al[0]) # ここの lambda Al:Al[0]は一致させないといけないらしい
    ans = []
    for k,v in Al:
        ans.append(v)
    print(*ans)
if __name__ == '__main__':
  main()

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(" ".join(map(str, rev)))

Submission status: Accepted

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

dic = {}
for i in range(1,N+1):
  dic[i] = a[i-1]
  
dic = sorted(dic.items(),key=lambda x:x[1])
l = [k[0] for k in dic]
print(' '.join(map(str,l)))

Submission status: Accepted

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

import sys
# import math
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product                # product(iter, repeat=n)
# from itertools import accumulate             # accumulate(iter[, f])
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from copy import deepcopy                    # to copy multi-dimentional matrix without reference


def main():
    mod = 1000000007                  # 10^9+7
    inf = float('inf')
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():  return int(input())
    def mi():  return map(int, input().split())
    def mi_0(): return map(lambda x: int(x)-1, input().split())
    def lmi(): return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():  return list(input())
    
    
    n = ii()
    a = lmi()
    d = {}
    for i, accum in enumerate(a):
        d[accum] = i + 1
    for j in range(1, n+1):
        print(d[j], end=' ')
    print('')

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())
a_inputs = {int(a):i+1 for i,a in enumerate(input().split())}
print(' '.join([str(a_inputs[i]) for i in range(1,n+1)]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 初期入力
N = int(input())
A = list(map(int, input().split()))
A_sorted =sorted(enumerate(A))

#
junbann =[(i+1,v) for i,v in enumerate(A) ]
junbann_sort =sorted(junbann,key = lambda x:x[1])
kotae = [i[0] for i in junbann_sort]
print(*kotae)

Submission status: Accepted

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


def solve(N: int, A: "List[int]"):
    ans = [0]*N
    for i in range(N):
        ans[A[i]-1]=str(i+1)
    print(" ".join(ans))
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

ansList = [0]*n

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

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())
s=[ int(i) for i in  input().split()]
l=[0]*n

for i in range(n):
  l[s[i]-1]=str(i+1)
print(' '.join(l))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
L = []
T = {}
for i in range(N):
    T[i+1] = A[i]
newT = {v : k for k, v in T.items()}
for i in range(1,N+1):
    L.append(newT[i])
print(*L)

Submission status: Accepted

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

ans=[0]*n

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
import numpy as np
print(" ".join(map(str, list(np.argsort(a) + 1))))

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
result_list = [0]*N
for a, b in enumerate(A):
    result_list[b-1] = a + 1
print(*result_list)

Submission status: Accepted

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

d = [[i+1, v] for i, v in enumerate(A)]

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

for i, v in d:
    print(i, end=' ')

print()

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
dic = {i:0 for i in range(1,N+1)}
for i in range(N):
    dic[A[i]] = i + 1
ans = []
#print(dic)
for i in dic.keys():
    ans.append(str(dic[i]))
print(' '.join(ans))

Submission status: Accepted

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

Submission status: Accepted

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

ans = [0] * n

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

print(*ans)

Submission status: Accepted

Solution code:
n, *a = map(int, open(0).read().split())

d =[0] * n
for i in range(0, n):
    d[a[i] - 1] = i + 1
    
for i in range(n):
    print(d[i], end=' ')

Submission status: Accepted

Solution code:
n, *a = map(int, open(0).read().split())

d = {}
for i in range(0, n):
    d[a[i]] = i + 1
    
for i in range(n):
    print(d[i + 1], end=' ')

Submission status: Accepted

Solution code:
N = int(input())
L = list( map(int,input().split()) )
LL = [0] * N
for i, name in enumerate(L):
    LL[name-1] = i+1

for j in range(N):
    print(LL[j],end=" ")

Submission status: Accepted

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

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

print(' '.join(l))

Submission status: Accepted

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

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

Ans2.sort()

Ans3=[]
for i in range(N):
    Ans3.append(str(Ans2[i][1]))
    

print((" ").join(Ans3))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = []

for i, j in enumerate(A):
    ans.append((j, i+1))

ans.sort()

for i, j in ans:
    print(j, end='')
    if i == len(ans):
        print()
    else:
        print(' ', end='')

Submission status: Accepted

Solution code:
n = int(input())
a = []
i = 1
for j in list(map(int, input().split())):
    a.append((i, j))
    i += 1
a.sort(key=lambda x: x[1])
ans = []
for i, j in a:
    ans.append(str(i))
print(' '.join(ans))