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

p = [(n+1)/2 for n in p]
#import numpy as np
#s = np.cumsum(p)

max_e=0
for i in range(N-(K-1)):
  v=p[i:K+i]
  smax=sum(v)
  #e=(K+smax)/2

  max_e = max(max_e, smax)
    
print(max_e)

Fixed submission:
N,K=map(int, input().split())
p = list(map(int, input().split()))

p = [(n+1)/2 for n in p]
import numpy as np
s = np.cumsum(p)

e=s[K-1]
max_e=e
for i in range(1,N-K):
  e=s[i+K]-s[i]
  max_e = max(max_e, e)
    
print(max_e)

Buggy python submission (verdict: Runtime Error):
N,K=map(int, input().split())
p = list(map(int, input().split()))

#p = [(n+1)/2 for n in p]
import numpy as np
s = np.cumsum(p)

e=s[K-1]
max_e=(K+e)/2
for i in range(1,N-K):
  e=s[i+K]-s[i]
  e=(K+smax)/2
  max_e = max(max_e, e)
    
print(max_e)

Fixed submission:
N,K=map(int, input().split())
p = list(map(int, input().split()))

p = [(n+1)/2 for n in p]
import numpy as np
s = np.cumsum(p)

e=s[K-1]
max_e=e
for i in range(1,N-K):
  e=s[i+K]-s[i]
  max_e = max(max_e, e)
    
print(max_e)

Buggy python submission (verdict: Runtime Error):
N,K=map(int, input().split())
p = list(map(int, input().split()))

#p = [(n+1)/2 for n in p]
import numpy as np
s = np.cumsum(p)

e=s[K-1]
max_e=(K+e)/2
if N==1:
  print(max_e)
else:
for i in range(0,N-K-1):
    e=s[i+K]-s[i]
    #print(e)
    e=(K+e)/2
    #print(e)
    max_e = max(max_e, e)

  print(max_e)

Fixed submission:
N,K=map(int, input().split())
p = list(map(int, input().split()))

p = [(n+1)/2 for n in p]
import numpy as np
s = np.cumsum(p)

e=s[K-1]
max_e=e
for i in range(1,N-K):
  e=s[i+K]-s[i]
  max_e = max(max_e, e)
    
print(max_e)

Buggy python submission (verdict: Runtime Error):
N,K=map(int, input().split())
p = list(map(int, input().split()))

p = [(N+1)/2 for n in p]
import numpy as np
s = np.cumsum(p)

max_e=0
for i in range(N-K+1):
  e=s[i+K]-s[i]
  max_e = max(max_e, e)
    
print(max_e)

Fixed submission:
N,K=map(int, input().split())
p = list(map(int, input().split()))

p = [(n+1)/2 for n in p]
import numpy as np
s = np.cumsum(p)

e=s[K-1]
max_e=e
for i in range(1,N-K):
  e=s[i+K]-s[i]
  max_e = max(max_e, e)
    
print(max_e)

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

max_e=0
for i in range(N-(K-1)):
  v=p[i:K+i]
  smax=sum(v)
  e=(K+smax)/2

  if max_e<e:
    max_e=e
    
print(max_e)

Fixed submission:
N,K=map(int, input().split())
p = list(map(int, input().split()))

p = [(n+1)/2 for n in p]
import numpy as np
s = np.cumsum(p)

e=s[K-1]
max_e=e
for i in range(1,N-K):
  e=s[i+K]-s[i]
  max_e = max(max_e, e)
    
print(max_e)

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

max_e=0
for i in range(N-(K-1)):
  v=p[i:K+i]
  smin=len(v)
  smax=sum(v)
  kou=smax-(smin-1)
  e=(smin+smax)/2

  if max_e<e:
    max_e=e
    
print(max_e)

Fixed submission:
N,K=map(int, input().split())
p = list(map(int, input().split()))

p = [(n+1)/2 for n in p]
import numpy as np
s = np.cumsum(p)

e=s[K-1]
max_e=e
for i in range(1,N-K):
  e=s[i+K]-s[i]
  max_e = max(max_e, e)
    
print(max_e)

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

def calc(n,a,l):
  return (a+l)/2

max_e=0
for i in range(N-(K-1)):
  v=p[i:K+i]
  #print(v)
  smin=len(v)
  smax=sum(v)
  kou=smax-(smin-1)
  e=calc(kou,smin,smax)
  #e=list(map(calc, v))
  #print(e)
  #e=sum(e)

  if max_e<e:
    max_e=e

print(max_e)

Fixed submission:
N,K=map(int, input().split())
p = list(map(int, input().split()))

p = [(n+1)/2 for n in p]
import numpy as np
s = np.cumsum(p)

e=s[K-1]
max_e=e
for i in range(1,N-K):
  e=s[i+K]-s[i]
  max_e = max(max_e, e)
    
print(max_e)

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

def calc(n):
  return (n+1)/2

max_e=0
for i in range(N-(K-1)):
  v=p[i:K+i]
  #print(v)
  e=list(map(calc, v))
  #print(e)
  e=sum(e)

  if max_e<e:
    max_e=e

print(max_e)

Fixed submission:
N,K=map(int, input().split())
p = list(map(int, input().split()))

p = [(n+1)/2 for n in p]
import numpy as np
s = np.cumsum(p)

e=s[K-1]
max_e=e
for i in range(1,N-K):
  e=s[i+K]-s[i]
  max_e = max(max_e, e)
    
print(max_e)