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

Fixed submission:
from collections import Counter

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

v1=[]
v2=[]

for i in range(n):
  if i%2==0:
    v1.append(v[i])
  else:
    v2.append(v[i])

v1c = Counter(v1).most_common()
v2c = Counter(v2).most_common()

ans2=float("inf")
ans3=float("inf")
ans4=float("inf")


if v1c[0][0]!=v2c[0][0]:
  ans=len(v1)-v1c[0][1]+len(v2)-v2c[0][1]
  print(ans)

else:
  if len(v1c) !=1:
    ans2=len(v1)-v1c[1][1]+len(v2)-v2c[0][1]
  if len(v2c) !=1:
    ans3=len(v1)-v1c[0][1]+len(v2)-v2c[1][1]
  else:
    ans4=min(len(v1),len(v2))
  print(min(ans2,ans3,ans4))

Buggy submission (verdict: Runtime Error):
from collections import Counter

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

v1=[]
v2=[]

for i in range(n):
  if i%2==0:
    v1.append(v[i])
  else:
    v2.append(v[i])

v1c = Counter(v1).most_common()
v2c = Counter(v2).most_common()
ans2=float("inf")
ans3=float("inf")


if v1c[0][0]!=v2c[0][0]:
  ans=len(v1)-v1c[0][1]+len(v2)-v2c[0][1]
  print(ans)

else:
  if len(v1c) !=1:
  	ans2=len(v1)-v1c[1][1]+len(v2)-v2c[0][1]
  elif len(v2c) !=1:
    ans3=len(v1)-v1c[0][1]+len(v2)-v2c[1][1]
  else:
    ans4=min(len(v1),len(v2))
  print(min(ans2,ans3,ans4))
Problem p02731 (python)

Fixed submission:
L = int(input())
L /= 3
print(L**3)

Buggy submission (verdict: Runtime Error):
l = map(int, input().split())
print(l ** 3 / 27)
Problem p02706 (python)

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

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

B = sum(A)

if N >= B:
  print(N-B)

else:
  print('-1')

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

A = 0

for i in range(M):
  A += int(input())

if M < A:
  print(N-A)

else:
  print(-1)

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

A = 0

for i in range(M):
  A += int(input())

if M < A:
  print(N-A)

else:
  print(-1)

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

A = 0

for i in range(M):
  A += int(input())

if M < A:
  print(N-A)

else:
  print(-1)

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

A = []

for i in range(N-1):
  a = int(input())
  A.append(a)

B = []

for j in range(N-1):
  temp = 0
  for i in A:
    if i-2 == j:
      temp += 1
  B.append(temp)        
for j in range(N-1):
  print(B[j])

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

A = 0

for i in range(M):
  A += int(input())

if M < A:
  print(N-A)

else:
  print(-1)

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

A = 0

for i in range(M):
    A += int(input())

if M < A:
    print(N-A)

else:
    print(-1)
Problem p02708 (python)

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

sum = 0

for j in range(K,M+2):
    temp = j*(M-j+1) + 1
    if temp > (10**9 + 7):
        temp = temp%(10**9 + 7)
    sum += temp
if sum > 10**9+7:
    sum = sum%(10**9+7)

print(sum)

Buggy submission (verdict: Runtime Error):
M = int(input())
K = int(input()) 

sum = 0

for j in range(K,M+2):
    temp = j*(M-j+1) + 1
    if temp > (10^9 + 7):
        temp = temp%(10^9 + 7)
    sum += temp

print(sum)
Problem p02717 (python)

Fixed submission:
x, y, z = map(int, input().split())

print(z, x, y)

Buggy submission (verdict: Runtime Error):
x = int(input())
y = int(input())
z = int(input())

a = z
b = x
c = y

print(a, b, c)

Buggy submission (verdict: Runtime Error):
x = int(input())
y = int(input())
z = int(input())

print(z, x, y)
Problem p02719 (python)

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

print(min(l, abs(l - k)))

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

if (n < k):
    print(k % n)
elif (n >= k):
    if (l == 0):
        print(0)
    else:
        print(abs(k - n))
Problem p02801 (python)

Fixed submission:
C = input()
print(chr(ord(C)+1))

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
Q_n = [0] * N
C = [0] * N

Ans = 0
Pen = 0
for i in range(M):
    p, S = input().split()
    p = int(p)-1
    if (S == 'AC') and (Q_n[p] == 0):
        Q_n[p] = 1
        Ans += 1
        Pen += C[p]
    elif (S == 'WA'):
        C[p] += 1
        
print(Ans, Pen)
Problem p02802 (python)

Fixed submission:
N, M = map(int, input().split())
Q_n = [0] * N
C = [0] * N

Ans = 0
Pen = 0
for i in range(M):
    p, S = input().split()
    p = int(p)-1
    if (S == 'AC') and (Q_n[p] == 0):
        Q_n[p] = 1
        Ans += 1
        Pen += C[p]
    elif (S == 'WA'):
        C[p] += 1
        
print(Ans, Pen)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
Q_n = [0] * N
C = [0] * N

Ans = 0
Pen = 0
for i in range(M):
    p, S = input().split
    p = int(p)-1
    if (S == 'AC') and (Q_n[p] == 0):
        Q_n[p] = 1
        Ans += 1
        Pen += C[p]
    elif (S == 'WA'):
        C[p] += 1
        
print(Ans, Pen)

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

for x in range(M):
    pS[x][0] = int(pS[x][0])
    
Ans, Pen = 0, 0
for x in range(M):
    if (pS[x][0] != pS[x-1][0]):
        pS_temp = 0
        Ans_temp = 0
    if (pS[x][1] == 'AC') and (pS_temp == 0):
        Ans += 1
        Ans_temp += 1
        pS_temp += 1
    elif (pS[x][1] == 'WA') and (pS_temp == 0) and (Ans_temp == 0):
        Pen += 1
print(Ans, Pen)

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

for x in range(M):
    pS[x][0] = int(pS[x][0])
    
Ans, Pen = 0, 0
for x in range(M):
    if (pS[x][0] != pS[x-1][0]):
        pS_temp = 0
        Ans_temp = 0
    if (pS[x][1] == 'AC') and (pS_temp == 0):
        Ans += 1
        Ans_temp += 1
        pS_temp += 1
    elif (pS[y][1] == 'WA') and (pS_temp == 0) and (Ans_temp == 0):
        Pen += 1
print(Ans, Pen)
Problem p02684 (python)

Fixed submission:
from sys import stdin
input = stdin.readline
def minus(n):
  return n-1
  
def main():
  num_list = list(map(int, input().split()))
  A = list(map(int, input().split()))
  N=num_list[0]
  K=num_list[1]
  A_i=0
  N_list=[0]*N
  A =list(map(minus, A))
  sFlag=True
  i=0
  while(sFlag):
    i=i+1
    pre=A_i
    N_list[A_i]+=1
    if(N_list[A_i]==3):
      sumA=N_list.count(int(2))
      sumA=sumA+N_list.count(int(3))
      K=(K-i)%sumA+1
      for j in range(K):
        pre=A_i
        te=A[A_i]
        A_i=te
      sFlag=False
      break
    te=A[A_i]
    A_i=te
    if(i>=K):
      sFlag=False
      break
  print(A_i+1)
  
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
from sys import stdin
input = stdin.readline
def minus(n):
  return n-1
  
def main():
  num_list = list(map(int, input().split()))
  A = list(map(int, input().split()))
  N=num_list[0]
  K=num_list[1]
  A_i=0
  N_list=[0]*N
  A =list(map(minus, A))
  sFlag=True
  i=0
  while(sFlag):
    i=i+1
    pre=A_i
    N_list[A_i]+=1
    if(N_list[A_i]==3):
      sumA=N_list.count(int(2))
      K=(K-i)%sumA
      for j in range(K):
        pre=A_i
        te=A[A_i]
        A_i=te
      break
    te=A[A_i]
    A_i=te
    if(i>=K):
      sFlag=False
      break
  print(A_i+1)
  
if __name__ == '__main__':
    main()
Problem p02690 (python)

Fixed submission:
def main():
  sFlag=False
  X= int(input())
  for i in range(-1000,1000):
    for j in range(-1000,1000):
      X_n=i**5-j**5
      if(X_n==X):
        print(i,j)
        sFlag=True
        break
    if(sFlag==True):
      break
 
if __name__=='__main__':
  main()

Buggy submission (verdict: Runtime Error):
def main():
  sFlag=False
  X= int(input())
  X_table=prime_decomposition(X)
  X_table.append(1)
  for i in range(-1000,1000):
    A=i
    for j in range(-1000,1000):
      X_n=i**5-j**5
      if(X_n==X):
        print(A,B)
        sFlag=True
        break
    if(sFlag==True):
      break

if __name__=='__main__':
  main()

Buggy submission (verdict: Runtime Error):
def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(i)
    i += 1
  if n > 1:
    table.append(int(n))
  return table
def main():
  sFlag=False
  X= int(input())
  X_table=prime_decomposition(X)
  X_table.append(1)
  for i in range(-1000.1000):
    A=i
    for j in range(len(X_table)):
      B=A-X_table[j]
      X_n=A**5-B**5
      if(X_n==X):
        print(A,B)
        sFlag=True
        break
    if(sFlag==True):
      break

if __name__=='__main__':
  main()
Problem p02765 (python)

Fixed submission:


def main():
  N,R=map(int,input().split())
  if(N<10):
    inner=R+100*(10-N)
  else:
    inner=R
  
  print(inner)

if __name__ == '__main__':
	main()

Buggy submission (verdict: Runtime Error):
import math
def main():
  N=int(input())
  X=list(map(int,input().split()))
  x_mean=math.ceil(sum(X)/len(X))
  sumX=0
  for i in range(len(X)):
    sumX=sumX+(X[i]-x_mean)**2
  print(sumX)

if __name__ == '__main__':
	main()
Problem p02802 (python)

Fixed submission:
n,m=map(int,input().split())
ps=[list(input().split()) for i in range(m)]
pen=[0]*n#ペナ数
rig=[0]*n#ACorWA

for i in range(m):
    if ps[i][1]=="AC":
        rig[int(ps[i][0])-1]=1
    else:
        if rig[int(ps[i][0])-1]==0:
            pen[int(ps[i][0])-1]+=1
cnt1,cnt2=0,0
for i in range(n):
    if rig[i]==1:
        cnt1+=rig[i]
        cnt2+=pen[i]

print(str(cnt1)+" "+str(cnt2))

Buggy submission (verdict: Runtime Error):
import numpy as np
def main():
  N,M=map(int,input().split())
  str_list = [list(input().split()) for _ in range(M)]
  np_str_list=np.array(str_list)
  wacount=0
  account=0
  if(len(str_list)==0):
    print(0,0)
  else:
    for i in range(1,N+1):
      tgtarray=np_str_list[np.where(np_str_list[:,0]==str(i)),1][0]
      if(len(tgtarray)!=0):
        ac_index=np.where(tgtarray=='AC')[0][0]
        account=account+1
        wacount=wacount+tgtarray[0:ac_index].shape[0]
    print(account,wacount)

if __name__=='__main__':
  main()

Buggy submission (verdict: Runtime Error):
import numpy as np
def main():
  N,M=map(int,input().split())
  str_list = [list(input().split()) for _ in range(M)]
  np_str_list=np.array(str_list)
  wacount=0
  for i in range(1,N+1):
    tgtarray=np_str_list[np.where(np_str_list[:,0]==str(i)),1][0]
    ac_index=np.where(tgtarray=='AC')[0][0]
    wacount=wacount+tgtarray[0:ac_index].shape[0]
  account=len(np_str_list[np_str_list[:,1]=='AC',0])
  print(wacount,account)

if __name__=='__main__':
  main()

Buggy submission (verdict: Runtime Error):
import numpy as np
def main():
  N,M=map(int,input().split())
  str_list = [list(input().split()) for _ in range(M)]
  np_str_list=np.array(str_list)
  wacount=0
  for i in range(1,N+1):
    tgtarray=np_str_list[np.where(np_str_list[:,0]==str(i)),1][0]
    ac_index=np.where(tgtarray=='AC')[0][0]
    wacount=wacount+tgtarray[0:ac_index].shape[0]
  account=len(np_str_list[np_str_list[:,1]=='AC',0])
print(wacount,account)

if __name__=='__main__':
  main()
Problem p03160 (python)

Fixed submission:
N=int(input())
h=list(map(int,input().split()))
dp=[float('inf') for i in range(N)]
dp[0]=0
for i in range(1,N):
  dp[i]=min(dp[i],dp[i-1]+abs(h[i]-h[i-1]))
  if(i>1):
    dp[i]=min(dp[i],dp[i-2]+abs(h[i]-h[i-2]))
print(dp[N-1])

Buggy submission (verdict: Runtime Error):
N,K=map(int, input().split())
h=list(map(int,input().split()))
dp=[float('inf') for i in range(N)]
dp[0]=0
for i in range(1,N):
  for j in range(1,K+1):
    dp[i]=min(dp[i],dp[i-j]+abs(h[i]-h[i-j]))
print(dp[N-1])
Problem p03161 (python)

Fixed submission:
N,K=map(int, input().split())
h=list(map(int,input().split()))
dp=[float('inf') for i in range(N)]
dp[0]=0
if(N<K):
  K=N-1
for i in range(1,N):
  for j in range(1,K+1):
    dp[i]=min(dp[i],dp[i-j]+abs(h[i]-h[i-j]))
print(dp[N-1])

Buggy submission (verdict: Runtime Error):
N,K=map(int, input().split())
h=list(map(int,input().split()))
dp=[float('inf') for i in range(N)]
dp[0]=0
for i in range(1,N):
  for j in range(1,K+1):
    dp[i]=min(dp[i],dp[i-j]+abs(h[i]-h[i-j]))
print(dp[N-1])
Problem p03162 (python)

Fixed submission:
def main():
  n = int(input())  #nは入力回数
  num_list = [list(map(int, input().split())) for _ in range(n)]

  dp = [[0] * 3 for i in range(n+1)]
  for i in range(0,n):
    for j in range(3):
      for k in range(3):
        if(j==k):
          continue
        else:
          dp[i+1][k]=max(dp[i+1][k],dp[i][j]+num_list[i][k])
  print(int(max(dp[n][0],dp[n][1],dp[n][2])))

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import numpy as np
n = int(input())  #nは入力回数
num_list = [list(map(int, input().split())) for _ in range(n)]
dp_ini=0
dp=np.zeros((n+1,n))
for i in range(0,n):
  for j in range(3):
    for k in range(3):
      if(j==k):
        continue
      else:
        dp[i+1][k]=max(dp[i+1][k],dp[i][j]+num_list[i][k])
print(int(max(dp[n][0],dp[n][1],dp[n][2])))
Problem p02730 (python)

Fixed submission:
def check_str( ss ):
  sslen = len(ss)
  
  if( sslen %2 == 0 ): 
    return (ss[:sslen//2] == ss[sslen//2:][::-1])
  else:
  	return (ss[:sslen//2] == ss[sslen//2+1:][::-1])
  
s = input()

slen = len(s)

if( not check_str( s ) ):
  print( "No" )
else:
#print(s[:slen//2])
#print(s[slen//2+1:][::-1])

  s1 =  s[:slen//2]
  s2 = s[slen//2+1:]
  
  
  if( (not check_str( s1 )) or (not check_str( s2 )) ):
    print( "No" )
  else:
    print( "Yes" )

#s1 = s[:len(s)-1]

#s1

Buggy submission (verdict: Runtime Error):

def check_str( ss ):
  sslen = len(ss)
  
  #ccnt = 0
  #for c in ss:
  #  if( ss[0] == c ):
  #    ccnt+=1
  
  if( sslen == ccnt ):
    return False
  
  return (ss[:sslen//2] == ss[sslen//2+1:][::-1])
  
s = input()

slen = len(s)

if( not check_str( s ) ):
  print( "No" )
else:
#print(s[:slen//2])
#print(s[slen//2+1:][::-1])

  s1 =  s[:slen//2]
  s2 = s[slen//2+1:]
  
  
  if( (not check_str( s1 )) or (not check_str( s2 )) ):
    print( "No" )
  else:
    print( "Yes" )

#s1 = s[:len(s)-1]

#s1
Problem p02741 (python)

Fixed submission:
retu = "1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51"

retu = retu.split(",")
retuint=[]
for i in retu :
	retuint.append(int(i))

index=input()

print(retuint[int(index)-1])

Buggy submission (verdict: Runtime Error):
import math
 
datas = input().split(" ")
 
a = float(datas[0])
b = float(datas[1])
c = float(datas[2])
 
if(a+b < (c-a-b)**2):
  print( "Yes" )
else:
  print( "No" )

Buggy submission (verdict: Runtime Error):
import math
 
datas = input().split(" ")
 
a = int(datas[0])
b = int(datas[1])
c = int(datas[2])
 
if(math.sqrt(a)*math.sqrt(b)+a+b < c):
  print( "Yes" )
else:
  print( "No" )

Buggy submission (verdict: Runtime Error):
datas = input().split(" ")

h = int(datas[0])
w = int(datas[1])


if( h==1 ):
  print(1)
elif( w== 1):
  print(1)
elif( h % 2 == 0  and w % 2 == 0):
  print( h * w//2 )
elif( h % 2 == 0 ):
  print( (h * (w-1))//2 + h // 2  )
elif( w % 2 == 0):
  print( (w * (h-1))//2 + w // 2  )
else:
  print( ((h-1) * (w-1))//2 + (h-1) // 2 + w // 2 +1  )

Buggy submission (verdict: Runtime Error):
retu = "1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51"

retu = retu.split(",")
retuint=[]
for i in retu :
	retuint.append(int(i))

index=input()

print(retuint[int(index)])

Buggy submission (verdict: Runtime Error):
retu = "1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51"

retu = retu.split(",")
retuint=[]
for i in retu :
	retuint.append(int(i))

index=input()

print(retuint[int(index-1)])

Buggy submission (verdict: Runtime Error):
retu = "1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51"

retuint = map(int,retu.split(","))

index=input()

print(retuint(index))

Buggy submission (verdict: Runtime Error):
retu = input( )
print(int(retu.split(",")[32]))

Buggy submission (verdict: Runtime Error):
retu = input( )
print(int(retu.split(",")[32]))
Problem p02755 (python)

Fixed submission:
taxs = input().split(" ")
 
a = int(taxs[0])
b = int(taxs[1])
 
product_min = int(a / 0.08 + 0.5)
product_max = int((a+1) / 0.08)

setflg = 0
for product in range( product_min, product_max ):
  bpred = int(product * 0.1)
  if( bpred == b ):
    print( product )
    setflg=1
    break

if setflg==0:
  print( -1 )

Buggy submission (verdict: Runtime Error):
taxs = input().split(" ")
 
a = int(taxs[0])
b = int(taxs[1])
 
product_min = int(a / 0.08)
product_max = int((a+1) / 0.08)

for product in range( product_min, product_max ):
	bpred = int(product * 0.1)
	if( bpred == b ):
  		print( product )
        break

print( -1 )
Problem p02696 (python)

Fixed submission:
A, B, N = map(int, input().split())
x = min(B-1, N)
print((A*x//B)-A*(x//B))

Buggy submission (verdict: Runtime Error):
A,B,N=map(int,input().split())
L=[]
for i in range(1,N):
  import math
  Y=(math.floor(A*i/B))-A*(math.floor(i/B))
  L.append(Y)
print(max(L))

Buggy submission (verdict: Runtime Error):
A,B,N=map(int,input().split())
L=[]
for i in range(1,N):
  import math
  Y=(math.floor(A*i/B))-A*(math.floor(i/B))
  L.append(Y)
print(max(L))
Problem p02700 (python)

Fixed submission:
a,b,c,d=map(int,input().split())
e=a//d
f=c//b
x=a-e*d
y=c-f*b
if x==y==0:
  if f<=e:
    print('Yes')
  else:
    print('N0')
elif x==0 and y!=0:
  if f+1<=e:
    print('Yes')
  else:
    print('No')
elif y==0 and x!=0:
  if f<=e+1:
    print('Yes')
  else:
    print('NO')
else:
  if f<=e:
    print('Yes')
  else:
    print('No')

Buggy submission (verdict: Runtime Error):
a,b,c,d=map(int,input.split())
while a or c >0:
  c=c-b
  if c<=0:
    print('Yes')
    break
  a=a-d
  if a<=0:
    print('No')
    break
Problem p02705 (python)

Fixed submission:
R=int(input())
print(R*2*3.14)

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
L=list(map(int,input().split()))
X=sum(L)
if N-X<0:
  print(-1)
else:
  print(N-X)

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
L=list(map(int,input().split()))
X=0
for i in range(M):
  X=X+L[i]
if N-X<0:
  print(-1)
else:
  print(N-X)

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
L=list(map(int,input().split()))
for i in range(M):
  X=X+L[i]
if N-X<0:
  print(-1)
else:
  print(N-X)
Problem p02706 (python)

Fixed submission:
N,M=map(int,input().split())
L=list(map(int,input().split()))
X=0
for i in range(M):
  X=X+L[i]
if N-X<0:
  print(-1)
else:
  print(N-X)

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
L=list(map(int,input().split()))
for i in range(M):
  X=X+L[i]
if N-X<0:
  print(-1)
else:
  print(N-X)

Buggy submission (verdict: Runtime Error):
,M=map(int,input().split())
L=list(map(int,input().split()))
for i in range(M):
  X=X+L[i]
if N-X<0:
  print(-1)
else:
  print(N-X)
Problem p02717 (python)

Fixed submission:
x,y,z=map(int,input().split())
print(z,x,y)

Buggy submission (verdict: Runtime Error):
x,y.z=map(int,input().split())
print(z,x,y)
Problem p02730 (python)

Fixed submission:
s = input()
t = s[:(len(s)-1)//2]
u = s[(len(s)+3)//2-1:]
if s == s[::-1] and t == t[::-1] and u == u[::-1]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
s = input()
t = s[:(len(s)-1)/2]
u = s[(len(s)+3)/2-1:]
if s == s[::-1] and t == t[::-1] and u == u[::-1]:
  print("Yes")
else:
  print("No")
Problem p02760 (python)

Fixed submission:
a,b,c=map(int,input().split())
d,e,f=map(int,input().split())
g,h,i=map(int,input().split())
N=int(input())
L=[int(input()) for i in range(N)]
if a in L and b in L and c in L:
  print('Yes')
elif d in L and e in L and  f in L:
  print('Yes')
elif g in L and h in L and  i in L:
  print('Yes')
elif a in L and d in L and  g in L:
  print('Yes')
elif b in L and e in L and  h in L:
  print('Yes')
elif c in L and f in L and  i in L:
  print('Yes')
elif a in L and e in L and  i in L:
  print('Yes')
elif c in L and e in L and  g in L:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
d,e,f=map(int,input().split())
g,h,i=map(int,inout().split())
N=int(input())
L=[int(input()) for i in range(N)]
if a in L and b in L and c in L:
  print('Yes')
elif d in L and e in L and  f in L:
  print('Yes')
elif g in L and h in L and  i in L:
  print('Yes')
elif a in L and d in L and  g in L:
  print('Yes')
elif b in L and e in L and  h in L:
  print('Yes')
elif c in L and f in L and  i in L:
  print('Yes')
elif a in L and e in L and  i in L:
  print('Yes')
elif c in L and e in L and  g in L:
  print('Yes')
else:
  print('No')
Problem p02784 (python)

Fixed submission:
H,N=map(int,input().split())
L=list(map(int,input().split()))
a=sum(L)
if H>a:
  print('No')
else:
  print('Yes')

Buggy submission (verdict: Runtime Error):
H,N=map(int,input().split())
L=list(map(int,input().split()))
a=sum(L)
if H>L:
  print('No')
else:
  print('Yes')
Problem p02830 (python)

Fixed submission:
n=int(input())
a,b=input().split()
r=''
for i in range(n):
  r=r+a[i]
  r=r+b[i]
print(r)

Buggy submission (verdict: Runtime Error):
n=int(input())
a,b=input().split()
r=''
for i in range(N):
  r=r+a[i]
  r=r+b[i]
print(r)
Problem p02848 (python)

Fixed submission:
N=int(input())
S=input()
L='ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans=''
for i in range(len(S)):
  a=S[i]
  index=L.find(a)
  b=L[index+N]
  ans=ans+b
print(ans)

Buggy submission (verdict: Runtime Error):
N=int(input())
S=input()
L='ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans=''
for i in range(len(S)):
  a=S[i]
  index=L.find(a)
  b=L[index+N]
  ans=ans+b
prin(ans)
Problem p02885 (python)

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

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())
if A>2B:
  print(A-2*B)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())
if A>2B:
  print(A-2B)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())
if A>2B:
  print(A-2B)
else:
  print(0)
Problem p02922 (python)

Fixed submission:
a,b=map(int,input().split())
c=a-1
count=1
while a<b:
  a=a+c
  count+=1
if b==1:
  count=0
print(count)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if b%a==0:
  print(b//a)
elif:
  print(b//a+1)
Problem p02957 (python)

Fixed submission:
A,B=map(int,input().split())
if (A+B)%2==0:
  print((A+B)//2)
else:
  print('IMPOSSIBLE')

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().spliy())
if (A+B)%2==0:
  print((A+B)//2)
else:
  print('IMPOSSIBLE')
Problem p02969 (python)

Fixed submission:
r=int(input())
print(3*r*r)

Buggy submission (verdict: Runtime Error):
r=int(input())
print 3*r*r

Buggy submission (verdict: Runtime Error):
r=int(input())
s=3r**2
print('s')

Buggy submission (verdict: Runtime Error):
r=int(input())
S=3r**2
print(S）
Problem p03059 (python)

Fixed submission:
a,b,c=map(int,input().split())
print(b*(c//a))

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
print(b*(t//a))
Problem p03292 (python)

Fixed submission:
a,b,c=map(int,input().split())
d=abs(a-b)
e=abs(b-c)
f=abs(c-a)
L=[d,e,f]
L.sort()
print(L[0]+L[1])

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().spliT())
d=abs(a-b)
e=abs(b-c)
f=abs(c-a)
L=[d,e,f]
L.sort()
print(L[0]+L[1])

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().spliT())
d=abs(a-b)
e=abs(b-c)
f=abs(c-a)
L=list[d,e,f]
L.sort()
print(L[0]+L[1])
Problem p03433 (python)

Fixed submission:
N=int(input())
A=int(input())
b=N//500
c=N-500*b
if c<=A:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
N=int(input())
A=int(input())
b=N//500
c=N-500b
if A<=c:
  print('Yes')
else:
  print('No')
Problem p03555 (python)

Fixed submission:
a=input()
b=input()
if a[0]==b[2] and a[1]==b[1] and a[2]==b[0]:
  print('YES')
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
a,b,c=input().split()
e,f,g=input().split()
if a==g and c==e and b==f:
  print('YES')
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
a,b,c=input().split()
e,f,g=input().split()
if a==g and c==e and b==f:
  print('YES')
else:
  print('NO')