Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p02918 (python)

Fixed submission:
N, K = map(int, input().split())
S = input()
count = 0
for i in range(1, N):
  if S[i] == S[i - 1]:
    count += 1
print(min(N - 1, count + K * 2))

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
S = input()
count = 0
for i in range(1, N):
  if S[i] == S[i - 1]:
    c += 1
print(min(N - 1, count + K * 2))

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
S = input().split()

def result(S):
    count = 0
    for i in range(len(S)-1):
        if S[i]==S[i+1]:
            count += 1
    return count
  
def reverse(S, l, r):
    for i in range(l-1, r):
        if S[i] == "R":
            S[i] = "L"
        else:
            S[i] = "R"
        return S
M = 0
for k in range(K):
  for r in range(1, N+1):
      for l in range(1, r+1):
          new = result(reverse(S))
          if new > M:
              M = new
print(new)

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
S = input().split()

def result(S):
    count = 0
    for i in range(len(S)-1):
        if S[i]==S[i+1]:
            count += 1
    return count
  
def reverse(S, l, r):
    for i in range(l-1, r):
        if S[i] == "R":
            S[i] = "L"
        else:
            S[i] = "R"
        return S
M = 0
for r in range(1, N+1):
    for l in range(1, r+1):
        new = result(reverse(S))
        if new > M:
            M = new
print(new)
Problem p02921 (python)

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

count = 0
for _, (s, t) in enumerate(zip(S,T)):
    if s == t:
        count += 1

print(count)

Buggy submission (verdict: Runtime Error):
S = str(input())
T = str(input())

count = 0
for _, s, t in enumerate(zip(S,T)):
    if s == t:
        count += 1

print(count)
Problem p04030 (python)

Fixed submission:
string = input()
result = []
j=0
for i in range(len(string)):
    if string[i]=='0':
        result.append('0')
    elif string[i]=='1':
        result.append('1')
    elif string[i]=='B' and len(result)>=1 and result[-1] in ['0','1']:
        del result[-1]
str_result="".join(result)
print(str_result)

Buggy submission (verdict: Runtime Error):
string = input()
result = []
j=0
for i in range(len(string)):
    if string[i]=='0':
        result.append('0')
    elif string[i]=='1':
        result.append('1')
    elif string[i]=='B' and len(result)>1 and result[-1] in ['0','1']
        result[-1]=""
str_result="".join(result)
print(str_result)
Problem p02909 (python)

Fixed submission:
S = input()

if S == 'Sunny':
  print('Cloudy')
  
if S == 'Cloudy':
  print('Rainy')
  
if S == 'Rainy':
  print('Sunny')

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

if S == 'Sunny':
  print('Cloudy')
  
if S == 'Cloudy':
  print('Rainy')
  
if S == 'Rainy':
  print('Sunny')
Problem p03206 (python)

Fixed submission:
D = int(input())

if D == 25:
  print('Christmas')
  
if D == 24:
  print('Christmas Eve')
  
if D == 23:
  print('Christmas Eve Eve')
  
if D == 22:
  print('Christmas Eve Eve Eve')

Buggy submission (verdict: Runtime Error):
D = int(input())

if D = 25:
  print('Christmas')
  
if D = 24:
  print('Christmas Eve')
  
if D = 23:
  print('Christmas Eve Eve')
  
if D = 22:
  print('Christmas Eve Eve Eve')
Problem p03238 (python)

Fixed submission:
N = int(input())

if N == 1:
    print('Hello World')

else:
     A = int(input())
     B = int(input())
     print(A + B)

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

if N == 1:
    print('Hello World')

if N == 2:
    print(A + B)

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

if N == 1:
    print('Hello Would')

if N == 2:
    print(A + B)
Problem p02817 (python)

Fixed submission:
S,T=map(str,input().split())
print("{}{}".format(T,S))

Buggy submission (verdict: Runtime Error):
S,T=map(str,input().split())
print(f"{T}{S}")
Problem p02818 (python)

Fixed submission:
a, b, k = map(int, input().split(" "))
if a+b <= k:
  print('0 0')
elif a >= k:
  c = a-k
  print(c, ' ', b)
else:
  c = (a+b)-k
  print('0 ', c)

Buggy submission (verdict: Runtime Error):
a, b, k = map(float(), input().split(" "))
if a+b <= k:
  print("0 0")
elif a >= k:
  print(f'{a-k} 0')
else:
  print(f'0 {(a+b)-k}')

Buggy submission (verdict: Runtime Error):
a, b, k = input().split(" ")
if a+b <= k:
  print("0 0")
elif a >= k:
  print(f'{a-k} 0')
else:
  print(f'0 {(a+b)-k}')
Problem p02848 (python)

Fixed submission:
N = int(input())
L = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
S = input()
res = ""

for i in S:
  n = ord(i)
  n = n + N
  if n > ord("Z"):
    n -= 26
  res += L[n - ord("A")]
  
print(res)

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

s = []
L = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
L += L

for i in S:
  s += a[a.find(c) + N]
  
print(*s, sep="")
Problem p02861 (python)

Fixed submission:
import itertools 
n = int(input())
xy = [list(map(int, input().split())) for _ in range(n)]

l = 0
c = 0

for v in itertools.permutations(xy):
  for i in range(len(v)-1):
    l += ((v[i][0] - v[i+1][0])**2 + (v[i][1] - v[i+1][1])**2)**0.5
  c += 1

print(l/c)

Buggy submission (verdict: Runtime Error):
import itertools 
n = int(input())
xy = [list(map(int, input().split())) for _ in range(n)]

l = 0
c = 0

for v in itertools.permutations(xy):
  for i in range(len(v)-1):
    l += ((v[i][0] - v[i+1][0])**2 + v[i][1] - v[i+1][1])**2)**0.5
  c += 1
  
print(l/c)
Problem p02899 (python)

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

Buggy submission (verdict: Runtime Error):
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))

Buggy submission (verdict: Runtime Error):
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))

Buggy submission (verdict: Runtime Error):
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))

Buggy submission (verdict: Runtime Error):
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))
Problem p02922 (python)

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

if C % (A-1) == 0:
  print(C//(A-1)+1)
elif C % (A-1) != 0 :
  print(C//(A-1)+2)

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

a = 1
count = 0

while True:
  if a >= B:
    print(count)
    exit()
  a = a - 1 + A
  cnt += 1
Problem p02924 (python)

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

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

l = list(range(1,N+1)) 
I = list(range(1,N))
l.pop(0)

print(sum([x % y for (x,y) in zip(I, l)]))

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

l = list(range(1,N+1)) ## 1~Nのリスト
I = list(range(1,N))
l.pop(0)

print(sum([x % y for (x,y) in zip(I, l)]))

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

l = list(range(1,N+1)) ## 1~Nのリスト
I = list(range(1,N+1))

a = l.pop(0)
l.append(a)

print(sum([x % y for (x,y) in zip(I, l)]))

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

l = list(range(1,N+1)) ## 1~Nのリスト
I = compy.deepcopy(l)

a = l.pop(0)
l.append(a)

print(sum([x % y for (x,y) in zip(I, l)]))

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

l = list(range(1,N+1)) ## 1~Nのリスト
I = list(range(1,N+1))

a = l.pop(0)
l.append(a)

L= [x % y for (x,y) in zip(I, l)]

print(sum(L))
Problem p02988 (python)

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

count = 0

for i in range(n-2):
  if p[i]<p[i+1]<p[i+2] or p[i+2]<p[i+1]<p[i]:
    count += 1
    
print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
p = list(map(int, input().split()))

count = 0

for i in range(n-1):
  if p[i]<p[i+1]<p[i+2] or p[i+2]<p[i+1]<p[i]:
    count += 1
    
print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
p = list(map(int, input().split()))

count = 0

for i in range(n):
  if p[i]<p[i+1]<p[i+2] or p[i+2]<p[i+1]<p[i]:
    ans += 1
    
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
p = list(map(int, input().split()))

count = 0

for i in range(len(n)-1):
  if p[i]<p[i+1]<p[i+2] or p[i+2]<p[i+1]<p[i]:
    ans += 1
    
print(ans)
Problem p03000 (python)

Fixed submission:
n, x = map(int, input().split())
l = list(map(int, input().split()))

d = 0
c = 1

for i in range(n):
  d += l[i]
  if d <= x:
    c += 1

    
print(c)

Buggy submission (verdict: Runtime Error):
n, x = map(int, input().split())
l = map(int, input().split())

d = 0
c = 0
for i in range(n):
  d += l[i]
  if d < x:
    c += 1
  else:
    break
    
print(c)
Problem p03239 (python)

Fixed submission:
N,T=map(int,input().split())
m=1001
for i in range(N):
    c,t=map(int,input().split())
    if t<=T:m=min(m,c)
print("TLE" if m==1001 else m)

Buggy submission (verdict: Runtime Error):
N, T = map(int, input.split())
c_max = 1001

for i in range(N):
  c,t = map(int, input.split())
  if t <=T:
    c_max=min(c_max, c)
print("TLE" if c_max==1001 else c)
Problem p03251 (python)

Fixed submission:
n, m, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))

x = sorted(x)
y = sorted(y)

if max(x[-1], X) < min(y[0], Y):
  print("No War")
else:
  print("War")

Buggy submission (verdict: Runtime Error):
n,m,x,y = map(int,input().split())
y = list(map(int, input().split()) for _ in range(n))
x = list(map(int, input().split()) for _ in range(n))

x = sorted(x)
y = sorted(y)

if y[0]<x[-1]:
  print("War")
else:
  print("No War")
Problem p03418 (python)

Fixed submission:
n, k = map(int, input().split())

if k == 0:
  print(n**2)
  exit()


ans = 0
for b in range(1, n+1):
  ans += n//b * max(0, b-k)
  ans += max(0, n%b+(1-k))
  
print(ans)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())

if k == 0:
  print(n**2)
  exit()


ans = 0
for b in range(1, n+1):
  ans += int(N/b) * max(0, b-k)
  ans += max(0, n%b+(1-k))
  
print(ans)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())

if k == 0:
  print(n**2)
  exit()


ans = 0
for b in range(1, n+1):
  ans += (N//b) * max(0, b-k)
  ans += max(0, n%b+(1-k))
  
print(ans)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())

if k == 0:
  print(n**2)
  exit()


ans = 0
for b in range(1, n+1):
  ans += N//b * max(0, b-k)
  ans += max(0, n%b+(1-k))
  
print(ans)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())

if k == 0:
  print(n**2)


ans = 0
for b in range(1, n+1):
  ans += N//b * max(0, b-k)
  ans += max(0, n%b+(1-k))
  
print(ans)
Problem p03543 (python)

Fixed submission:
n = input()
print("Yes" if n[0]==n[1]==n[2] or n[1]==n[2]==n[3] else "No")

Buggy submission (verdict: Runtime Error):
a,b,c,d = input()
print("Yes" if a=b=c or b=c=d else "No")

Buggy submission (verdict: Runtime Error):
N = input()
print("Yes" if n[0]==n[1]==n[2] or n[1]==n[2]==n[3] else "No")

Buggy submission (verdict: Runtime Error):
N = input()
print("Yes" if n[0]==n[1]==n[2] or n[1]==n[2]==n[3])
Problem p03544 (python)

Fixed submission:
N = int(input())

l = [2, 1]

for i in range(N-1):
  l.append(l[i]+l[i+1])
  
print(l[-1])

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

l = [1, 2]

for i in range(N-1):
  l = l.append(l[i]+l[i+1])
  
print(l[-1])
Problem p03606 (python)

Fixed submission:
N = int(input())
a=[list(map(int,input().split())) for i in range(N)]
count = 0

for i in range(N):
  count += a[i][1] - a[i][0] + 1
  
print(count)

Buggy submission (verdict: Runtime Error):
N = int(input())
a=[list(map(int,input().split())) for i in range(N)]
count = 0

for i in range(N+1):
  count += a[i][1] - a[i][0] + 1
  
print(count)

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

count = 0

for i in range(N+1):
  l, r = map(int, input().split())
  count += r-l+1
  
print(count)

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

count = 0

for i in range(N+1):
  l, r = map(int, input().split())
  count += l-r+1
  
print(count)
Problem p03632 (python)

Fixed submission:
a, b, c, d = map(int, input().split())

t = min(b, d) - max(a, c)

print(max(0, t))

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

if a<=c<=b<=d:
  print(b-c)
elif b<=a<=d<=c:
  print(d-a)
elif a<=c<=d<=b:
  print(d-c)
elif c<=a<=b<=d:
  print(b-a)
elif b=c or a=d:
  print(1)
else:
  print(0)
Problem p03760 (python)

Fixed submission:
o = list(input())
e = list(input())+[""]

for x, y in zip(o,e):
  print(x+y,end="")

Buggy submission (verdict: Runtime Error):
o = list(input())
e = list(input()+[""])

for x, y in zip(o, e):
  print(x+y, end="")
Problem p03777 (python)

Fixed submission:
a, b = map(str, input().split())

print('H' if a == b else 'D')

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

if a==str(H):
  print(b)
elif a==str(D):
  if b==str(H):
    print(D)
  elif b==str(D):
    print(H)

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

if a==H:
  print(b)
elif a==D:
  if b==H:
    print(D)
  elif b==D:
    print(H)

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

if a==H:
  print(b)
elif a==D:
  if b==H:
    print(D)
  elif b==D:
    print(H)
Problem p03076 (python)

Fixed submission:
time=[]
back=0
for i in range(5):
    A=int(input())
    if A%10==0:
        pass
    else:
        back=max(back,10-A%10)
        A=(A//10)*10 +10

    time.append(A)

print(sum(time)-back)

Buggy submission (verdict: Runtime Error):
l = list(map(int, input().split()))
lr = list(map(lambda x: x%10, l))
lr = [e for e in lr if e != 0]
lr = lr.sorted
print(sum(l) + sum(list(map(lambda x: 10-x, lr[1:]))))
Problem p02945 (python)

Fixed submission:
A, B = map(int, input().split())
val = A * B
if B > 0:
  val = (A + B) if (A + B) > val else val
else:
  val = (A - B) if (A - B) > val else val

print("%d"%val)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())
print("%d"% max([A + B, A - B, A* B])
Problem p03160 (python)

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

costs = [None] * N
costs[0] = 0
costs[1] = abs(steps[1] - steps[0])
if N > 2:
    costs[2] = min(abs(steps[2] - steps[0]), costs[1] + abs(steps[2] - steps[1]))

for i in range(3, N):
    cost1 = costs[i-1] + abs(steps[i-1] - steps[i])
    cost2 = costs[i-2] + abs(steps[i-2] - steps[i])
    costs[i] = min(cost1, cost2)

print(costs[N-1])

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

costs = [None] * N
costs[0] = 0
costs[1] = abs(steps[1] - steps[0])
costs[2] = min(abs(steps[2] - steps[0]), costs[1] + abs(steps[2] - steps[1]))

for i in range(3, N):
    cost1 = costs[i-1] + abs(steps[i-1] - steps[i])
    cost2 = costs[i-2] + abs(steps[i-2] - steps[i])
    costs[i] = min(cost1, cost2)

print(costs[N-1])
Problem p03161 (python)

Fixed submission:
import math


def get_min(num_step):
    res = float("inf")
    for i in range(1, min(num_step, K)+1):
        cost = costs[num_step-i] + abs(steps[num_step] - steps[num_step-i])
        if cost < res:
            res = cost
    return res


N, K = map(int, input().split(" "))
steps = list(map(int, input().split(" ")))
costs = [None] * N
costs[0] = 0

for i in range(1, N):
    costs[i] = get_min(i)

print(costs[N-1])

Buggy submission (verdict: Runtime Error):
import math


def get_min(num_step):
    res = math.inf
    for i in range(1, min(num_step, K)+1):
        cost = costs[num_step-i] + abs(steps[num_step] - steps[num_step-i])
        if cost < res:
            res = cost
    return res


N, K = map(int, input().split(" "))
steps = list(map(int, input().split(" ")))
costs = [None] * N
costs[0] = 0

for i in range(1, N):
    costs[i] = get_min(i)

print(costs[N-1])
Problem p02818 (python)

Fixed submission:
# -*- Coding: utf-8 -*-

a,b,k = map(int, input().split())

if k >= (a+b):
    print('{0} {1}'.format(0,0))
elif k < a:
    print('{0} {1}'.format(a-k, b))
elif k >= a:
    print('{0} {1}'.format(0, b-(k-a)))

Buggy submission (verdict: Runtime Error):
# -*- Coding: utf-8 -*-

a,b,k = map(int, input().split())

if k >= (a+b):
    print('{0} {1}'.format(0,0))
elif k < a:
    print('{0} {1}'.format(a-k, b))
elif k >= a:
    print('{0} {1}'.format(0, b-(k-a)))

exit(1)

Buggy submission (verdict: Runtime Error):
# -*- Coding: utf-8 -*-

a,b,k = map(int, input().split())

if a > 1000000000000 or b > 1000000000000 or k > 1000000000000:
    exit(1)

if k == 0:
    print('{0} {1}'.format(a,b))
    exit(1)

if k >= a:
    k = k-a
    a = 0
else:
    a = a - k
    k = 0

if k == 0:
    print('{0} {1}'.format(a,b))
    exit(1)
else:
    if k >= b:
        b = 0
        print('{0} {1}'.format(a,b))
        exit(1)
    else:
        b = b - k
        print('{0} {1}'.format(a,b))

Buggy submission (verdict: Runtime Error):
# -*- Coding: utf-8 -*-

a,b,k = map(int, input().split())

if k == 0:
    print('{0} {1}'.format(a,b))
    exit(1)

if k >= a:
    k = k-a
    a = 0
else:
    a = a - k
    k = 0

if k == 0:
    print('{0} {1}'.format(a,b))
    exit(1)
else:
    if k >= b:
        b = 0
        print('{0} {1}'.format(a,b))
        exit(1)
    else:
        b = b - k
        print('{0} {1}'.format(a,b))

Buggy submission (verdict: Runtime Error):
# -*- Coding: utf-8 -*-

a,b,k = map(int, input().split())

if k == 0:
    print('{0} {1}'.format(a,b))
    exit(1)

if k >= a:
    k = k-a
    a = 0
else:
    a = a - k
    k = 0

if k == 0:
    print('{0} {1}'.format(a,b))
    exit(1)
else:
    if k >= b:
        b = 0
        print('{0} {1}'.format(a,b))
        exit(1)
    else:
        b = b - k
        print('{0} {1}'.format(a,b))

Buggy submission (verdict: Runtime Error):
# -*- Coding: utf-8 -*-

a,b,k = map(int, input().split())

if k == 0:
    print('{0} {1}'.format(a,b))
    exit(1)

if k >= a:
    k = k-a
    a = 0
else:
    a = a - k

if k == 0:
    print('{0} {1}'.format(a,b))
    exit(1)
else:
    if k >= b:
        b = 0
        print('{0} {1}'.format(a,b))
        exit(1)
    else:
        b = b - k
        print('{0} {1}'.format(a,b))
Problem p02899 (python)

Fixed submission:
n = int(input())
l = list(map(int, input().split(" ")))
a =[0]*n

for i in range(n):
    #print(i)
    a[l[i]-1] = i + 1 #each_numのi番目のインデックスに代入, -1 はi 番目が1,2,3 ...

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

Buggy submission (verdict: Runtime Error):
n = int(input())
l = list(map(int, input().split(" ")))
a =[0]*num

for i in range(n):
    #print(i)
    a[l[i]-1] = i + 1 #each_numのi番目のインデックスに代入, -1 はi 番目が1,2,3 ...

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

Buggy submission (verdict: Runtime Error):
import numpy as np
num = int(input())
each_num = list(map(int, input().split(" ")))

i = 1
ans = [[]]
while i >= num:
    ans.append = each_num.index(i)

print(ans)
Problem p02909 (python)

Fixed submission:
today = input()

weather = ["Sunny", "Cloudy", "Rainy"]

days = weather.index(today)
tomorrow = days + 1
if tomorrow == 3:
    tomorrow = 0
    
print(weather[tomorrow])

Buggy submission (verdict: Runtime Error):
today = input()

weather = ["Sunny", "Cloudy", "Rainy"]

days = weather.index(today)
tomorrow = days + 1
print(weather[tomorrow])
Problem p02911 (python)

Fixed submission:
import numpy as np
N, K, Q = map(int, input().split(" "))
point_list = np.array([K-Q]*N)
ans_num_list = [int(input()) for _ in range(Q)]

num_answer_correct = np.array([0]*N)
for i in ans_num_list:
  num_answer_correct[i-1] += 1

point_list = point_list + num_answer_correct
# print(output)

for i in point_list:
  if i > 0:
    print("Yes")
  else:
    print("No")

Buggy submission (verdict: Runtime Error):
import numpy as np
N, K, Q = map(int, input().split(" "))
point_list = np.array([K]*N)

change = np.array([0]*N)
cnt = 1

ans_num_list = [int(input()) for _ in range(Q)]
#print(ans_num_list)

for i in ans_num_list:
  change[i] += 1
  change = change - 1

output = point_list + change
# print(output)

for i in range(N):
  if output[i] > 0:
    print("Yes")
  else:
    print("No")

Buggy submission (verdict: Runtime Error):
import numpy as np
N, K, Q = map(int, input().split(" "))
point_list = np.array([K]*N)

change = np.array([0]*N)
cnt = 1

ans_num_list = [int(input()) for _ in range(Q)]
#print(ans_num_list)

for i in ans_num_list:
  change[i] += 1
  change = change - 1

output = point_list + change
# print(output)

for i in range(N):
  if point_list[i] > 0:
    print("Yes")
  else:
    print("No")
Problem p03408 (python)

Fixed submission:
n = int(input())
a = [input() for i in range(n)]
m = int(input())
b = [input() for i in range(m)]
min = 0
for i in range(n):
    max = a.count(a[i])-b.count(a[i])
    if max >= min:
        min = max
    else:
        pass
print(min)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [input() for i in range(n+1)]
m = int(input())
b = [input() for i in range(m+1)]
min = 0
for i in range(n+1):
    max = a.count(a[i])-b.count(a[i])
    if max >= min:
        min = max
    else:
        pass
print(max)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [input() for i in range(n)]
m = int(input())
b = [input() for i in range(m)]
min = 0
for i in range(n+1):
    max = a.count(a[i])-b.count(a[i])
    if max >= min:
        min = max
    else:
        pass
print(max)
Problem p03425 (python)

Fixed submission:
n = int(input())
s = [input() for i in range(n)]

f = [a for a in s if a.startswith('M')]
g = [b for b in s if b.startswith('A')]
h = [c for c in s if c.startswith('R')]
i = [d for d in s if d.startswith('C')]
j = [e for e in s if e.startswith('H')]

k = len(f)*len(g)*len(h)
l = len(f)*len(g)*len(i)
m = len(f)*len(g)*len(j)
n = len(f)*len(h)*len(i)
o = len(f)*len(h)*len(j)
p = len(f)*len(i)*len(j)
q = len(g)*len(h)*len(i)
r = len(g)*len(h)*len(j)
s = len(g)*len(i)*len(j)
t = len(h)*len(i)*len(j)

sum = k+l+m+n+o+p+q+r+s+t
print(sum)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = [input() for i in range(n)]

f = [a for a in s if s.startswith('M')]
g = [b for b in s if s.startswith('A')]
h = [c for c in s if s.startswith('R')]
i = [d for d in s if s.startswith('C')]
j = [e for e in s if s.startswith('H')]

k = len(f)*len(g)*len(h)
l = len(f)*len(g)*len(i)
m = len(f)*len(g)*len(j)
n = len(f)*len(h)*len(i)
o = len(f)*len(h)*len(j)
p = len(f)*len(i)*len(j)
q = len(g)*len(h)*len(i)
r = len(g)*len(h)*len(j)
s = len(g)*len(i)*len(j)
t = len(h)*len(i)*len(j)

sum = k+l+m+n+o+p+q+r+s+t
print(sum)
Problem p03448 (python)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
x = int(input())
ans = 0
for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if 500*i+100*j+50*k==x:
        ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
c = input()
x = input()
ans = 0
for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if 500*i+100*j+50*k=x:
        ans += 1
print(ans)
Problem p03455 (python)

Fixed submission:
a, b = map(int, input().split())
c = a * b
if c%2 == 0:
  print("Even")
else:
  print("Odd")

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
c = a * b
if c%2 == 0:
  print(Even)
else:
  print(Odd)
Problem p03471 (python)

Fixed submission:
n, y = map(int, input().split())
z = y/1000
for i in range(n+1):
    for j in range(n+1-i):
        k = n - i- j
        if 10*i + 5*j + k == z:
            print(i, j, k)
            exit(0)
print('-1 -1 -1')

Buggy submission (verdict: Runtime Error):
n, y = map(int, input().split())
z = y/1000
for i in range(1,n+1):
    for j in range(0, n+1-i):
        k = n - i- j
            if 10*i + 5*j + k == y:
                print('i j k')
                break
print('-1 -1 -1')
Problem p03473 (python)

Fixed submission:
m = int(input())
print(48 - m)

Buggy submission (verdict: Runtime Error):
m = input()
print(24 - m)