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

Fixed submission:
a, b, c = input().split()        
a, b, c = int(a), int(b), int(c) 
fl = False                       
ab = a+b                         
ac = a+c                         
bc = b+c                         
while(1):                        
    if ab == c:                  
        fl = True                
        break                    
    if bc == a:                  
        fl = True                
        break                    
    if ac == b:                  
        fl = True                
        break                    
    break                        
if fl:                           
    print('Yes')                 
else:                            
    print('No')

Buggy submission (verdict: Runtime Error):
w, h, n = input().split()              
w, h, n = int(w), int(h), int(n)       
x = []                                 
y = []                                 
a = []                                 
                                       
for _ in range(n):                     
    x_, y_, a_ = input().split()       
    x.append(int(x_))                  
    y.append(int(y_))                  
    a.append(int(a_))                  
W = w                                  
H = h                                  
w_r = w                                
w_l = 0                                
h_u = h                                
h_l = 0                                
for i in range(n):                     
    if a[i] is 1 and x[i]>w_l:         
        w_l = x[i]                     
    if a[i] is 2 and x[i]<w_r:         
        w_r = x[i]                     
    if a[i] is 3 and y[i]>h_l:         
        h_l = y[i]                     
    if a[i] is 4 and y[i]<h_u:         
        h_u = y[i]                     
                                       
ans = (w_r - w_l)*(h_u - h_l)          
if (w_r - w_l) < 0 or (h_u - h_l) < 0: 
    ans = 0                            
print(ans)
Problem p03962 (python)

Fixed submission:
a = []              
a = input().split() 
s = set(a)          
print(len(s))

Buggy submission (verdict: Runtime Error):
import math                                             
                                                        
N = input()                                             
t = []                                                  
a = []                                                  
for i in range(int(N)):                                 
    t_n, a_n = input().split()                          
    t.append(int(t_n))                                  
    a.append(int(a_n))                                  
                                                        
t_ans = 0                                               
a_ans = 0                                               
for t_n, a_n in zip(t, a):                              
    k = max(math.ceil(t_ans/t_n), math.ceil(a_ans/a_n)) 
    if not k:                                           
        k = 1                                           
    t_ans = int(k*t_n)                                  
    a_ans = int(k*a_n)                                  
print(t_ans+a_ans)

Buggy submission (verdict: Runtime Error):
a = []                
for i in range(3):    
    a.append(input()) 
                      
s = set(a)            
print(len(s))
Problem p04012 (python)

Fixed submission:
w = input()                    
l = list(w)                    
l.sort()                       
ans = "Yes"                    
if len(l)%2 != 0:
    print("No")
    exit()
for i in range(int(len(l)/2)): 
    if l[2*i] != l[2*i+1]:     
        ans = "No"             
        break                  
print(ans)

Buggy submission (verdict: Runtime Error):
w = input()                
l = list(w)                
l.sort()                   
ans = "Yes"                
for i in range(len(l)/2):    
    if l[2*i] != l[2*i+1]: 
        ans = "No"         
        break              
print(ans)

Buggy submission (verdict: Runtime Error):
w = input()                
l = list(w)                
l.sort()                   
ans = "Yes"                
for i in range(len(l)):    
    if l[2*i] != l[2*i+1]: 
        ans = "No"         
        break              
print(ans)
Problem p03136 (python)

Fixed submission:
a= input()
b = input().split()
b = [int(s) for s in b]
s = 0
for i in range(0,len(b)):
    s+=int(b[i])
if s-int(max(b))>int(max(b)):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a= input()
b = input().split()
s = 0
for i in range(0,len(b)):
    s+=int(b[i])
if s-max(b)>max(b):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a= input()
b = input().split()
s = 0
for i in range(0,len(b)):
               s+=int(b[i])
if s-max(b)>max(b):
  print("Yes")
else:
  print("No)
Problem p03102 (python)

Fixed submission:
N,M,C=map(int, input().split())
# N:Aのソースコード(配列)数
# M:AとBの配列の中身の数
# C:計算で利用

B=list(map(int,input().split()))
A=[]
for i in range(N):
  a=list(map(int,input().split()))
  A.append(a)
    
x=0
for i in range(N):
  ans=0
  for j in range(M):
     ans+=A[i][j]*B[j]
  if ans+C>0:
     x+=1


print(x)

Buggy submission (verdict: Runtime Error):
N,M,C=map(int, input().split())
# N:Aのソースコード(配列)数
# M:AとBの配列の中身の数
# C:計算で利用

B=list(map(int,input.split()))
A=[]
for i in range(N):
  a=map(int,input().split())
  A.append(a)
    
ans=0
x=0
for i in range(N):
  for j in range(M):
     ans+=A[i][j]*B[j]
  if ans+C>0:
     x+=1

print(x)
Problem p03103 (python)

Fixed submission:
N,M=map(int,input().split())
# N:売店数
# M:買う数
AB=[]
for i in range(N):
  ab=list(map(int,input().split()))
  AB.append(ab)
#AB[0]:A円，AB[1]:最大B本まで買える

list.sort(AB,key=lambda x:x[0])
#print(AB)

m=0 #買う数
cost=0 #かかる値段
for i in range(N):
 
 if M-m==AB[i][1]:
     m+=AB[i][1]
     cost+=AB[i][0]*AB[i][1]
     break
 elif M-m<AB[i][1] :
      for j in range(AB[i][1]+1):
         cost=cost+AB[i][0]*j
         m=m+j
         if m==M:
             break
         elif m<M:
             cost=cost-AB[i][0]*j
             m=m-j
 else:
      cost+=AB[i][0]*AB[i][1]
      m+=AB[i][1]
    
print(cost)

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
# N:売店数
# M:買う数
AB=[]
for i in range(N):
  ab=list(map(int,input().split()))
  AB.append(ab)
#AB[0]:A円，AB[1]:最大B本まで買える

list.sort(AB,key=lambda x:x[0])
#print(AB)

m=0 #買う数
cost=0 #かかる値段
for i in range(N):
 
 if M-m==AB[i][1]:
     m+=AB[i][1]
     cost+=AB[i][0]*AB[i][1]
     break

 elif M-m<AB[i][1] :
      for j in range(AB[i][1]+1):
         cost=cost+AB[i][0]*j
         m=m+j
         if m==M:
             break
        else:
             cost=cost-AB[i][0]*j
 else:
      cost+=AB[i][0]*AB[i][1]
      m+=AB[i][1]
    
print(cost)

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
# N:売店数
# M:買う数
AB=[]
for i in range(N):
  ab=list(map(int,input().split()))
  AB.append(ab)
#AB[0]:A円，AB[1]:最大B本まで買える

list.sort(AB,key=lambda x:x[0])
#print(AB)

m=0 #買う数
cost=0 #かかる値段
for i in range(N):
 
 if M-m==A[i][1]
 m+=A[i][1]
 cost+=AB[i][0]*AB[i][1]
 break

 elif M-m<A[i][1] :
      for j in range(AB[i][1]+1):
         cost=cost+AB[i][0]*j
         m=m+j
         if m==M:
             break

 cost+=AB[i][0]*AB[i][1]
 m+=A[i][1]
    
print(cost)
Problem p03105 (python)

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

x=b//a
x=int(x)

if x>=c:
  print(c)
else :
  print(x)

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

x=b//a
  
if x>=c:
  print(c)
else :
  print(x)

Buggy submission (verdict: Runtime Error):
a=input()
b=input()
c=input()
  
a=int(a)
b=int(b)
c=int(c)
x=int(x)

x=b//a
  
if x>=c:
  print(c)
else :
  print(x)

Buggy submission (verdict: Runtime Error):
a=input()
b=input()
c=input()
  
a=int(a)
b=int(b)
c=int(c)
x=int(x)

x=b//a:
  
if x>=c:
  print(c)
else :
  print(x)

Buggy submission (verdict: Runtime Error):
a=input()
b=input()
c=input()
  
a=int(a)
b=int(b)
c=int(c)
x=int(x)

x=b//a
  
if x>=c:
  print(c)
else 
  print(x)

Buggy submission (verdict: Runtime Error):
a=input()
b=input()
c=input()
  
a=int(a)
b=int(b)
c=int(c)
x=int(x)

x=b//a
  
if(x>=c)
print(c)
else 
print(x)

Buggy submission (verdict: Runtime Error):
a=input()
b=input()
c=input()
  
  a=int(a)
  b=int(b)
  c=int(c)
  x=int(x)
  x=b//a
  
  if(x>=c)
    print(c)
    else 
      print(x)

Buggy submission (verdict: Runtime Error):
a=input()
  b=input()
  c=input()
  
  int(a)
  int(b)
  int(c)
  int(x)
  x=b//a
  
  if(x>=c)
    print(c)
    else 
      print(x)
Problem p03106 (python)

Fixed submission:
A, B, K = map(int, input().split())
a=[]
#b=[]
if A>=B:
  for i in range(1, A+1): # i = [1,2,3,4,....A]
    if A%i==0 and B%i==0:
      a.append( i )
      # b.append( B/i )
  
else:
  for i in range(1, B+1): # i = [1,2,3,4,....A]
    if A%i==0 and B%i==0:
      a.append( i )
      # b.append( B/i )

#print(a)
#print(b)

#c=[]
#for ea in a:
 # if ea in b:
  #  c.append( ea )
c=len(a)
print(a[c-K])

Buggy submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
a=[]
b=[]
if A>=B:
  for i in range(1,A+1): # i = [1,2,3,4,....A]
    if A%i==0 and B%i==0:
      a.append( A/i )
      b.append( B/i )
  
else:
  for i in range(1,B+1): # i = [1,2,3,4,....A]
    if A%i==0 and B%i==0:
      a.append( A/i )
      b.append( B/i )

c=[]
for ea in a:
  if ea in b:
    c.append( ea )

print(c[K])
Problem p03125 (python)

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

if B%A==0:
    print(A+B)
else:
  print(B-A)

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

if B%A==0:
    print(A+B)
else
  print(A-B)
Problem p03068 (python)

Fixed submission:
import re

N = int(input())
S = str(input())
K = int(input())

print(re.sub(r'[^%s]'%S[K-1], '*', S))

Buggy submission (verdict: Runtime Error):
import re

N = int(input())
S = str(input())
K = int(input())

print(re.sub(r'[^%s]'%S[K], '*', S))
Problem p03089 (python)

Fixed submission:
N = int(input())
b = [int(x) for x in input().split()]

if sum([(x > idx + 1) for (idx, x) in enumerate(b)]) >= 1:
  print(-1)
else:
  list_ = []
  while len(b) > 0:
    for idx, c in enumerate(b):
      if idx+1 == c:
        del_idx = idx
    list_.append(b.pop(del_idx))

  for c in list_[::-1]:
      print(c)

Buggy submission (verdict: Runtime Error):
N = int(input())
b = [int(x) for x in input().split()]

if sum([(x > idx + 1) for (idx, x) in enumerate(b)]) >= 1:
  print(-1)

list_ = []
while len(b) > 0:
  for idx, c in enumerate(b):
    if idx+1 == c:
      del_idx = idx
  list_.append(b.pop(del_idx))
  
for c in list_[::-1]:
	print(c)
Problem p03096 (python)

Fixed submission:
N = int(input())
C = []
tmp_b = -1
for _ in range(N):
  tmp_n = int(input())
  if tmp_n != tmp_b:
    C.append(tmp_n)
    tmp_b = tmp_n

SUM = 1
DP_dict = {}

for c in C:
  if c not in DP_dict.keys():
    DP_dict[c] = SUM
  else:
    SUM += DP_dict[c]
    DP_dict[c] = SUM

print(SUM % (10**9+7))

Buggy submission (verdict: Runtime Error):
N = int(input())
C = [int(input()) for _ in range(N)]
C = [x for (x,y) in zip(C[:-1], C[1:]) if x!=y] + [C[-1]]

SUM = 1
DP_dict = {}

for c in C:
  if c in DP_dict.keys():
    SUM += DP_dict[c] = SUM
  DP_dict[c] = SUM

print(SUM % (10**9+7))
Problem p03106 (python)

Fixed submission:
A, B, K = [int(x) for x in input().split()]
list_ = []
for k in range(1, min(A,B)+1):
  if A % k == 0 and B % k == 0:
    list_.append(k)
print(list_[::-1][K-1])

Buggy submission (verdict: Runtime Error):
A, B, K = [int(x) for x in input().split()]
list_ = []
for k in range(1, min(A,B)):
  if A % k == 0 and B % k == 0:
    list_.append(k)
print(list_[len(list_)-K+1])
Problem p03067 (python)

Fixed submission:
a,b,c=map(int,input().split())
if a>b:
    a,b=b,a
print("Yes" if a<=c<=b else "No")

Buggy submission (verdict: Runtime Error):
A, B, C  =  map(int, input().sprt))
Problem p03067 (python)

Fixed submission:
h1, h2, d = list(map(int, (input().split())))

if(h1 > h2):
    temp = h2
    h2 = h1
    h1 = temp

if(d >= h1 and d <= h2):
    print("Yes")
else:
    print("No")

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

count_list =[]
wc = 0

A=[0]*(N)
bc = 0

for i in list(range(N))[::-1]:
    if(S[i] == '#'):
        bc  += 1
    A[i] = bc

for n in range(N-1):
    if(S[n] == '.'):
        num = n
        count_list.append(A[n+1] + wc)
        wc += 1

if(S[N-1] == '.'):
    count_list.append(wc+1)

count = min(count_list)
print(count)

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

count_list =[]
wc = 0

A=[0]*(N)

for i in list(range(N-1))[::-1]:
    if(S[i] == '#'):
        A[i] = A[i+1] + 1

for n in range(N-1):
    if(S[n] == '.'):
        num = n
        count_list.append(A[n+1] + wc)
        wc += 1

if(S[N-1] == '.'):
    count_list.append(wc+1)

count = min(count_list)
print(count)

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

count_list =[]
wc = 0

A=[0]*(N+1)

for i in list(range(N))[::-1]:
    if(S[i] == '#'):
        A[i] = A[i+1] + 1

print(A)
for n in range(N-1):
    if(S[n] == '.'):
        num = n
        count_list.append(A[n+1] + wc)
        wc += 1

if(S[N-1] == '.'):
    count_list.append(wc+1)

count = min(count_list)
print(count)
Problem p03067 (python)

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

if(A<C and C<B) or (B<C and C<A):
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
  A, B, C = map(int, input().split())
   
  if(A<C and C<B) or (B<C and C<A):
      print('Yes')
  else:
      print('No')
Problem p03071 (python)

Fixed submission:
A, B = map(int, input().split())
print(max([A + A - 1, B + A, B + B -1]))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
v1, v2 = map(int, input().split())

if v1 < v2:
    t = v1
    v1 = v2
    v2 = t

v3 = v1 - v2

if v3 = 0:
    print(v1*2)

if v3 <= 2:
    print(v1*2-1)

if v1 == 1:
    print(v1*2+1)
Problem p03067 (python)

Fixed submission:
a,b,c=map(int, input().split())
if a>b:
    goal=a
    start=b
else:
    goal=b
    start=a
    
ans="No"
if c>start and c<goal:
    ans="Yes"
print(ans)

Buggy submission (verdict: Runtime Error):
N=int(input())
s=input()
tmp=N
for i in range(N+1) :
  k=s[:i].count("#")+s[i:N].count(".")
  if tmp>k:
    tmp=k
print(tmp)

Buggy submission (verdict: Runtime Error):
N=int(input())
s=input()
tmp=N
for i in range(N+1) :
  k=s[:i].count("#")+s[i:N].count(".")
  if tmp>k:
    tmp=k
print(tmp)

Buggy submission (verdict: Runtime Error):
N=int(input())
s=input()
tmp=N
for i in range(N+1) :
  k=s[:i].count("#")+s[i:N].count(".")
  if tmp>k:
    tmp=k
print(tmp)

Buggy submission (verdict: Runtime Error):
N=int(input())
s=input()
tmp=[s[:i].count("#")+s[i:N].count(".") for i in range(N+1)]
print(min(tmp)+1)

Buggy submission (verdict: Runtime Error):
N=int(input())
s=input()
tmp=[s[:i].count("#")+s[i:N].count(".") for i in range(N+1)]
print(min(tmp))

Buggy submission (verdict: Runtime Error):
N=int(input())
s=input()
tmp=N
for i in range(N+1):
    a=s[:i].count("#")
    b=s[i:N].count(".")
    if tmp>a+b:
        tmp=a+b
print(tmp)

Buggy submission (verdict: Runtime Error):
#N=3
#s=".######."
#s=[s[i] for i in range(len(s))]
N=input()
s=input()
s=[s[i] for i in range(len(s))]
hit1=0
count1=0
for i in s:
    if i=="#":
        hit1 = 1
    if i==".":
        count1=count1+hit1
count2=0
hit2=0
for i in range(len(s)):
    if s[-1-i]==".":
        hit2 = 1
    if s[-1-i]=="#":
        count2=count2+hit2
        
print(min(count1,count2))

Buggy submission (verdict: Runtime Error):
#N=3
#s=".######."
#s=[s[i] for i in range(len(s))]
N=input()
s=input()
s=[s[i] for i in range(len(s))]
hit1=0
count1=0
for i in s:
    if i=="#":
        hit1 = 1
    if i==".":
        count1=count1+hit1
count2=0
hit2=0
for i in range(len(s)):
    if s[-1-i]==".":
        hit2 = 1
    if s[-1-i]=="#":
        count2=count2+hit
        
print(min(count1,count2))
Problem p03068 (python)

Fixed submission:
N=int(input())
S=input()
K=int(input())
tmp=S[K-1]
out=[]
for i in range(N):
    if S[i]!=tmp:
        out.append("*")
    else:
        out.append(S[i])
ttt=""
for i in out:
    ttt="{}{}".format(ttt,i)
print(ttt)

Buggy submission (verdict: Runtime Error):
N=int(input())
S=input()
K=int(input())
tmp=S[K-1]
out=[]
for i in range(N):
    if S[i]!=tmp:
        out.append("*")
    else:
        out.append(S[i])
ttt=""
for i in out:
    ttt="{}{}".format(ttt,i)
print(ttt)
N=input()
N=int(input())

Buggy submission (verdict: Runtime Error):
N=input()
S=input()
K=input()
tmp=S[K-1]
out=[]
for i in range(N):
    if S[i]!=tmp:
        out.append("*")
    else:
        out.append(S[i])
ttt=""
for i in out:
    ttt="{}{}".format(ttt,i)
print(ttt)

Buggy submission (verdict: Runtime Error):
N=input()
S=input()
K=input()
tmp=S[K-1]
out=[]
for i in range(N):
    if S[i]!=tmp:
        out.append("*")
    else:
        out.append(S[i])
ttt=""
for i in out:
    ttt="{}{}".format(ttt,i)
print(ttt)
Problem p03068 (python)

Fixed submission:
n = int(input())
s = str(input())
k = int(input())
for i in range(n):
    if s[i] != s[k-1]:
        s = s.replace(s[i],"*")
print(s)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = str(input())
k = int(input())
for i in range(n):
    if s[i] != s[k]:
        s = s.replace(s[i],"*")
print(s)
Problem p03067 (python)

Fixed submission:
#!/usr/bin/env python3

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

if a < c and c < b:
    print("Yes")

elif b < c and c < a:
    print("Yes")

else:
    print("No")

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3

a,b,c = map(int,input().spliy())

if a < c and c < b:
    print("Yes")

elif b < c and c < a:
    print("Yes")

else:
    print("No")
Problem p03067 (python)

Fixed submission:
a, b, c = (int(i) for i in input().split())  
if a <= c <= b or b <= c <= a:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
s = str(input())


def func(input_s):
    count = input_s.count(".")
    for c, i in enumerate(s):
        if c == "." and i != 0 and input_s[i - 1] == "#":
            tmp_str = input_s
            tmp_str[i - 1] = "."
            tmp_count = func(tmp_str[i:])
            count = min(tmp_count + 1, count)
    return count


pre = ""
print(func(s))

Buggy submission (verdict: Runtime Error):
n = int(input())
s = str(input())
k = int(input())

char = s[k-1]
result = ""
for x in s:
    if x == char:
        result += char
    else:
        result += "*"
print(result)

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
c = input()

if a <= c <= b or b <= c <= a:
    print("Yes")
else:
    print("No")
Problem p03068 (python)

Fixed submission:
n = int(input())
s = str(input())
k = int(input())
 
char = s[k-1]
result = ""
for x in s:
    if x == char:
        result += char
    else:
        result += "*"
print(result)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = str(input())
k = int(input())

char = s[k]
result = ""
for x in s:
    if x == char:
        result += char
    else:
        result += "*"
print(result)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = str(input())
k = int(input())

char = s[k]
result = ""
for x in s:
    if x == char:
        result += char
    else:
        result += "*"
print(result)

Buggy submission (verdict: Runtime Error):
n = input()
s = str(input())
k = input()

char = s[k]
result = ""
for x in s:
    if x == char:
        result += char
    else:
        result += "*"
print(result)
Problem p03067 (python)

Fixed submission:
s = input()
a, b, c = [int(_) for _ in s.split()]
a, b, c = [_-a for _ in (a, b, c)]

if b * c > 0 and abs(b) > abs(c):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
s = input()
if abs(c-a) > abs(b-a):
    print("Yes")
else:
    print("No")
Problem p03068 (python)

Fixed submission:
N = input()
S = input()
K = int(input())

tar = S[K-1]

lis = (_ if _==tar else "*" for _ in S)
print("".join(lis))

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

tar = S[K-1]

lis = (_ if _==tar else "*" for _ in S]
print("".join(lis))
Problem p03067 (python)

Fixed submission:
input_str = input()
homes = input_str.split(" ")
for i, home in enumerate(homes):
    homes[i] = int(home)
if ((homes[2] - homes[1]) * (homes[2] - homes[0]) < 0):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
input_str = input()
homes = input_str.split(" ")
for home in homes:
    home = int(home)
print(homes)
if ((homes[2] - homes[1]) * (homes[2] - homes[0]) < 0):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
input_str = input()
homes = input_str.split(" ")
for home in homes:
    home = int(home)
print(homes)
if ((homes[3] - homes[1]) * (homes[3] - homes[2]) < 0):
    print("Yes")
else:
    print("No")
Problem p03067 (python)

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

if b-c > 0 and c-a > 0:
    print("Yes")
elif a-c > 0 and c-b > 0:
    print("Yes")
else:
    print("No")

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

if b-c > 0 and c-a > 0:
    print("Yes")
else if a-b > 0 and b-c > 0:
    print("Yes")
else:
    print("No")

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

if b-c > 0 && c-a > 0:
    print("Yes")
else:
    print("No")
Problem p03067 (python)

Fixed submission:
A,B,C = map(int,input().split())
if(A<C and C<B) or (B<C and C<A):
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
S = [i for i in input()]
for i in range(N):
    if(S[i]=='#'):
        break
s = S[i:]
if(i==0):
    print(0)
else:
    a = s.count('#')
    print(min(a,len(s)-a))

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

sum_ = sum(a)
count = 0
for j in range(2,N):
    for i in list(itertools.combinations(a,j)):
        if(2*sum(i)>sum_):
            for m in range(1,len(i)):
                for k in list(itertloos.combinations(i,m)):
                    if(sum_>2*sum(k) and sum_>2*(sum(i)-sum(k))):
                        count += 1
count = count * 6

Buggy submission (verdict: Runtime Error):
N = int(input())
S = [i for i in input()]
for i in range(N):
    if(S[i]=='#'):
        break
s = S[i:]
a = s.count('.')
print(min(a,len(s)-a))
Problem p03227 (python)

Fixed submission:
#!/usr/bin/env python3

import sys


def main(input):
    return input if len(input) == 2 else input[::-1]

if __name__ == "__main__":
    print(main(sys.stdin.readline().strip()))

Buggy submission (verdict: Runtime Error):
import sys

def main(input):
    return input if len(input) == 2 else input[::-1]

if __name__ == "__main__":
    print main(sys.stdin.readline().strip())

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3

import sys


def main(input):
    return input if len(input) == 2 else ''.join(reversed(input))

if __name__ == "__main__":
    print main(sys.stdin.readline().strip())
Problem p03067 (python)

Fixed submission:
a,b,c=map(int,input().split())
if c>=a:
    if b>=c:
        print("Yes")
    else:
            print("No")
else:
    if b<=c:
        print("Yes")
    else:
            print("No")

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if c>a:
    if b>c:
        print("Yes")
        else:
            print("No")
else:
    print("No")
Problem p03067 (python)

Fixed submission:
li = list(map(int,input().split()))
if li[0]<li[2]<li[1] or li[1]<li[2]<li[0]:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n=2
string_list=[input() for i in range(n)]
c=0
new=''
a=0
b=0
f=0
for stone in string_list[1]:
    if stone=='.' and c==0:
        continue
    elif stone=='#':
        c+=1
        a+=1
        f+=1
    elif stone=='.':
        b+=1
        f=0

if b>=(a-f):
    print(a-f)
else:
    print(b)