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

Fixed submission:
#n,a,b,c,d=map(int,input().split())
n=int(input())
a=[int(i) for i in input().split()]
ans=True
c=[]

t=sum(a)//((n*(n+1))//2)

if sum(a)%((n*(n+1))//2)!=0:
    ans=False
else:
    for i in range(n):
        if i==0:
            d=a[0]-a[-1]
        else:
            d=a[i]-a[i-1]
        if (t-d)%n!=0 or d-t>0:
            ans=False
            break
        s=(t-d)//n
        c.append(s)
    #if sum(c)==t:
        #ans=True
if n==1:
    ans=True
print('YES' if ans else 'NO')

Buggy submission (verdict: Runtime Error):
#n,a,b,c,d=map(int,input().split())
n=int(input())
a=[int(i) for i in input().split()]
ans=False
c=[]

t=sum(a)//((n*(n+1))//2)

if sum(a)%((n*(n+1))//2)!=0:
    ans=False
else:
    for i in range(n):
        if i==0:
            d=a[0]-a[-1]
        else:
            d=a[i]-a[i-1]
        if (t-d)%n!=0:
            ans=False
            break
        s=(t-d)//n
        c.append(s)
    if sum(c)==t:
        #ans=True
if n==1:
    ans=True
print('YES' if ans else 'NO')

Buggy submission (verdict: Runtime Error):
#n,a,b,c,d=map(int,input().split())
n=int(input())
a=[int(i) for i in input().split()]
ans=False
c=[]

t=sum(a)//((n*(n+1))//2)

if sum(a)%((n*(n+1))//2)!=0:
    ans=False
else:
    if n==1:
        ans=True
        break
    for i in range(n):
        if i==0:
            d=a[0]-a[-1]
        else:
            d=a[i]-a[i-1]
        if (t-d)%n!=0:
            ans=False
            break
        s=(t-d)//n
        c.append(s)
    if sum(c)==t:
        ans=True
print('YES' if ans else 'NO')
Problem p03813 (python)

Fixed submission:
print('A'+'RB'[int(input())<1200]+'C')

Buggy submission (verdict: Runtime Error):
print('A'+'RB'[input()[:2]<’12’]+'C')
Problem p03814 (python)

Fixed submission:
x=1e9
for j,i in enumerate(input()):
 if i=='A':x=min(x,j)
 if i=='Z':y=j
print(y-x+1)

Buggy submission (verdict: Runtime Error):
s=input()
x=1e9
for i in range(len(s)):
 if i=='A':x=min(x,i)
 if i=='Z':y=i
print(y-x+1)
Problem p03817 (python)

Fixed submission:
n=int(input())
ans=(n//11)*2
ans+=2 if n-11*(n//11)>6 else 1
ans-=1 if n-11*(n//11)==0 else 0
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
ans=(n//11)*2
ans+=2 if n-n//11>6 else 1
ans-=1 if n-n//11=0 else 0
print(ans)
Problem p03827 (python)

Fixed submission:
input()
x=0
a=[0]
for i in input():a+=a[-1]+1-2*(i=='D'),
print(max(a))

Buggy submission (verdict: Runtime Error):
,t=open(0)
a=[0]
for i in t:a+=a[-1]+1-2*(i=='D'),
print(max(a))

Buggy submission (verdict: Runtime Error):
input()
x=0
a=[0]
for i in input():a+=a[-1]+1-2*(i=='D')
print(a)
Problem p03845 (python)

Fixed submission:
I=input
I()
t=[int(i)for i in I().split()]
for i in' '*int(input()):p,x=map(int,I().split());print(sum(t)+x-t[p-1])

Buggy submission (verdict: Runtime Error):
I=input;I();t=[int(i)for i in I().S()]
for i in' '*int(input()):p,x=map(int,I().split());print(sum(t)+x-t[p-1])

Buggy submission (verdict: Runtime Error):
n=int(input())
t=[int(i)for i in input().split()]
m=int(input())
T=sum(t)
for i in' '*m:p,x=LI();print(T+x-t[p-1])
Problem p03854 (python)

Fixed submission:
a=['dream','dreamer','erase','eraser']
def check(c):
    if c=='':
        return True
    size=len(c)
    n=len(c)
    while n>0:
        tmp=n
        for i in a:
            #print(-n-len(i),-n)
            if size>=len(i) and c[n-len(i):n]==i:
                n-=len(i)
        if tmp==n:
            return False
    return True

print('YES' if check(input()) else 'NO')

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(1000000)
a=['dream','dreamer','erase','eraser']
def check(c):
    rt=False
    size=len(c)
    if c=='':
        return True
    for i in a:
        if size>=len(i) and c[:len(i)]==i:
            rt=check(c[len(i):]) or rt
    return rt

print(cnt,'YES' if check(s) else 'NO', s)
Problem p03892 (python)

Fixed submission:
def gcd(x,y):
    if x%y==0:
        return y
    while x%y>0:
        x,y=y,x%y
    return y
a,b,c,d=map(int,input().split())
x,y=abs(a-c),abs(b-d)
g=gcd(x,y)
print(g*(x//g+y//g-1))

Buggy submission (verdict: Runtime Error):
import math
a,b,c,d=map(int,input().split())
x,y=abs(a-c),abs(b-d)
g=math.gcd(x,y)
print(g*(x//g+y//d-1))

Buggy submission (verdict: Runtime Error):
import math
a,b,c,d=map(int,input().split())
x,y=abs(a-c),abs(b-d)
g=math.gcd(x,y)
print(g*(x//g+y//d-1))
Problem p03910 (python)

Fixed submission:
n=int(input())
for i in range(int((2*n)**0.5-3),n+2):
  if i*(i+1)//2==n:
    for j in range(1,i+1):
      print(j)
    break
  elif i*(i+1)//2>n:
    k=i*(i+1)//2-n
    for j in range(1,i+1):
      if j!=k:
        print(j)
    break

Buggy submission (verdict: Runtime Error):
n=int(input())
for i in range((2*n)**0.5-3,n**0.5+2):
  if i*(i+1)//2=n:
    for j in range(1,i+1):
      print(j)
    break
  elif i*(i+1)//2>n:
    k=i*(i+1)//2-n
    for j in range(1,i+1):
      ifr j!=k:
        print(j)
    break
Problem p03911 (python)

Fixed submission:
import sys
sys.setrecursionlimit(10**7)
n,m=map(int,input().split())
g=[[] for _ in range((n+m))]
for i in range(n):
    a=[int(i)-1 for i in input().split()][1:]
    for l in a:
        g[i].append(n+l)
        g[n+l].append(i)

par=[i for i in range(n+m)]

def root(x):
    if x==par[x]:
        return x
    else:
        par[x]=root(par[x])
        return par[x]
        
def connect(x,y):
    rx=root(x)
    ry=root(y)
    if rx!=ry:
        par[rx]=ry
    return

for i in range(n+m):
    for nb in g[i]:
        connect(i,nb)

p=par[0]
ans='YES'
for i in range(n):
    if par[i]!=p:
        ans='NO'

print(ans)

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
g=[[] for _ in range((n+m))]
for i in range(n):
    a=[int(i)-1 for i in input().split()][1:]
    for l in a:
        g[i].append(n+l)
        g[n+l].append(i)

par=[i for i in range(n+m)]

def root(x):
    if x==par[x]:
        return x
    else:
        par[x]=root(par[x])
        return par[x]
        
def connect(x,y):
    rx=root(x)
    ry=root(y)
    if rx==ry:
        0
    else:
        par[rx]=ry
    return

for i in range(n+m):
    for nb in g[i]:
        connect(i,nb)

p=par[0]
ans='YES'
for i in range(n):
    if par[i]!=p:
        ans='NO'

print(ans)

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
g=[[] for _ in range((n+m))]
for i in range(n):
    a=[int(i)-1 for i in input().split()][1:]
    for l in a:
        g[i].append(l)
        g[n+l].append(i)

par=[i for i in range(n+m)]

def root(x):
    if x==par[x]:
        return x
    else:
        par[x]=root(par[x])
        return par[x]
        
def connect(x,y):
    rx=root(x)
    ry=root(y)
    if rx==ry:
        0
    else:
        par[rx]=ry
    return

for i in range(n+m):
    for nb in g[i]:
        connect(i,nb)

p=par[0]
ans='YES'
for i in range(n):
    if par[i]!=p:
        ans='NO'

print(ans)
Problem p03945 (python)

Fixed submission:
s=str(input())
ans=0
for i in range(len(s)-1):
  if s[i]!=s[i+1]:
    ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
s=str(input())
ans=0
for i in range(len(s)-1):
  if s[i]<>[i+1]:
    ans+=1
print(ans)
Problem p03994 (python)

Fixed submission:
#n,x=map(int,input().split())
#a=[int(i) for i in input().split()]
import string
alp=string.ascii_lowercase
di={}
for i in range(26):
    di[alp[i]]=i
s=input()
a=[]
for i in s:
    a.append(i)
l=a.pop()
if a:
    a=a[::-1]
k=int(input())
ans=''
i=0
while a:
    t=a.pop()
    d=(26-di[t])%26
    if d<=k:
        k-=d
        ans+='a'
    else:
        ans+=t
    i+=1
kk=k%26
ans+=alp[(alp.index(l)+kk)%26]
print(ans)

Buggy submission (verdict: Runtime Error):
#n,x=map(int,input().split())
#a=[int(i) for i in input().split()]
import string
alp=string.ascii_lowercase
di={}
for i in range(26):
    di[alp[i]]=i
s=input()
a=[]
for i in s:
    a.append(i)
l=a.pop()
if a:
    a=a[::-1]
k=int(input())
ans=''
i=0
while a:
    t=a.pop()
    d=(26-di[t])%26
    if d<=k:
        k-=d
        #ans+='a'
    else:
        #ans+=t
    i+=1
kk=k%26
#ans+=alp[(alp.index(l)+kk)%26]
print(ans)
Problem p04019 (python)

Fixed submission:
s=set(input())
ans='No'
if s in (set('SN'), set('EW'), set('NEWS')):
  ans='Yes'
print(ans)

Buggy submission (verdict: Runtime Error):
s=set(input())
ans='No'
if s in (set('SN'), set('EW'), set('NEWS')):
  ans='Yes'
peint(ans)
Problem p04020 (python)

Fixed submission:
n=int(input())
tmp, ans=0,0
for i in range(n):
  a=int(input())
  if a==0:
    ans+=tmp//2
    tmp=0
  else:
    tmp+=a
print(ans+tmp//2)

Buggy submission (verdict: Runtime Error):
n=int(input())
tmp, ans=0,0
for i in range(n):
  a=int(input())
  if a=0:
    ans+=tmp//2
    tmp=0
  else:
    tmp+=a
print(ans)
Problem p04041 (python)

Fixed submission:
from heapq import heappush, heappop
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations,combinations
import sys
import bisect
import string
#import math
#import time
#import random
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def StoI():
    return [ord(i)-97 for i in input()]
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['Yes','No']
mo=10**9+7
#ts=time.time()
#sys.setrecursionlimit(10**6)
input=sys.stdin.readline
show_flg=False
#show_flg=True

n,X,Y,Z=MI()
t=1<<(X+Y+Z)
haiku=( (1<<(X+Y+Z)) + (1<<(Y+Z)) + (1<<Z) )>>1
dp=[0]*t
dp[0]=1


for i in range(n):
    tm=[i for i in dp]
    dp=[0]*t
    for k in range(t):
        for d in range(10):
            m=((k<<(d+1))+(1<<d))
            if m&haiku == haiku:
                continue
            else:
                dp[int(m)%t]+=tm[k]
                dp[int(m)%t]%=mo
sub=0
for i in range(t):
    sub+=dp[i]
ans=pow(10,n,mo)-sub
print(ans%mo)

show(ans,sub)
show(dp)
show(n,t,n*t*10)

Buggy submission (verdict: Runtime Error):
from heapq import heappush, heappop
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations,combinations
import sys
import bisect
import string
#import math
#import time
#import random
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def StoI():
    return [ord(i)-97 for i in input()]
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['Yes','No']
mo=10**9+7
#ts=time.time()
#sys.setrecursionlimit(10**6)
input=sys.stdin.readline
show_flg=False
#show_flg=True


n,X,Y,Z=MI()

pt=[[0]*11 for _ in range(11)]

for m in range(1,8):
    if m==1:
        for a in range(1,11):pt[m][a]=1
        continue
    for a in range(1,8):
        an=0
        for i in range(1,11):
            if a-i>=0:an+=pt[m-1][a-i]
        pt[m][a]=an
    
def cnt(m,a):
    if m==1:
        pt[1][a]=1
        return a
    if pt[m][a]!=-1:
        return pt[m][a]
    rt=0
    for i in range(1,11):
        if a-i<=0:
            break
        rt+=cnt(m-1,a-i)
    pt[m][a]=rt
    return rt

ans=0
for x in range(n+1):
    for y in range(x+1,n+1):
        for z in range(y+1,n+1):
            for w in range(z+1,n+1):
                p=1
                p*=pt[y-x][X]
                p*=pt[z-y][Y]
                p*=pt[w-z][Z]
                ans+=p*pow(10,n-(w-x),mo)
                show(x,y,z,w,p)

print(ans%mo)
Problem p02602 (python)

Fixed submission:
# coding: utf-8
#import math
#import numpy
#N = int(input())
def main():
    import sys
    input = sys.stdin.readline
    N, K = map(int,input().split())
    A = list(map(int,input().split()))
    #K =int(input())
    ANS = []
    
    #ANS.append(a)
    for i in range(K,N):
        if A[i-K] < A[i]:
            print("Yes")
        else:
            print("No")
        
        
        #ANS.append(a)
    #print(ANS)
    

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
# coding: utf-8
import math
import numpy
#N = int(input())
N, K = map(int,input().split())
A = list(map(int,input().split()))
#K =int(input())
ANS = []
a = 1
for i in range(K):
    a *= A[K-i-1]
ANS.append(a)
for i in range(K,N):
    a *=A[i]
    a //= A[i-K]
    ANS.append(a)
#print(ANS)
for i in range(N-K):
    if ANS[i+1] > ANS[i]:
        print("Yes")
    else:
        print("No")
Problem p02690 (python)

Fixed submission:
# coding: utf-8

x = int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

D = make_divisors(x)
for i in D:
    for j in range(-10000,10000):
        k = j +  i
        if k**5 - j**5 == x:
            a, b = k, j
            break

print(a,b)

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

x = int(input())
for i in range(-100, 100):
    for j in range(i,1000):
        #print(j**5-i**5)
        if j**5-i**5 == x:
            ans = [j,i]
            break

print(ans)
Problem p02727 (python)

Fixed submission:
# coding: utf-8

x, y, a, b, c = map(int,input().split())
L = []
Pa = list(map(int,input().split()))
Pb = list(map(int,input().split()))
Pc = list(map(int,input().split()))
Pa.sort(reverse = True)
Pb.sort(reverse = True)
Pc.sort(reverse = True)

ca = 0
cb = 0
cc = 0
flg1 = True
flg2 = True
flg3 = True
ans = 0
for i in range(x+y):
    if ca == x:
        flg1 = False
        ca = 0
        Pa[ca] = 0
    if cb == y:
        flg2 = False
        cb = 0
        Pb[cb] = 0
    if cc == c:
        flg3 = False
        cc = 0
        Pc[cc] = 0
    if Pa[ca] == max(Pa[ca], Pb[cb], Pc[cc]) and flg1:
        ans += Pa[ca]
        ca += 1
    elif Pb[cb] == max(Pa[ca], Pb[cb], Pc[cc]) and flg2:
        ans += Pb[cb]
        cb += 1
    elif Pc[cc] == max(Pa[ca], Pb[cb], Pc[cc]) and flg3:
        ans += Pc[cc]
        cc += 1
        #print("###")

print(ans)

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

x, y, a, b, c = map(int,input().split())
L = []
Pa = list(map(int,input().split()))
Pb = list(map(int,input().split()))
Pc = list(map(int,input().split()))
Pa.sort(reverse = True)
Pb.sort(reverse = True)
Pc.sort(reverse = True)

ca = 0
cb = 0
cc = 0
flg1 = True
flg2 = True
ans = 0
for i in range(x+y):
    if ca == x:
        flg1 = False
        ca = 0
        Pa[ca] = 0
    if cb == y:
        flg2 = False
        cb = 0
        Pb[cb] = 0
    if Pa[ca] == max(Pa[ca], Pb[cb], Pc[cc]) and flg1:
        ans += Pa[ca]
        ca += 1
    elif Pb[cb] == max(Pa[ca], Pb[cb], Pc[cc]) and flg2:
        ans += Pb[cb]
        cb += 1
    else:
        ans += Pc[cc]
        cc += 1

print(ans)
Problem p02797 (python)

Fixed submission:
# coding: utf-8
# Your code here!
N,K,S=map(int,input().split())
ans=[]
p=N-K

if S!=10**9:
    for i in range(N-K):
        ans.append(str(S+1))
    for i in range(K):
        ans.append(str(S))
else:
    for i in range(N-K):
        ans.append(str(1))
    for i in range(K):
        ans.append(str(S))
#print(ans)
#ans=' '.join(ans)

#print(len(ans))


#print(" ".join([str(n) for n in ans]))
print(*ans)

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

N, S, K = map(int,input().split())
if S == 10**9:
    A = [S-1] * (N-K) + [S] * K
else:
    A = [S+1] * (N-K) + [S] * K

print(A)
Problem p02885 (python)

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

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

if a <= b*2:
  print(0)
else:
  print(a-b*2)
Problem p02886 (python)

Fixed submission:
N = int(input())
l=list(map(int,input().split()))
ans=0
N_=int((N*(N-1))/2)
for i in range(N-1):
  life=0
  for j in range(i+1,N):
    life+=l[i]*l[j]
  ans+=life
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
l=list(map(int,input().split()))
ans=0
N_=int((N*(N-1))/2)
for i in range(N_-1):
  life=0
  for j in range(i+1,N_):
    life+=l[i]*l[j]
  ans+=life
print(ans)
Problem p02887 (python)

Fixed submission:
import copy

N = int(input())
S = list(input())
l = copy.deepcopy(S)

for i in range(N-1):
  if S[i] == S[i+1]:
    l[i]=0
  
l_=[i for i in l if i!=0]
print(len(l_))

Buggy submission (verdict: Runtime Error):
N = int(input())
S=sorted(list(map(input())))
cnt=0
for i in range(N-1):
  if S[i]!=S[i+1]:
    cnt+=1
    
print(cnt)

Buggy submission (verdict: Runtime Error):
N = int(input())
S=sorted(list(map(input())))
cnt=0
for i in range(N-1):
  if S[i]==S[i+1]:
    cnt+=1
    
print(cnt)
Problem p02888 (python)

Fixed submission:
from bisect import bisect_right
 
N = int(input())
L = sorted(list(map(int, input().split())))
 
ans = 0
for i in range(1, N-1):
    for j in range(i+1, N):
        ans += max(0, i - bisect_right(L, L[j] - L[i]))
print(ans)

Buggy submission (verdict: Runtime Error):
from bisect import bisect_right
 
N = int(input())
L = sorted(list(map(int, input().split())))
 
ans = 0
for i in range(1, N-1):
    for j in range(i+1, N):
        ans += max(0, i - bisect_right(L, L[j] - L[i]))
print(ans)
from bisect import bisect_right

N = int(input())
L = sorted(list(map(int, input().split())))

ans = 0
for i in range(1, N-1):
    for j in range(i+1, N):
        ans += max(0, i - bisect_right(L, L[j] - L[i]))
print(ans)
Problem p02900 (python)

Fixed submission:
#coding utf-8
import fractions
import math
a, b = map(int,input().split())
ans = 0
g = fractions.gcd(a,b)
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

ans = len(factorization(g)) + 1
if a == 1 or b == 1:
    ans = 1
print(ans)

Buggy submission (verdict: Runtime Error):
#coding utf-8
import fractions
import math
a, b = map(int,input().split())
ans = 0
g = math.gcd(a,b)
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

ans = len(factorization(g)) + 1
if a == 1 or b == 1:
    ans = 1
print(ans)
Problem p02911 (python)

Fixed submission:
# coding: utf-8
# Your code here!

N, K, Q = map(int,input().split())
L = [0]*N
for i in range(Q):
    a = int(input())
    L[a-1] += 1

for i in range(N):
    if Q - L[i] < K:
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
N,K,Q = map(int,input().split())
K=K-Q
 
a=[]
for i in range(Q):
  a.append(int(input()))
cnt=[K-Q]*N
for i in range(1,N+1):
  cnt[i-1] += a.count(i)
  if cnt[i] > 0:
    print("Yes")
  else:
    print("No")

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

a=[]
for i in range(Q):
  a.append(int(input()))
cnt=[K-Q]*N
for i in range(1,N+1):
  a.count(i) += cnt[i-1]
  if cnt[i] > 0:
    print("Yes")
  else:
    print("No")
Problem p02917 (python)

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

Buggy submission (verdict: Runtime Error):
N=int(input())
A=[0]*N
B=list(map(int,input().split()))
A[0]=B[0]
A[N-1]=B[N-2]
for i in range(1,N-1):
  A[i]=min(B[i],B[i+1])
  
print(sum(A))
Problem p02923 (python)

Fixed submission:
N = int(input())
H = [int(x) for x in input().split()]
dp = [0] * len(H) 
for i in range(1, len(H)):
  if H[i-1] >= H[i]: 
    dp[i] = dp[i-1] + 1
ans = max(dp)
print(ans)

Buggy submission (verdict: Runtime Error):
N =int(input())
h=list(map(int,input().split()))
L = [0]*(N-1)

for i in range(N-2,-1,-1):
  if h[i] >= h[i+1]:
    L[i] = L[i+1] + 1
    
print(max(L))

Buggy submission (verdict: Runtime Error):
N = int(input())
h = list(map(int,input().split()))
L = [0] * (N-1)

for i in range(N-2,-1,-1):
  if h[i] >= h[i+1]:
    L[i+1] = L[i] + 1
    
print(max(L))

Buggy submission (verdict: Runtime Error):
N = int(input())
h = list(map(int, input().split()))
cnt=[0]*(N-1)
ans=[0]*(N-1)
counter=1
if N==1:
  print(0)
else:
  for i in range(N-1):
    if h[i] >= h[i+1]:
      cnt[i]=counter
    else:
      counter+=1
  for j in range(1,counter+1):
    ans[j]=cnt.count(j)
  print(max(ans))

Buggy submission (verdict: Runtime Error):
N = int(input())
h = list(map(int, input().split()))
cnt=[0]*(N-1)
ans=[0]*(N-1)
counter=1
if N==1:
  print(0)
else:
  for i in range(N-1):
    if h[i] >= h[i+1]:
      cnt[i]=counter
    else:
      counter+=1
  for j in range(1,counter+1):
    ans[j-1]=cnt.count(j)
  print(max(ans))

Buggy submission (verdict: Runtime Error):
N = int(input())
h_ = list(input().split())
h = [int(i) for i in h_]
cnt=[0]*(N-1)
ans=[0]*(N-1)
counter=1
if N==1:
  print(0)
else:
  for i in range(N-1):
    if h[i] >= h[i+1]:
      cnt[i]=counter
    else:
      counter+=1
  for j in range(1,counter+1):
    ans[j]=cnt.count(j)
  print(max(ans))

Buggy submission (verdict: Runtime Error):
N = int(input())
h_ = list(input().split())
h = [int(i) for i in h_]
cnt=[0]*(N-1)
ans=[0]*(N-1)
counter=1
if N==1:
  print(0)
else:
  for i in range(N-1):
    if h[i] >= h[i+1]:
      cnt[i]=counter
    else:
      counter+=1
for j in range(N-1):
  ans[j]=cnt.count(j)
print(max(ans))

Buggy submission (verdict: Runtime Error):
N = int(input())
h_ = list(input().split())
h = [int(i) for i in h_]
cnt=[0]*(N-1)
for i in range(N-1):
  for j in range(i,N-1):
    if h[j] >= h[j+1]:
      cnt[i]+=1
    else:
      break
print(max(cnt))
Problem p02945 (python)

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

c=a+b
d=a-b
e=a*b
print(max(c,d,e))

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

x=a+b
y=a-b
z=a*b
print(max(x,y,z))
Problem p02953 (python)

Fixed submission:
N = int(input())
H = list(map(int,input().split()))
stp=0
for i in range(N-1,0,-1):
    if H[i]+1 == H[i-1]:
        H[i-1]-=1
    elif H[i] >= H[i-1]:
        pass
    elif H[i] < H[i-1]+1:
        print("No")
        stp = 1
        break
if stp != 1:
    print("Yes")

Buggy submission (verdict: Runtime Error):
#解答２
N = int(input())
H = list(map(int,input().split()))
stp = 0
for i in range(N-1):
    if H[i] == H[i+1]+1:#そのままforループ。次が１だけ低ければ１足して、
        H[i+1] += 1　　　
    elif H[i+1] >= H[i]:#同じ高さ以上なら無問題、
         pass
    else:#２以上低ければアウト
        stp += 1
        print("No")
        break
if stp == 0:
    print("Yes")
Problem p03001 (python)

Fixed submission:
#解答
w, h, x, y = list(map(int, input().split()))
ans = 0
 
if ((x, y) == (w / 2, h / 2)):
    print("{s} {mul}".format(s=(w * h / 2), mul=1))
else:
    print("{s} {mul}".format(s=(w * h / 2), mul=0))

Buggy submission (verdict: Runtime Error):
#解答
w, h, x, y = list(map(int, input().split()))
ans = 0
 
if ((x, y) == (w / 2, h / 2)):
    print("{s} {mul}".format(s=(w * h / 2), mul=1))
else:
    print("{s} {mul}".format(s=(w * h / 2), mul=0))
w, h, x, y = list(map(int, input().split()))
ans = 0

if ((x, y) == (w / 2, h / 2)):
    print("{s} {mul}".format(s=(w * h / 2), mul=1))
else:
    print("{s} {mul}".format(s=(w * h / 2), mul=0))
Problem p03029 (python)

Fixed submission:
a,b=map(int,input().split())
n=int((a*3+b)/2)
 
print(n)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input(),split())
n=int((a*3+b)/2)

print(n)