Buggy python submission (verdict: Time Limit Exceeded):
N=[int(e) for e in input().split()]
p=[(int(e)+1)/2.0 for e in input().split()]
p2=[0.]*(N[0]-N[1]+1)
for i in range(N[0]-N[1]+1):
    p2[i]=sum(p[i:(i+N[1])])

print(max(p2))

Fixed submission:
N,K=map(int,input().split())
p=list(map(int,input().split()))
for i in range(N-1):
    p[i+1]=p[i+1]+p[i]
max=p[K-1]
if N>K:
    for i in range(1,N-K+1):
        tmp=p[i+K-1]-p[i-1]
        if max < tmp:
            max=tmp
print((max+K)/2.)

Buggy python submission (verdict: Time Limit Exceeded):
N=[int(e) for e in input().split()]
p=[int(e) for e in input().split()]
p2=[0]*(N[0]-N[1]+1)
for i in range(N[0]-N[1]+1):
    a=0
    for j in range(N[1]):
        a=a+(p[i+j]+1)
    p2[i]=a

print(max(p2)/2.)

Fixed submission:
N,K=map(int,input().split())
p=list(map(int,input().split()))
for i in range(N-1):
    p[i+1]=p[i+1]+p[i]
max=p[K-1]
if N>K:
    for i in range(1,N-K+1):
        tmp=p[i+K-1]-p[i-1]
        if max < tmp:
            max=tmp
print((max+K)/2.)

Buggy python submission (verdict: Runtime Error):
N=input().split()
p=map(int, input().split())
NN=int(N[0])
MM=int(N[1])
p2=[0.]*(NN-MM+1)
for i in range(NN-MM+1):
    a=0.
    for j in range(MM):
        a=a+(p[i+j]+1)/2
    p2[i]=a
print(max(p2))

Fixed submission:
N,K=map(int,input().split())
p=list(map(int,input().split()))
for i in range(N-1):
    p[i+1]=p[i+1]+p[i]
max=p[K-1]
if N>K:
    for i in range(1,N-K+1):
        tmp=p[i+K-1]-p[i-1]
        if max < tmp:
            max=tmp
print((max+K)/2.)

Buggy python submission (verdict: Time Limit Exceeded):
N=input().split()
p=[int(e) for e in input().split()]
NN=int(N[0])
MM=int(N[1])
p2=[0.]*(NN-MM+1)
for i in range(NN-MM+1):
    for j in range(MM):
        p2[i]=p2[i]+(p[i+j]+1)/2

print(max(p2))

Fixed submission:
N,K=map(int,input().split())
p=list(map(int,input().split()))
for i in range(N-1):
    p[i+1]=p[i+1]+p[i]
max=p[K-1]
if N>K:
    for i in range(1,N-K+1):
        tmp=p[i+K-1]-p[i-1]
        if max < tmp:
            max=tmp
print((max+K)/2.)

Buggy python submission (verdict: Time Limit Exceeded):
N=[int(e) for e in input().split()]
p=[int(e) for e in input().split()]
p2=[0.]*(N[0]-N[1]+1)
for i in range(N[0]-N[1]+1):
    for j in range(N[1]):
        p2[i]=p2[i]+(p[i+j]+1)/2
 
print(max(p2))

Fixed submission:
N,K=map(int,input().split())
p=list(map(int,input().split()))
for i in range(N-1):
    p[i+1]=p[i+1]+p[i]
max=p[K-1]
if N>K:
    for i in range(1,N-K+1):
        tmp=p[i+K-1]-p[i-1]
        if max < tmp:
            max=tmp
print((max+K)/2.)

Buggy python submission (verdict: Time Limit Exceeded):
N=[int(e) for e in input().split()]
p=[int(e) for e in input().split()]
p2=[0.]*(N[0]-N[1]+1)
for i in range(N[0]-N[1]+1):
    for j in range(N[1]):
        p2[i]=p2[i]+(p[i+j]+1)/2

print(max(p2))

Fixed submission:
N,K=map(int,input().split())
p=list(map(int,input().split()))
for i in range(N-1):
    p[i+1]=p[i+1]+p[i]
max=p[K-1]
if N>K:
    for i in range(1,N-K+1):
        tmp=p[i+K-1]-p[i-1]
        if max < tmp:
            max=tmp
print((max+K)/2.)

Buggy python submission (verdict: Time Limit Exceeded):
N=[int(e) for e in input().split()]
p=[(int(e)+1)/2 for e in input().split()]
p2=[0.]*(N[0]-N[1]+1)
for i in range(N[0]-N[1]+1):
    for j in range(N[1]):
        p2[i]=p2[i]+p[i+j]
print(max(p2))

Fixed submission:
N,K=map(int,input().split())
p=list(map(int,input().split()))
for i in range(N-1):
    p[i+1]=p[i+1]+p[i]
max=p[K-1]
if N>K:
    for i in range(1,N-K+1):
        tmp=p[i+K-1]-p[i-1]
        if max < tmp:
            max=tmp
print((max+K)/2.)