TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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.

Submission attempts (in order):
N=int(input())
A=list(map(int, input().split()))
ans = ""
for i in range(N):
  ans += str(A.index(i+1)+1) + " "
print(ans)

import sys
N=int(input())
A=list(map(int, input().split()))
for i in range(N):
  sys.stdout.write(str(A.index(i+1)+1)+" ")

N=int(input())
A=list(map(int, input().split()))
str = ""
for i in range(N):
  str += str(A.index(i+1)+1) + " "

import sys
N=int(input())
A=list(map(int, input().split()))
for i in range(N):
  sys.stdout.write(str(A.index(i+1)+1))
  sys.stdout.write(" ")

N=int(input())
A=list(map(int, input().split()))
l = [0] * N
ans = ""
for i in range(N):
  sys.stdout.write(A.index(i+1)+1)
  sys.stdout.write(" ")
  


N=int(input())
As=list(map(int, input().split()))
man = [""] * N
for i in range(N):
  man[As[i]-1] = str(i+1)
result = ' '.join(man)
print(result)

Verdicts: Time Limit Exceeded

Time Limit Exceeded

Runtime Error

Time Limit Exceeded

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
import sys
input = sys.stdin.readline
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) 
print(" ".join(map(str,b)))

import sys
input = sys.stdin.readline
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) 
print(" ".join(map(str,b)))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
a=list(map(int,input().split()))
li=[0]*n
for i in range(n):
  li[a[i]-1] += i+1
print(" ".join(li))

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

for i in range(N):
    for j in range(N):
        if A[j]==i+1:
            print(j+1)

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

for i in range(N):
    for j in range(N):
        if A[j]==i:
            print(j)

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


Verdicts: Runtime Error

Time Limit Exceeded

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = input()
a_list = input().split()
ret = []

for i, a in enumerate(a_list):
  ret.append((a, i))

a_sorted = sorted(ret)
b = []
for _, i in a_sorted:
  b.append(str(i+1))
print(b)
print(" ".join(b))

n = int(input())
a_list = input().split()
ret = [0]*n

for i, a in enumerate(a_list):
    ret[int(a)-1] = str(i + 1)

print(" ".join(ret))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
a = list(map(int, input().split()))
b = []
for i in range(n):
  b.append(a.index(i+1)+1)
for i in range(n):
  print(str(i)+" ")

n = int(input())
a = list(map(int, input().split()))
b = []
for i in range(n):
  b.append(a.index(i+1)+1)
for i in range(n):
  print(i+" ")

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

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
l = list(map(int, input().split()))
a = [[i+1, l[i]] for i in range(n)]
a.sort(key=lambda x: x[1])
ans = ""
for i in range(n):
  ans = ans + str(a[i][0]) + " "

print(ans)

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

print(" ".join(ans))

Verdicts: Time Limit Exceeded

Accepted
Problem: 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.

Submission attempts (in order):
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)

import heapq
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)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
a = list(map(int, input().split()))
p =[]
for i in range(n) :
    p.append([i+1,a[i]])

p.sort(key=lambda x: x[1])
r = ''
for i in range(n) :
    r = r + ' ' + str(p[i][0])

print (r)

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

p.sort(key=lambda x: x[1])
r = ''
q = [x[0] for x in p]
for i in range(n) :
    r = r + ' ' + str(q[i])

print (r)

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

r = ''
for i in range(n) :
    for j in range(n) :
        if p[j][1] == (i + 1) :
            r = r + ' ' + str(p[j][0])

print (r)

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

p.sort(key=lambda x: x[1])
r = ''
q = [x[0] for x in p]
for i in range(n) :
    r = r + ' ' + str(q[i])

print (r)

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

p.sort(key=lambda x: x[1])
q = list(map(str,[x[0] for x in p]))
r = ' '.join(q)


print (r)

Verdicts: Time Limit Exceeded

Time Limit Exceeded

Time Limit Exceeded

Time Limit Exceeded

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
a_l = list(map(int, input().split()))
a_d = {}
for i, p in enumerate(a_l):
    a_d[p] = i
res_l = []
for k in sorted(list(a_d.keys())):
    res_l.append(str(a_dt[k]+1))
print(' '.join(res_l))

n = int(input())
p_list = list(map(int, input().split()))
p_dict = {}
for i, p in enumerate(p_list):
    p_dict[p] = i
res_list = []
for key in sorted(list(p_dict.keys())):
    res_list.append(str(p_dict[key]+1))
print(' '.join(res_list))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
S = list(map(int,input().split()))
m = [0 for _ in range(N)]
for i in range(N):
  m[S[i]-1] = i+1
print(m)


N = int(input())
S = list(map(int,input().split()))
m = [0 for _ in range(N)]
for i in range(N):
  m[S[i]-1] = i+1
print(*m,sep=" ")


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())  
A = [int(i) for i in input().split()] 
B=[0]*N
ans=0
for i in range(N):
    B[i]=(A.index(i+1)+1)
print(B)

N = int(input())
A = [int(i) for i in input().split()] 
A.insert(0, 0)
B = [0]*N
mydict={}
for i in range(1,N+1):
    mydict[A[i]]=i
sorted(mydict.items(), key=lambda x: x[1])
for i in range(1,N+1):
    B[i-1]=mydict[i]
print(' '.join(map(str, B)))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
print(" ".join(map(lambda x: str(x[1]), sorted([(int(a), num) for a, num in zip(input().split(" "), list(range(1,int(input()) + 1)))]))))

print(" ".join(map(lambda x:str(x[0]),sorted([(n,int(a))for n,a in zip(list(range(1,int(input())+1)),input().split(" "))],key=lambda x:x[1]))))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
A = list(map(int, input().split()))

ans = [0] * len(A)

for i in A:
    ans[i - 1] = A.index(i) + 1

print(ans)


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

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

print(*ans)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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())

def solve():
  N = int(input())
  A = sorted([(i, int(v)) for i, v in enumerate(input().split())])
  sortedList = [-1] * N
  for i, a in A:
    sortedList[a - 1] = str(i + 1)
  return ' '.join(sortedList)

print(solve())

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
if __name__ == '__main__':
    n = int(input())
    a = [int(i) for i in input().split()]
    ans = [0]*n
    for i in range(n):
        ans[i] = a[i]
    ans_str =""
    for i in ans:
        if ans_str =="":
            ans_str = str(i)
        else:
            ans_str = ans_str+" "+str(i)
    print(ans_str)

if __name__ == '__main__':
    n = int(input())
    a = [int(i) for i in input().split()]
    ans = [0]*n
    print(ans)
    for i in range(n):
        ans[i] = a[i]
    ans_str =""
    for i in ans:
        if ans_str =="":
            ans_str = str(i)
        else:
            ans_str = ans_str+" "+str(i)
    print(ans_str)

if __name__ == '__main__':
    n = int(input())
    a = [int(i) for i in input().split()]
    ans = [0]*n
    for i in range(n):
        ans[a[i]-1] = i+1
    ans_list = map(str, ans)  
    ans_str =' '.join(ans_list)
    print(ans_str)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N=int(input())
n = list(map(int, input().split()))
s=sorted(range(len(n)), key=lambda k: n[k])
s=list(map(lambda k:k+1,s))
print(s)

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N=int(input())
A=list(map(int,input().split()))
new_A=[0 for i in range(N)]
for i in range(N):
    new_A[A[i]-1]=i+1
print(new_A)

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
aa = list(map(int, input().split()))
oo = [str(a) for a in np.argsort(aa)+1] 
print(" ".join(oo))

import numpy as np
n = int(input())
aa = list(map(int, input().split()))
oo = [str(a) for a in np.argsort(aa)+1] 
print(" ".join(oo))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input()) 
a_list = list(map(int, input().split()))
print(sorted(range(len(a_list)), key=lambda k: a_list[k]))

n = int(input()) 
a_list = list(map(int, input().split()))
res = sorted(range(n), key=lambda k: a_list[k])
print(list(map(lambda x: x+1, res)))

n = int(input()) 
a_list = list(map(int, input().split()))
res = sorted(range(n), key=lambda k: a_list[k])
print(list(map(lambda x: x+1, res)))

n = int(input()) 
a_list = list(map(int, input().split()))
res = sorted(range(n), key=lambda k: a_list[k])
print(' '.join(list(map(lambda x: str(x+1), res))))

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())

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

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

n = int(input())

a = list(map(int, input().split()))
b = list(enumerate(a))
c = sorted(b, key=lambda x:x[1])


print(*[c[i][0]+1 for i in range(n)])

Verdicts: Time Limit Exceeded

Accepted
Problem: 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.

Submission attempts (in order):
# -*- coding: utf-8 -*-
import numpy as np

n = int(input())
a = np.array(input().split(), dtype='int')

ans = np.empty(n)

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

print(ans)

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

n = int(input())
a = np.array(input().split(), dtype='int')

ans = np.empty(n)

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

print(*ans)

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

n = int(input())
a = np.array(input().split(), dtype='int')

ans = np.empty(n, dtype='int')

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

print(*ans)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
a = list(map(int, input().split()))
info = []
ans = []
for i in range(n):
    info.append([i+1, a[i]])

info.sort()
for s, o in info:
    print(o)

n = int(input())
a = list(map(int, input().split()))
sorted_a = []
for i in range(n):
    sorted_a.append([a[i], i])

sorted_a.sort()

ans = []
for i in range(n):
    ans.append(sorted_a[i][1]+1)
print(*ans)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
ai = list(map(int,input().split()))
ans = [0]*n

for i in range (0,n):
    ans[ai[i]-1]  = i+1

print(ans)

n = int(input())
ai = list(map(int,input().split()))
ansss = [0]*n

for i in range (0,n):
    ansss[ai[i]-1]  = i+1

print(*ansss)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N=int(input())
A=[int(x) for x in input().split()]
ans=[None]*N
for i,a in enumerate(A):
    ans[a-1]=i
print(*ans)


N=int(input())
A=[int(x) for x in input().split()]
ans=[None]*N
for i,a in enumerate(A):
    ans[a-1]=i+1
print(*ans)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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
print(''.join(b))

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

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
str_b = map(str, b)
print(' '.join(str_b))

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
a=list(map(int,input().split()))
i=1
b = []
j=0



while i<=n:
    print(a.index(i)+1, end=" ")
    i+=1

n=int(input())
a=list(map(int,input().split()))
i=1
b = []
j=0

map = {a[i]:str(i+1) for i in range(n)}
print(" ".join(map[i] for i in range(1, n+1)))

Verdicts: Time Limit Exceeded

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
num = list(map(int, input().split()))
ans = [0]*n
j = 1
for i in num:
  ans[i-1] = j
  j += 1
print(ans)

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
a = list(map(int, input().split()))
dic = {}
for i in range(N):
    dic[a.index(a[i])+1] = a[i]
print(dic)
dic_sorted = sorted(dic.items(), key=lambda x:x[1])
for i in range(N):
    print(dic_sorted[i][0],'',end="")

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
def abc142_c():    
    n = int(input())
    a = list(map(int,input().split()))
    i = 0
    dict = {}

    for num in a:
        i += 1
        dict[i] = num

    sorted_arrive_list = sorted(dict.items(), key=lambda x :x[1])
    ans = ''
    for l in sorted_arrive_list:
        ans = ans + str(l[0]) + ' '
    print(ans)

if __name__ ==  '__main__':
    abc142_c()

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

    
    for val, num in enumerate(a, 1):
        ans[num - 1] = val
    
    print(*ans)
if __name__ ==  '__main__':
    abc142_c2()    

Verdicts: Time Limit Exceeded

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
a = list(map(int, input().split()))

# print(a)

for i in range(1, n + 1):
    # li.append(a.index(i) + 1)

    print(a.index(i) + 1, end=" ")
    

import numpy as np

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

npa = np.array(a)
print(*(np.argsort(npa) + 1))

Verdicts: Time Limit Exceeded

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
a = list(map(int,input().split()))

for i in range(1,n+1):
  print(a.index(i)+1,end=' ')

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

Verdicts: Time Limit Exceeded

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
A = map(int, input().split())

result = []
for i, a in enumerate(A):
    result.append({'i':i, 'a': a})

result.sort(reverse=True, key=lambda x: x['a'])
print(' '.join([str(x['a']) for x in result]))

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input().split()[0])
aa = input().split()
bb = []

for i in range(1, N+1):
    bb.append(aa.index(str(i+1)))

print(*bb)


N = int(input().split()[0])
aa = input().split()
bb = []

for i in range(1, N+1):
    bb.append(aa.index(str(i)))

print(*bb)

N = int(input().split()[0])
aa = input().split()
bb = [0]*N

for i in range(0, N):
    bb[int(aa[i]) - 1] = i + 1

print(*bb)


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
# -*- coding: utf-8 -*-

N = int(input())

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

order = sorted(range(len(A)), key=lambda k: A[k])
sorted_order = [_a + 1 for i, _a in enumerate(order)]
print('{}'.format(sorted_order))

# -*- coding: utf-8 -*-

N = int(input())

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

order = sorted(range(len(A)), key=lambda k: A[k])
sorted_order = [_a + 1 for i, _a in enumerate(order)]
print(*sorted_order)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
A = list(map(list(), input().split()))
ans = [0]*n
for i in range(n):
  ans[A[i]-1] = i+1
ans.sort()
print(ans)

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

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

N = int(input())
A = list(map(int, input().split()))
A.sort()
print([A[0-i] for i in range(N)])

n = int(input().split())
A = list(map(int, input().split()))
A_sort = sorted(A, reverse=True)
print(*A)

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

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
import numpy as np

N = int(input())
A_i = np.array(list(map(int, input().split())))
stu = [[nums+1,student] for nums, student in enumerate(A_i)]

hh = np.full(N, np.nan)
for i, j in stu:
  hh[j-1] = hh[j-1] = i

print(hh)

import numpy as np

N = int(input())
A_i = np.array(list(map(int, input().split())))
stu = [[nums+1,student] for nums, student in enumerate(A_i)]

emp = np.full(N, np.nan)
for i, j in stu:
    emp[j-1] = i
    print(emp[j-1])

import numpy as np

N = int(input())
A_i = np.array(list(map(int, input().split())))
stu = [[nums+1,student] for nums, student in enumerate(A_i)]

emp = np.full(N, np.nan)
for i, j in stu:
    emp[j-1] = i
emp = emp.astype('int')
print(emp)   

import numpy as np

N = int(input())
A_i = np.array(list(map(int, input().split())))
stu = [[nums+1,student] for nums, student in enumerate(A_i)]

hh = np.full(N, np.nan)
for i, j in stu:
  hh[j-1] = hh[j-1] = i

print(hh.astype('int'))

import numpy as np

N = int(input())
A_i = np.array(list(map(int, input().split())))
stu = [[nums+1,student] for nums, student in enumerate(A_i)]

emp = np.full(N, np.nan)
for i, j in stu:
    emp[j-1] = i
    
print(emp.astype('int'))   

import numpy as np

N = int(input())
A_i = np.array(list(map(int, input().split())))
stu = [[nums+1,student] for nums, student in enumerate(A_i)]

hh = np.full(N, np.nan)
for i, j in stu:
    hh[j-1] = i
    print(hh[j-1].astype('int'))

import numpy as np

N = int(input())
A_i = np.array(list(map(int, input().split())))
stu = [[nums+1,student] for nums, student in enumerate(A_i)]

hh = np.full(N, np.nan)
for i, j in stu:
    hh[j-1] = i
    
print(hh.astype('int'))

import numpy as np

N = int(input())
A_i = np.array(list(map(int, input().split())))
stu = [[nums+1,student] for nums, student in enumerate(A_i)]

hh = np.full(N, np.nan)
for i, j in stu:
  hh[j-1] = i

print(hh.astype('int'))

import numpy as np
 
N = int(input())
A_i = np.array(list(map(int, input().split())))
stu = [[nums+1,student] for nums, student in enumerate(A_i)]
 
emp = np.full(N, np.nan)
for i, j in stu:
    emp[j-1] = i

print(*emp.astype('int'), sep=" ")

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
# -*- coding: utf-8 -*-
N = input()
N = int(N)
A = list(map(int, input().split()))

for i in range(len(A)):
	A[i] = [A[i], i]
A.sort()
for j in range(len(A)):
	A[j] = str(A[j][1] )
print(' '.join(A))

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
dic = {}

A = list(map(int, input().split()))
k = []
ANS = []
for i in range(1, N+1):
  k.append(i)

dic = dict(zip(k, A))
dic = dict(sorted(dic.items(), key=lambda x:x[0]))

for key in dic:
  ANS.append(key)

for b in range(N):
  print(ANS[b], end=" \n"[b + 1 == N])

N = int(input())
dic = {}
dic2 = {}
A = list(map(int, input().split()))
k = []
ANS = []
for i in range(1, N+1):
  k.append(i)

dic = dict(zip(k, A))
dic2 = dict(sorted(dic.items(), key=lambda x:x[1]))

for key in dic2:
  ANS.append(key)

for b in range(N):
  print(ANS[b], end=" \n"[b + 1 == N

N = int(input())
d = []

A = list(map(int, input().split()))
k = []
ANS = []
for i in range(1, N+1):
  k.append(i)

d = list(zip(k, A))
d.sort(key=lambda x:x[0])

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

N = int(input())
dic = {}
dic2 = {}
A = list(map(int, input().split()))
k = []
ANS = []
for i in range(1, N+1):
  k.append(i)

dic = dict(zip(k, A))
dic2 = dict(sorted(dic.items(), key=lambda x:x[1]))
print(dic2)
for key in dic2:
  ANS.append(key)

for b in range(N):
  print(ANS[b], end=" \n"[b + 1 == N])

N = int(input())
d = []

A = list(map(int, input().split()))
k = []
ANS = []
for i in range(1, N+1):
  k.append(i)

d = list(zip(k, A))
d.sort(key=lambda x:x[1])

for b in range(N):
  print(d[b][0], end=" \n"[b + 1 == N])

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
aaa = list(map(int, input().split()))
bbb = sorted(list(enumerate(aaa, start=1)), key=itemgetter(1))
print(*map(itemgetter(0), bbb))

from operator import itemgetter
n = int(input())
aaa = list(map(int, input().split()))
bbb = sorted(list(enumerate(aaa, start=1)), key=itemgetter(1))
print(*map(itemgetter(0), bbb))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
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)

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

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)

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

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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(b)

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(*b)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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)

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)




Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
from operator import itemgetter

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

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


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

print(*[t[1] for t in sorted(zip(A, range(1, N + 1)))])


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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+=j
  c+=' '
print(c[:-1])

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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
order = input().split()
a = sorted(order)
for i in a:
    print(order.index(i)+1, end=" ")


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

    ans = [0 for _ in range(n)]
    for i in range(n):
        ans[a[i]-1] = i+1
    print(' '.join(map(str,ans)))

if __name__ == "__main__":
    main()

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
a = list(map(int, input().split()))
A = []
for index, i in enumerate(a):
  A[i] = index + 1
print(A)

n = int(input())
a = list(map(int, input().split()))
A = []
for index, i in enumerate(a):
  A[i -1] = index + 1
print(' '.join(A))

n = int(input())
a = list(map(int, input().split()))
A = [0]*n
for index, i in enumerate(a):
  A[i -1] = str(index + 1)
print(' '.join(A))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
a = list(map(int, input().split()))
a_sort = sorted(a)

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

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

for i, name in enumerate(a):
  a_sort[name-1] = i + 1
print(' '.join(a_sort))


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

for i, name in enumerate(a):
  a_sort[name-1] = str(i + 1)
print(' '.join(a_sort))


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
A = list(map(int, input().split()))

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

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)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
A = list(map(int, input().split()))
B = [(A[i],i) for i in range(N)]
B.sort()
for b in B:
    print(b[1])

input_line_no = 0
N = int(input())
A = list(map(int, input().split()))
B = [(A[i],i+1) for i in range(N)]
B.sort()
C = [str(b[1]) for b in B]
print(' '.join(C))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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) 




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) 






Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import heapq
n = int(input())
a = list(map(int,input().split()))
p = []
for b in a:
  heapq.heappush(p,b)
for i in range(n):
  x = heapq.heappop(p)
  y = a.index(x)
  print(y+1,end=' ')

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

Verdicts: Time Limit Exceeded

Accepted