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/env python3
#    encoding: UTF-8
#    Modified: <28/Sep/2019 05:37:25 PM>


#    ✪ H4WK3yE乡
#    Mohd. Farhan Tahir
#    Indian Institute Of Information Technology (IIIT), Gwalior


import sys
import os
from io import IOBase, BytesIO


def main():
    n = int(input())
    tmp = get_array()
    arr = []
    for i in range(n):
        arr.append([tmp[i], i + 1])
    arr.sort()
    for i in range(n):
        print(arr[i][1], end=" ")


BUFSIZE = 8192


class FastIO(BytesIO):
    newlines = 0

    def __init__(self, file):
        self._file = file
        self._fd = file.fileno()
        self.writable = "x" in file.mode or "w" in file.mode
        self.write = super(FastIO, self).write if self.writable else None

    def _fill(self):
        s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
        self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
        return s

    def read(self):
        while self._fill():
            pass
        return super(FastIO, self).read()

    def readline(self):
        while self.newlines == 0:
            s = self._fill()
            self.newlines = s.count(b"\n") + (not s)
        self.newlines -= 1
        return super(FastIO, self).readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.getvalue())
            self.truncate(0), self.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        py2 = round(0.5)
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        if py2 == 1:
            self.write = self.buffer.write
            self.read = self.buffer.read
            self.readline = self.buffer.readline
        else:
            self.write = lambda s: self.buffer.write(s.encode("ascii"))
            self.read = lambda: self.buffer.read().decode("ascii")
            self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)


def get_array():
    return list(map(int, sys.stdin.readline().split()))


def get_ints():
    return map(int, sys.stdin.readline().split())


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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import numpy as np
def main():
    out=0
    N=int(input())
    A=list(map(int,input().split()))
    A=np.array(A)
    return " ".join([str(x+1) for x in np.argsort(A).tolist()])

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

for a in ans:
    print(str(a)+' ',end='')

print()

Submission status: Accepted

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

ans = [str(i[0]+1) for i in sorted(enumerate(A), key=lambda x:x[1])]
# print(ans)
print(' '.join(ans))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
INF = float("inf")


def solve(N: int, A: "List[int]"):
    data = [(a, i) for i, a in enumerate(A)]
    data.sort()
    print(*[a+1 for i, a in data], sep=" ")
    return


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

    N = int(input())
    A = list(map(int, input().split()))
    student = [0 for _ in range(N)]
    for i in range(N):
        student[A[i]-1] = i+1
    return " ".join(map(str, student))

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

Submission status: Accepted

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

ans = [0] * n

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

print(*ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline


def read_int():
    return int(input())


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


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N, A):
    A_ = [(a, i+1) for i, a in enumerate(A)]
    A_.sort()
    return ' '.join(map(lambda x: str(x[1]), A_))


def main():
    N = read_int()
    A = read_int_n()
    print(slv(N, A))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a=int(input())
b=list(map(int,input().split()))
c=[0 for i in range(a)]

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(n):
    result[arr[i]-1] = i+1

print(" ".join(str(i) for i in result))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i)-1 for i in input().split()]
dic = {}
for i in range(n):
    dic[a[i]] = i

for i in range(n):
    print(dic[i]+1,end = "")
    if i != n-1:
        print(" ",end = "")
    else:
        print("")

Submission status: Accepted

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

Submission status: Accepted

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

ans.sort()
for i in range(n):
    print(ans[i][1],end=" ")

print()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
import numpy as np

sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return list(map(int, sys.stdin.readline().split()))
def II(): return int(sys.stdin.readline())
def LS(): return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]

def main():
    n = II()
    a_s = LI()
    a_s = np.array(a_s)
    i_s = np.argsort(a_s)
    ans = [str(i + 1) for i in i_s]
    print(" ".join(ans))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import numpy as np

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

# for i in range(N):
#   print(As.index(i+1) + 1, end = " ")

for item in np.argsort(As):
  print(item+1, end=" ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#https://atcoder.jp/contests/abc142/tasks/abc142_c

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

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

b.sort()

c = []

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

Submission status: Accepted

Solution code:

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

ret=[0]*(n+1)

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

arglist = list(map(str, ret[1:]))
print(" ".join(arglist))

Submission status: Accepted

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

l = []
for i in range(N):
    tmp = [A[i], i]
    l.append(tmp)

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

Submission status: Accepted

Solution code:
import numpy as np
n=int(input())
a=[int(i) for i in input().split()]
print( *np.array(a).argsort()+1 )

Submission status: Accepted

Solution code:

# Setup
import sys
import collections
sys.setrecursionlimit(4100000)

n = int(input())
a = [int(i) for i in input().split()]
d = {}
for i in range(n):
    d[a[i]] = i
ans = ""
for i in range(1,n+1):
    ans += str(d[i]+1) + " "
print(ans)
# print(d)

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 = list(map(int, input().split()))

print(*map(lambda x: x[1], sorted(zip(a, range(1, n + 1)))))

Submission status: Accepted

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


pair = list(zip(A,range(1,N+1)))
pair.sort()

ans = ""
for _, o in pair:
	ans += str(o)+" "

ans = ans[:-1]
print(ans)

Submission status: Accepted

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

li = []
for i, e in enumerate(a, 1):
    li.append((i, e))

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

ans = []
for i, e in li:
    ans.append(i)

print(*ans)

Submission status: Accepted

Solution code:
mod = 1000000007
MOD = 998244353
ii = lambda :  int(input())
si = lambda :  input()
dgl = lambda : list(map(int, input()))
f = lambda :   map(int, input().split())
il = lambda :  list(map(int, input().split()))
it = lambda :  tuple(map(int, input().split()))
ls = lambda :  list(input())
n=ii()
l=il()

l2=[[j,i] for i,j in enumerate(l)]
l2.sort()
for i in range(n):
    print(l2[i][1]+1,end=' ')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
A=sorted([(h,i) for i, h in enumerate(map(int,input().split()))])
print(" ".join([str(i+1) for h,i in A]))

Submission status: Accepted

Solution code:
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

N = int(input())
inp = list(map(int, input().split()))
L = []
for i, l in enumerate(inp, 1):
    L.append([l, i])

L = sorted(L, key=lambda x: x[0])
ans = []
for _, l in L:
    ans.append(l)
print(" ".join(map(str, ans)))

Submission status: Accepted

Solution code:
N = int(input())
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:
# ABC141c
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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

t = []

for i in range(n):
    t.append([a[i], i])
t.sort()

for i in t:
    print(i[1]+1, end=' ')

Submission status: Accepted

Solution code:
n=int(input())
ans=[0]*n

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

    tmp = []
    for i in range(N):
        tmp.append((a[i], i))
    tmp = sorted(tmp, key=lambda x: x[0])
    
    for i in range(N-1):
        print(tmp[i][1]+1, end=" ")
    print(tmp[N-1][1]+1)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]

# n
# a, b = 
# s = input()

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

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

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

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline
n=int(input())
a_list=list(map(int,input().split()))
A=[]
for i in range(n):
    A.append((a_list[i],i+1))
A.sort()
for i in A:
    print(i[1],end='')
    print(' ',end='')

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()
for i in range(n):
    print(b[i][1],end=' ')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
n = int(input())
a = list(map(int, input().split()))
b = [None] * n
for i in range(n):
    b[i] = [a[i], i + 1]
b.sort()
for i in range(n):
    print(b[i][1], end=' ')

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
n = list(range(1, N + 1))

A, n = zip(*sorted(zip(A, n)))

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

Submission status: Accepted

Solution code:
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 i in range(len(l)):
    ans.append(str(l[i][1]))

print(" ".join(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]
n=int(input())
a=list(map(int,input().split()))
ans=[0]*n
for i in range(n):
    ans[a[i]-1]=i+1
print(" ".join(map(str,ans)))

Submission status: Accepted

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

iAs = list(range(N))
iAs.sort(key=lambda iA: As[iA])

anss = [iA+1 for iA in iAs]
print(' '.join(map(str, anss)))

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

Submission status: Accepted

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

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

lst.sort()

for i in lst:
    print (i[1], end = ' ')

print ()

Submission status: Accepted

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


def main():
  input()
  vs = [(i + 1, v) for i, v in enumerate(map(int, input().split()))]
  vs.sort(key=lambda x: x[1])

  print(' '.join(str(i) for i, _ in vs))


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

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

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

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

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

print(*answer)

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

C=[]
for i in range(N):
    C.append(B[i][1])

print(*C)

Submission status: Accepted

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

Submission status: Accepted

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

ans = [-1] * n
for ind, aa in enumerate(a, 1):
    ans[aa - 1] = ind
print(*ans)

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)])
t=[]
for i,j in s:
    t.append(j)
print(*t)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10000000)
def input():
    return sys.stdin.readline()[:-1]
from bisect import *
from collections import *
from heapq import *
import itertools
INF = 10**9
MOD = 10**9+7

n = int(input())
a = [int(x) for x in input().split()]
idx = [0] * n
for i, x in enumerate(a, 1):
    idx[x-1] = i
print(*idx)

Submission status: Accepted

Solution code:

N = int(input())

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

lis = []

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

lis.sort()
ans = []

for i in range(N):
    ans.append(lis[i][1])

print (" ".join(map(str,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()
ans=[]
for i in range(n):
  ans.append(str(a[i][1]))
print(' '.join(ans))

Submission status: Accepted

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

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

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

ans = []
for i in range(n):
    ans.append(box[i][0])

print(*ans)

Submission status: Accepted

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

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

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

print(*ans)

Submission status: Accepted

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

Submission status: Accepted

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

students = [(a, i + 1) for i, a in enumerate(As)]
counts = ' '.join(map(lambda st: str(st[1]), sorted(students)))
print(counts)

Submission status: Accepted

Solution code:
N = int(input())
inf = input().split()
A = [(int(inf[i]),i+1) for i in range(len(inf))]
A.sort(key=lambda x:x[0])
ans = []
for a in A:
  x, y = a
  ans += [str(y)]
print(' '.join(ans))

Submission status: Accepted

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

A.sort()
ans = [i for a, i in A]
print(*ans, sep=' ')

Submission status: Accepted

Solution code:

N = int(input())
A = sorted([[i,int(k)] for i,k in enumerate(input().split())],key=lambda x:x[1])
for a in A:
	print(a[0]+1,"",end="")
print()

Submission status: Accepted

Solution code:
n,a=open(0)
n=int(n)
b=[0]*int(n)
for i,t in enumerate(a.split()):b[int(t)-1]=i+1
print(*b)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

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

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

ans = [x[1] for x in order]
print(*ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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(*(bb[1] for bb in b))

Submission status: Accepted

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

a.sort()
ans = [i[1] for i in a]
print(*ans, sep=" ")

Submission status: Accepted

Solution code:
import sys
import numpy as np
n = int(input())
a_ls = [int(i) for i in sys.stdin.readline().split()]
print(" ".join([str(i + 1) for i in np.argsort(a_ls)]))

Submission status: Accepted

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

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

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

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

print(*C)

Submission status: Accepted

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

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 = list(map(int,input().split()))
A = [(a, i) for i, a in enumerate(A, 1)]
A = sorted(A)
ans = [a[1] for a in A]
print(*ans)

Submission status: Accepted

Solution code:
n = int(input())
l = sorted((a, b + 1) for b, a in enumerate(map(int, input().split())))
print(' '.join(str(b) for _, b in l))

Submission status: Accepted

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

lst = sorted(range(1,N+1), key=lambda x:arr[x-1])

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

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

n = ni()
a = na()
r = [0] * n
for i in range(n):
    r[a[i]-1] = i+1
for x in r:
    print(str(x) + " ", end="")
print()

Submission status: Accepted

Solution code:
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

n = onem()


a = l()

aa = []

for i in range(n):
    aa.append([i,a[i]])
aa.sort(key = lambda x:x[1])
aaa = []

for i in range(n):
    aaa.append(aa[i][0]+1)


print(jo(aaa))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(300000)


def solve(N: int, A: "List[int]"):
    tmp = []
    for i in range(N):
        tmp.append([A[i], i])
    tmp.sort()
    ret = ' '.join([str(t[1] + 1) for t in tmp])
    print(ret)
    return


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

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

n = I()
a = LI()
b = []
for i in range(n):
    b.append((a[i],i+1))
b.sort(key = itemgetter(0))
ans = []
for i in range(n):
    ans.append(b[i][1])
print(*ans)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def resolve():
    n=int(input())
    A=list(map(int,input().split()))
    B=[(i,a) for i,a in enumerate(A)]
    B.sort(key=lambda x:x[1])
    for b in B:
        print(b[0]+1,end=' ')
resolve()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
n = int(input())
a = [int(item) for item in input().split()]
ans = [0] * n
for i, item in enumerate(a):
    ans[item-1] = i
for item in ans:
    print(item + 1)

Submission status: Accepted

Solution code:
N = int(input())
nums = list(map(int, input().split()))
print(' '.join([str(i+1) for i, v in sorted(enumerate(nums), key=lambda iv: iv[1])]))

Submission status: Accepted

Solution code:
n = int(input())
ls = list(map(int, input().split()))
ls2 = [(x, i + 1) for x, i in zip(ls, range(n))]
ls2.sort(key=lambda x: x[0])
print(*[x for _, x in ls2])

Submission status: Accepted

Solution code:
#C問題
N = int(input())
A = list(map(int,input().split()))
st = []
for i in range(N):
    a = A[i]
    st.append([a,i+1])
st.sort()
for s in st:
    print(s[1],end = " ")

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 = []
for b in B:
    ans.append(b[1])
print(*ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())
A=[int(i) for i in input().split()]
B=[]
for i in range(n):
  B.append((A[i],i+1))
B.sort(key=lambda x:x[0])
Ans=[]
for i in range(n):
  Ans.append(B[i][1])
print(*Ans)

Submission status: Accepted

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

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 = sorted(b, key=lambda x: x[1])

ans = ""
for i in range(n):
    ans += str(b[i][0])
    if i != n-1:
        ans += " "
print(ans)

Submission status: Accepted

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

import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline

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


ans = [0]*n

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

print(*ans)

Submission status: Accepted

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


def main():
    n = int(input())
    bs = [int(b) for b in input().split()]
    res = sorted(range(1, n + 1), key=lambda x: bs[x - 1])
    print(*res)


if __name__ == "__main__":
    main()

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()
c = []
for i in range(n):
  c.append(b[i][1])
print(' '.join(list(map(str,c))))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import heapq
from bisect import bisect_right, bisect_left
from collections import defaultdict, Counter
import itertools
import sys
sys.setrecursionlimit(10**7)
MOD = 10**9 + 7
INF = float("inf")


def main():
    n = int(input())
    a = list(map(int, input().split()))
    l = []
    for i in range(n):
        l.append([a[i], 1+i])
    l = sorted(l, key=lambda x: x[0])
    ansl = []
    for i in range(n):
        ansl.append(l[i][1])
    print(*ansl)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())


n = ni()
a = list(li())
lst = []
for i in range(n):
    lst.append((i, a[i]))

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

ans = []
for i, _ in lst:
    ans.append(i+1)

print(*ans)

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:
N = int(input())
A = list(map(int,input().split()))
B = []
for i in range(N):
    a = A[i]
    B.append([i+1,a])
B = sorted(B, key = lambda a: a[1])
ans = []
for i in range(N):
    b = B[i][0]
    ans.append(b)
print(*ans)

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()
ans = [b[i][1] for i in range(n)]
print(*ans)