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:
#!/usr/bin/python3

import sys
# input = sys.stdin.readline
sys.setrecursionlimit(100000)
MOD = 10 ** 9 + 7

#N = int(input())
#A = [int(x) for x in input().split()]
#V = [[0] * 100 for _ in range(100)]

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

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

T.sort()


ans = [str(t[1]) for t in T]

print(" ".join(ans))

Submission status: Accepted

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

Submission status: Accepted

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

B = [(A[i], i + 1) for i in range(N)]
B.sort()
print(' '.join([str(Bi[1]) for Bi in B]))

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
print(*b[1:])

Submission status: Accepted

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

Submission status: Accepted

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

import sys
from operator import itemgetter

n = int(sys.stdin.readline())
a = dict()
for i,ai in enumerate([int(x) for x in sys.stdin.readline().strip().split()]):
    a[i+1] = ai
#
for i,ai in sorted(a.items(),key=itemgetter(1)):
    print( i,end=" ")

Submission status: Accepted

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

Submission status: Accepted

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

ans = []
for t in A:
    ans.append(t[0])
print(*ans)

Submission status: Accepted

Solution code:
from collections import defaultdict

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

D = defaultdict(int)

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

print(' '.join([str(d[0]) for d in sorted(D.items(), key=lambda x: x[1])]))

Submission status: Accepted

Solution code:
n = int(input())

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

res = []
for i,v in enumerate(lista):
    res.append((i,v))


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

for i in res[:-1]:
    print(i[0]+1, end=' ')
    
print(res[-1][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())
A = [int(_) for _ in input().split()]
print(*list(i + 1 for v, i in sorted((v, i) for i, v in enumerate(A))))

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
N=int(input())
A=[int(x) for x in input().split()]
L=sorted(range(len(A)), key=lambda k: A[k])
for i in range(len(L)):
  L[i] += 1
print(*L)

Submission status: Accepted

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


def solve(N: int, A: "List[int]"):

    res = sorted([(a,i) for i,a in enumerate(A,1)])
    print(" ".join(map(lambda x: str(x[1]),res)))
    return


# Generated by 1.1.4 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 collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from operator import mul
from functools import reduce
from pprint import pprint
sys.setrecursionlimit(2147483647)


INF = float('inf')
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007



from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from operator import mul
from functools import reduce


INF = float('inf')
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007


n = I()
A = LI()
print(*[i + 1 for i in sorted(range(n), key=lambda x: A[x])])

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    A = [(i+1,int(people)) for i,people in enumerate(input().split())]
    A.sort(key=lambda x: x[1])
    for i in range(N):
        print(A[i][0],end="")
        if i != N-1:
            print(" ",end="")
    else:
        print()
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
A = np.array([int(a) for a in input().split()])
arg = np.argsort(A) + 1
print(" ".join(arg.astype(str).tolist()))

Submission status: Accepted

Solution code:
def calc(N, A):
    B = [(i + 1, A[i]) for i in range(N)]
    B.sort(key=lambda p: p[1])
    return ' '.join([str(b[0]) for b in B])


N = int(input())
A = [int(s) for s in input().split()]
print(calc(N, A))

Submission status: Accepted

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

def readInts():
  return [int(s) for s in input().split(" ")]

def main():
  N = readInts()[0]
  A = readInts()
  T = [(A[i], i+1) for i in range(N)]
  T.sort()

  print(" ".join(map(lambda t: str(t[1]), T)))

if __name__ == "__main__":
  main()

Submission status: Accepted

Solution code:
N = int(input())

jun = [0] * N
for i, a in enumerate(input().split()):
    a = int(a)
    jun[a - 1] = i + 1


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

Submission status: Accepted

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

Submission status: Accepted

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

ans.sort(key=lambda x: x[0])
ans_str = [str(ans[i][1] + 1) for i in range(N)]
print(" ".join(ans_str))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

def main():
    import sys
    input = sys.stdin.readline
    N = int(input())
    A = [int(x) for x in input().rstrip().split()]
    A = sorted([(a, i+1) for i, a in enumerate(A)])
    print(*[i for _, i in A])

main()

Submission status: Accepted

Solution code:
n = int(input())
a = [(i+1, int(ai)) for i, ai in enumerate(input().split())]

a.sort(key=lambda x: x[1])
a2 = [str(ai[0]) for ai in a]
print(" ".join(a2))

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
ai = [(a[i], i+1) for i in range(n)]
ai.sort()
_, index = zip(*ai)
print(*index)

Submission status: Accepted

Solution code:
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 i in range(n):
    print(ans[i], end=" ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(100000)

def ins(): return input().split()
def ii(): return int(input())
def iil(): return list(map(int,ins()))
def lin(): return list(input())
def iin(): return map(int,ins())

n = ii()
a = iil()
b = [0 for i in range(n)]
for i,j in enumerate(a):
    b[j-1] = str(i+1)
print(" ".join(b))

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
M = [0]*N
for i in range(N):
    num = A[i]
    M[num-1] = i+1
for m in range(len(M)-1):
    print(M[m],end=" ")
print(M[N-1])

Submission status: Accepted

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

# AA = [ix, num for ix, num in enumerate(A)]

AA = []
for ix, num in enumerate(A):
    AA.append((ix, num))

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

sbuf = ""
for student in AA:
    sbuf+= str(student[0]+1) + " "

print(sbuf)

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

N = int(input()) # integer
A = list(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())
a = list(map(int, input().split()))
b = []
c = []
for i in range(n):
  b.append([a[i], i])
b.sort(key = lambda x:x[0])
for j in range(n):
  c.append(b[j][1]+1)
print(*c)

Submission status: Accepted

Solution code:
n = int(input())
students = [(i+1, int(x)) for i, x in enumerate(input().split())]

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

print(" ".join([str(x[0]) for x in sorted_students]))

Submission status: Accepted

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

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

    ans = []
    for l in L:
        ans.append(l[1])
    print(" ".join(map(str, ans)))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
a = list(map(int, input().split()))
tmp = [(ai, i) for i, ai in enumerate(a)]

tmp.sort()
print(" ".join(map(lambda a: str(a[1]+1), tmp)))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from operator import itemgetter

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

ax = [(i + 1, ai) for i, ai in enumerate(a)]
ax = sorted(ax, key=itemgetter(1))
an = [x[0] for x in ax]
print(*an)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1000000000)
ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())

def main():
    N = ii()
    A = lmis()
    A = [(i+1, a) for i, a in enumerate(A)]
    A.sort(key=lambda x: x[1])
    for a in A:
        print(a[0], end=' ')


main()

Submission status: Accepted

Solution code:
students = int(input())
order = list(map(int, input().split()))

s = [i for i in range(1,students+1)]
s.sort(key=lambda x: order[x-1])
print(" ".join(map(str, s)))

Submission status: Accepted

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

A = [[i+1, A[i]] for i in range(len(A))]
A = sorted(A, key=lambda x:x[1])

print(' '.join([str(a[0]) for a in A]))

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
li = []
for itr, val in enumerate(A):
  li.append([val, itr + 1])
li.sort()
print(*[i[1] for i in li])

Submission status: Accepted

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

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

    sort_B = sorted(B)
    ans = []
    for i, j in sort_B:
        ans.append(j)

    print(*ans)
main()

Submission status: Accepted

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

ans = [0 for _ in range(N)]

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

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

Submission status: Accepted

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

v=[0]*n

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

for j in range(n):
  print(v[j],end=" ")

print("")

Submission status: Accepted

Solution code:
from collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
import math
import queue
#import numpy as np
#import sympy as syp(素因数分解とか)
Mod = 1000000007
 
  
def sieve_of_eratosthenes(n):
    if not isinstance(n,int):
        raise TypeError("n is not int")
    if n<2:
        raise ValueError("n is not effective")
    prime = [1]*(n+1)
    for i in range(2,int(math.sqrt(n))+1):
        if prime[i] == 1:
            for j in range(2*i,n+1):
                if j%i == 0:
                    prime[j] = 0
    res = []
    for i in range(2,n+1):
        if prime[i] == 1:
            res.append(i)
    return res

def factorial(i):
    if i == 1:
        return 1
    else:
        return i*factorial(i-1)
 
class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n+1)]
        self.rank = [0 for i in range(n+1)]
    
    def findroot(self,x):
        if x == self.parent[x]:
            return x
        else:
            y = self.parent[x]
            y = self.findroot(self.parent[x])
            return y
    
    def union(self,x,y):
        px = self.findroot(x)
        py = self.findroot(y)
        if px < py:
            self.parent[py] = px
        else:
            self.parent[px] = py
 
    def same_group_or_no(self,x,y):
        return self.findroot(x) == self.findroot(y)




def main(): #startline-------------------------------------------
    N = int(input())
    A = list(map(int,input().split()))
    p = []
    for i in range(N):
        p.append([i+1,A[i]])
    p.sort(key = lambda x:x[1])
    ans = [p[i][0] for i in range(N)]
    print(*ans,sep = " ")
if __name__ == "__main__":
    main() #endline===============================================

Submission status: Accepted

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

dic = {}
for i in range(n):
  dic[i+1] = a[i]

ans = ""
for k, v in sorted(dic.items(), key=lambda x: x[1]):
  ans += str(k) + " "
print(ans[:-1])

Submission status: Accepted

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

B = [(A[idx], idx) for idx in range(N)]
C = sorted(B)
D = [c[1] + 1 for c in C]

print(*D)

Submission status: Accepted

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

result=list(0 for _ in range(N))

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

print(*result)

Submission status: Accepted

Solution code:
N = int(input())
A = [[int(i)+1,int(j)] for i,j in enumerate(input().split())]
A.sort(key=lambda x:x[1])
for i in range(N):
  print(A[i][0], end=" ")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def solve():
    N = int(input())
    B = list(range(N+1))
    for i,a in enumerate(map(int, input().split()), start=1):
        B[a] = str(i)
    res = ' '.join(B[1:])
    

    return str(res)

if __name__ == '__main__':
    print(solve())

Submission status: Accepted

Solution code:
def read():
    return int(input())

def readmap():
    return map(int, input().split())

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


if __name__ == "__main__":
    N = read()
    A = readlist()
    A = [0] + A

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    a = list(map(int,input().split()))
    zip_a = list(zip(a,list(range(1,n+1))))
    zip_a = sorted(zip_a)
    ans = [str(i) for _,i in zip_a]
    print(" ".join(ans))
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
MAX_INT = int(10e12)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()
data = IL()
a = []
ans = []

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

a.sort()
#print(a)
for i in a:
  a,b = i
  ans.append(b)

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

Submission status: Accepted

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

n=int(input())
l=list(map(int,input().split()))
m=[]
for i in range(1,n+1):
    t=(l[i-1],i)
    m.append(t)
m.sort()
s=""
for k in range(n):
    if k==n-1:
        s+=str(m[k][1])
    else:
        s+=str(m[k][1])+" "
print(s)
#print(m)

Submission status: Accepted

Solution code:
def two_int():
    N, K = map(int, input().split())
    return N,K

def one_int():
    return int(input())

def one_str():
    return input()

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

N=one_int()
A = many_int()

temp = list(zip(A, [i+1 for i in range(len(A))]))


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

output=[]
for i in temp2:
    output.append(str(i[1]))


print(" ".join(output))

Submission status: Accepted

Solution code:
import heapq
N = int(input())
A = [int(i) for i in input().split()]
heap = []
for i in range(N):
    heapq.heappush(heap,(A[i],i))
heapq.heappush(heap,(10**9,10**9))
ans = []
for i in range(N):
    p,q = heapq.heappop(heap)
    ans.append(q+1)
print(*ans)

Submission status: Accepted

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

ans = [0]*a

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
ngo = [0]*n
count = 0
for i in input().split(' '):
    ngo[int(i)-1] = count
    count+=1
s = ''
for i in ngo:
    s += str(i+1)+' '
print(s[:-1])

Submission status: Accepted

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

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

ans = ''
for i in range(N):
  ans += str(s[i][1])
  if(i != N-1): 
    ans += ' '
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
list_ = []
for i in range(len(A)):
  list_.append([A[i],i+1])
list_ = sorted(list_)
ans = []
for j in list_:
  ans.append(str(j[1]))
print(' '.join(ans))

Submission status: Accepted

Solution code:
import sys
import heapq

input = sys.stdin.readline
N= int(input())
A = []
[heapq.heappush(A,[a,i+1]) for i, a in enumerate(map(int,input().split()))]
ans = []
while len(A) !=0:
  a, idx = heapq.heappop(A)
  ans.append(idx)
print(*ans)

Submission status: Accepted

Solution code:
n = int(input())

h = map(int, input().split(" "))

d = {}
for i, hi in enumerate(h):
    d[hi] = i + 1
a = list()
for i in range(n):
    a.append(str(d[i+1]))

print(' '.join(a))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
inpl = lambda: list(map(int,input().split()))
N = int(input())
A = inpl()
Ai = [ (A[i], i+1) for i in range(N)]
Ai.sort()
print(' '.join([ str(r[1]) for r in Ai ]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

answer = []
for i, x in enumerate(A):
    answer.append((i, x))
answer.sort(key=lambda x: x[1])
answer2 = []
for y in answer:
    answer2.append(y[0] + 1)
print(*answer2)

Submission status: Accepted

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

class Student:
    def __init__(self, id, toukou):
        self.id = id
        self.toukou = toukou


def solve():
    N = int(input())
    As = list(map(int, input().split()))
    ans = []
    for i, a in enumerate(As):
        ans.append(Student(i+1, a))

    ans.sort(key=lambda x: x.toukou)

    ans1 = []
    for student in ans:
        ans1.append(student.id)

    print(*ans1)


if __name__ == "__main__":
    solve()

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(' '.join([str(i) for i in ans]))

Submission status: Accepted

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

Submission status: Accepted

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

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

x.sort()

ans = ''
for a in x:
    ans += str(a[1]) + ' '
print(ans[:-1])

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(100000)

def getN():
    return int(input())
def getList():
    return list(map(int, input().split()))
import math
from bisect import bisect_left

n = getN()
nums = getList()

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

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

print(*(ans))

Submission status: Accepted

Solution code:
import sys
from _operator import itemgetter

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()

n = ni()
a = na()
li = []
for i in range(n):
    li.append([i+1, a[i]])
list.sort(li, key=itemgetter(1))
ans = []
for i in range(n):
    ans.append(li[i][0])
print(*ans)

Submission status: Accepted

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

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

for x in a:
  print(x[1],end=' ')

Submission status: Accepted

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

Submission status: Accepted

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

print(' '.join(ans))

Submission status: Accepted

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

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

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

print(' '.join(order))

Submission status: Accepted

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

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

Submission status: Accepted

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

dic={}
for idx, j in enumerate(a,1):
    dic[j]=idx


dic = sorted(dic.items() , key=lambda x:x[0])

li=[]
for i,j in dic:
    li.append(j)
print(*li)

Submission status: Accepted

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

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

for i in range(N):
    tmp[i][0] = L[i]

tmp.sort()

res = ''

for i in range(N):
    res += str(tmp[i][1])

    if i != N -1:
        res += ' '

print(res)

Submission status: Accepted

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

x = list((np.argsort(A)+1).astype(str))

print(' '.join(x))

Submission status: Accepted

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

def main():
    N = int(input())
    A = list(map(int, input().split()))
    X = []
    for i,a in enumerate(A):
        X.append((i+1,a))
    X.sort(key=lambda x: x[1])
    for i,a in X:
        print(i, end=" ")

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

def input(): return sys.stdin.readline()[:-1]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def MATINT(h): return [list(map(int, input().split())) for _ in range(h)]
def MATSTR(h): return [input() for _ in range(h)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
inf = float('inf')
mod = 10 ** 9 + 7

N = INT()
A_ = LIST()
A = sorted([[A_[i], i+1] for i in range(N)])

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

print(*B)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

import sys
import math
import collections
import itertools
from inspect import currentframe
INF = 10 ** 10
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y) : return (x * y) // gcd(x, y)
def I() : return int(input())
def MI() : return map(int, input().split())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def chkprint(*args) : names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}; print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))

N = I()
A = LI()

As = [[i + 1, a] for i, a in enumerate(A)]
As.sort(key=lambda x : x[1])

for a in As:
    print(a[0], end=" ")

print()

Submission status: Accepted

Solution code:
#n, k = map(int, input().split())
n = int(input())
an = list(map(int, input().split()))

order = sorted(range(1, n+1), key=lambda x: an[x-1])
print(' '.join(map(str, order)))

Submission status: Accepted

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

Submission status: Accepted

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

array = sorted([(A[i], i+1) for i in range(N)])

print(" ".join([str(a[1]) for a in array]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

TaskList = []

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

TaskList.sort()

for pair in TaskList:
    print(pair[1])

Submission status: Accepted

Solution code:
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

n = ni()
a = nl()

sl = sorted(range(len(a)), key=lambda k: a[k])

for s in sl:
    print(s+1)

Submission status: Accepted

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

r = [""] * N

for i in range(N):
    index = a[i]-1
    r[index] = str(i+1)

print(" ".join(r))

Submission status: Accepted

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

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

Submission status: Accepted

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

lst = []

for i, a in enumerate(A):
    lst.append((a, i+1))

lst.sort()

llst = []
for val in lst:
    llst.append(str(val[1]))

print(" ".join(llst))

Submission status: Accepted

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

for i in range(N):
    A[i] = [A[i], i+1]
    
A.sort()
ans = []
for i in range(N):
    ans.append(str(A[i][1]))
    
print(' '.join(ans))

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    # N,= [int(a) for a in input().split()]
    A = [int(a) for a in input().split()]

    AA = sorted(enumerate(A), key=lambda a: a[1])

    print(" ".join([str(i+1) for i, a in AA]))


if __name__ == "__main__":
    main()

Submission status: Accepted

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

sts = [(a,i+1) for i,a in enumerate(As)]
sts = sorted(sts)
ans = []
for st in sts:
    ans.append(st[1])
print(*ans)