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: Runtime Error

Solution code:
import numpy as np

n, k=[int(i) for i in input().split()]
records= np.array([int(i) for i in input().split()])

enrolled = np.argsort(a)

attendance_num = [i+1 for i in range(len(a))]

attendance_order = attendance_num[enrolled]

print(attendance_order)

Submission status: Runtime Error

Solution code:
import heapq
from heapq import heappush, heappop
list=[]
x = int(input())
y = [int(x) for x in input().split()]
heapq.heapify(y)
for i in range(x):
  k=heapq.heappop(y)
  print(z.index(k)+1,end=' ')

Submission status: Runtime Error

Solution code:
import sys

N,*H = map(int,open(0).read().split())

ans_list = []

for j in range(N):
    # sys.stdout.write(str(H.index(j+1) + 1) + " ")
    sys.stdout.write(H.index(j+1) + 1 + " ")

Submission status: Runtime Error

Solution code:
from fractions import gcd

d = math.gcd(*map(int, input().split()))
r = 1
for i in range(2, int(d ** 0.5) + 1):
    if d % i == 0:
        d //= i
        r += 1
    while d % i == 0:
        d //= i
print(r + (d > 1))

Submission status: Runtime Error

Solution code:
import numpy
N=int(input())
A=list(map(int,input().split()))
s=numpy.argsort(A)
print(' '.join(s))

Submission status: Runtime Error

Solution code:
inport numpy
N=int(input())
A=list(map(int,input().split()))
s=numpy.argsort(A)
print(' '.join(s))

Submission status: Runtime Error

Solution code:
n = gets.to_i
a = gets.split(' ').map(&:to_i)

a.length.times{|i| print("#{a.index(i + 1) + 1} ")}

Submission status: Runtime Error

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

B = [0]*N
j = 0
for i in A:
    j += 1
    B[int(i)-1] = j
    if

resutl = ""
for i in B:
    resutl += (str(i) + " ")
print(resutl.rstrip())

Submission status: Runtime Error

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

for i in range(1,len(A+1)):
  R += str(A.index(i)+1) + ' '

print(R)

Submission status: Runtime Error

Solution code:
N = int(input())
A = [int(i) for i in input().split()]
values = [str(i+1) for i in range(N)]
dic = {key: val for key, val in zip(A, values)}
dic_s = deque(sorted(dic.items()))
s =[]
for i in range(N):
    s.append(dic_s[i][1])

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

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
from __future__ import print_function

n = int(raw_input())
li = map(int, raw_input().split())

for i in xrange(1,n+1):
    li[i-1] = li.index(i) +1
    
print(*li, sep=' ')

Submission status: Runtime Error

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

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

l.sort()

res = str(l[0][1])
for i in range(1, n):
    res = res + " " + str(l[0][i])
print(res)

Submission status: Runtime Error

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

B = sorted(range(len(A)), key=lambda k: A[k])
resutl = ""
for i in B:
    resutl += (str(i+1) + " ")
print(resutl.rstrip())N = int(input())
A = input().split()

B = [0]*N
j = 0
for i in A:
    j += 1
    B[int(i)-1] = j

resutl = ""
for i in B:
    resutl += (str(i) + " ")
print(resutl.rstrip())

Submission status: Runtime Error

Solution code:
import math
def gcd(x,y):
    if x < y:
        x, y = y, x
    if y == 0:
        return x
    if  x % y == 0:
        return y
    else:
        return gcd(y, x%y)

def f(n):
    li = []
    m = n
    while True:
        for i in range(2, n + 1):
            if m % i == 0:
                if not i in li:
                    li.append(i)
                    n = n // i
                    break
                else:
                    n = n // i
                    continue
        else:
            break
    return li

a, b = list(map(int, input().split()))
d = gcd(a, b)
print(len(set(f(d))) + 1)

Submission status: Runtime Error

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

for i in range(n+1):
    c.append(a.index(i)+1)

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

Submission status: Runtime Error

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

a = np.array(a)

'''
for i in range(1,n+1):
    result.append(a.index(i)+1)
'''


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

Submission status: Runtime Error

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

for i in b:
    c.append(a.index(i)+1)

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

Submission status: Runtime Error

Solution code:
import numpy as np
N = int(input())
A = list(map(int,input().split()))
ls = [0]*N
for i in range(N):
    ls[i] = A.index(i+1)
np.add(ls+1)
print(*ls)

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int, input().split()))
dic = {}; ans = []
for i in range(n+1)[1:]:
    dic.setdefault(a[i-1],[]).append(i)
heapq.heapify(a)
for i in range(n):
    res = heapq.heappop(a)
    ans.append(dic[res][0])
print(*ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = input()
a = input().split(' ')
a1 = a
a.sort()
text = []
out = []
for i in a:
	text.append(str(a1.index(a)+1))
for i in range(len(text)-1)
	out += text[i] + " "

print(out + text[len(text)])

Submission status: Runtime Error

Solution code:
import numpy as np

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

a_idx = np.argsort(np_a)
#print(a_idx)

res = [str(1+int(x)) for x in a_idx.tolist()]
#print(res)

print(' '.join(res))

Submission status: Runtime Error

Solution code:
import numpy as np

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

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

Submission status: Runtime Error

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: Runtime Error

Solution code:
n, = map(int,input().split())
li = input().split()
h_list = [int(li[i]) for i in range(n)]

indices = [*range(len(h_list))]
sorted_indices = sorted(indices, key=lambda i: h_list[i])
answer = [sorted_indices[i] + 1 for i in range(n)]
print(answer)

Submission status: Runtime Error

Solution code:
N = int(input())
A = list(map(list, input().split()))
for i in range(N):
    A[i].append(i + 1)  # 出席番号をそれぞれ追加している
A = sorted(A)  # 人数でソート
ans = []
for ai in range(N):
    ans.append(A[ai][1])  # 人数順に出席番号で出力
print(" ".join(map(str, ans)))

Submission status: Runtime Error

Solution code:
N=int(input())
L=list(map(int,input().split())
to=[]
for i in range(N):
  to.append([i,L[i]])
to=sorted(to, key=lambda x:x[1])
for i in range(N):
       print(total[i][0],end='')

Submission status: Runtime Error

Solution code:
n = int(input())
h = list(map(int, input().split()))
cnt = h.sort()
for i in range(n):
  for j int range(j):
    if cnt[i] == h[j]:
      print(h[j], end = "")

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
int a[100005];

int main(){
	int n,x;
  	scanf("%d",&n);
  for(int i=1;i<=n;i++){
  	scanf("%d",&x);
    a[x]=i;
  }
  for(int i=1;i<=n;i++){
  	printf("%d ",a[i]);
  }
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

import numpy as np

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

    ans = ''
    for i in range(1, n+1):
        ans += str(a_list.index(i)+1)

    print(' '.join([*ans]))

if __name__ == '__main__':
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys

stdin = sys.stdin

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

def main():
  n = ni()
  a = list(na())
  res = []
  for i in range(1,n+1):
    res.append(a[i])
  print(*res)

main()

Submission status: Runtime Error

Solution code:
#
# Yet I'm feeling like
# 	There is no better place than right by your side
# 		I had a little taste
# 			And I'll only spoil the party anyway
# 				'Cause all the girls are looking fine
# 					But you're the only one on my mind

import sys
# import re
inf = float("inf")
# sys.setrecursionlimit(1000000)

# abc='abcdefghijklmnopqrstuvwxyz'
# abd={'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod,MOD=1000000007,998244353
# vow=['a','e','i','o','u']
# dx,dy=[-1,1,0,0,-1,1,-1,1],[0,0,1,-1,1,1,-1,-1]

# import operator as op
# from functools import reduce
# from collections import deque, Counter, OrderedDict,defaultdict
# from heapq import nsmallest, nlargest, heapify,heappop ,heappush, heapreplace
from math import ceil,floor,log,sqrt,factorial,pow,pi,gcd,log10,atan,tan
# from bisect import bisect_left,bisect_right,insort_left
# import numpy as np
# import queue
# from copy import deepcopy
# import random

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

n=int(input())
Arr=get_array()
result=[]
for i in range(n):
    result.append((Arr[i],i))
result.sort()
ans=[]
for i in result:
    ans.append(i[1]+1)
print(*ans)

Submission status: Runtime Error

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

ans=[]
for i,a in enumerate(A):
  ans.append([i+1,a])
ans.sort(key=lambda x:x[a])
for a in ans:
  print(a[0],end=' ')

Submission status: Runtime Error

Solution code:
import java.util.*;
public class C {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		ArrayList<Pair> ps = new ArrayList<>();
		for(int i = 0; i < n; i++) {
			int w = sc.nextInt();
			ps.add(new Pair(i+1, w));
		}
		Collections.sort(ps);
		StringBuilder sb = new StringBuilder();
		for(int i = 0; i < n; i++) {
			sb.append(ps.get(i).n+" ");
		}
		System.out.println(sb.toString().trim());
	}
	static class Pair implements Comparable<Pair>{
		int n, w;
		public Pair(int _n, int _w) {
			 n = _n; w = _w;
		}
		@Override
		public int compareTo(Pair p) {
			return w-p.w;
		}
	}

}

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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
s=""
for i in b:
  s+=str(i)+' '
print(s)

Submission status: Runtime Error

Solution code:
n = int(input())

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

ans = [None]*n

for i in range(n):
  ans[ls[i]-1] = i+1
  
print(" ".join(ans))

Submission status: Runtime Error

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.to_list())

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def solve():
  N, K = map(int, input().split())
  H = [int(i) for i in input().split()]
  return len(list(filter(lambda h: h >= K, H)))

print(solve())

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <set>
#include <map>
#include <queue>
#include <iomanip>
using namespace std;
#define rep(i,n) for(int i = 0;i<n;i++)
const long long MOD = 1000000007LL;
const string alpha = "abcdefghijklmnopqrstuvwxyz";
int main(){
    int n;
    cin >> n;
    int a;
    int ans[n];
    for(int i = 1;i<=n;i++){
        cin >> a;
        ans[a-1]=i;
    }
    for(int i = 0;i<n;i++) cout << ans[i] << " ";
    cout << endl;
}