TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: N friends of Takahashi has come to a theme park.  To ride the most popular roller coaster in the park, you must be at least K centimeters tall.  The i-th friend is h_i centimeters tall.  How many of the Takahashi's friends can ride the roller coaster?

Submission attempts (in order):
x,y=map(int,input().split())
m=list(map(int,input().split())
ans=0
for i in m:
    if m[i]>=y:
        ans += 1
print(ans)
      

x,y=map(int,input().split())
m=list(map(int,input().split())
ans=0
for i in m:
       if m[i]>=y:
       ans += 1
print(ans)

x,y=map(int,input().split())
m=list(map(int,input().split()))
ans=0
for i in m:
    if m[i]>=y:
        ans += 1
print(ans)


x,y=map(int,input().split())
m=list(map(int,input().split()))
ans=0
for i in m:
    if i>=y:
        ans += 1
print(ans)


Verdicts: Runtime Error

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

Alist = [[idx+1, a] for (idx, a) in enumerate(Alist)]

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

ans = [a for a, _ in Alist]
print(" ".join(ans))

N = int(input())
Alist = list(map(int, input().split()))
 
Alist = [[idx+1, a] for (idx, a) in enumerate(Alist)]
 
Alist.sort(key=lambda x:x[1])
 
ans = [str(a) for a, _ in Alist]
print(" ".join(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())
l=list(map(int,input().split()))
ans=[]
for i in range(1,len(l)+1):
    ans.append(l.index(i)+1)
print (ans, end=" ")

n=int(input())
l=list(map(int,input().split()))
ans=[None]*n
i=1
for index in l:
  ans[index-1]=str(i)
  i+=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())
An = list(map(int, input().split()))
order = []

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

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

for i, num in enumerate(An):
    ans[num-1] = i+1

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

answer = [0] * len(A)
for i, Ai, in enumerate(A):
    answer[Ai - 1] = str(i + 1)
answer = ' '.join(answer)

print(answer)


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

answer = [0] * N
for i, Ai, in enumerate(A):
    answer[Ai - 1] = str(i + 1)
answer = ' '.join(answer)

print(answer)


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


from fractions import gcd
from math import sqrt

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


from fractions import gcd

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


from fractions import gcd

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


R = lambda: map(int, input().split())
n, = R()
a = list(R())
print(*sorted(range(1, n + 1), key=lambda x: a[x - 1]))


Verdicts: Runtime Error

Runtime Error

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):
def main():
    N = int(input())
    a = input().split(" ")
    dict = {}
    for i in range(N):
        dict[int(a[i])] = str(i + 1)
    ans = ""
    for j in range(N):
        ans = ans + dict[j + 1] + " "
    print(ans)


if __name__ == '__main__':
    main()

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


if __name__ == '__main__':
    main()

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())
ans = [0]*N
num = 1
for i in A:
    ans[i-1] = num
    num += 1
print(ans)

N = int(input())
A = map(int, input().split())
ans = [0]*N
num = 1
for i in A:
    ans[i-1] = num
    num += 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())
_ = list(map(int, input()))
a = []
for i in range(1,n+1):
  a.append(_[i-1], i)
  
ans = []
a_sort = (sorted(a, key=lambda x: x[0]))
for i in range(n):
  ans.append(a_sort[i][1])
  
print(' '.join(list(map(str, ans))))

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

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

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

import numpy as np

A = np.array(A)
print(' '.join([str(i + 1) for i in A.argsort()]))

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()))
B=[0]*n
cnt = 1
for a in A:
	B[a-1]=cnt
	cnt += 1
print(B)

n=int(input())
A=list(map(int,input().split()))
B=[0]*n
cnt = 1
for a in A:
	B[a-1]=str(cnt)
	cnt += 1
print(" ".join(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()))
S = [0] * (10 ** 5)
for i,a in enumerate(A):
    S[a] = i + 1
    # print(A[i] + 1)
    # print(a)

for n in range(N + 1):
    if n != 0:
        print(S[n],end=" ")
        

N = int(input())
A = list(map(int,input().split()))
S = [0] * (10 ** 5 + 2)
for i,a in enumerate(A):
    S[a] = i + 1
    # print(A[i] + 1)
    # print(a)

for n in range(1,N + 1):
    if n == N + 1 or n == N:
        print(S[n])
    else:
        print(S[n],end=" ")


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, 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] = str(i+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):
from math import gcd, sqrt


def is_prime(n):
    flag = True
    for k in range(2, int(sqrt(n)) + 1):
        if n % k == 0:
            flag = False
            return

    if flag:
        return n


def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors


def main():
    a, b = map(int, input().split())
    coms = make_divisors(gcd(a, b))
    # print(coms)
    ans = [is_prime(i) for i in coms]
    # print(ans)
    ans2 = [a for a in ans if a is not None]
    print(len(ans2))


if __name__ == "__main__":
    main()


def main():
    n = int(input())
    a = list(map(int, input().split()))
    ans = []
    a = {i: k for i, k in enumerate(a, start=1)}
    a = sorted(a.items(), key=lambda a: a[1])
    for i in a:
        ans.append(i[0])

    print(*ans)


if __name__ == "__main__":
    main()


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

classmate = [[0] * 2 for i in range(N)]

for i in range(len(number_classmate)):
    classmate[i][0] = number_classmate[i]
    classmate[i][1] = i+1
print(classmate)

classmate.sort(key=lambda s: s[0])

mapped_list = map(str, list(i[1] for i in classmate))
first_index = ' '.join(mapped_list)

print(first_index)





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

classmate = [[0] * 2 for i in range(N)]

for i in range(len(number_classmate)):
    classmate[i][0] = number_classmate[i]
    classmate[i][1] = i+1

classmate.sort(key=lambda s: s[0])

mapped_list = map(str, list(i[1] for i in classmate))
first_index = ' '.join(mapped_list)

print(first_index)



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):
import copy
N=int(input())
L=[int(x) for x in input().split()]
L0=copy.copy(L)
L.sort()
Ans=[]

for i in range(N):
	for j in range(N):
		if L[i]==L0[j]:
			Ans.append(j+1)

print(Ans)

import copy
N=int(input())
L=[int(x) for x in input().split()]
Ans=[0]*N

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

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

n = int(input())
a = [int(i) for i in input().split()]
ans = ''
for i in range(1,n+1):
    ans+=(str(a.index(i)+1)+' ')
print(ans)

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

Verdicts: 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):
a=int(input())
b=[0]*a
c=list(map(int,input().split()))

for i in range(a):
  b[c[i]-1]+=i+1
print(b)

n=int(input())
a= list(map(int, input().split())) 
#a.sort()
#print(a)
#print(sum(a[:-1])+a[-1]//2)
b=sorted(a)
for i in range(len(a)):
  print(a.index(b[i])+1,end=" ")

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


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


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


a=int(input())
b=[0]*a
c=list(map(int,input().split()))

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

Verdicts: Wrong Answer

Time Limit Exceeded

Runtime Error

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

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


sorted_indices = sorted(range(n), key=lambda i: h_list[i])
answer = [str(sorted_indices[i] + 1) for i in range(n)]
print(' '.join(answer))

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 = [int(i) for i in input().split()]
out = []
for i in range(n):
    out.append(a.index(n-i))
print(reversed(out))

n = int(input())
a = [int(i) for i in input().split()]
out = [] * n
for i in range(n):
    out[i] = (str(a.index(n-i)+1))
print(' '.join(out[::-1]))


n = int(input())
a = [int(i) for i in input().split()]
out = [0] * n
for i in range(len(a)): out[a[i] - 1] = i
print(out)


n = int(input())
a = [int(i) for i in input().split()]
out = [0] * n
for i in range(len(a)): out[a[i] - 1] = i + 1
print(' '.join([str(i) for i in out]))

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=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):
n = int(input())
lst = input().split(" ")

dic = {}
for i, l in enumerate(lst):
  dic[int(l)] = i

ll = []
for i in range(1, n+1):
  ll.append(dic[i])
  
answer = " ".join(ll)
print(answer)

n = int(input())
lst = input().split(" ")

dic = {}
for i, l in enumerate(lst):
  dic[int(l)] = i

ll = []
for i in range(1, n+1):
  ll.append(str(dic[i]))
  
answer = " ".join(ll)
print(answer)

n = int(input())
lst = input().split(" ")

dic = {}
for i, l in enumerate(lst):
  dic[int(l)] = i+1

ll = []
for i in range(1, n+1):
  ll.append(str(dic[i]))
  
answer = " ".join(ll)
print(answer)

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()))
List = [0]*N


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

  
print(" ".joint(ret))





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


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

  
print(" ".join(ret))





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

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






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

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






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


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

  
print(" ".join(List))





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

for i in range(N):
  List.append(str(A.index(i+1)+1))



print(' '.join(List))


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


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

  
print(" ".join(List))





Verdicts: Runtime Error

Runtime Error

Time Limit Exceeded

Time Limit Exceeded

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


print((a.index(i)+1) for i in range(1,n+1))
    



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

from operator import itemgetter
n=int(input())
a=list(map(int,input().split()))

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



Verdicts: Wrong Answer

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

for i in range(N):
    S += str((A.index(i+1))+1) + ' '

print(S)

N = int(input())
A = tuple(map(int,input().split()))
S = ''

for i in range(N):
    n = A.index(i+1)
    S += str(n+1) + ' '

print(S.lstrip())

N = int(input())
A = tuple(map(int,input().split()))
B = list(A)
O = []
S = ''

for i in range(N):
    n = 0
    a = min(B)
    for n in range(len(A)):
        if A[n] == a:
            S += str(n+1) + ' '
            B.remove(min(B))

print(S.lstrip(' '))

N = int(input())
A = tuple(map(int,input().split()))
B = list(A)
O = []

for i in range(N):
    n = 0
    a = min(B)
    for n in range(len(A)):
        if A[n] == a:
            O.append(n+1)
            B.remove(min(B))

S = ''
for j in range(N):
    S += str(O[j]) + ' '

print(S.lstrip(' '))

N = int(input())
A = tuple(map(int,input().split()))
S = ''

for i in range(N):
    n = A.index(i+1)
    S = S + str(n+1) + ' '

print(S)

N = int(input())
A = tuple(map(int,input().split()))
S = ''

for i in range(N):
    n = A.index(i+1)
    S += str(n+1) + ' '

print(S)

N = int(input())
A = tuple(map(int,input().split()))
S = ''

for i in range(N):
    n = A.index(i+1)
    S += str(n+1) + ' '

print(S.lstrip(' '))

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

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

print(*O)

Verdicts: Time Limit Exceeded

Time Limit Exceeded

Time Limit Exceeded

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):
size = int(input())
personList = [int(x) for x in input().split()]
result = list(range(size))
for i, order in enumerate(personList):
  result[order - 1] = i
print(' '.join(map(str, result)))

size = int(input())
personList = [int(x) for x in input().split()]
result = list(range(size))
for i, order in enumerate(personList):
  result[order - 1] = i + 1
print(' '.join(map(str, 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())
al = list(map(int, input().split()))
ans = []
for i in range(1, n+1):
    print(i + 1)

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

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

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


Verdicts: Wrong Answer

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):
n = int(input())
l = list(map(int, input().split()))
res = list(np.argsort(l)+1)
print(" ".join(map(str, res)))


import numpy as np
n = int(input())
l = list(map(int, input().split()))
res = list(np.argsort(l)+1)
print(" ".join(map(str, res)))


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):
import numpy as np

N = int(input())
strA = list(map(int, input().split()))
newstrA = np.array(strA)
print(np.argsort(newstrA)+1)


import numpy as np

N = int(input())
strA = list(map(int, input().split()))
newstrA = np.array(strA)
ans = np.argsort(newstrA)+1
print(' '.join(map(str, 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()))

output=[0]*(N+1)
for i in range(N):
  output[A[i]]=i+1
  
print(' '.join(map(str, output)))

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

output=[0]*(N+1)
for i in range(N):
  output[A[i]]=i+1
  
print(' '.join(map(str, output[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()))
for i in range(1,N+1):
    B.append(A.index(i)+1)
print(' '.join(map(str,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(' '.join(map(str,B)))

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())
students = [int(x) for x in input().split(' ')]
order = [x for x in range(n)]
for s in students:
    order[s-1] = s
print(order)


n = int(input())
students = [int(x) for x in input().split(' ')]
order = [x for x in range(n)]
for i in range(n):
    order[students[i] - 1] = i+1
print(' '.join([str(x) for x in 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):
# coding: utf-8
N = int(input())
A = list(map(int, input().split()))

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

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

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

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

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 = [int(i) for i in input().split()]

ret = [0] * N
for i in range(N):
    print(i, A[i] - 1)
    ret[A[i] - 1] = str(i + 1)
print(" ".join(ret))


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

ret = [0] * N
for i in range(N):
    ret[A[i] - 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):
def ri(): return int(input())
def rli(): return list(map(int, input().split()))
def rls(): return list(map(str, input().split()))
def pl(a): print(" ".join(list(map(str, a))))
def ma():return map(int,input().split())
def nli(x):return [input for _ in range(x)]
def hukusuu(): 
  listA=[] 
  while True:
    try:listA.append(list(map(int,input().split())))
    except:break 
  return listA
from itertools import accumulate as acc 
import operator as op
import copy as cp
import math
from bisect import bisect_left as bisl
from bisect import bisect_right as bisr
def ifif(s):
  if s:print("Yes")
  else:print("No")

n=ri()  
a=rli()
b=[0]*n
for k in range(len(a))
  b(a[k])=k

print(" ".join(b))

def ri(): return int(input())
def rli(): return list(map(int, input().split()))
def rls(): return list(map(str, input().split()))
def pl(a): print(" ".join(list(map(str, a))))
def ma():return map(int,input().split())
def nli(x):return [input for _ in range(x)]
def hukusuu(): 
  listA=[] 
  while True:
    try:listA.append(list(map(int,input().split())))
    except:break 
  return listA
from itertools import accumulate as acc 
import operator as op
import copy as cp
import math
from bisect import bisect_left as bisl
from bisect import bisect_right as bisr
def ifif(s):
  if s:print("Yes")
  else:print("No")

n=ri()  
a=rli()
b=[0]*n
for k in range(len(a)):
  b[a[k]-1]=str(k+1)

print(" ".join(b))


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

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



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

ans = [0] * n

for i in range(n):
    s = A[i]
    ans[s-1] = i+1
print(*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()))
r = ""
for i in set(range(N)):
  r+= str(A.index(i+1)+1)
  r+= " "
print(r)


N = int(input())
A = list(map(int,input().split()))
B = list(range(1,N+1,1))
C = zip(A,B)
C.sort()
a, b = zip(*C)
print(' '.join(b))


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


N = int(input())
A = list(map(int,input().split()))
B = list(range(1,N+1,1))
C = zip(A,B)
C.sort()
a, b = zip(*C)
print(' '.join(b))

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

N = int(input())
A = list(map(int,input().split()))
B = list(range(1,N+1,1))
C = zip(A,B)
C.sort()
a, b = zip(*C)
print(" ".join(str(x) for x in b))

N = int(input())
A = list(map(int,input().split()))
B = list(range(1,N+1,1))
C = zip(A,B)
D = sorted(C)
a, b = zip(*D)
print(" ".join(str(x) for x in b))

Verdicts: Time Limit Exceeded

Runtime Error

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

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(map(str,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=map(int,input().split())
d=[0]*n
for i in range(0,n):
  d[a[i]-1]=i
print(*d)  

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

print(*d)  

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


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


Verdicts: Runtime Error

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):
import numpy as np
N = int(input())
A = [int(x) for x in input().split()]
list= np.arange(1,N+1)
for i in range(N):
    list[A[i]-1]=i+1
print(list)

import numpy as np
N = int(input())
A = [int(x) for x in input().split()]
list= np.arange(1,N+1)
for i in range(N):
    list[A[i]-1]=i+1

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

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()) 
l=list(map(int,input().split())) 
dic_l={} 
lst_1=[] 
for i in range(n): 
  dic_l[l[i]]=i 
  for j in range(1,n+1): 
    lst_1.append(str(dic_l[j]+1)) 
print(" ".join(lst_1))

n=int(input()) 
l=list(map(int,input().split())) 
	dic_l={} 
	lst_1=[] 
	for i in range(n): 
		dic_l[l[i]]=i 
		for j in range(1,n+1): 
			lst_1.append(str(dic_l[j]+1)) 
print(" ".join(lst_1)) 

n=int(input()) 
l=list(map(int,input().split())) 
	dic_l={} 
	lst_1=[] 
	for i in range(n): 
		dic_l[l[i]]=i 
	for j in range(1,n+1): 
		lst_1.append(str(dic_l[j]+1)) 
print(" ".join(lst_1))

n=int(input()) 
l=list(map(int,input().split())) 
dic_l={} 
lst_1=[] 
for i in range(n): 
	dic_l[l[i]]=i 
	for j in range(1,n+1):
		lst_1.append(str(dic_l[j]+1)) 
print(" ".join(lst_1))

n=int(input()) 
l=list(map(int,input().split())) 
dic_l={} 
lst_1=[] 
for i in range(n): 
	dic_l[l[i]]=i 
for j in range(1,n+1):
	lst_1.append(str(dic_l[j]+1)) 
print(" ".join(lst_1))

Verdicts: Runtime Error

Runtime Error

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):
import numpy as np

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

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

import numpy as np

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

ans = [0] * n
for (i,ai) in zip(range(n),a):
    ans[ai-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()))
ans = []
for i in range(1, len(A)+1):
	ans.append(A.index(i+1))
print(*ans)


import sys

readline = sys.stdin.readline

def main():
    N = int(readline())
    A = list(map(int, readline().split()))
    tmp = []
    for i, a in enumerate(A):
        tmp.append((i, a))
    tmp.sort(key=lambda a: a[1])
    ans = []
    for i in tmp:
        ans.append(i[0]+1)
    print(*ans)

if __name__ == "__main__":
    main()


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):
def main():
  import sys
  
  n=int(input())
  a=tuple(map(int,sys.stdin.readline().split()))
  b=[None]*n
  
  for index,number in enumerate(a,1):
    b[index-1]=number
  
  print(" ".join(map(str,b)))
  
if __name__=="__main__":
  main()

def main():
  import sys
  numberOfStudent=int(input())
  orderOfArrive=tuple(map(int,sys.stdin.readline().split()))
  studentArrive=[None]*numberOfStudent
  count=1
  for arrive in orderOfArrive:
    studentArrive[arrive-1]=count
    count+=1
  print(" ".join(map(str,orderOfArrive)))
if __name__=="__main__":
  main()

def main():
  import sys
  a=int(input())
  b=tuple(map(int,sys.stdin.readline().split()))
  c=[[i,b[i-1]] for i in range(1,a+1)]
  d=sorted(c,key=lambda x:x[1])
  e=[i[0] for i in d]
  print(" ".join(map(str,e)))
if __name__=="__main__":
  main()

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

anser = [0]*n

for i in range(n):
  temp = n-(n-a[i])
  anser[temp-1] = i+1
print(anser)
  


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

anser = [0]*n

for i in range(n):
  temp = n-(n-a[i])
  anser[temp-1] = i+1
print(*anser)
  


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()))
#print(N)
#print(a)
b = a.copy()
for i in range(0, len(a)):
    b[a[i]-1] = i+1
    
print(b)

N = int(input())
a = list(map(int, input().split()))
#print(N)
#print(a)
b = a.copy()
for i in range(0, len(a)):
    b[a[i]-1] = str(i+1)
strb = ' '.join(b)
print(strb)

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()))
for i in range(1,n+1):
  print(a.index(i)+1,end=" ")
print()

n=int(input())
a=list(map(int,input().split()))
b=[-1]*n
for i,j in enumerate(a):
  b[j-1]=i+1
print(*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())
people = list(map(int, input().split()))
order = [people.index(i)+1 for i in people]
print(" ".join(map(str, order)))

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

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()))
a1=sorted(a)
ans=''
for i in range(n):
    for j in range(n):
        if a1[i]==a[j]:
            ans+=str(j+1)+' '
print(ans)

n=int(input())
a=list(map(int,input().split()))
ans=''
for i in range(1,n+1):
    ans+=str(a.index(i)+1)+' '
print(ans)

n=int(input())
a=input().split()
ans=['' for _ in range(n)]
for i in range(n):
    s=int(a[i])
    ans[s-1]=str(i+1)
print(' '.join(ans))

Verdicts: Time Limit Exceeded

Time Limit Exceeded

Accepted