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

b = [[i+1,a[i]] for i in range(n)]
b.sort(key=lambda x: x[1])
c = []
for i in range(n):
    c.append(b[i][0])
print(' '.join(map(str, c)))

Submission status: Accepted

Solution code:
import numpy
N = [int(x) for x in raw_input().split(' ')][0]
A = [int(x) for x in raw_input().split(' ')]
array = numpy.array(A)
order = array.argsort()
res = [str(x+1) for x in order]
print(' '.join(res))

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
N = int(input())
A = [ int(x)-1 for x in input().split() ]
B = [ 0 for _ in range(N) ]

for i,t in enumerate(A):
  B[t] = i+1

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

Submission status: Accepted

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

Submission status: Accepted

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

b = [0 for _ in range(n)]
for i in range(n):
    b[ a[i] - 1] = i+1
for i in range(n):
    print(str(b[i]) + " ", end = "")

Submission status: Accepted

Solution code:
import heapq

n = int(input())
list = []

idx = 1
for count_str in input().split():
    count = int(count_str)
    heapq.heappush(list, (count, idx))
    
    idx += 1

print(" ".join([ str(heapq.heappop(list)[1]) for _ in range(n) ]))

Submission status: Accepted

Solution code:
#!/Library/Frameworks/Python.framework/Versions/3.5/bin/python3

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

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

ls = sorted(l)
for i in range(n):
    print(ls[i][1], end='')
    if i < n - 1:
        print(' ', end='')
print()

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
ans = []
for i, a in enumerate(A):
    ans.append({'index': i+1, 'value': a})
ans.sort(key=lambda ans: ans['value'])
for x in ans:
    print(x['index'], end=' ')

Submission status: Accepted

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

b = sorted(range(len(a)), key=lambda k: a[k])
c = b[-1]

for i in b:
    if i == c:
        print(i+1)
    else:
        print(i+1,end=' ')

Submission status: Accepted

Solution code:
n = int(input())
l1 = list(map(int,input().split()))
l2 = []
for i in range(n):
    l2.append(0)
for i in range(n):
    l2[l1[i]-1] = i+1
for i in range(n):
    print(l2[i],end=' ')

Submission status: Accepted

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


class Student:
    def __init__(self, attendance_number, time_order):
        self.attendance_number = attendance_number
        self.time_order = time_order


oder_list = []
for index, a in enumerate(A):
    oder_list.append(Student(index+1, a))

oder_list.sort(key=lambda x: x.time_order)

print(' '.join([str(x.attendance_number)for x in oder_list]))

Submission status: Accepted

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

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

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

print()

Submission status: Accepted

Solution code:
n = int(input())
a_lst = list(map(int, input().split()))
lst = []
for i,a in enumerate(a_lst):
    lst.append([i+1,a])
ans = []
for l in sorted(lst, key=lambda x:x[1]):
    ans.append(l[0])
print(' '.join(map(str,ans)))

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
dict = {}
for i in range(N):
    dict[A[i]] = i + 1
sorteddict = sorted(dict.items())
for j in range(N):
    ans = sorteddict[j]
    print(ans[1])

Submission status: Accepted

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

Submission status: Accepted

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

dict = {}
for i in range(len(a)):
  dict[a[i]] = i+1

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

Submission status: Accepted

Solution code:
n=int(input())
a=[int(i) for i in input().split()]
junnbann={}
for i in range(0,n):
    junnbann[i+1] = a[i]

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

for i in junnbann_sorted:
    print(i[0],end=' ')

Submission status: Accepted

Solution code:
N = int(input())

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

num_dict = {}

for i in range(1,N+1):
	num_dict[L[i-1]] = i
	

for i in num_dict.values():
  	print(i)

Submission status: Accepted

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

for p, _ in sorted(list(enumerate(A)), key=lambda x: x[1]):
    print(p+1, end=' ')

Submission status: Accepted

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

zyunban_hito = [(a,i) for i,a in enumerate(a_list)]

zyunban_hito.sort()

result = [str(hito+1) for _,hito in zyunban_hito]

print(" ".join(result))

Submission status: Accepted

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

index_a_tuples = []
for index, a in enumerate(a_list):
    index_a_tuples.append((index + 1, a))

sorted_tuples = sorted(index_a_tuples, key=lambda t: t[1])

sorted_index = []
for sorted_tuple in sorted_tuples:
    sorted_index.append(sorted_tuple[0])

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

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().strip().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(*c)

Submission status: Accepted

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

ans = [0] * n

cnt = 1
for i in l:
    ans[i -1] = cnt
    cnt+=1

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

Submission status: Accepted

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

nums = []
nos = []
for no in range(N):
    num = A[no]  # 1, num = 3
    nums.append(num)
    nos.append(no)

Z = [str(x + 1) for _, x in sorted(zip(nums, nos))]

print(' '.join(Z))

Submission status: Accepted

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

sort = [0 for i in range(N)]
count = 1

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

sort = [str(s) for s in sort]
print(" ".join(sort))

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
ans = list(range(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()))
ans = [0 for i in range(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()))
b = []
for i in range(n):
    b.append([i, a[i]])
b = sorted(b, key=lambda x: x[1])
c = []
for k, v in b:
    c.append(k+1)
print(' '.join(map(str, c)))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np

N = int(input())
tmp = input()
tmp_s = [int(x.strip()) for x in tmp.split(' ')]
x = np.argsort(tmp_s)

print(" ".join(repr(e) for e in x+1))

Submission status: Accepted

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

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


pairs = zip(A, a)
sortedpairs = sorted(pairs, key=lambda x: x[0])

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

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

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))
B=[(0,0)]*N
for i, b in enumerate(A):
    B[i]=(i+1, A[i])
B.sort( key=lambda x: x[1])

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

Submission status: Accepted

Solution code:
# 190928 C
import heapq
if __name__ == "__main__":
    N = int(input())
    A = list(map(int,input().split()))
    retlist = sorted(range(len(A)), key=lambda k: A[k])
    for i in range(N):
        print(retlist[i]+1,end=" ")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(*AA)

Submission status: Accepted

Solution code:
import sys
N = int(input())
A = list(map(int, sys.stdin.readline().strip().split()))


school = [0] * N
j = 1
for i in A:
    school[i - 1] = j
    j += 1

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

Submission status: Accepted

Solution code:
N=int(input())
L=list(map(int,input().split()))
ans=[0 for i in range(100010)]
d={i+1:v for i,v in enumerate(L)}
ans=sorted(d.items(), key=lambda x:x[1])
print(*[i[0] for i in ans])

Submission status: Accepted

Solution code:
n = int(input())
res = [0 for i in range(n)]

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

for key,value in enumerate(data):
  res[value-1] = str(key+1)
print(' '.join(res))

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

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

Submission status: Accepted

Solution code:
N=int(input())
M=list(map(int,input().split()))
k={}
for i,j in enumerate(M, start=1):
  k[j]=i
j=[]
for i in k:
  j.append(k[i])
  
print(" ".join(map(str,j)))

Submission status: Accepted

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

dic = {}

num = 1
for i in A:
    dic[num] = i
    num += 1

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

# print(dic_sorted)
ans = ""
for i in dic_sorted:
    ans += str(i[0]) + " "

print(ans[:-1])

Submission status: Accepted

Solution code:
from collections import defaultdict, deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys
import random
import itertools
import math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt


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


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


def LI_(): return list(map(lambda x: int(x)-1, input().split()))


def II(): return int(input())


def IF(): return float(input())


def LS(): return list(map(list, input().split()))


def S(): return list(input().rstrip())


def IR(n): return [II() for _ in range(n)]


def LIR(n): return [LI() for _ in range(n)]


def FR(n): return [IF() for _ in range(n)]


def LFR(n): return [LI() for _ in range(n)]


def LIR_(n): return [LI_() for _ in range(n)]


def SR(n): return [S() for _ in range(n)]


def LSR(n): return [LS() for _ in range(n)]


mod = 1000000007
inf = float('INF')


def A():
    a = II()
    b = a//2
    p = b/a
    if a % 2:
        print(1-p)
    else:
        print(p)

    return

# B


def B():
    N, K = map(int, input().split())
    h = LI()
    count = 0

    for i in h:
        if i >= K:
            count += 1
        else:
            continue
    print(count)
    return

# C


def C():
    N = II()
    A = LI()
    J = [0] * N
    for i, n in enumerate(A):
        J[n-1] = i+1
    for s in J:
        print(s, end=" ")

    return

# D


def D():
    n, = LI()
    a = LI()
    q = []
    for ai in a:
        heappush(q, ai)
    for _ in range(m):
        heappush(q, heappop(q) / 2)
    ans = 0
    while q:
        ans += int(heappop(q))
    print(ans)
    return

# E


def E():
    return

# F


def F():
    return


# Solve
if __name__ == '__main__':
    C()

Submission status: Accepted

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

order = list(zip(range(1,N+1), A))
order = sorted(order, key=lambda x: x[1])

for o in order:
    print(o[0], end=" ")
print("")

Submission status: Accepted

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

num = [i+1 for i in range(len(A))]

order = []
for i in range(len(A)):
    order.append([A[i],num[i]])
    
order.sort()

ans = []
for i in range(len(A)):
    ans.append(str(order[i][1]))
    
print(" ".join(ans))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np
N=int(input())
A=np.array(list(map(int, input().split())))
B=[]
for i in np.argsort(A):
    B.append(i+1)
print(' '.join(list(map(str, B))))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import numpy as np

n = int(input())
a = list(map(int, input().split()))
a.insert(0, 0)
x = np.array(a)
y = list(np.argsort(x)[1::])
#print(y)
y = map(str, y)
#print(y)
print(" ".join(y))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from collections import Counter, deque, defaultdict
from math import factorial
import heapq, bisect
import math
import itertools
sys.setrecursionlimit(10 ** 5 + 10)
INF = 10**15 +5
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

n = INT()
a = LIST()
for i in range(n):
    a[i] = (a[i],i+1)
a = sorted(a)
for i in range(n):
    print(str(a[i][1]) + " ",end = "")

Submission status: Accepted

Solution code:
listA=[] #appendのために宣言が必要
while True:
    try:
        listA.append(list(map(int,input().split())))

    except:
        break;
        #または、quit(),os.exit()をして止める。

#print(listA[0],listA[1])
N=listA[0]
i=1
order=[]
listA[1]
import numpy as np
np_=np.array(listA[1])
x=np.argsort(np_)
x1=list(map(lambda y:y+1,x))
print(*x1)

Submission status: Accepted

Solution code:
n = int(input())
order_list = list(map(int, input().split()))
dict = {}
for i, order in enumerate(order_list):
  dict[order] = i + 1
ans_list = []
for i in range(n):
  ans_list.append(str(dict[i+1]))
ans = ' '.join(ans_list)
print(ans)

Submission status: Accepted

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

dict1 = dict(zip(ls, menber))
dict1 = sorted(dict1.items(), key=lambda x: x[0])

for i in range(len(dict1)):
    print(dict1[i][1], end=' ')

Submission status: Accepted

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

#N = 3
#a_list = [2 ,3, 1]

arrival_list = []

import numpy as np

print(' '.join(list((np.argsort(a_list) + 1).astype(str))))

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in 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:
import numpy as np
import math
import heapq

N = int(input())
A = list(input().split())
A = [[int(A[i]),i+1] for i in range(N)]
heapq.heapify(A)

ans = []
for i in range(N):
    x = heapq.heappop(A)
    ans.append(x[1])

print(*ans)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
C = []
for _ in range(N):
  C.append([])
for i in range(N):
  C[i].append(A[i])
for j in range(N):
  C[j].append(j+1)
C.sort(key = lambda x:x[0])
B = [C[k][1] for k in range(N)]
for s in B:
  print(s,end = ' ')

Submission status: Accepted

Solution code:
N = int(input())

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

Ans = [0] * N

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

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

Submission status: Accepted

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

for _ in range(1, N+1):
  A_key.append(_)

A_dict = dict(zip(A, A_key))

for v in A_dict.values():
  print(v, end=' ')

Submission status: Accepted

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

dic = {}

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

#print(dic)

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

Submission status: Accepted

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

r = [0] * n

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

print(" ".join(r))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# C - Go to School
N = int(input())
A = list(map(int, input().split()))

result = [0] * N

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

print(*result)

Submission status: Accepted

Solution code:
num_student = int(input())
attend_list = [(x, i+1) for i, x in enumerate(list(map(int, input().split(' '))))]
attend_list.sort()

print(' '.join(map(str, [tup[1] for tup in attend_list])))
exit(0)

Submission status: Accepted

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

IDs = range(1, len(As)+1)
result_dict = dict(zip(IDs,As))
result_dict = sorted(result_dict.items(), key=lambda x:x[1])
result_list = list(map(lambda x: str(x[0]), result_dict))
result = " ".join(result_list)
print(result)

Submission status: Accepted

Solution code:
n = int(input())

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

l = list(range(0,n))

l.sort(key=lambda i: a[i])

for i in range(len(l)):
  l[i] += 1

print(*l)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
#(index+1)番
ans = [-1 for i in range(n)]
for i, c in enumerate(a):
    ans[c-1] = str(i+1)
print(' '.join(ans))

Submission status: Accepted

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

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

print(" ".join(b))

Submission status: Accepted

Solution code:
#%%

_ = int(input())
a = [(i + 1, x) for i, x in enumerate(map(int, input().split()))]

#%%
print(' '.join(map(lambda x: str(x[0]), sorted(a, key=lambda v: v[1]))))

Submission status: Accepted

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

for s in res:
    print(s+1, end =" ")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

N = int(input())

order = {}
count = 1
list = list((map(int, input().split())))
for i in list:
    order[i] = count
    count += 1

# 並び替える
order_sorted = sorted(order.items())
print(' '.join([str(item[1]) for item in order_sorted]))

Submission status: Accepted

Solution code:
import numpy as np


N = int(input())
A = np.array([int(str) for str in input().split()])
[print(i + 1, end=' ') for i in np.argsort(A)]

Submission status: Accepted

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

a_list.sort()

print(' '.join([str(i) for a, i in a_list]))

Submission status: Accepted

Solution code:
n = int(input())

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

ans = [0] * n

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

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

Submission status: Accepted

Solution code:
# C - Go to School
N = int(input())
A = list(map(int,input().split()))
B = [0]*N

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

for s in B:
  print(s, end =" ")

Submission status: Accepted

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

Submission status: Accepted

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

d = dict(ori)
d_sort = sorted(d.items())

ans =[]
for i in range(len(A)):
    ans.append(d_sort[i][1])

print(*ans)

Submission status: Accepted

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

Submission status: Accepted

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

dic = {}

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

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

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

Submission status: Accepted

Solution code:
import numpy as np
n=int(input())
li = list(map(int,input().split()))
x = np.argsort(li)
#print(x)


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

Submission status: Accepted

Solution code:
#coding: UTF-8
N = int(input())
A = list(map(int, input().split()))
ans = []
for i in range(N):
  ans.append(0)
for i in range(N):
  ans[A[i] - 1] = i + 1 
ans = list(map(str, ans))
ans = " ".join(ans)
print(ans)

Submission status: Accepted

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

result = [""]*N
for sid, rank in enumerate(As):
    result[rank-1] = str(sid+1)
print(" ".join(result))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
A = list(map(int,input().split()))

B = list(range(1, N+1))
mulL = []

for i in range(N):
  L = []
  L.append(B[i])
  L.append(A[i])
  mulL.append(L)
mulL.sort()
mulL.sort(key=lambda x:x[1], reverse=False)

answer = []
for i in range(N):
  answer.append(mulL[i][0])
  
print(*answer)

Submission status: Accepted

Solution code:
N = int(input())
A = [0]+list(map(int, input().split()))
print(*sorted(range(len(A)), key=lambda k: A[k])[1:])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Apr 20 20:47:47 2019

@author: Owner
"""

import numpy as np
import sys
import collections
import scipy.misc
import math
from operator import itemgetter
import itertools
import copy
import bisect
import heapq

#素因数を並べる
def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(int(i))
    i += 1
  if n > 1:
    table.append(int(n))
  return table   
# 桁数を吐く
def digit(i):
    if i > 0:
        return digit(i//10) + [i%10]
    else:
        return []
    
def getNearestValueIndex(list, num):
    """
    概要: リストからある値に最も近い値のインデックスを取得する関数
    @param list: データ配列
    @param num: 対象値
    @return 対象値に最も近い値
    """

    # リスト要素と対象値の差分を計算し最小値のインデックスを取得
    idx = np.abs(np.asarray(list) - num).argmin()
    return idx

def find_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default

class UnionFind(object):
    def __init__(self, n=1):
        self.par = [i for i in range(n)]
        self.rank = [0 for _ in range(n)]
        self.size = [1 for _ in range(n)]

    def find(self, x):
        """
        x が属するグループを探索
        """
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]

    def union(self, x, y):
        """
        x と y のグループを結合
        """
        x = self.find(x)
        y = self.find(y)
        if x != y:
            if self.rank[x] < self.rank[y]:
                x, y = y, x
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1
            self.par[y] = x
            self.size[x] += self.size[y]

    def is_same(self, x, y):
        """
        x と y が同じグループか否か
        """
        return self.find(x) == self.find(y)

    def get_size(self, x):
        """
        x が属するグループの要素数
        """
        x = self.find(x)
        return self.size[x]
    

"""
N, X = map(int, input().split())

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

P = [0]*N
Y = [0]*N
for n in range(N):
    P[n], Y[n] = map(int, input().split())

# 多次元配列の宣言（あとでintにすること。）（タプルにすること。）
dp = np.zeros((N+1, 4,4,4))
    
all(nstr.count(c) for c in '753')

# 複数配列を並び替え
ABT = zip(A, B, totAB)
result = 0
# itemgetterには何番目の配列をキーにしたいか渡します
sorted(ABT,key=itemgetter(2))
A, B, totAB = zip(*ABT)
A.sort(reverse=True)

# 2進数のbit判定
(x >> i) & 1

# dp最小化問題
dp = [np.inf]*N
for n in range(N):
    if n == 0:
        dp[n] = 0
    else:
        for k in range(1,K+1):
            if n-k >= 0:
                dp[n] = min(dp[n], dp[n-k] + abs(h[n]-h[n-k]))
            else:
                break
# 累積和
add = 1 # 問題によって決まる
res = 0
sums = [0]*(len(nums)+1)
for i in range(len(nums)):
    sums[i+1] = sums[i] + nums[i]
for i in range(0, len(nums), 2):
    left = i
    right = min(i+add, len(nums))
    tmp = sums[right] - sums[left]
    res = max(tmp, res)

#２分探索
li, ri = bisect.bisect_left(p_ac, l[i]-1), bisect.bisect_right(p_ac, r[i]-1)    

#ソート関数
org_list = [3, 1, 4, 5, 2]
new_list = sorted(org_list)
print(org_list)
print(new_list)
# [3, 1, 4, 5, 2]
# [1, 2, 3, 4, 5]

#Distance Transformation
    for h in range(0,H):
        for w in range(0,W):
            if h == 0 and w == 0:
                pass
            elif h == 0:
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h-1][W-w]+1)
            elif w == 0:   
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h][W-w-1]+1)
            else:
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h][W-w-1]+1, D[H-h-1][W-w]+1, D[H-h][W-w]+2)
            d_max = max(D[H-h-1][W-w-1], d_max)

"""

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

    
def main():
    C = A
    B = [n for n in range(1,N+1)]
    # 複数配列を並び替え
    CB = zip(C, B)
    # itemgetterには何番目の配列をキーにしたいか渡します
    CB = sorted(CB,key=itemgetter(0))
    #CB = list(CB)
    res = [CB[n][1] for n in range(N)]

    print(*res, sep=" ")            
                
                
            
            
                

    
if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

print(*sol)

Submission status: Accepted

Solution code:

n= int(input())
a = input()
list1 = list(map(int,a.split()))
list2 = [0]*n
for i in range(n):
    list2[list1[i]-1] = i+1

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

Submission status: Accepted

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

for j in jun:
		print(j, end=' ')

Submission status: Accepted

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

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

print(" ".join(str(e+1) for e in o))

Submission status: Accepted

Solution code:
import numpy as np

n = int(input())
A = list(map(int, input().split()))
a = np.argsort(A)
print(' '.join(map(str, a+1)))

Submission status: Accepted

Solution code:
def main(n,a_list):

    i = 0
    list = [0] * n
    while i < n:
        list[a_list[i] - 1] = i + 1
        i += 1

    i = 0
    while i < n:
        print(list[i], end="")
        if not i == n - 1:
            print(' ', end="")
        i += 1


if __name__ == '__main__':
    n = int(input())
    a_list = list(map(int, input().split()))
    main(n, a_list)

Submission status: Accepted

Solution code:
N=int(input())
dict={}
ans=''
A=map(int,input().split())
for num,i in enumerate(A):
    dict[i]=num
for j in sorted(dict):
    ans+=str(dict[j]+1)+' '
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# C - Go to School

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

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

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
import numpy as np
a = np.array(a)
# b = np.sort(a)
c = np.argsort(a) + 1
for i in range(n):
    print(c[i], end=" ")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
order_dict = {i+1:int(j) for i, j in enumerate(input().split())}

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

for i in order_dict_sorted:
  print(i[0], end = ' ')

Submission status: Accepted

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