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())
numbers=input().rstrip().split(" ")
order=[0 for i in range(n)]
for (i,number) in enumerate(numbers):
    order[int(number)-1]=i+1
#print(order)
for num in order:
    print(num,end=" ")

Submission status: Accepted

Solution code:
import sys
import numpy as np

n=int(sys.stdin.readline())
#a=np.array(sys.stdin.readline().split(),dtype='int64')
#b=np.arange(n)
#ans=stack(a,b,axis=

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

a=list(sys.stdin.readline().split())
b=[0]*n

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

Submission status: Accepted

Solution code:
from operator import itemgetter

N = int(input())
A = list(map(int,input().split()))
B =[]
for i,c in enumerate(A):
    B.append([i+1,c])

B = sorted(B, key=itemgetter(1))

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
    n = int(input())
    a = list(map(int, input().split()))
    ans = [0]*n
    for i, j in enumerate(a):
        ans[j-1] = i+1
    print(" ".join(map(str, ans)))
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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
n = int(input()) 
a = list(map(int, input().split()))
l = list(range(1, len(a)+1, 1))
d = dict(zip(a, l))
ans = [str(d[x]) for x in l]
print(' '.join(ans))

Submission status: Accepted

Solution code:
# import math
# from itertools import permutations as permus
# from fractions import gcd
# from collections import deque
# from collections import Counter

import numpy as np
# import scipy as scp

# 入力の受け取り
n = int(input())
# 配列入力の受け取り
arrA = np.array(input().split(),dtype=np.int64)

ans = [0 for _ in range(n)]
for i,v in enumerate(arrA):
    ans[v-1] = i+1

print(*ans)

Submission status: Accepted

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

Submission status: Accepted

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

print(*ans)

Submission status: Accepted

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

A = []

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

for j in range(len(A)):
  print(A[j][1],end =' ')

Submission status: Accepted

Solution code:
#142_C
n = int(input())
a = list(map(int, input().split()))
aa = sorted([(a[i], i + 1) for i in range(n)])
ans = []
for _, idx in aa:
    ans.append(idx)
print(*ans)

Submission status: Accepted

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

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

print(" ".join(res))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

def main():
    N = int(input())
    A = input_nums()
    members = {}
    for i in range(1, N+1):
        members[i] = A[i-1]
    members = sorted(members.items(), key=lambda x:x[1])
    res = [str(m[0]) for m in members]
    print(' '.join(res))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
"""
for i in range(N):
    print("{:}".format(A.index(i+1)+1),end=" ")"""
a = list(range(1,N+1,1))
#print(a)
A_ = dict(zip(A,a))
#print(A_)

A__ = sorted(A_.items())
#print(A__)

for i in range(N):
    print("{:}".format(A__[i][1]),end=" ")

Submission status: Accepted

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

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

    come = [None] * N

    for i, x in enumerate(A):
        come[x - 1] = (i + 1)

    print(*come)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

A = np.array(a)
print(' '.join(list(map(str,A.argsort() + 1))))

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
b = [(i, j) for i, j in zip(a, range(n))]
b.sort()
c = []
for i in b:
    c.append(i[1] + 1)
print(" ".join(map(str,c)))

Submission status: Accepted

Solution code:
# import bisect
# import copy
# import fractions
# import math
import numpy as np
#from collections import Counter
# from itertools import accumulate,permutations, combinations,combinations_with_replacement,product

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

    B=np.argsort(A)

    for b in B:
        print(b+1,end=' ')




resolve()

Submission status: Accepted

Solution code:
N=int(input())

A=list(map(int, input().split()))
B=[-1]*N
for i in range(N):
  B[A[i]-1]=i+1
  
for b in B:
  print(b, 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())
A = [int(x) for x in input().split()]
B = [0 for _ in range(N)]
for ind,num in enumerate(A):
  B[num-1]=ind+1
print(*B)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n=int(input())
    tmp=input().split()
    a=[[int(tmp[i]),str(i+1)] for i in range(n)]
    a.sort()
    print(" ".join([a[i][1] for i in range(n)]))
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
_, *a = map(int, open(0).read().split())
print(*[i for i, __ in sorted(enumerate(a, 1), key = lambda l: l[1])])

Submission status: Accepted

Solution code:
import numpy as np
N, A = int(input()), np.array(input().split()).astype('i8')
print(' '.join((np.argsort(A)+1).astype('str')))

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from bisect import bisect_left

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
from bisect import *
from heapq import *
from collections import *
from itertools import *
from functools import *

sys.setrecursionlimit(100000000)
input = lambda: sys.stdin.readline().rstrip()

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

ans = [0] * N
for i, j in enumerate(A):
    ans[j - 1] = i + 1
print(' '.join(map(str, ans)))

Submission status: Accepted

Solution code:


def submit():
    n = int(input())
    alist = list(map(int, input().split()))
    order = [-1 for _ in range(n)]

    for i, a in enumerate(alist, start=1):
        order[a - 1] = i

    print(*order, sep=" ")
    


if __name__ == "__main__":
    submit()

Submission status: Accepted

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

p = [0]*n
t = 1
for i in a:
  p[i-1] = t
  t += 1
print(*p)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve():
    N = int(input())
    A = list(map(int, input().split()))
    B = []
    for a, b in enumerate(A):
        B.append((b, a+1))
    B.sort()
    l = []
    for (a, b) in B:
        l.append(b)
    print(*l)

# print(solve())

# def solve()が@return voidのとき
solve()

Submission status: Accepted

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

for i in range(n):
  c.append([h[i],i+1])
  
c.sort()
for i , k in c:
  print(k)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
info = []
ans = []
for i in range(n):
    info.append([a[i], i+1])
# print(info)
info.sort()
for s, o in info:
    print(o)

Submission status: Accepted

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

Submission status: Accepted

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

tmp.sort()
s = ""
for i in range(N):
    s += str(tmp[i][1]+1) + " "

print(s)

Submission status: Accepted

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

def make1d(n):
  lst = []
  for i in range(n):
    lst.append(0)
  return lst

def attend(n, lst):
  res = make1d(n)
  for i in range(n):
    res[lst[i]-1] = i+1
  return res

print(*attend(N, List))

Submission status: Accepted

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

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
print(*s)

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int, input().split()))
d = {a:i for a,i in enumerate(A)}
print(*[k+1 for k, v in sorted(d.items(), key=lambda item: item[1])])

Submission status: Accepted

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

arrive_l = {}
cnt = 1
for i in range(n):
    arrive_l[l[i]] = cnt
    cnt+=1

arrival_order = sorted(arrive_l.items())
ans = ""
for i in range(n):
    ans += str(arrival_order[i][1]) + " "
    
print(ans.strip())

Submission status: Accepted

Solution code:
import numpy
N = int(input())
A = list(map(int, input().split()))
inds = numpy.argsort(A)
inds+=1
for ind in inds:
  print(ind, end=' ')

Submission status: Accepted

Solution code:
import numpy as np

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

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

print(*ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 10 21:34:10 2020

@author: Kanaru Sato
"""

n = int(input())
memo = list(map(int, input().split()))
attend = [0]*n

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

ans = [str(attend[i]) for i in range(0,n)]
ans = " ".join(ans)

print(ans)

Submission status: Accepted

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

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])
idx = list(map(str, idx))
print(" ".join(idx))

Submission status: Accepted

Solution code:
N = int(input())
A = {i + 1: a for i, a in enumerate(input().split())}
sort_A = sorted(A.items(), key=lambda x: int(x[1]))

for i, a in sort_A:
    print(i, end=" ")

Submission status: Accepted

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

Submission status: Accepted

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

for x in range(len(A)):
    out[x + 1] = A[x]

outlist = []
for k, v in sorted(out.items(), key=lambda x: x[1]):
    outlist.append(str(k))

print(" ".join(outlist))

Submission status: Accepted

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

Submission status: Accepted

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

idx = [0] * n

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

Submission status: Accepted

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

i = 0
person = []
for j in range(n):
    person.append(0)
ans = []
for k in a:
    i += 1
    person[k-1] = i

a.sort()
for l in a:
    ans.append(str(person[l-1]))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
f=input;f();print(*list(zip(*sorted((int(i),e+1) for e,i in enumerate(f().split()))))[1])

Submission status: Accepted

Solution code:
input();print(*list(zip(*sorted((i,e+1) for e,i in enumerate(map(int,input().split())))))[1])

Submission status: Accepted

Solution code:
input()
l=sorted([(i,e+1) for e,i in enumerate(map(int,input().split()))])
print(*list(zip(*l))[1])

Submission status: Accepted

Solution code:
n=int(input())
lt=sorted([(e+1,i) for e,i in enumerate(map(int,input().split()))], key=lambda k:k[1])
print(*list(zip(*lt))[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int, input().split()))
D = {a:i for i,a in enumerate(A)}
L=sorted(D.items())
for a, b in L:
    print(b+1, end=' ')
print()

Submission status: Accepted

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

import numpy as np

a = np.array(a)
arg = a.argsort()

for i in arg:
    print(i+1, end=' ')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def solve(N: int, A: "List[int]"):
    k = (np.argsort(A)+1)
    print(*k)
    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:
from operator import itemgetter
N=int(input())
A=list(map(int,input().split()))
B=[(i+1,A[i]) for i in range(N)]
B=sorted(B,key=itemgetter(1))
for k in range(N):
  print(B[k][0],end=" ")

Submission status: Accepted

Solution code:
N = int(input())
A_list = list(map(int, input().split()))
dic_A = {}
ans = []
for i in range(N):
    dic_A[A_list[i]] = i
for k, v in sorted(dic_A.items()):
    ans.append(str(v+1))
print(" ".join(ans))

Submission status: Accepted

Solution code:
n = int(input())
for a,_ in sorted(enumerate(list(map(int,input().split())),start=1),key=lambda x: x[1]):
    print(a,end=" ")

Submission status: Accepted

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

for i in range(1,N+1):
    numberlist.append(i)
mydic=dict(zip(mylist,numberlist))
#print(mydic)
#print(numberlist)
#print(mydic)
anslist=sorted(mydic.items())
#print(anslist)

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

Submission status: Accepted

Solution code:
num = int(input())
a_list = list(map(int, input().split(" ")))
ans_list = [0] * num

for i in range(num):
    ans_list[a_list[i]-1] = i+1

for i in range(num-1):
    print(ans_list[i], end=" ")
print(ans_list[num-1])

Submission status: Accepted

Solution code:
N = int(input())
S = [int(i) for i in input().split(" ")]
L = [0]*N

for j in range(0,N):
  L[S[j]-1] = j+1
for k in range(N):
    if k==N-1:
        print("{}".format(L[k]),end="")
    else:
        print("{} ".format(L[k]),end="")
print("\n",end="")

Submission status: Accepted

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

b =[]
for i in range(0,len(a)):
    b.append([a[i],i+1])
b.sort()

for i in range(n):
    print(str(b[i][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 = list(map(int, input().split()))
l = [[] for i in range(n)]

for i in range(n):
    
    l[i] = [a[i], i+1]
    
l.sort()
ans = [0 for i in range(n)]

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

print(*ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

n = int(stdin.readline().rstrip())
a = {i + 1: int(x) for i, x in enumerate(stdin.readline().rstrip().split())}

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

final = []
for i in range(n):
    final.append(a_sorted[i][0])

print(*final)

Submission status: Accepted

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

c = [i for i in range(n)]
sorted_c = sorted(c, key=lambda i: a[i])
sorted_c = [x+1 for x in sorted_c]
print(*sorted_c)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
A = [int(x) for x in input().split()]

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

print(" ".join(ans))

Submission status: Accepted

Solution code:
import math
import sys
import numpy as np

def input():
    return sys.stdin.readline()[:-1]

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

ans = [0] * (N+1)

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


print(*ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

ans = ""
for r in rank[1:]:
    if ans != "":
        ans += " "
    ans += str(r)

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Ans = [0 for _ in range(n)]

for i in range(n):
    Ans[List[i]-1] = i + 1

print(*Ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ai = []
for i in range(1, n+1):
    ai.append((a[i-1], i))
    
    
for i in sorted(ai):
    print(i[1], end=" ")

Submission status: Accepted

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

print()

Submission status: Accepted

Solution code:
import numpy as np

num = int(input())
num_list = list(map(int,input().split()))

base = np.zeros(num)
base = list(map(int,base))

for i in range(0,num):
  base[num_list[i] - 1] = i+1

print(*base)

Submission status: Accepted

Solution code:
import heapq as hq

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

h = []
for i in range(N):
    hq.heappush(h, (A[i], i+1))

for i in range(N):
    A[i] = hq.heappop(h)[1]

print(*A)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# #!/usr/bin/env python3
# # -*- coding: utf-8 -*-


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

    result = []
    for i, a in enumerate(A, start=1):
        result.append([i, a])
    result = sorted(result, key=lambda x: x[1])

    print(*[i for i, a in result])


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
MOD = 10**9 + 7
INF = float('INF')

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

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

    print(*ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

l =[0]*n

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

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

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))
#print(A)
a=[]
l=[]
for i in range(N):
    a.append([A[i],i+1])
a.sort(key=lambda x:x[0])
for i in range(N):
    l.append(a[i][1])
print(*l, sep=" ")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

a=[0]*N

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

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    n = int(input())
    la = list(map(int, input().split()))
    lai = [(a, i) for i, a in enumerate(la)]
    lai = sorted(lai)
    li1 = [str(i + 1) for a, i in lai]
    print(" ".join(li1))

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

arr = list(zip(range(1,n+1), a))
arr.sort(key=lambda x: x[1])
print(' '.join([str(i[0]) for i in arr]))

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 = list(map(int, input().split()))
b = [i for i in range(1, n+1)]
list_score = [list(e) for e in zip(a, b)]

list_score.sort()

ans = []

for i in range(n):
    ans.append(list_score[i][1])

print(*ans)

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 l:l[0])

r=[]
for i in range(len(l)):
    r.append(l[i][1])

print(*r)

Submission status: Accepted

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

for i in a:
    cnt += 1
    ans[i-1] = str(cnt)

print(" ".join(ans))

Submission status: Accepted

Solution code:
n = int(input())
student = list(map(int,input().split()))
 
ans = [0] * n   #登校した順番を記録するためのリスト
 
for i in range(n):
    s = student[i]   #出席番号iの生徒が登校した順番をメモ
    ans[s-1] = i+1    #ansに出席番号を書き込む
 
print(*ans)

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

t = ''
for i in s:
  t += str(i) + ' '
print(t)

Submission status: Accepted

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

Submission status: Accepted

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

res = sorted(res, key=lambda x : x[1])
for i in range(n):
	if i == n-1:
		print(res[i][0])
	else :
		print('{} '.format(res[i][0]), end='')

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

d = dict()
for x in range(n):
    d[a[x]] = x+1
    continue

d_sort = sorted(d)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
print(*[i + 1 for i, _ in sorted(enumerate(map(int, input().split())), key=lambda iv: iv[1])])

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
ans = []
t = ""
for i in range(n):
    ans.append([a[i],i+1])

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

for i, j in ans:
    t += str(j) + " "

print(t)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding:utf-8 -*-

import numpy

def main():
  n = int(input())
  As = numpy.array(list(map(int, input().strip().split())))
  print(' '.join(map(str, numpy.argsort(As)+1)))

if __name__=='__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
n, *a = map(int, sys.stdin.buffer.read().split())
ans = sorted(list(range(1, n+1)), key=lambda x: a[x-1])
print(*ans)

Submission status: Accepted

Solution code:
import numpy as np

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

ans = np.argsort(A)
for n in ans:
    print(n+1, end=" ")
print()

Submission status: Accepted

Solution code:
n = int(input())
arr = list(map(int,input().split()))
ans = []
#二次元リストを作る→ソート
for i in range(1,n+1):
    ans.append([arr[i-1],i])
ans.sort()
ans = [i[1] for i in ans]


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#python3
from operator import itemgetter
def main():
    n = int(input())
    a = [int(i) for i in input().split()]
    s = []
    for i,j in zip(a,range(n)):
        s.append((i,j+1))
    for i in sorted(s, key=itemgetter(0)):
        print(i[1],end=" ")
main()

Submission status: Accepted

Solution code:
n=int(input())
A=list(map(int,input().split()))
x=[]
for i in range(n):
    x.append([A[i],i+1])
    
y=sorted(x,key=lambda x:x[0])
s=''
for i in range(n):
    s+=str(y[i][1])+' '
print(s)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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