Buggy python submission (verdict: Runtime Error):
from itertools import accumulate
N,K = map(int,input().split())
P = list(map(int,input().split()))
ans = []
for i in range(N):
  P[i] = (P[i]+1)/2
hope = list(accumulate(P))
 
for j in range(N-K):
  ans.append(hope[j+K]-hope[j])
print(max(ans))

Fixed submission:
N,K = map(int,input().split())
P = list(map(int,input().split()))
for i in range(N):
  P[i] = (P[i]+1)/2
now = sum(P[:K])
ans = now
for j in range(N-K):
  now = now - P[j] + P[j+K]
  ans = max(ans,now)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
P = list(map(int,input().split()))
ans = 0
hope = []
for i in range(N):
  hope.append((P[i]+1)/2)

for j in range(N-K+1):
  ans = max(ans,sum(hope[j:j+K]))

print(ans)

Fixed submission:
N,K = map(int,input().split())
P = list(map(int,input().split()))
for i in range(N):
  P[i] = (P[i]+1)/2
now = sum(P[:K])
ans = now
for j in range(N-K):
  now = now - P[j] + P[j+K]
  ans = max(ans,now)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from decimal import *
N,K = map(int,input().split())
P = list(map(int,input().split()))
ans = 0
hope = []
for i in range(N):
  hope.append(Decimal((P[i]+1)/2))

for j in range(N-K+1):
  ans = max(ans,sum(hope[j:j+K]))

print(ans)

Fixed submission:
N,K = map(int,input().split())
P = list(map(int,input().split()))
for i in range(N):
  P[i] = (P[i]+1)/2
now = sum(P[:K])
ans = now
for j in range(N-K):
  now = now - P[j] + P[j+K]
  ans = max(ans,now)
print(ans)

Buggy python submission (verdict: Runtime Error):
N,K = map(int,input().split())
P = list(map(int,input().split()))
for i in range(N):
  P[i] = (P[i]+1)/2
R = sum(Q[:K])
ans = R
for j in range(N-K):
  R = R - P[j] + P[j+K]
  ans = max(ans,R)
print(ans)

Fixed submission:
N,K = map(int,input().split())
P = list(map(int,input().split()))
for i in range(N):
  P[i] = (P[i]+1)/2
now = sum(P[:K])
ans = now
for j in range(N-K):
  now = now - P[j] + P[j+K]
  ans = max(ans,now)
print(ans)

Buggy python submission (verdict: Runtime Error):
N,K = map(int,input().split())
P = list(map(int,input().split()))
Q = []*N
for i in range(N):
  Q[i] = (P[i]+1)/2
R = sum(Q[:K])
ans = R
for j in range(N-K):
  R = R - Q[j] + Q[j+K]
  ans = max(ans,R)
print(ans)

Fixed submission:
N,K = map(int,input().split())
P = list(map(int,input().split()))
for i in range(N):
  P[i] = (P[i]+1)/2
now = sum(P[:K])
ans = now
for j in range(N-K):
  now = now - P[j] + P[j+K]
  ans = max(ans,now)
print(ans)

Buggy python submission (verdict: Runtime Error):
N,K = map(int,input().split())
P = [int(input()) for i in range(N)]
Q = []*N
for i in range(N):
  Q[i] = (P[i]+1)/2
R = sum(Q[:K])
ans = R
for j in range(N-K):
  R = R - Q[j] + Q[j+K]
  ans = max(ans,R)
print(ans)

Fixed submission:
N,K = map(int,input().split())
P = list(map(int,input().split()))
for i in range(N):
  P[i] = (P[i]+1)/2
now = sum(P[:K])
ans = now
for j in range(N-K):
  now = now - P[j] + P[j+K]
  ans = max(ans,now)
print(ans)

Buggy python submission (verdict: Runtime Error):
N,K = map(int,input().split())
P = [int(input()) for i in range(N)]
Q = []*N
for i in range(N):
  Q[i] = (P[i]+1)/2
R = 0
for j in range(K):
  R += Q[j]
for k in range(N-K):
  R = R - Q[k] + Q[k+K]
  ans = max(R)
print(ans)

Fixed submission:
N,K = map(int,input().split())
P = list(map(int,input().split()))
for i in range(N):
  P[i] = (P[i]+1)/2
now = sum(P[:K])
ans = now
for j in range(N-K):
  now = now - P[j] + P[j+K]
  ans = max(ans,now)
print(ans)

Buggy python submission (verdict: Runtime Error):
N,K = map(int,input().split())
P = [int(input()) for i in range(N)]
Q = []*N
for i in range(N):
  Q[i] = (P[i]+1)/2
R = 0
for j in range(K):
  R += Q[j]
for k in range(N-K)
  R = R - Q[k] + Q[k+K]
  ans = max(R)
print(ans)

Fixed submission:
N,K = map(int,input().split())
P = list(map(int,input().split()))
for i in range(N):
  P[i] = (P[i]+1)/2
now = sum(P[:K])
ans = now
for j in range(N-K):
  now = now - P[j] + P[j+K]
  ans = max(ans,now)
print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
K = int(input())
P = list(map(int,input().split()))
for i in range(N):
  P[i] = (P[i]+1)/2
now = sum(P[:K])
ans = now
for j in range(N-K):
  ans = ans - P[j] + P[j+K]
  ans = max(ans,now)
print(ans)



Fixed submission:
N,K = map(int,input().split())
P = list(map(int,input().split()))
for i in range(N):
  P[i] = (P[i]+1)/2
now = sum(P[:K])
ans = now
for j in range(N-K):
  now = now - P[j] + P[j+K]
  ans = max(ans,now)
print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
K = int(input())
P = list(map(int,input().split()))
for i in range(N):
  P[i] = (i+1)/2
now = sum(P[:K])
ans = now
for j in range(N-K):
  ans = ans - P[j] + P[j+K]
  ans = max(ans,now)
print(ans)



Fixed submission:
N,K = map(int,input().split())
P = list(map(int,input().split()))
for i in range(N):
  P[i] = (P[i]+1)/2
now = sum(P[:K])
ans = now
for j in range(N-K):
  now = now - P[j] + P[j+K]
  ans = max(ans,now)
print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
K = int(input())
P = list(map(int,input().split()))
for i in range(N):
  P[i] = (i+1)/2
now = sum(P[:K])
for j in range(N-K):
  ans = ans - P[j] + P[j+K]
  ans = max(ans,now)
  now = ans
print(ans)



Fixed submission:
N,K = map(int,input().split())
P = list(map(int,input().split()))
for i in range(N):
  P[i] = (P[i]+1)/2
now = sum(P[:K])
ans = now
for j in range(N-K):
  now = now - P[j] + P[j+K]
  ans = max(ans,now)
print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
K = int(input())
P = list(map(int,input().split()))
for i in range(N):
  P[i] = (i+1)/2
now = P[:K]
for j in range(N-K):
  ans = ans - P[j] + P[j+K]
  ans = max(ans,now)
  now = ans
print(ans)

Fixed submission:
N,K = map(int,input().split())
P = list(map(int,input().split()))
for i in range(N):
  P[i] = (P[i]+1)/2
now = sum(P[:K])
ans = now
for j in range(N-K):
  now = now - P[j] + P[j+K]
  ans = max(ans,now)
print(ans)

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

Fixed submission:
N,K = map(int,input().split())
P = list(map(int,input().split()))
for i in range(N):
  P[i] = (P[i]+1)/2
now = sum(P[:K])
ans = now
for j in range(N-K):
  now = now - P[j] + P[j+K]
  ans = max(ans,now)
print(ans)

Buggy python submission (verdict: Runtime Error):
N,K = map(int,input().split())
P = list(map(int,input().split()))
dp = []*N+1
dp[0] = 0
for i in range(N):
    ans = max(P[i]//0 for j in range(P[i])+P[i+1]//0 for j in range(P[i+1])+P[i+2]//0 for j in range(P[i+2]))
print(ans)

Fixed submission:
N,K = map(int,input().split())
P = list(map(int,input().split()))
for i in range(N):
  P[i] = (P[i]+1)/2
now = sum(P[:K])
ans = now
for j in range(N-K):
  now = now - P[j] + P[j+K]
  ans = max(ans,now)
print(ans)

Buggy python submission (verdict: Runtime Error):
N,K = map(int,input().split())
P = list(map(int,input().split()))
dp = []*N+1
dp[0] = 0
for i in range(N):
    dp[i+1] = max(dp[i]//P[i],dp[i+1]//P[i+1])
hope = max(dp[i:i+3])
hopes = sum(hope)

Fixed submission:
N,K = map(int,input().split())
P = list(map(int,input().split()))
for i in range(N):
  P[i] = (P[i]+1)/2
now = sum(P[:K])
ans = now
for j in range(N-K):
  now = now - P[j] + P[j+K]
  ans = max(ans,now)
print(ans)