Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import math
A,B = map(int, input().split())

 

 
for i in range(1,100001):
    if A == int(i * 0.08) and B == int(i * 0.1):
        print(i)
        sys.exit()
 
print(-1)

Fixed submission:
import sys

a, b = [int(w) for w in input().split()]

max_n = (b + 1) * 10

for i in range(max_n):
    if a == int(i * 0.08) and b == int(i * 0.1):
        print(i)
        sys.exit()

print(-1)
Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
S = input()
S  = deque(S)
Q = int(input())

for _ in range(Q):
    string = (input())
    Query = string.replace(' ', '')
    Query = list(Query)

    if Query[0] == "1":
        S = list(S)
        S = S[::-1]
        S= deque(S)
    else:
        if Query[1] == "1":
            S.appendleft(Query[2])
        else:
            S.append(Query[2])

S = list(S)
ans = "".join(S)
print(ans)


Fixed submission:
from collections import deque
S = input()
S  = deque(S)
Q = int(input())

# 0の時は普通、1の時は反転状態
Reverse_Flag = 0  

for _ in range(Q):
    string = (input())
    Query = string.replace(' ', '')
    Query = list(Query)

    if Query[0] == "1":
        if Reverse_Flag == 0:
            Reverse_Flag = 1
        else:
            Reverse_Flag = 0
    
    elif  Query[1] == "1":
        if Reverse_Flag == 0:
            S.appendleft(Query[2])
        else:
            S.append(Query[2])

    else:
        if Reverse_Flag == 0:
            S.append(Query[2])
        else:
            S.appendleft(Query[2])

if Reverse_Flag == 1:
    S = list(S)
    S = S[::-1]
    print("".join(S))
else:
    S = list(S)
    print("".join(S))

Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
S = input()
S  = deque(S)
Q = int(input())

for _ in range(Q):
    string = (input())
    Query = string.replace(' ', '')
    Query = list(Query)

    if Query[0] == "1":
        S = list(S)
        S = S[::-1]
        S= deque(S)
    else:
        if Query[1] == "1":
            S.appendleft(Query[2])
        else:
            S.append(Query[2])

S = list(S)
ans = "".join(S)
print(ans)

Fixed submission:
from collections import deque
S = input()
S  = deque(S)
Q = int(input())

# 0の時は普通、1の時は反転状態
Reverse_Flag = 0  

for _ in range(Q):
    string = (input())
    Query = string.replace(' ', '')
    Query = list(Query)

    if Query[0] == "1":
        if Reverse_Flag == 0:
            Reverse_Flag = 1
        else:
            Reverse_Flag = 0
    
    elif  Query[1] == "1":
        if Reverse_Flag == 0:
            S.appendleft(Query[2])
        else:
            S.append(Query[2])

    else:
        if Reverse_Flag == 0:
            S.append(Query[2])
        else:
            S.appendleft(Query[2])

if Reverse_Flag == 1:
    S = list(S)
    S = S[::-1]
    print("".join(S))
else:
    S = list(S)
    print("".join(S))
Buggy python submission (verdict: Runtime Error):
import sys
N, M = map(int, input().split())

#とりまぶっこむ 
SClis = [] 
for _ in range(M):
    a, b = map(int, input().split())
    SClis.append([a,b])

ans = [-1]*N

for i in range(M):
    singlelis = SClis[i]
    S =  (singlelis[0] - 1)
    C =  (singlelis[1])
    
    if ans[S] != -1 and ans[S] != C:
        print(-1)
        sys.exit()
    else:
        ans[S] = C


    
if N == 1:
    if ans[0] == -1:
        ans[0] = 0
        print(''.join(map(str, ans)))
        sys.exit()

if N != 1:
    if ans[0] == 0:
        print(-1)
        sys.exit()
    
    if ans[0] == -1:
        ans[0] = 1
    
    for i in range(1,N):
        if ans[i] == -1:
            ans[i] = 0

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


Fixed submission:
N = int(input())
if N % 2 == 0:
    print(int(N/2))
else:
    print(int(N//2)+1)
Buggy python submission (verdict: Runtime Error):
import sys
N, M = map(int, input().split())

SClis = [] 
for _ in range(M):
    a, b = map(int, input().split())
    SClis.append([a,b])

ans = [-1]*N


for singlelis in SClis:
    digits = singlelis[0]-1
    number = singlelis[1]

    if ans[digits] == -1 or ans[digits] == number:
        ans[digits] = number
    else:
        print(-1)
        sys.exit()

if ans[0] == 0:
    print(-1)
    sys.exit()


kotae = ""
for i in range(N):
    i_str = str(ans[i])

    if i == 0 and i_str == "-1":
        kotae = kotae + "1"
        

    if i_str == "-1" and i != 0:
        kotae = kotae + "0"
    elif i_str != "-1" and i != 0:
        kotae = kotae + i_str

print(int(kotae))
     



Fixed submission:
import sys
N, M = map(int, input().split())

#とりまぶっこむ 
SClis = [] 
for _ in range(M):
    a, b = map(int, input().split())
    SClis.append([a,b])

ans = [-1]*N

for i in range(M):
    singlelis = SClis[i]
    S =  (singlelis[0] - 1)
    C =  (singlelis[1])
    
    if ans[S] != -1 and ans[S] != C:
        print(-1)
        sys.exit()
    else:
        ans[S] = C


    
if N == 1:
    if ans[0] == -1:
        ans[0] = 0
        print(''.join(map(str, ans)))
        sys.exit()

if N != 1:
    if ans[0] == 0:
        print(-1)
        sys.exit()
    
    if ans[0] == -1:
        ans[0] = 1
    
    for i in range(1,N):
        if ans[i] == -1:
            ans[i] = 0

print(''.join(map(str, ans)))
Buggy python submission (verdict: Time Limit Exceeded):
import collections
import sys
N = int(input())
S = [input() for _ in range(N)]

c = collections.Counter(S)
ans = []

for i in range(len(c.most_common())):
    if i == 0:
        ans.append(((c.most_common()[0][0])))
    
    if i != 0:
        if (c.most_common()[i-1][1]) == (c.most_common()[i][1]):
            
            ans.append(((c.most_common()[i][0])))
        else:
            break

ans.sort()
 
for i in ans:
    print(i)

Fixed submission:
import collections
import sys
N = int(input())
S = [input() for _ in range(N)]

c = collections.Counter(S)
ans = []
li=c.most_common()
for i in range(len(li)):
    if i == 0:
        ans.append(((li[0][0])))
    
    if i != 0:
        if (li[i-1][1]) == (li[i][1]):
            
            ans.append(((li[i][0])))
        else:
            break

ans.sort()

for i in ans:
    print(i)
Buggy python submission (verdict: Runtime Error):
import sys
A = list(map(int, input().split()))
N = int(input())

if len(A) == len(set(A)):
    print("YES")
else:
    print("NO")


Fixed submission:
s,t = input().split()
a,b = map(int,input().split())
u = input()
 
if u == s:
    print(a - 1, b)
else:
    print(a, b- 1)
Buggy python submission (verdict: Runtime Error):
import sys
A = list(map(int, input().split()))
N = int(input())

if len(A) == len(set(A)):
    print("YES")
else:
    print("NO")


Fixed submission:
import sys
N = int(input())
A = list(map(int, input().split()))
if len(A) == len(set(A)):
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
import sys
A = list(map(int, input().split()))
n = int(input())

if len(A) == len(set(A)):
    print("YES")
else:
    print("NO")

Fixed submission:
import sys
N = int(input())
A = list(map(int, input().split()))
if len(A) == len(set(A)):
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())

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


def CalculateExpectedValu(n):
    bunbo = 1 / n
    ans = 0

    for i in range(1,n+1):
        ans = ans + (i*bunbo)

    return ans

number = 0
CumulativeSum = [0]

for i in P:
    number = number + CalculateExpectedValu(i)
    CumulativeSum.append(number)

ans = 0



for i in range(0 , (len(CumulativeSum)-K)):
    tmpans = CumulativeSum[i+K] - CumulativeSum[i]
    ans = max(ans, tmpans)

print(ans)


Fixed submission:
N, K = map(int, input().split())

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


def CalculateExpectedValu(n):
    bunbo = 1 / n
    ans = 0

    for i in range(1,n+1):
        ans = ans + (i*bunbo)

    return ans

number = 0
CumulativeSum = [0]

for i in P:
    number = number + CalculateExpectedValu(i)
    CumulativeSum.append(number)

ans = 0



for i in range(0 , (len(CumulativeSum)-K)):
    tmpans = CumulativeSum[i+K] - CumulativeSum[i]
    ans = max(ans, tmpans)

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
N = int(input())
P = list(map(int, input().split()))

ans = 0

for i in range(N):
    count = 0
    for j in P[0:i]:
        if P[i] <= j:
            count = count + 1
        
    if count == len(P[0:i]):
        ans = ans + 1  

print(ans)

Fixed submission:
N = int(input())
P = list(map(int, input().split()))

result = 0
m = P[0]
for i in range(N):
    if P[i] <= m:
        result += 1
        m = P[i]
print(result)
Buggy python submission (verdict: Runtime Error):
H = int(input())
W = int(input())
N = int(input())

if H <= W:
    if N % W == 0:
        print(N/W)
    else:
        print((N//W) + 1)
else:
    if N % H == 0:
        print(int(N/H)
    else:
        print(int((N//H) + 1))

Fixed submission:
H = int(input())
W = int(input())
N = int(input())

if H <= W:
    if N % W == 0:
        print(int(N/W))
    else:
        print(int((N//W) + 1))
else:
    if N % H == 0:
        print(int(N/H))
    else:
        print(int((N//H) + 1))
Buggy python submission (verdict: Runtime Error):
A = list(map(int, input().split()))

SUM_A = sum(A)

if SUM_A <= 21:
    pritn("win") 
else:
    print("bust")

Fixed submission:
A = list(map(int, input().split()))

SUM_A = sum(A)

if SUM_A <= 21:
    print("win") 
else:
    print("bust")
Buggy python submission (verdict: Runtime Error):
S = "redcoder"

ans = 0

ALEN = (len(A))
 
B = list(A)
 
 
 
B_re =  list(reversed(B))
 
ans = 0
 
 
for i in range(ALEN):
    if B[i] != B_re[i]:
        ans = ans+1
    
if ans　% 2 == 0:
    print(ans//2)
elif ans %2 != 0:
    print((ans//2) +1)
elif ans == 0:
    print(0)

Fixed submission:
S = input()

ans = 0

ALEN = (len(S))
 
B = list(S)
 
 
 
B_re =  list(reversed(B))
 
ans = 0
 

 
for i in range(ALEN):
  if B[i] != B_re[i]:
        ans = ans+1
    
if ans % 2 == 0:
    print(ans//2)
elif ans %2 != 0:
    print((ans//2) +1)
elif ans == 0:
    print(0)
Buggy python submission (verdict: Runtime Error):
import sys
import math

N = input()

if int(N) <= 100:
    print("0")
    sys.exit()

if int(N) % 100 == 0:
    print("1")
    sys.exit()

tmp = (int(N) - (int(N)//100)*100)

if tmp <= 5:
    print("1")
    sys.exit()

tmp2 = math.ceil(tmp/5)

if int(N) <= tmp2*105:
    print("0")
else:
    print("1")


Fixed submission:
M1,D1= map(int, input().split())
M2,D2 = map(int, input().split())

if D1 + 1 == D2:
    print(0)
else:
    print(1)

Buggy python submission (verdict: Runtime Error):
N = int(input())

a = N/1.08

a1 = round(a)

a2 = int(a1*1.08)

if a2 == N:
    print(a1)
else:
    print(":(")

Fixed submission:
M1,D1= map(int, input().split())
M2,D2 = map(int, input().split())

if D1 + 1 == D2:
    print(0)
else:
    print(1)

Buggy python submission (verdict: Runtime Error):
N=1079

a = N/1.08

a1 = round(a)

a2 = int(a1*1.08)

if a2 == N:
    print(a1)
else:
    print(:()


Fixed submission:
M1,D1= map(int, input().split())
M2,D2 = map(int, input().split())

if D1 + 1 == D2:
    print(0)
else:
    print(1)
Buggy python submission (verdict: Runtime Error):
N=1079

a = N/1.08

a1 = round(a)

a2 = int(a1*1.08)

if a2 == N:
    print(a1)
else:
    print(:()


Fixed submission:
import math
import sys
N = int(input())

for i in range(1,50001):
    if math.floor(i * 1.08) == N:
        print(i)
        sys.exit()

print(":(")

Buggy python submission (verdict: Runtime Error):
N = int(input())

a = N/1.08

a1 = round(a)

a2 = int(a1*1.08)

if a2 == N:
    print(a1)
else:
    print(:()


Fixed submission:
import math
import sys
N = int(input())

for i in range(1,50001):
    if math.floor(i * 1.08) == N:
        print(i)
        sys.exit()

print(":(")
Buggy python submission (verdict: Runtime Error):
S = input()

if S == ("SUN"):
    pritn(7)
elif S == ("MON"):
    print(5)
elif S == ("TUE"):
    print(4)
elif S == ("WED"):
    print(3)
elif S == ("THU"):
    print(2)
elif S == ("FRI"):
    print(1)
elif S == ("SAT"):
    print(1)

Fixed submission:
S = input()

if S == ("SUN"):
    print(7)
elif S == ("MON"):
    print(6)
elif S == ("TUE"):
    print(5)
elif S == ("WED"):
    print(4)
elif S == ("THU"):
    print(3)
elif S == ("FRI"):
    print(2)
elif S == ("SAT"):
    print(1)

Buggy python submission (verdict: Runtime Error):
S = input()

if S == ("SUN"):
    pritn(7)
elif S == ("MON"):
    print(6)
elif S == ("TUE"):
    print(5)
elif S == ("WED"):
    print(4)
elif S == ("THU"):
    print(3)
elif S == ("FRI"):
    print(2)
elif S == ("SAT"):
    print(1)

Fixed submission:
S = input()

if S == ("SUN"):
    print(7)
elif S == ("MON"):
    print(6)
elif S == ("TUE"):
    print(5)
elif S == ("WED"):
    print(4)
elif S == ("THU"):
    print(3)
elif S == ("FRI"):
    print(2)
elif S == ("SAT"):
    print(1)

Buggy python submission (verdict: Runtime Error):
S = input()

if S == ("SUN"):
    pritn(7)
elif S == ("MON"):
    print(6)
elif S == ("TUE"):
    print(5)
elif S == ("WED"):
    print(4)
elif S == ("THU"):
    print(3)
elif S == ("FRI"):
    print(2)
elif S == ("SAT"):
    print(1)

Fixed submission:
S = input()

if S == ("SUN"):
    print(7)
elif S == ("MON"):
    print(6)
elif S == ("TUE"):
    print(5)
elif S == ("WED"):
    print(4)
elif S == ("THU"):
    print(3)
elif S == ("FRI"):
    print(2)
elif S == ("SAT"):
    print(1)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))

ans = float('inf') 
sum_A = sum(A)
CumSum = 0


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

print(ans)


Fixed submission:
X,Y = map(int, input().split())

trd = 100000
srd = 200000
onrd = 300000

if X == 3 and 3 < Y:
    print(trd)
elif X == 2 and 3 < Y:
    print(srd)
elif X == 1 and 3 < Y:
    print(onrd)
elif Y == 3 and 3 < X:
    print(trd)
elif Y == 2 and 3 < X:
    print(srd)  
elif Y == 1 and 3 < X:
    print(onrd)
elif X == 3 and Y == 3:
    print((trd)+(trd))
elif X == 3 and Y == 2:
    print((trd) +(srd))
elif X == 3 and Y == 1:
    print((trd)+(onrd))
elif X == 2 and Y == 3:
    print((srd)+(trd))
elif X == 2 and Y == 2:
    print((srd)+(srd))
elif X == 2 and Y == 1:
    print((srd)+(onrd))
elif X == 1 and Y == 3:
    print((onrd)+(trd))
elif X == 1 and Y == 2:
    print((onrd) + (srd))
elif X == 1 and Y == 1:
    print((onrd)+(onrd) + 400000)
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
X,Y = map(int, input().split())

3rd = 100000
2rd = 200000
1rd = 300000

if X == 3 and 3 < Y:
    print(3rd)
elif X == 2 and 3 < Y:
    print(2rd)
elif X == 1 and 3 < Y:
    print(1rd)
elif Y == 3 and 3 < X:
    print(3rd)
elif Y == 2 and 3 < X:
    print(2rd)  
elif Y == 1 and 3 < X:
    print(1rd)
elif X == 3 and Y == 3:
    print((3rd)+(3rd))
elif X == 3 and Y == 2:
    print((3rd) +(2rd))
elif X == 3 and Y == 1:
    print((3rd)+(1rd))
elif X == 2 and Y == 3:
    print((2rd)+(3rd))
elif X == 2 and Y == 2:
    print((2rd)+(2rd))
elif X == 2 and Y == 1:
    print((2rd)+(1rd))
elif X == 1 and Y == 3:
    print((1rd)+(3rd))
elif X == 1 and Y == 2:
    print((1rd) + (2rd))
elif X == 1 and Y == 1:
    print((1rd)+(1rd) + 400000)
else:
    print(0)

Fixed submission:
X,Y = map(int, input().split())

trd = 100000
srd = 200000
onrd = 300000

if X == 3 and 3 < Y:
    print(trd)
elif X == 2 and 3 < Y:
    print(srd)
elif X == 1 and 3 < Y:
    print(onrd)
elif Y == 3 and 3 < X:
    print(trd)
elif Y == 2 and 3 < X:
    print(srd)  
elif Y == 1 and 3 < X:
    print(onrd)
elif X == 3 and Y == 3:
    print((trd)+(trd))
elif X == 3 and Y == 2:
    print((trd) +(srd))
elif X == 3 and Y == 1:
    print((trd)+(onrd))
elif X == 2 and Y == 3:
    print((srd)+(trd))
elif X == 2 and Y == 2:
    print((srd)+(srd))
elif X == 2 and Y == 1:
    print((srd)+(onrd))
elif X == 1 and Y == 3:
    print((onrd)+(trd))
elif X == 1 and Y == 2:
    print((onrd) + (srd))
elif X == 1 and Y == 1:
    print((onrd)+(onrd) + 400000)
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))

ans = 10**8 
sum_A = sum(A)
t = 0


for i in range(N-1):
  hoge = hoge + A[i]
  ans = min(ans,abs(sum_A - (hoge*2)))

print(ans)

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

ans = float('inf')
sum_A = sum(A)
hoge = 0


for i in range(N-1):
  hoge = hoge + A[i]
  ans = min(ans,abs(sum_A - (hoge*2)))

print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))

ans = 10**8 
sum_A = sum(A)
hoge = 0


for i in range(N-1):
  CumSum = CumSum + A[i]
  ans = min(ans,(abs((sum_A - hoge)-(hoge))))

print(ans)

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

ans = float('inf')
sum_A = sum(A)
hoge = 0


for i in range(N-1):
  hoge = hoge + A[i]
  ans = min(ans,abs(sum_A - (hoge*2)))

print(ans)

Buggy python submission (verdict: Runtime Error):
FUCKOFF

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

ans = float('inf')
sum_A = sum(A)
hoge = 0


for i in range(N-1):
  hoge = hoge + A[i]
  ans = min(ans,abs(sum_A - (hoge*2)))

print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
xy = [list(map(int, input().split())) for _ in range(N)]

t = 1
for i in range(1, N - 1):
  t *= i

ans = 0
for i in range(N - 1):
  for j in range(i + 1, N):
    x1, y1 = xy[i]
    x2, y2 = xy[j]
    ans += (((x1 - x2) ** 2 + (y1 - y2) ** 2) ** (1 / 2)) * (N - 1) * 2 * t

n = 1
for i in range(1, N + 1):
  n *= i

ans /= n

print(ans)


Fixed submission:
N = int(input())

print(N*N)
Buggy python submission (verdict: Runtime Error):
S = int(input())
LENS = int((len(S))/2)
mae = S[0:LENS]
usiro = S[LENS:len(S)]

if mae == usiro:
    print("Yes")
else:
    print("No")

    

Fixed submission:
N = int(input())
S = input()
if N%2==1:
    print("No")
else:
    center = int(len(S)/2)
    if S == S[:center]*2:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Runtime Error):
a, b = map(int,input().split())
 
if 1 <= a =<9 and 1 <= b <=9:
    print(a*b)
else:
    print(-1)

Fixed submission:
a, b = map(int,input().split())
if 1 <= a <= 9 and 1 <= b <= 9:
    print(a*b)
else:
    print(-1)

Buggy python submission (verdict: Runtime Error):
a, b = map(int,input().split())
 
if 1<=a=<9 and 1<=b<=9:
    print(a*b)
else:
    print(-1)

Fixed submission:
a, b = map(int,input().split())
if 1 <= a <= 9 and 1 <= b <= 9:
    print(a*b)
else:
    print(-1)

Buggy python submission (verdict: Runtime Error):
a, b = map(int,input().split())
 
if 1<=a=<9 and 1<=b<=9:
  print(a*b)
else:
  print(-1)

Fixed submission:
a, b = map(int,input().split())
if 1 <= a <= 9 and 1 <= b <= 9:
    print(a*b)
else:
    print(-1)

Buggy python submission (verdict: Runtime Error):
a, b = map(int,input().split())
 
if 1<=a=<9 and 1<=b<=9:
  print(a*b)
else:
  print("-1")

Fixed submission:
a, b = map(int,input().split())
if 1 <= a <= 9 and 1 <= b <= 9:
    print(a*b)
else:
    print(-1)

Buggy python submission (verdict: Runtime Error):
a, b = map(int,input().split())
 
if 1<=a=<9 and 1<=b<=9:
  print(a*b)
else:
  pritn("-1")

Fixed submission:
a, b = map(int,input().split())
if 1 <= a <= 9 and 1 <= b <= 9:
    print(a*b)
else:
    print(-1)

Buggy python submission (verdict: Runtime Error):
a, b = map(int,input().split())

if 1<=a=<9,1<=b<=9:
  print(a*b)
else:
  pritn("-1")

Fixed submission:
a, b = map(int,input().split())
if 1 <= a <= 9 and 1 <= b <= 9:
    print(a*b)
else:
    print(-1)
Buggy python submission (verdict: Runtime Error):
A,B= map(int, input().split())

#隠される範囲
C = (B*2)
D = A-C

if D = 0:
    print(0)
else:
    print(D) 

Fixed submission:
A,B= map(int, input().split())

#隠される範囲
B_2 = B*2

if A - B_2 >= 0:
    print(A - B_2)
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
A,B= map(int, input().split())

#隠される範囲
C = (A-(B*2))

if C = 0:
    print(0)
else:
    print(C) 

Fixed submission:
A,B= map(int, input().split())

#隠される範囲
B_2 = B*2

if A - B_2 >= 0:
    print(A - B_2)
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
n = int(input())
student = list(map(int,input().split()))
 
ans = [0] * n   #登校した順番を記録するためのリスト
 
for i in range(n):
    s = student[i]   #出席番号がiの人が来た時に、既にs人いました。
    ans[s-1] = i+1 　#なのでansリスト(来た順に対応させる)のs-1番目(リストの仕様)に出席番号iの人が配属されます。

print(*ans)

Fixed submission:
n = int(input())
student = list(map(int,input().split()))
 
ans = [0] * n   #登校した順番を記録するためのリスト
 
for i in range(n):
    s = student[i]   #出席番号iの生徒が登校した順番をメモ
    ans[s-1] = i+1    #ansに出席番号を書き込む
 
print(*ans)
Buggy python submission (verdict: Time Limit Exceeded):
N,K,Q = map(int, input().split())
A = []
for a in range(Q):
	A.append(int(input()))


for i in range(1,N+1):
    judge = ((K-Q) + (A.count(i)))
    if judge > 0 :
        print("Yes")
    else:
        print("No")

Fixed submission:
N,K,Q = map(int, input().split())
A = []
for a in range(Q):
	A.append(int(input()))


P = [K-Q] * N
for i in range(Q):
    P[A[i]-1] += 1
for i in range(N):
    if P[i] <= 0:
        print("No")
    else:
        print("Yes")

Buggy python submission (verdict: Time Limit Exceeded):
N,K,Q = map(int, input().split())
A = []
for a in range(Q):
	A.append(int(input()))
Players_Number = []

for i in range(1,N+1):
    Players_Number.append(i)

for i in Players_Number:
    judge = ((K-Q) + (A.count(i)))
    if judge > 0 :
        print("Yes")
    else:
        print("No")

Fixed submission:
N,K,Q = map(int, input().split())
A = []
for a in range(Q):
	A.append(int(input()))


P = [K-Q] * N
for i in range(Q):
    P[A[i]-1] += 1
for i in range(N):
    if P[i] <= 0:
        print("No")
    else:
        print("Yes")

Buggy python submission (verdict: Time Limit Exceeded):
N,K,Q = map(int, input().split())
A = []
for a in range(Q):
	A.append(int(input()))

#参加者の持ちスコア
PlayersScore = []
for i in range(N):
    PlayersScore.append(K)

for i in (A):
    number = (i-1)
    for j  in range(N):
        if j != number:
            PlayersScore[j] = (PlayersScore[j] - 1)

for k in PlayersScore:
    if k > 0 :
        print("Yes")
    else:
        print("No")

Fixed submission:
N,K,Q = map(int, input().split())
A = []
for a in range(Q):
	A.append(int(input()))


P = [K-Q] * N
for i in range(Q):
    P[A[i]-1] += 1
for i in range(N):
    if P[i] <= 0:
        print("No")
    else:
        print("Yes")
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

#tempは空白の箱に過ぎず、一番最初のfor文では確定演出で問答無用にXの値になる。
#for文が2週目に突入してからが、tempの分かれ目。2回目のfor文でも一致はせず素直に3が代入される。
#最後のif文　temp == x-1 が一致するのは　１回目と2回目　or 2回目と3回目が連番。つまり-1して一致すれば連続


#満足度を記録していくための変数
cnt = 0

#1つ前に食べた料理を記録するための変数
temp = ""

#料理を食べた順番に処理していく
for x in A:
    
    #食べた料理の満足度を追加
    cnt += B[x-1]
    
    #今食べた料理が1つ前に食べた料理のi+1かどうかを確認
    if temp == x - 1:
        cnt += C[temp-1]
        
    #今食べた料理を記録    
    temp = x
#全ての料理に対して処理が終わったら満足度を出力   
print(cnt)

Fixed submission:
N = int(input())

print(N**3)
Buggy python submission (verdict: Runtime Error):
n=int(input())
print((n-1)*n//2)


Fixed submission:
S = input()
T = input()

cnt = 0

for i in range(len(S)):
    if S [i] == T[i]:
        cnt += 1

print(cnt)
Buggy python submission (verdict: Runtime Error):
import sys
N = int(input())
H = list(map(int, input().split()))
ans_lis = []
ans = 0
for i in range(N):
    for j in range(i,N-1):
        if H[j] >= H[j+1]:
            ans = ans + 1
        else:
            ans_lis.append(ans)
            ans = 0
print(max(ans_lis))

Fixed submission:
n=int(input())
h=[int(i) for i in input().split()]
c=0
d=c
for i in range(n-1):
    if h[i]>=h[i+1]:
        c+=1
    else:
        d=max([c,d])
        c=0

print(max([c,d]))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

ans = 0
for i in range(N,1,-1):
    ans = ans + i-1

print(ans)

Fixed submission:
n=int(input())
print((n-1)*n//2)