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())
num_list = list(map(int,input().split()))
num_array = [0]*n
for i in range(n):
    num_array[num_list[i]-1] = i+1
for i in range(n):
    print(num_array[i])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


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


def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


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

    ans = []
    for p in sorted(v):
        ans.append(p[1])

    print(*ans)


def main():
    N = int(input())
    A = list(map(int, input().split()))
    solve(N, A)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

b = ' '.join(map(lambda x: str(x[0] + 1), a))

print(b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 2019-11-18 23:58:23(JST)
import sys
# import collections
# import math
# from string import ascii_lowercase, ascii_uppercase, digits
# from bisect import bisect_left as bi_l, bisect_right as bi_r
# import itertools
# from functools import reduce
# import operator as op
# import re
# import heapq
# import array
# from scipy.misc import comb # (default: exact=False)
# import numpy as np 


def main():
    n, *a = [int(x) for x in sys.stdin.read().split()]
    a = list(enumerate(a, 1))
    a.sort(key=lambda x: x[1])
    for i in a:
        print(i[0], end=' ')

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def ji(tup):
  return(tup[1])


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

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

b.sort(key=ji)
for key in range(n):
  print(b[key][0],end=" ")

Submission status: Accepted

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

Submission status: Accepted

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

l = [0]*n
snum = 0

for i in A:
    snum += 1
    l[i-1] = snum

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

Submission status: Accepted

Solution code:
stu = 0
def g(val):
    global stu
    stu += 1
    return [stu, int(val)]

n = int(input())
a = list(map(g, input().split()))
a.sort(key=lambda x: x[1])

op = str(a[0][0])
for i in range(1,n):
    op += " " + str(a[i][0])
print(op)

Submission status: Accepted

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

B = []
for i in range(n):
    B.append((i,A[i]))
B.sort(key=lambda x:x[1])
for i in B:
    print(i[0]+1, end=" ")

Submission status: Accepted

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

ret = [0] * N
for i in range(N):
    ret[A[i] - 1] = str(i + 1)
print(" ".join(ret))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(*ans)

Submission status: Accepted

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

Submission status: Accepted

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

ans = [0]*N

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

print(*ans)

Submission status: Accepted

Solution code:
N = int(input())
A = [int(x) for x in input().split()]
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()))
b={}
cnt=1;
for i in a:
    b[i]=cnt
    cnt+=1
for i in range(1,n+1):
    print(b[i], end=" ")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
n=int(input())
a=[list(map(int,input().split()))]
b=[[i+1 for i in range(n)]]
a=np.array(a)
b=np.array(b)
c = np.concatenate([a,b])
d=np.argsort(c[0, :])
d=[d[i]+1 for i in range(n)]
print(' '.join(map(str, d)))

Submission status: Accepted

Solution code:
def abc142_c2():    
    n = int(input())
    a = list(map(int, input().split()))
    # ansを格納する空のリストを準備
    ans = [0] * n

    # enumerate()でインデックスと取り出してansに格納
    for val, num in enumerate(a, 1):
        ans[num - 1] = val
    # リストの前に*をつけるとアンパックされる
    print(*ans)
if __name__ ==  '__main__':
    abc142_c2()

Submission status: Accepted

Solution code:
import collections

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

b = collections.OrderedDict()
for i in range(len(a)):
    b[i + 1] = a[i]

c = sorted(b.items(), key=lambda x: x[1])
# print(c)
for i, j in c:
    print(i, end=' ')

Submission status: Accepted

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

res = [0 for i in range(n)]

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

Submission status: Accepted

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

for o in order:
    print(o, end=' ')

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
a = list(map(int,input().split()))
line = np.ndarray((n,2),np.int64)
for i in range(n):
  line[i][0] = i + 1
  line[i][1] = a[i]

s = sorted(line,key=lambda x:x[1])
for i in range(n):
  print(s[i][0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import UserList


def main():
    _ = input()
    A = Array(input().split(" ")).map(int)
    ans = A.with_index().sort(lambda x: x[1]).map(lambda x: x[0] + 1).join_to_str(" ")
    print(ans)


class Array(UserList):
    def __init__(self, iterable):
        self.data = iterable

    def map(self, f):
        return Array([f(x) for x in self.data])

    def join_to_str(self, sep):
        return sep.join(self.map(str))

    def filter(self, f):
        return Array([x for x in self.data if f(x)])

    def with_index(self):
        return Array([(i, x) for i, x in enumerate(self.data)])

    def sort(self, key):
        return Array(sorted(self.data, key=key))

    def sum(self):
        return sum(self.data)

    def min(self):
        return min(self.data)

    def max(self):
        return max(self.data)

    def fold_left(self, f, init):
        ret = init
        for x in self.data:
            ret = f(ret, x)
        return ret

    def _scan_left(self, f, init):
        ret = init
        for x in self.data:
            ret = f(ret, x)
            yield ret

    def scan_left(self, f, init):
        return Array(list(self._scan_left(f, init)))

    def lower_bound(self, x):
        """x以上になる最小のindex"""
        low = 0
        high = len(self)
        while low < high:
            mid = (low + high) // 2
            if self[mid] < x:
                low = mid + 1
            else:
                high = mid
        return low

    def upper_bound(self, x):
        """xより大きくなる最小のindex"""
        low = 0
        high = len(self)
        while low < high:
            mid = (low + high) // 2
            if self[mid] <= x:
                low = mid + 1
            else:
                high = mid
        return low

    def _distinct(self):
        dic = {}
        for x in self.data:
            if dic.get(x):
                continue
            dic[x] = True
            yield x

    def distinct(self):
        return Array(list(self._distinct()))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from operator import itemgetter
n = int(input())
L = list(map(int, input().split()))
M = []
for i in range(n):
  M.append([i, L[i]])
  
M.sort(key=itemgetter(1))
for i in range(n):
  print(M[i][0]+1, 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

for i in range(n):
    print(ans[i])

Submission status: Accepted

Solution code:
def main():
  N = int(input())
  A = list(map(lambda i: int(i), input().split(' ')))
  answer = [0] * N
  for i in range(N):
    answer[A[i] - 1] = str(i + 1)
  print(' '.join(answer))

main()

Submission status: Accepted

Solution code:
N = int(input())
dic = {}
a = [int(i) for i in input().split()]

for i in range(N):
    dic.setdefault(a[i], i+1)
    
dic = sorted(dic.items(), key=lambda x:x[0])

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

Submission status: Accepted

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

result = np.argsort(A) + 1

print(*result)

Submission status: Accepted

Solution code:
##C
n = int(input())
a = list(map(int,input().split()))
##リストに0をn個いれておく
b = [0]*n
##enumerateで、要素とインデックスを両方得る
for i , val in enumerate(a):
    b[val-1] = i+1
print(*b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
import numpy as np
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

n = inp()

# 2 3 1
L = inpl()

#1 2 3 
Lsort = sorted(L)

#(2,1) (3,2) (1,3)
zL = list(zip(L, Lsort))

zL.sort(key = lambda x: x[0])
ansL = [_[1] for _ in zL] 
print(' '.join(map(str, ansL)))

Submission status: Accepted

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

order = [0 for i in range(N+1)]

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

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

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, aa in enumerate(a):
    aa -= 1
    ans[aa] = i+1

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

Submission status: Accepted

Solution code:
n = int(input())
l = [int(i) for i in input().split()]
l2 = []
l3 = []
for i in range(n):
    l2.append([l[i],i+1])
l2.sort()
for i in range(n):
    l3.append(l2[i][1])
print(' '.join(map(str,l3)))

Submission status: Accepted

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

L = {}

for i in range(n):
    L[i] = l[i]

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

for j in sort_L:
    print(j[0]+1, end=" ")

Submission status: Accepted

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

L = [0]*n

for i, order in enumerate(l,1):
    L[order-1] = i

print(*L)

Submission status: Accepted

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

Submission status: Accepted

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

B=[[A[i],i] for i in range(N)]
B.sort()

for i in B:
  print((i[1]+1))

Submission status: Accepted

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

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

for i in range(len(B)):
  print(str(B[i]), end="")
  if i == len(B)-1:
    break
  print(" ", end = "")
print()

Submission status: Accepted

Solution code:
def main():
    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
    print(' '.join(map(str,ans)))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import numpy as np

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

print(' '.join(map(str, (np.argsort(A)+1).tolist())))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

res=np.argsort(A)+1
print(' '.join([str(x) for x in res]))

Submission status: Accepted

Solution code:
import numpy as np
N =int(input())
A = list(map(int,input().split()))
A_array =np.array(A)
A_sort =np.argsort(A_array)
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(1, n+1):
	ans.append("")

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

Submission status: Accepted

Solution code:
_ = input()
l = list(map(int,input().split()))
dic = {l[i]:i for i in range(len(l))}
l = sorted(l)
ans = [str(dic[i] + 1) for i in l]
print(" ".join(ans))

Submission status: Accepted

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

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

print(' '.join(B))

Submission status: Accepted

Solution code:
def calculate(n, arr):
    result = [0] * len(arr)

    for index, value in enumerate(arr):
        result[value - 1] = str(index + 1)

    return result


N = int(input())
S = input().split(' ')
arr = list(map(int, list(S)))
result = calculate(N, arr)


print(' '.join(result))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())

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

for i in range(1, n+1):
  dic[a[i-1]] = i
  
for s in sorted(dic.keys()):
  print(dic[s], end=' ')
  
print()

Submission status: Accepted

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

ans = sorted(range(len(A)), key=A.__getitem__)
ans = [a+1 for a in ans]
print(*ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
ans = [None] * N

for idx, a in enumerate(list(map(int, input().split()))):
    ans[a-1] = idx+1
    
print(' '.join(map(str, ans)))

Submission status: Accepted

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

b = []


for i,x in enumerate(a):
    b.append([x,i+1])

b = sorted(b, key=lambda x:x[0])

c = [str(x[1]) for x in b]

print(' '.join(c))

Submission status: Accepted

Solution code:
n = int(input())
x = [int(i) for i in input().split()]
y = []
for i in range(len(x)):
	y.append([x[i], i+1])

z = sorted(y)
for i in z:
	print(i[1], end = ' ')

Submission status: Accepted

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

order = [0] * N
for i in range(N):
    order[int(A[i]) - 1] = i + 1
print(" ".join([str(j) for j in order]))

Submission status: Accepted

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

Submission status: Accepted

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

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

B.sort()

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

Submission status: Accepted

Solution code:
N = int(input())
let=input().split()

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

for num in list:print(num)

Submission status: Accepted

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

Submission status: Accepted

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

b = list(enumerate(a))

c = sorted(b, key=lambda x: x[1])

print(" ".join(map(lambda x: str(x[0]+1), c)))

Submission status: Accepted

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

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

ans = [x[1]+1 for x in A_index]
print(' '.join(map(str, ans)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

memo.sort(key=lambda x: x[1])
for i, a in memo:
    print(i, end=' ')

Submission status: Accepted

Solution code:
n = int(input())
a = [i for i in map(int, input().split())]
stu = [{'no' : i, 'arv':a[i]} for i in range(n)]

stu.sort(key=lambda x: x['arv'])

res = []
for i in stu:
    res.append(i['no'] + 1)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
A = input().split()
for i in range(n):
  A[i] = [int(A[i]),i+1]
A = sorted(A, key=lambda x:x[0])
for a in A[:]:
  print(a[1],end=" ")
#print(A[-1][1])

Submission status: Accepted

Solution code:
def main():
    n  = int(input())
    students = list(map(int,input().split()))
    number = [i for i in range(1,n+1)]
    students_number = []
    for i in range(n):
        students_number.append([students[i]] + [number[i]])
    sorted_students_number = sorted(students_number,key = lambda x:x[0])
    ans = [i[1] for i in sorted_students_number]
    print(*ans)

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(0, n):
    j = a[i] - 1
    b[j] = i + 1

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

Submission status: Accepted

Solution code:
n = int(input())
a  = list(map(int,input().split()))
b = {}
cnt = 1;
for i in a:
    b[i] = cnt
    cnt+=1
a.sort()
for i in a:
    print(b[i], end=" ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
import numpy as np
def print_ans(input_line):
    """Test Case
    >>> print_ans("2 3 1")
    3 1 2
    >>> print_ans("1 2 3 4 5")
    1 2 3 4 5
    >>> print_ans("8 2 7 3 4 5 6 1")
    8 2 4 5 6 7 3 1
    """
    arr = np.array(list(map(int,input_line.split())))
    arr_sort = np.argsort(arr) + 1
    arr_str = list(map(str,arr_sort.tolist()))
    print(" ".join(arr_str))

if __name__ == '__main__':
    N = int(input())
    input_line = input()
    print_ans(input_line)

Submission status: Accepted

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

ans_li = [0 for i in range(num)]

for i in range(num):
    order = orders[i]
    ans_li[order - 1] = i + 1

print(*ans_li)

Submission status: Accepted

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

L=[0]*n

for i in range(n):
  s = A[i]
  L[s-1] = i+1

print(*L)

Submission status: Accepted

Solution code:
import numpy as np

N = int(input())

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

ans = np.argsort(A_list) + 1


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

Submission status: Accepted

Solution code:
n=int(input())
L=list(map(int,(input()).split()))
L=list(map(lambda x: x-1, L))

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

Submission status: Accepted

Solution code:
import bisect

n=int(input())
L=list(map(int,(input()).split()))
L=list(map(lambda x: x-1, L))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

res = sorted(range(1, n + 1), key=lambda k:a_s[k - 1])
for r in res:
	print(r, end=" ")

Submission status: Accepted

Solution code:
size = int(input())
personList = [int(x) for x in input().split()]
result = list(range(size))
for i, order in enumerate(personList):
  result[order - 1] = i + 1
print(' '.join(map(str, result)))

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

print(*[b[1] for b in B])

Submission status: Accepted

Solution code:
def main():

    N = int(input())
    A = list(int(x) for x in input().split())
    ans = [0] * N

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

    print(' '.join(map(str, ans)))
    
if __name__ == '__main__':
    main()

Submission status: Accepted

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

s = [0] * n
for i, m in enumerate(a, start=1):
    s[m - 1] = i

b = " ".join(list(map(str, s)))
print(b)

Submission status: Accepted

Solution code:
n=int(input())
a=sorted([[i,int(j)] for i,j in enumerate(input().split())],key=lambda x:x[1])
ans=[]
for i in range(n):
    ans+=[str(a[i][0]+1)]
print(*ans,sep=' ')

Submission status: Accepted

Solution code:
# AtCoder
from collections import defaultdict
N = int(input())
lst = [int(i) for i in input().split()]

d = defaultdict(int)
for i, v in enumerate(lst, start=1):
    d[i] = v

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

ans = []
for k, v in d2:
    ans.append(k)
print(*ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

if __name__ == "__main__":
    n = int(input())
    a = list(map(int, input().split(" ")))
    a = np.array(a)

    aSortedIndex = np.argsort(a)

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

Submission status: Accepted

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

Submission status: Accepted

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

d = {p:i for i, p in enumerate(a, start=1)}
s = [str(i[1]) for i in sorted(d.items())]
print(' '.join(s))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

ansl = [0 for _ in range(n)]
for idx, a in enumerate(al):
    ansl[a-1] = idx

for i in ansl:
    print(i+1)

Submission status: Accepted

Solution code:
input()
a=list(map(int,input().split()))
print(' '.join([str(i[0]) for i in sorted([[i+1,a[i]]for i in range(0,len(a))],key=lambda x: x[1])]))

Submission status: Accepted

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

Submission status: Accepted

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

l_sorted = [0] * N

for i in range(N):
    l_sorted[l[i] - 1] = i + 1



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

Submission status: Accepted

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

for i in range (0,n):
    ansss[ai[i]-1]  = i+1

print(*ansss)

Submission status: Accepted

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

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

Submission status: Accepted

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

print(*c)

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 unittest


class TestC(unittest.TestCase):
    def test_1(self):
        self.assertEqual(think([2, 3, 1]), [3, 1, 2])

    def test_2(self):
        self.assertEqual(think([1, 2, 3, 4, 5]), [1, 2, 3, 4, 5])

    def test_3(self):
        self.assertEqual(think([8, 2, 7, 3, 4, 5, 6, 1]), [8, 2, 4, 5, 6, 7, 3, 1])


def solve():
    a = read()
    result = think(a)
    write(result)


def read():
    n = read_int(1)[0]
    return read_int(n)


def read_int(n):
    return list(map(lambda x: int(x), read_line().split(' ')))[:n]


def read_float(n):
    return list(map(lambda x: float(x), read_line().split(' ')))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(a):
    list_of_index_and_a = []
    for index, e in enumerate(a):
        list_of_index_and_a.append((index + 1, e))

    list_of_index_and_a.sort(key=lambda x: x[1])
    return [x[0] for x in list_of_index_and_a]


def write(result):
    print(' '.join(list(map(lambda x: str(x), result))))


if __name__ == '__main__':
    # unittest.main()
    solve()

Submission status: Accepted

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

print(' '.join(map(str, result[1::])))

Submission status: Accepted

Solution code:
N = int(input())

# [出席番号, 登校順]のリスト
A = [[i, int(a)] for (i, a) in zip(range(1, N+1), input().split())]

# 登校順でソート
A.sort(key = lambda x:x[1])

print(' '.join(map(str, [row[0] for row in A])))

Submission status: Accepted

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

n = int(input())
a = li()

aa = [(i+1,a[i]) for i in range(n)]
aa.sort(key=lambda x: x[1])
a = [aaa[0] for aaa in aa]
ans = ''
for aa in a:
    ans += str(aa)
    ans += ' '
print(ans[:-1])

Submission status: Accepted

Solution code:
n = int(input())

timelist =list(map(int,input().split()))
numberList = ["."]*n
for i in range(len(timelist)):
    numberList[timelist[i]-1]=str(i+1)
for a in numberList:
    print(a,end=" ")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
L = list(map(int,input().split()))
S = []
K = []
for i in range(n):
  S.append([L[i],i+1])
S.sort()
for i in range(n):
  K.append(S[i][1])
print(' '.join(map(str,K)))