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:
import sys
from io import StringIO
import unittest
import os

# 再帰処理上限(dfs作成時に設定するのが面倒なので限度近い値を組み込む)
sys.setrecursionlimit(999999999)


# 検索用タグ、lambdaの練習。sort()

# 実装を行う関数
def resolve(test_def_name=""):
    # 数値取得サンプル
    #   1行N項目 x, y = map(int, input().split())
    #   N行N項目 x = [list(map(int, input().split())) for i in range(n)]

    # 文字取得サンプル
    aa = input()
    x = list(map(lambda xx: int(xx), input().split()))

    new_x = list(enumerate(x, 1))

    new_x = sorted(new_x, key=lambda xx: xx[1])

    ans = []
    for i in new_x:
        ans.append(i[0])

    print(*ans)


# テストクラス
class TestClass(unittest.TestCase):
    def assertIO(self, assert_input, output):
        stdout, sat_in = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(assert_input)
        resolve(sys._getframe().f_back.f_code.co_name)
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, sat_in
        self.assertEqual(out, output)

    def test_input_1(self):
        test_input = """3
2 3 1"""
        output = """3 1 2"""
        self.assertIO(test_input, output)

    def test_input_2(self):
        test_input = """5
1 2 3 4 5"""
        output = """1 2 3 4 5"""
        self.assertIO(test_input, output)

    def test_input_3(self):
        test_input = """8
8 2 7 3 4 5 6 1"""
        output = """8 2 4 5 6 7 3 1"""
        self.assertIO(test_input, output)

    # 自作テストパターンのひな形(利用時は「tes_t」のアンダーバーを削除すること
    def tes_t_1original_1(self):
        test_input = """データ"""
        output = """データ"""
        self.assertIO(test_input, output)


# 実装orテストの呼び出し
if __name__ == "__main__":
    if os.environ.get("USERNAME") is None:
        # AtCoder提出時の場合
        resolve()

    else:
        # 自PCの場合
        unittest.main()

Submission status: Accepted

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

d = {}

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

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

ans_lst = []
for item in d_sort:
    ans_lst.append(str(item[1]))

print(" ".join(ans_lst))

Submission status: Accepted

Solution code:
import math
import sys
from collections import deque
import heapq
import copy
import itertools
from itertools import permutations
from itertools import combinations
import bisect
def mi() : return map(int,sys.stdin.readline().split())
def ii() : return int(sys.stdin.readline().rstrip())
def i() : return sys.stdin.readline().rstrip()
a=ii()
l=list(mi())
s=[0]*a
for i in range(a):
  s[l[i]-1]=i+1
for j in s:
  print(j,end=" ")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# template by 3xC and starkizard.
# contributors: 

#####################################################################################
from __future__ import division, print_function 

import sys
import os
from collections import Counter, deque, defaultdict
import itertools
import math
import io


"""Uncomment modules according to your need"""


# from bisect import bisect_left, bisect_right, insort
# from heapq import heappop, heapify, heappush
# from random import randint as rn
# from Queue import Queue as Q
# from copy import deepcopy
# from decimal import *
# import re
# import operator

#####################################################################################
# this enables you to write python3 code with PyPy2 (Python 2)
if sys.version_info[0] < 3:
    input = raw_input
    range = xrange

    filter = itertools.ifilter
    map = itertools.imap
    zip = itertools.izip

#####################################################################################

"""value of mod"""
MOD = 998244353
mod = 10**9 + 7

"""Uncomment next 4 lines if doing huge recursion"""
# import threading
# threading.stack_size(1<<27)
# sys.setrecursionlimit(10000

def prepare_factorial(mod=mod):
    """ returns two lists, factorial and inverse factorial modulo argument by default 10**9 +7 """
    # Comment code out when you don't need inverse factorial or vice versa
    fact = [1]
    for i in range(1, 200005):
        fact.append((fact[-1] * i) % mod)

    ifact = [0] * 200005
    ifact[200004] = pow(fact[200004], mod - 2, mod)
    for i in range(200004, 0, -1):
        ifact[i - 1] = (i * ifact[i]) % mod

    return fact, ifact

def modinv(n, p):
    """ returns N inverse modulo p """
    return pow(n, p - 2, p)

def ncr(n, r,  fact, ifact):
    """ takes 4 arguments: n , r and factorial and inverse factorial lists"""
    t = (fact[n] * (ifact[r]*ifact[n-r]) % MOD)% MOD
    return t


def get_n(Sum):    
    """this function returns the maximum n for which Summation(n) <= Sum"""
    ans = (-1 + sqrt(1 + 8*Sum))//2
    return ans

def sieve(n):
    """ returns a list of prime numbers till n """
    if n < 2: return list()
    prime = [True for _ in range(n + 1)]
    p = 3
    while p * p <= n:
        if prime[p]:
            for i in range(p * 2, n + 1, p):
                prime[i] = False
        p += 2
    r = [2]
    for p in range(3, n + 1, 2):
        if prime[p]:
            r.append(p)
    return r



def divs(n, start=1):
    """ returns a list of all divisors till n """
    divisors = []
    for i in range(start, int(math.sqrt(n) + 1)):
        if n % i == 0:
            if n / i == i:
                divisors.append(i)
            else:
                divisors.extend([i, n // i])
    return divisors



def divn(n, primes):
    """ returns the number of divisors, two arguments n and the sieve till n """
    divs_number = 1
    for i in primes:
        if n == 1:
            return divs_number
        t = 1
        while n % i == 0:
            t += 1
            n //= i
        divs_number *= t



def lrfind(d, x, default=-1):
    """ Takes 2 arguments an iterable and an element. returns a tuple (firstoccurence,lastoccurence) -1 if not found """
    left = right = -1
    for i in range(len(d)):
        if d[i] == x:
            if left == -1: left = i
            right = i
    if left == -1:
        return default, default
    else:
        return left, right

def gcd(x, y): # math.gcd is slower
    """ returns greatest common divisor of x and y """
    while y:
        x, y = y, x % y
    return x

def check_sorted(a):
    ''' returns True/False '''
    for i in range(len(a)-1):
        if a[i]>a[i+1]:
            return False
    return True
def ceil(n, k=1): return n // k + (n % k != 0) #returns math.ceil but protecting against floating inconsistencies
def input(): return sys.stdin.readline().strip()
def ii(): return int(input()) #inputs integer
def mi(): return map(int, input().split()) # inputting space seperated variables for example x,y,z
def li(): return list(map(int, input().split())) #inputting a space seperated list of integers
def lw(): return input().split() #inputting a space seperated list of strings
def lcm(a, b): return abs(a * b) // gcd(a, b) #returns LCM of two arguments
def prr(a, sep=' ', end='\n'): print(sep.join(map(str, a)), end=end) #For printing an iterable with seperator sep as optional second argument (default : " "), ending character (default: "\n") as optional third
def dd(): return defaultdict(int) #returns a dictionary with values defaulted to 0
def ddl(): return defaultdict(list) #returns a dictionary with values defaulted to []
def write(s): return sys.stdout.write(s)












###################################################################
def main():
    #CODE GOES HERE:
    n=ii()
    a=li()
    b=[-1]*n
    for i in range(n):
        b[a[i]-1]=i+1
    prr(b)
























    
""" -------- Python 2 and 3 footer by Pajenegod and c1729 ---------"""

py2 = round(0.5)
if py2:
    from future_builtins import ascii, filter, hex, map, oct, zip
    range = xrange

import os, sys
from io import IOBase, BytesIO

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):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        if py2:
            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)
input = lambda: sys.stdin.readline().rstrip('\r\n')
# sys.stdin = open('input.txt', 'r')
# sys.stdout = open('output.txt', 'w')

""" main function"""

if __name__ == '__main__':
    main()
    # threading.Thread(target=main).start()

Submission status: Accepted

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

ans = [0]*N
for i in range(N):
  num = int(A[i])
  ans[num-1] = 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()))
ans = [0] * n
for i in range(n):
  ans[A[i]-1] = i+1
  
ANS = [str(ans[i]) for i in range(n)]
print(" ".join(ANS))

Submission status: Accepted

Solution code:
n=int(input())
a={int(x):i+1 for i,x in enumerate(input().split())}
a=sorted(a.items())
b=[x[1] for x in a]
print(*b)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
dic = {i+1:a for i,a in enumerate(A)}
dic2 = sorted(dic.items(), key=lambda x:x[1])
ls = []
for i in range(len(dic2)):
    ls.append(dic2[i][0])

print(*ls, sep=" ")

Submission status: Accepted

Solution code:
from operator import itemgetter
n = int(input())
a = list(map(int,input().split()))
number = [0]*n
for i in range(n):
    number[i] = i+1
go = list(map(list,zip(a,number)))
go.sort()
junban = []
for i in range(n):
    junban.append(go[i][1])
ans = ' '.join(map(str,junban))
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

count = dict()

for x in range(1, n+1):
    count[str(x)] = a[x-1]


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

ans = ''

for x in range(n):
    ans += count_sorted[x][0]
    if x != n-1:
        ans += ' '

print(ans)

Submission status: Accepted

Solution code:
def actual(N, A):
    records = []

    for i, a in enumerate(A, start=1):
        record = dict(student_id=str(i), num_students=a)
        records.append(record)

    records_asc = sorted(records, key=lambda x: x['num_students'])

    return ' '.join([record['student_id'] for record in records_asc])


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

Submission status: Accepted

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

for i in A:
	l[i-1] = count
	count += 1
    
print(' '.join(map(str, l)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
A = map(int, input().split())
L = [0] * n

for i,val in enumerate(A):
    L[val-1] = i + 1

print(*L)

Submission status: Accepted

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

for i,val in enumerate(A):
    L[val-1] = i + 1

print(*L)

Submission status: Accepted

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

order=[0]*n

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

o=[str(a) for a in order]
o=" ".join(o)
print(o)

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())
s = list(map(int, input().split()))
d = {}
for i in range(n):
  d[s[i]] = i + 1
d = sorted(d.items(), key=lambda x:x[0])
for e in d:
  print(e[1], end=' ')

Submission status: Accepted

Solution code:
N = int(input())
a = [int(x) for x in input().split()]
num = [0]*N

for i, j in enumerate(a):
    num[j-1] = i+1

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

Submission status: Accepted

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

def main():
    N=int(input())
    A = list(map(int,input().split()))
    ans=[None]*N
    i=1
    for a in A:
        ans[a-1]=str(i)
        i+=1
    print(' '.join(ans))

if __name__ == "__main__":
    main()

Submission status: Accepted

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

import sys
from collections import defaultdict, deque
from heapq import heappush, heappop
import math
import bisect
input = sys.stdin.readline

# 再起回数上限変更
# sys.setrecursionlimit(1000000)

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

dic= defaultdict(int)
for idx, a in enumerate(A):
    dic[a] = idx + 1

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

Submission status: Accepted

Solution code:
def inversePermutation(arr, size):
	arr2 = [0] * (size)
	for i in range(0, size):
		arr2[arr[i] - 1] = i + 1
	return " ".join(map(str, arr2))

size = int(input())
arr = list(map(int, input().split()))

print(inversePermutation(arr, size))

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(enumerate(map(int, input().split()),start=1))
from operator import itemgetter
a.sort(key=itemgetter(1))

print(*[n[0] for n in a])

Submission status: Accepted

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

A_idx = np.argsort(A)+1
print(*A_idx)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

ans = [0] * n

for ind, i in enumerate(l):
    ans[i-1] = ind + 1

s = ' '.join([str(t) for t in ans])

print(s)

Submission status: Accepted

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

Submission status: Accepted

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

A_list = [[i+1, j] for i, j in enumerate(A_list) ]
A_list = sorted(A_list, key=lambda x: x[1])

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

Submission status: Accepted

Solution code:
import numpy as np
input()
print(*(np.array(input().split(), dtype=np.int32).argsort() + 1))

Submission status: Accepted

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

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

ans = [0] * N

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

print(' '.join(ans))

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
    
for c in b:
    print(c+1,end=" ")

Submission status: Accepted

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

As = {v:i+1 for i,v in enumerate(As)}
#print(As)

ans = [As[i] for i in range(1, N+1)]
print(*ans)

Submission status: Accepted

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

Submission status: Accepted

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

## Library

import sys
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter

## input

# n=int(input())
# A,B,C,D=map(int, input().split())
# string = input()
# yoko = list(map(int, input().split()))
# tate = [int(input()) for _ in range(N)]
# N, M = map(int,input().split()) 
#    P = [list(map(int,input().split())) for i in range(M)]


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

B=[]
for i in range(N):
    B+=[[i+1,A[i]]]
B.sort(key=lambda x:x[1])

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

Submission status: Accepted

Solution code:
N = int(input())

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

print(*ans)

Submission status: Accepted

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

print(*numpy.argsort(a)+1)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))  #8 2 7 3 4 5 6 1
# u = [(c, i) for i, c in enumerate(A)]  #タプルはcが優先される
l = list()
for i,c in enumerate(A):  #タプルにする
    l.append((c,i))

l.sort()

for c, i in l:
    print(i+1, end=" ")

Submission status: Accepted

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

for i in range(n):
    ans += (str(an[i][0]) + ' ')

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

    reslt = {}
    re = []

    for i, num in enumerate(A):
        reslt[num] = i + 1

    for k, v in sorted(reslt.items()):
        re.append(v)

    print(*re)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

d = {}

for i, studunt in enumerate(studunts):
    d[i+1] = studunt

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

l = [str(x) for x, y in d]
print(" ".join(l))

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
from operator import itemgetter
N=int(input())
A=list(map(int,input().split()))

print(*[t[0] + 1 for t in sorted(enumerate(A), key=itemgetter(1))])

Submission status: Accepted

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

l_plus = []
for i in range(n):
    tmp = [l[i], i+1]
    l_plus.append(tmp)

l_plus.sort()

for j in l_plus:
    print(j[1], end = ' ')

Submission status: Accepted

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

B=list(zip(A, range(1,N+1)))
C=sorted(B)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

for k in range(len(list)):
    print(list[k][0],end=' ')

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

L=[str(a) for a in Z]
L=" ".join(L)
print(L)

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
dic={}
for i in range(n):
  dic[i+1]=a[i]
 
dic2 = sorted(dic.items(), key=lambda x:x[1])
 
ans=""
for i in dic2:
  print(i[0],end=" ")
  
  
  
print(ans)

Submission status: Accepted

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

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

print(*ans)

Submission status: Accepted

Solution code:
n=int(input())
alist=list(map(int,input().split()))
adic={}
for i in range(n):
	adic[alist[i]]=i+1
out=[]
for i in range(1,n+1):
	if i == n:
		out.append(str(adic[i]))
	else:
		out.append(str(adic[i]) + " ")
print("".join(out))

Submission status: Accepted

Solution code:
def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    AL = [[i+1, a] for i, a in enumerate(A)]
    AL = sorted(AL, key=lambda x: x[1])
    ans = []
    for al in AL:
        ans.append(str(al[0]))
    print(' '.join(ans))

resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.buffer.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.buffer.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.buffer.readline().split()))

n = ri()
li = [0] * n
for i, v in enumerate(rl()):
    li[v-1] = str(i+1)
print(' '.join(li))

Submission status: Accepted

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

arr_2 = [0] * n
for idx, val in enumerate(arr):
    arr_2[val - 1] = idx + 1
    
for i in arr_2:
    print(i, end = " ")

Submission status: Accepted

Solution code:
import heapq

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

pq = []
for i,a in enumerate(A):
  heapq.heappush(pq,(a,i+1))

for i in range(N):
  print(heapq.heappop(pq)[1], end=" ")

Submission status: Accepted

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

S = []

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

S.sort()
for i in S:
    print(i[1], end=' ')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

n, *a = map(int, read().split())
l = [[x,i+1] for i,x in enumerate(a)]
l.sort()

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

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
ans={}
for i in range(1,n+1):
  ans[a[i-1]]=i
s=list(ans.keys())
s.sort()
for i in s:
  print(ans[i],end=' ')
  
print()

Submission status: Accepted

Solution code:
import sys

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


def solve():
    N = int(input())
    A = list(map(int, input().split()))
    C = [0 for _ in range(N)]

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

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

print(' '.join(str(i) for a, i in sorted(zip(a, range(1, n + 1)))))

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
s = {}
for i in range(n):
    #print("i = ",i,"の時a[",i,"] = ",a[i],"で,s[",a[i],"] = ",i+1)
    s[a[i]] = i+1
for i in range(n):
    print(s[i+1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import os, sys, re, math

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

ta = [(A[i], i + 1) for i in range(N)]
sa = sorted(ta, key=lambda k: k[0])

result = ''
for s in sa:
    result += '%s ' % s[1]
print(result.strip())

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
dic = {}
for v in range(len(a)):
	dic.update({a[v]:v+1})
print(' '.join([str(dic[i + 1]) for i in range(len(a))]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
N = int(input())
A = [int(s) for s in input().split()]

print(' '.join([str(s) for _, s in sorted(zip(A, list(range(1, N+1))))]))

Submission status: Accepted

Solution code:
n = int(input())
a = map(int, input().split())
print(' '.join(str(i) for a, i in sorted(zip(a, range(1, n + 1)))))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
values=list(map(int,input().split()))
keys=list(range(1,N+1))
d=dict(zip(keys,values))
e=sorted(d.items(), key=lambda x:x[1])
for i in range(N):
    print(e[i][0],end=" ")

Submission status: Accepted

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

Submission status: Accepted

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

for i, j in enumerate(a, 1):
    l[j - 1] = i

print(* l)

Submission status: Accepted

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

memo = {}

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

memo = sorted(memo.items(), key=lambda x:x[1])
# print(memo)
ans = []
for student, order in memo:
    ans.append(str(student))

print(" ".join(ans))

Submission status: Accepted

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

Submission status: Accepted

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

b = [(alist[i], i+1) for i in range(N)]
b.sort()
ans = [b[i][1] for i in range(N)]
print(*ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

tmp = [0]*n

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

Submission status: Accepted

Solution code:
import sys
from operator import itemgetter
def input(): return sys.stdin.readline().rstrip()
def main():
    n=int(input())
    A=[(int(i)+1,int(a)) for i,a in enumerate(input().split())]
    A.sort(key=itemgetter(1))
    print(" ".join(map(str,list(zip(*A))[0])))
if __name__=='__main__':
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

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


tmp = [0] * (n+1)
for i, num in enumerate(lst):
    tmp[num] = str(i + 1)

tmp.pop(0)

print(' '.join(tmp))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int, input().split()))
b = []
for i, a in enumerate(A):
    b.append([a, i+1])
b.sort()
ans = []
for c in b:
    ans.append(c[1])
print(*ans)

Submission status: Accepted

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

for i in range(N):
    ans_list[p_num[i] - 1] = i+1

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