Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
H,W = (int(_) for _ in input().split())                                                                                                                              
grid = [list(str(input())) for i in range(H)] 
dp = [[ -1 for i in range(W)] for j in range(H)]
dp[0][0] = 0 
for i in range(0,H):
    for j in range(0,W):
        if(grid[i][j] =="#" or (i,j) == (0,0)):
            continue
        if(i-1 >=0 and j-1>=0):
            if(dp[i-1][j] >= 0 and dp[i][j-1]>=0):
                dp[i][j]= min(dp[i-1][j]+1,dp[i][j-1] + 1)
            elif(dp[i-1][j] >=0):
                dp[i][j] = dp[i-1][j]+1
            elif(dp[i][j-1] >=0):
                dp[i][j] = dp[i][j-1]+1
        elif(i -1 >= 0 and j -1 < 0): 
            if(dp[i-1][j] >= 0): 
                dp[i][j] = dp[i-1][j]+ 1
        elif(j-1 >= 0 and i-1 < 0): 
            if(dp[i][j-1] >= 0): 
                dp[i][j] = dp[i][j-1] + 1 
cnt=0
dic={}
for i in range(0,H):
    for j in range(0,W):
        if(grid[i][j] == "#" or (i,j) == (0,0)):
            continue
        if(dp[i][j] == -1):
            cnt+=1
        elif(dp[i][j] not in dic):
            dic[dp[i][j]] = 1 
        else:
            cnt+=1
if(dp[H-1][W-1] not in dic or dic[dp[H-1][W-1]] !=1):
    print(-1)
else:
    print(cnt)

Fixed submission:
N=int(input())
A=int(input())
tmp = N
while(N >=500):
    tmp = N%500
    N//=500
if(tmp <=A):
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
H,W = (int(_) for _ in input().split()) 
grid = [list(str(input())) for i in range(H)] 
dp = [[ -1 for i in range(W)] for j in range(H)]
dp[0][0] = 0
for i in range(0,H):
    for j in range(0,W):
        if(grid[i][j] =="#" or (i,j) == (0,0)):
            continue
        if(i-1 >=0 and j-1>=0):
            if(dp[i-1][j] >= 0 and dp[i][j-1]>=0):
                dp[i][j]= min(dp[i-1][j]+1,dp[i][j-1] + 1)
            elif(dp[i-1][j] >=0):
                dp[i][j] = dp[i-1][j]+1
            elif(dp[i][j-1] >=0):
                dp[i][j] = dp[i][j-1]+1
        elif(i -1 >= 0 and j -1 < 0):
            if(dp[i-1][j] >= 0):
                dp[i][j] = dp[i-1][j]+ 1
        elif(j-1 >= 0 and i-1 < 0):
            if(dp[i][j-1] >= 0):
                dp[i][j] = dp[i][j-1] + 1
cnt=0
dic={}
for i in range(0,H):
    for j in range(0,W):
        if(grid[i][j] == "#" or (i,j) == (0,0) or (i,j) == (H-1,W-1)):
            continue
        if(dp[i][j] == -1):
            cnt+=1
            grid[i][j] ="+"
        elif(dp[i][j] not in dic):
            dic[dp[i][j]] = 1
        else:
            grid[i][j] ="+"
            cnt+=1
if(dp[H-1][W-1] < 0):
    print(-1)
else:
    print(cnt)   

Fixed submission:
N=int(input())
A=int(input())
tmp = N
while(N >=500):
    tmp = N%500
    N//=500
if(tmp <=A):
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
N,A = (int(i) for i in input().split()) 
i = 0
while(N >=500):
    N//=500
if(N <=A):
    print("Yes")
else:
    print("No")

Fixed submission:
N=int(input())
A=int(input())
tmp = N
while(N >=500):
    tmp = N%500
    N//=500
if(tmp <=A):
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
import numpy as np

N,K = map(int,input().split())
p = list(map(int,input().split()))
E = sum(p[0:K])
a = E
for i in range (0,N-K):
  E = E - p[i] + p[i+K]
  if E == max(a,E):
    a = E
    
print((a+K)/2)
  

Fixed submission:
N,K = map(int,input().split())
p = list(map(int,input().split()))
E = sum(p[0:K])
a = E
for i in range (0,N-K):
  E = E - p[i] + p[i+K]
  if E == max(a,E):
    a = E
    
print((a+K)/2)

Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
p = list(map(int,input().split()))
x = 0
a = 0
for i in range (0,N-K+1):
  x = sum(p[i:i+K])
  if x == max(a,x):
    a = x
    ans = i
    
E = 0
for j in range (0,K):
  E = E + (1 + p[ans+j]) / 2
print(E)


Fixed submission:
N,K = map(int,input().split())
p = list(map(int,input().split()))
E = sum(p[0:K])
a = E
for i in range (0,N-K):
  E = E - p[i] + p[i+K]
  if E == max(a,E):
    a = E
    
print((a+K)/2)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P = list(map(int,input().split()))
ans = 1
A = []
for i in range (0,N):
  x = min(P[0:i+1])
  A.append(x)

for i in range (1,N):
  if (A[i-1] > A[i]):
    ans = ans + 1
  elif (P[i] <= A[i-1]):
    ans = ans + 1
print(ans)
    

Fixed submission:
N = int(input())
P = list(map(int,input().split()))
ans = 1
P0 = P[0]

for i in range (1,N):
  if P[i] <= P0:
    ans = ans + 1
    P0 = P[i]
print(ans)

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

for i in range (1,N):
  if P[i] == min(P[0:i+1]):
    ans = ans + 1
print(ans)
  

Fixed submission:
N = int(input())
P = list(map(int,input().split()))
ans = 1
P0 = P[0]

for i in range (1,N):
  if P[i] <= P0:
    ans = ans + 1
    P0 = P[i]
print(ans)
Buggy python submission (verdict: Runtime Error):
import numpy as np
a,b,x = map(int,input().split())
V = a * a * b
dV = V - x
#y = max(V,dV)
#h = dV / V * b * 2
#theta = np.arctan(a / h) * 360 / (2 * np.pi)

if x >= V / 2:
  h = dV / V * b * 2
  theta = np.arctan(a / h) * 360 / (2 * np.pi)
  print(90-theta)
else:
  h = x / V * a * 2
  theta = np.arctan(h / b) * 360 / (2 * np.pi)
  print(90-theta)

Fixed submission:
import numpy as np
a,b,x = map(int,input().split())
V = a * a * b
dV = V - x
if x == V:
  print("0")
  
elif x >= V / 2:
  h = dV / V * b * 2
  theta = np.arctan(a / h) * 360 / (2 * np.pi)
  print(90-theta)
  
else:
  h = x / V * a * 2
  theta = np.arctan(h / b) * 360 / (2 * np.pi)
  print(90-theta)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
L = list(map(int,input().split()))
L.sort(reverse=True)
ans = 0    
for i in range (0,N-2):
  max = sum(x >= L[i] / 2 for x in L) 
  for j in range (i+1,max):
    n = sum(x > L[i]-L[j] for x in L[j+1:N]) 
    ans = ans + n
print(ans)  

Fixed submission:
N = int(input())
L = list(map(int,input().split()))
L.sort()
ans = 0
for i in range (N-1,1,-1): 
  s = 0 
  l = i - 1
  while l > s:
    if L[s] + L[l] > L[i]:
      ans = ans + (l - s)
      l = l - 1
    else:
      s = s + 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
L = list(map(int,input().split()))
L.sort(reverse=True)
ans = 0    
for i in range (0,N-2):
  for j in range (i+2,N):
    n = sum(x > L[i]-L[j] for x in L[i+1:j]) 
    ans = ans + n
print(ans) 

Fixed submission:
N = int(input())
L = list(map(int,input().split()))
L.sort()
ans = 0
for i in range (N-1,1,-1): 
  s = 0 
  l = i - 1
  while l > s:
    if L[s] + L[l] > L[i]:
      ans = ans + (l - s)
      l = l - 1
    else:
      s = s + 1
print(ans)
Buggy python submission (verdict: Runtime Error):
s=input()
N=len(s)
a="Yes"

for i in range (0,N):
  if i%2=0:
    if (s[i]!="R") and (s[i]!="U") and (s[i]!="D"):
      a="No"
      break
  else:
    if (s[i]!="L") and (s[i]!="U") and (s[i]!="D"):
      a="No"
      break
print(a)
      
      
      

Fixed submission:
s=input()
N=len(s)
a="Yes"

for i in range (0,N):
  if i%2==0:
    if (s[i]!="R") and (s[i]!="U") and (s[i]!="D"):
      a="No"
      break
  else:
    if (s[i]!="L") and (s[i]!="U") and (s[i]!="D"):
      a="No"
      break
print(a)
Buggy python submission (verdict: Runtime Error):
import numpy as np
N=int(input())
B=list(map(int,input.split()))
A=np.zeros(N,dtype="int64")

A[0]=B[0]
A[N-1]=B[N-2]

for i in range (1,N-1):
  A[i]=min(B[i-1],B[i])
print(sum(A))


Fixed submission:
import numpy as np
N=int(input())
B=list(map(int,input().split()))
A=np.zeros(N,dtype="int64")

A[0]=B[0]
A[N-1]=B[N-2]

for i in range (1,N-1):
  A[i]=min(B[i-1],B[i])
print(sum(A))

Buggy python submission (verdict: Runtime Error):
N=int(input())
B=list(map(int,input.split()))
A=[0]*N

A[0]=B[0]
A[N-1]=B[N-2]

for i in range (1,N-1):
  A[i]=min(B[i-1],B[i])
print(sum(A))

Fixed submission:
import numpy as np
N=int(input())
B=list(map(int,input().split()))
A=np.zeros(N,dtype="int64")

A[0]=B[0]
A[N-1]=B[N-2]

for i in range (1,N-1):
  A[i]=min(B[i-1],B[i])
print(sum(A))
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N = int(input())
H = list(map(int,input().split()))
k = np.zeros(N,dtype="int64")
for i in range (0,N-1):
  for j in range (i,N-1):
    if H[j] < H[j+1]:
      break
    k[i] = k[i] + 1
print(max(k))

Fixed submission:
N = int(input())
H = list(map(int,input().split()))
ans =  0
x = 0
for i in range (0,N-1):
  if H[i] >= H[i+1]:
    x = x + 1
  else:
    x = 0
  ans = max(ans,x)
print(ans)
Buggy python submission (verdict: Runtime Error):
import numpy as np
a = np.zeros(2,dtype = "int64")

a[0] = int(input())

def func(i):

  if(i == 1): 
    return 1
  return i + func(i - 1)

print(func(a[0]-1))

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

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
a = np.zeros(2,dtype = "int64")

N = int(input())
a[0] = N
a[1] = 0
for i in range (1,a[0]):
  a[1] = a[1] + i
print(a[1])

Fixed submission:
n = int(input())
ans = n * (n - 1) // 2
print(int(ans))
Buggy python submission (verdict: Runtime Error):
import sys
N=int(input())
H1=list(map(int,input().split()))
H=np.zeros(N,dtype="int64")
for i in range (0,N):
  H[i]=H1[i]
s=0
if N==1:
  print("Yes")
  sys.exit()
  
for i in range (0,N-1):
  if H[i]>H[i+1]:
    s = s + H[i]-H[i+1]
  if s>=2:
    print("No")
    sys.exit()

print("Yes")


Fixed submission:
import sys
N = int(input())
H = list(map(int,input().split()))
for i in reversed (range(N-1)):
  if H[i] > H[i+1]:
    H[i] = H[i] - 1
    if H[i] > H[i+1]:
      print("No")
      sys.exit()
print("Yes")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [int(input()) for i in range(N)]
A1 = sorted(A,reverse=True)
for i in range (0,N):
  if A[i] == max(A):
    print(A1[1])
  else:
    print(A1[0])

Fixed submission:
N = int(input())
A = [int(input()) for i in range(N)]
A1 = sorted(A,reverse=True)
for i in range (0,N):
  if A[i] == A1[0]:
    print(A1[1])
  else:
    print(A1[0])
Buggy python submission (verdict: Runtime Error):
import math
n=input()
Xs=list(map(int,input().split()))
Xs.sort()
a=Xs[0]
b=Xs[-1]
ans=math.inf
for p in range(a,b+1):
    m=0
    for x in Xs:
        m+=(x-p)**2
    if m<ans:
        ans=m
print(ans)

Fixed submission:
n=int(input())
Xs=list(map(int,input().split()))
Xs.sort()
a=Xs[0]
b=Xs[-1]
ans=float("inf")
for p in range(a,b+1):
    m=0
    for x in Xs:
        m+=(x-p)**2
    if m<ans:
        ans=m
print(ans)

Buggy python submission (verdict: Runtime Error):
import math
n=input()
Xs=list(map(int,input().split()))
Xs.sort()
a=Xs[0]
b=Xs[-1]
ans=math.inf
for p in range(a,b+1):
    m=0
    for x in Xs:
        m+=(x-p)**2
    if m<ans:
        ans=m
print(ans)

Fixed submission:
n=int(input())
Xs=list(map(int,input().split()))
Xs.sort()
a=Xs[0]
b=Xs[-1]
ans=float("inf")
for p in range(a,b+1):
    m=0
    for x in Xs:
        m+=(x-p)**2
    if m<ans:
        ans=m
print(ans)

Buggy python submission (verdict: Runtime Error):
n=input()
Xs=list(map(int,input().split()))
Xs.sort()
a=Xs[0]
b=Xs[-1]
ans=inf
for p in range(a,b+1):
    m=0
    for x in Xs:
        m+=(x-p)**2
    if m<ans:
        ans=m
print(ans)


Fixed submission:
n=int(input())
Xs=list(map(int,input().split()))
Xs.sort()
a=Xs[0]
b=Xs[-1]
ans=float("inf")
for p in range(a,b+1):
    m=0
    for x in Xs:
        m+=(x-p)**2
    if m<ans:
        ans=m
print(ans)
Buggy python submission (verdict: Runtime Error):
s=len(input())
2 print('x' * len(s))

Fixed submission:
s = input().rstrip()
print('x' * len(s))
Buggy python submission (verdict: Runtime Error):
t=input().split()
m=t.pop
n=int(m)
if len(set(t))==n:
    print("YES")
else:
    print("NO")


Fixed submission:
n=int(input())
t=input().split()
if len(set(t))==n:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
t=input().split()
n=int(t.pop(0))
if len(set(n))==n:
    print("YES")
else:
    print("NO")


Fixed submission:
n=int(input())
t=input().split()
if len(set(t))==n:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
t=input().split()
n=int(t.pop(0))
t.sort()
p=0
for i in range(n-1):
    if t[i]==t[i+1]:
        p+=1
        
if p>0:
    print("NO")
else:
    print("YES")

Fixed submission:
n=int(input())
t=input().split()
if len(set(t))==n:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
t=list(input())
import math
n=int(math.ceil((len(t)+1)/2))
p=0
for i in range(1,n):
    for j in range(1,i):
        if t[2*i]==t[2*j]:
            p+=1
if p>0:
    print("NO")
else:
    print("YES")


Fixed submission:
n=int(input())
t=input().split()
if len(set(t))==n:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int,input().split())
max=0
t=list(input().split())
s=[int(n) for n in t]
for i in range(N-K+1):
    x=sum(s[i:i+K])
    if max<x :
        max=x
print((max+K)/2)


Fixed submission:
N, K = map(int,input().split())
t=list(input().split())
s=[int(n) for n in t]
max=x=sum(s[:K])
for i in range(N-K):
    x+=(s[K+i]-s[i])
    if max<x :
        max=x
print((max+K)/2)

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int,input().split())
max=0
t=list(input().split())
for i in range(N-K+1):
    x=0
    for j in range(K):
        x+=int(t[i+j])
    if max<x :
        max=x
print((max+K)/2)


Fixed submission:
N, K = map(int,input().split())
t=list(input().split())
s=[int(n) for n in t]
max=x=sum(s[:K])
for i in range(N-K):
    x+=(s[K+i]-s[i])
    if max<x :
        max=x
print((max+K)/2)

Buggy python submission (verdict: Runtime Error):
N, K = map(int,input().split())
max=0
t=list(input().split())
for i in range(N-K+1):
    x=0
    for j in range(K):
        x+=int(s[i+j])
    if max<x :
        max=x
print((max+K)/2)

Fixed submission:
N, K = map(int,input().split())
t=list(input().split())
s=[int(n) for n in t]
max=x=sum(s[:K])
for i in range(N-K):
    x+=(s[K+i]-s[i])
    if max<x :
        max=x
print((max+K)/2)

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int,input().split())
max=0
t=list(input().split())
s=[int(n) for n in t]
for i in range(N-K+1):
    x=0
    for j in range(K):
        x+=s[i+j]
    if max<x :
        max=x
print((max+K)/2)

Fixed submission:
N, K = map(int,input().split())
t=list(input().split())
s=[int(n) for n in t]
max=x=sum(s[:K])
for i in range(N-K):
    x+=(s[K+i]-s[i])
    if max<x :
        max=x
print((max+K)/2)

Buggy python submission (verdict: Runtime Error):
max=0
N=int(input())
K=int(input())
t=list(input().split())
s=[int(n) for n in t]
for i in range(N-K+1):
    x=0
    for j in range(K):
        x+=s[i+j]
    if max<x :
        max=x
print((max+K)/2)

Fixed submission:
N, K = map(int,input().split())
t=list(input().split())
s=[int(n) for n in t]
max=x=sum(s[:K])
for i in range(N-K):
    x+=(s[K+i]-s[i])
    if max<x :
        max=x
print((max+K)/2)

Buggy python submission (verdict: Runtime Error):
max=0
N=int(input())
K=int(input())
t=list(input().split())
s=[int(n) for n in t]
for i in range(N-K):
    x=0
    for j in range(K):
        x+=s[i+j]
    if max<x :
        max=x
print((max+K)/2)

Fixed submission:
N, K = map(int,input().split())
t=list(input().split())
s=[int(n) for n in t]
max=x=sum(s[:K])
for i in range(N-K):
    x+=(s[K+i]-s[i])
    if max<x :
        max=x
print((max+K)/2)

Buggy python submission (verdict: Runtime Error):
max=0
N=int(input())
K=int(input())
t=list(input().split())
s=[int(n) for n in t]
for i in range(N-K):
    x=0
    for j in range(K):
        x+=s[i+j]
    if max<x :
        max=x
print((max+4)/2)

Fixed submission:
N, K = map(int,input().split())
t=list(input().split())
s=[int(n) for n in t]
max=x=sum(s[:K])
for i in range(N-K):
    x+=(s[K+i]-s[i])
    if max<x :
        max=x
print((max+K)/2)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
h= list(map(int,input().split()))
res=[0]*n
for i in range(n-1):
  j=i+1
  while j<=n-1:
    if h[i]>=h[j]:
      res[i]+=1
      i+=1
      j+=1
    else:
      break
print(max(res))

Fixed submission:
n=int(input())
h= list(map(int,input().split()))
res=[0]*n
for i in range(1,n):
  if h[-i]<=h[-i-1]:
    res[i]=res[i-1]+1
  else:
    res[i]=0
print(max(res))
Buggy python submission (verdict: Runtime Error):
li=list(map(int,input().split())).sort()
a=li.pop(-1)
k=int(input())
a=a*(2**k)
for i in li:
  a+=i
print(a)


Fixed submission:
li=sorted(list(map(int,input().split())))
a=li.pop(-1)
k=int(input())
a=a*(2**k)
for i in li:
  a+=i
print(a)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
numlist = list(map(int,input().split()))

check = 0
i = 0
while i < N-1:
    a = numlist[i]
    j = i + 1
    while j < N:
        if a == numlist[j]:
            check = 1
            break
        j = j + 1
    i = i + 1

if check == 1:
    print('NO')
else:
    print('YES')

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

check = 0
i = 0
while i < N-1:
    j = i + 1
    if numlist[i] == numlist[j]:
        check = 1
        break
    i = i + 1

if check == 1:
    print('NO')
else:
    print('YES')

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
numlist = list(map(int,input().split()))

check = 0
i = 0
while i < N-1:
    j = i + 1
    while j < N:
        if numlist[i] == numlist[j]:
            check = 1
            break
        j = j + 1
    i = i + 1

if check == 1:
    print('NO')
else:
    print('YES')

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

check = 0
i = 0
while i < N-1:
    j = i + 1
    if numlist[i] == numlist[j]:
        check = 1
        break
    i = i + 1

if check == 1:
    print('NO')
else:
    print('YES')
Buggy python submission (verdict: Runtime Error):
r = input()
print(r*r)

Fixed submission:
r = int(input())
print(r*r)
Buggy python submission (verdict: Runtime Error):
h, k = map(int, input().split())
lis = list(map(int, input().split()))
if h >= k:
    lis.sort(reverse=True)
    lis = lis[k:]
else:
    lis = []
    
print(sum(lis))

Fixed submission:
H, A = map(int, input().split())
from math import ceil
n = int(ceil(H/A))
print(n)
Buggy python submission (verdict: Runtime Error):
h, k = map(int, input().split())
lis = list(map(int, input().split()))
if n >= k:
    lis.sort(reverse=True)
    lis = lis[k:]
else:
    lis = []
    
print(sum(lis))

Fixed submission:
h, k = map(int, input().split())
lis = list(map(int, input().split()))
if h >= k:
    lis.sort(reverse=True)
    lis = lis[k:]
else:
    lis = []
    
print(sum(lis))

Buggy python submission (verdict: Time Limit Exceeded):
h, k = map(int, input().split())
lis = list(map(int, input().split()))
if len(lis) >= k:
    for i in range(k):
        lis.remove(max(lis))
else:
    lis = []
    
print(sum(lis))

Fixed submission:
h, k = map(int, input().split())
lis = list(map(int, input().split()))
if h >= k:
    lis.sort(reverse=True)
    lis = lis[k:]
else:
    lis = []
    
print(sum(lis))

Buggy python submission (verdict: Runtime Error):
h, k = map(int, input().split())
lis = list(map(int, input().split()))
for i in range(k):
    lis.remove(max(lis))
    
print(sum(lis))

Fixed submission:
h, k = map(int, input().split())
lis = list(map(int, input().split()))
if h >= k:
    lis.sort(reverse=True)
    lis = lis[k:]
else:
    lis = []
    
print(sum(lis))
Buggy python submission (verdict: Runtime Error):
n, h = map(int, input().split())
if n >= h:
    s = str(h)* n
else:
    s = stc(n)* h
print(s)

Fixed submission:
n, h = map(int, input().split())
if n >= h:
    s = str(h)* n
else:
    s = str(n)* h
print(s)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
lis = list(map(int, input().split()))
count = 0
minn = lis[0]
flug = 0
for i in range(n):
    if flug == 0:
        newlis = lis[0:i+1]
        if  minn >= lis[i]:
            count += 1
            minn = lis[i]
            if minn == 1:
                count += lis[i+1:].count(1)
                flug = 1
print(count)

Fixed submission:
n = int(input())
lis = list(map(int, input().split()))
count = 0
minn = lis[0]
minl = min(lis)
flug = 0
for i in range(n):
    if flug == 0:
        if  minn >= lis[i]:
            count += 1
            minn = lis[i]
            if minn == minl:
                count += lis[i+1:].count(minl)
                flug = 1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
lis = list(map(int, input().split()))
count = 0
minn = lis[0]
for i in range(n):
    newlis = lis[0:i+1]
    if  minn >= lis[i]:
        count += 1
        minn = lis[i]
print(count)

Fixed submission:
n = int(input())
lis = list(map(int, input().split()))
count = 0
minn = lis[0]
minl = min(lis)
flug = 0
for i in range(n):
    if flug == 0:
        if  minn >= lis[i]:
            count += 1
            minn = lis[i]
            if minn == minl:
                count += lis[i+1:].count(minl)
                flug = 1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
lis = list(map(int, input().split()))
count = 0
for i in range(n):
    newlis = lis[0:i+1]
    if min(newlis) == lis[i]:
        count += 1
print(count)

Fixed submission:
n = int(input())
lis = list(map(int, input().split()))
count = 0
minn = lis[0]
minl = min(lis)
flug = 0
for i in range(n):
    if flug == 0:
        if  minn >= lis[i]:
            count += 1
            minn = lis[i]
            if minn == minl:
                count += lis[i+1:].count(minl)
                flug = 1
print(count)
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = str(input())
count = 0
for i in range(n):
    if s[i] == 'a' or s[i] == 'A':
        if i + 1 <= n:
            if s[i + 1] == 'b' or s[i + 1] == 'B':
                if i + 2 <= n:
                    if s[i + 2] == 'c' or s[i + 2] ==  'C':
                        count += 1
print(count)

Fixed submission:
n = int(input())
s = str(input())
count = 0
for i in range(n):
    if s[i] == 'a' or s[i] == 'A':
        if i + 1 < n:
            if s[i + 1] == 'b' or s[i + 1] == 'B':
                if i + 2 < n:
                    if s[i + 2] == 'c' or s[i + 2] ==  'C':
                        count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
n = int(input())
s = str(input())
count = 0
for i in range(n):
    if s[i] == 'a' or s[i] == 'A':
        if s[i + 1] == 'b' or s[i + 1] == 'B':
            if s[i + 2] == 'c' or s[i + 2] ==  'C':
                count += 1
print(count)

Fixed submission:
n = int(input())
s = str(input())
count = 0
for i in range(n):
    if s[i] == 'a' or s[i] == 'A':
        if i + 1 < n:
            if s[i + 1] == 'b' or s[i + 1] == 'B':
                if i + 2 < n:
                    if s[i + 2] == 'c' or s[i + 2] ==  'C':
                        count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
n = int(input())
s = str(input())
count = 0
for i in range(n):
    if s[i] == 'a' or 'A':
        if s[i + 1] == 'b' or 'B':
            if s[i + 2] == 'c' or 'C':
                count += 1
print(count)

Fixed submission:
n = int(input())
s = str(input())
count = 0
for i in range(n):
    if s[i] == 'a' or s[i] == 'A':
        if i + 1 < n:
            if s[i + 1] == 'b' or s[i + 1] == 'B':
                if i + 2 < n:
                    if s[i + 2] == 'c' or s[i + 2] ==  'C':
                        count += 1
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
a, b, x = map(int, input().split())
for i in range(x):
    if a >= 1:
        a -= 1
    elif b >= 1:
        b -= 1
    else:
        pass
    
print(a, b)

Fixed submission:
a, b, x = map(int, input().split())
if a + b < x:
    a = 0
    b = 0
    print(a, b)
elif a < x:
    b = b - x + a
    a = 0
    print(a, b)
else:
    a = a - x
    print(a, b)