Harryxun/sft_time huggingface dataset:
### BUGGY CODE ###

N, K = map(int, input().split())
MOD = 1000000007

def f(n, k, i):
  if i == 1:
    return n - k + 1
  
  ret = 0
  for j in range(1, k - i + 2):
    for l in range(j + 1, n - k + j + 1):
      ret += f(n - l, k - j, i - 1)
  return ret

for i in range(1, K + 1):
  print(f(N, K, i) % MOD)

### FIXED CODE ###

N, K = map(int, input().split())
MOD = 1000000007

fact = [1]
for i in range(1, N):
  fact.append(fact[-1] * i)

def comb(n, k):
  return (fact[n] // (fact[n - k] * fact[k])) % MOD

def f2(n, k):
  return comb(n + k - 1, k - 1)

def f(n, k):
  if n < k:
    return 0
  if n == 0 and k == 0:
    return 1
  if k < 1:
    return 0
  return f2(n - k, k)

for i in range(1, K + 1):
  blue = f(K, i)
  red = (f(N - K, i - 1) + 2 * f(N - K, i) + f(N - K, i + 1)) % MOD
  ans = blue * red
  print(ans % MOD)
### BUGGY CODE ###

n = int(input())
li = list(map(int, input().split()))
li.sort()
inf = (10**6)+1
isprime = [False]*(inf)
for i in li:
    isprime[i] = [True]
for i in range(len(li)):
    if i+1<len(li):
      if li[i] == li[i+1]:
        isprime[li[i]] = False
for i in li:
    #if not isprime[i]:
    #    continue
    for k in range(i+i, inf, i):
        isprime[k] = False
prime_list = []
for i in range(inf):
    if isprime[i]:
        prime_list.append(i)
print(len(prime_list))


### FIXED CODE ###

n = int(input())
li = list(map(int, input().split()))
li.sort()
inf = (10**6)+1
isprime = [False]*(inf+1)
for i in li:
    isprime[i] = True
temp = 0
for i in li:
    if i == temp:
        isprime[i] = False
    if not isprime[i]:
        continue
    for k in range(i*2, inf+1, i):
        isprime[k] = False
    temp = i
prime_list = []
for i in range(len(li)):
      if i+1<len(li):
            if li[i] == li[i+1]:
                isprime[li[i]] = False
for i in range(1, inf+1):
    if isprime[i]:
        prime_list.append(i)
print(len(prime_list))
### BUGGY CODE ###

#!/usr/bin/env python3
from collections import deque, Counter
from heapq import heappop, heappush
from bisect import bisect_right

def main():
    H, W = map(int, input().split())
    S = [input() for _ in range(H)]

    # L[i][j]: このマスが光る時に左方向に照らされるマスの個数
    L = [[0]*W for _ in range(H)]
    R = [[0]*W for _ in range(H)]

    for i in range(H):
        for j in range(1,W):
            if S[i][j] == '.':
                if S[i][j-1] == '.': 
                    L[i][j] = L[i][j-1] + 1
            if S[i][W-j-1] == '.':
                if S[i][W-j] == '.': 
                    R[i][W-j-1] = R[i][W-j] + 1
    
    # U[i][j]: このマスが光る時に上方向に照らされるマスの個数
    U = [[0]*W for _ in range(H)]
    D = [[0]*W for _ in range(H)]

    for j in range(W):
        for i in range(1,H):
            if S[i][j] == '.':
                if S[i-1][j] == '.': 
                    U[i][j] = U[i-1][j] + 1
            if S[H-i-1][j] == '.':
                if S[H-i][j] == '.': 
                    D[H-i-1][j] = D[H-i][j] + 1
    ans = 0
    
    for i in range(H):
        for j in range(W):
            tmp = 1
            tmp += L[i][j] + R[i][j] + U[i][j] + D[i][j]
            ans = max(tmp,ans)
    
    print(ans)
    
if __name__ == "__main__":
    main()


### FIXED CODE ###

#!/usr/bin/env python3

def main():
    H, W = map(int, input().split())
    S = [input() for _ in range(H)]

    # L[i][j]: このマスが光る時に左方向に照らされるマスの個数
    L = [[0]*W for _ in range(H)]
    R = [[0]*W for _ in range(H)]

    for i in range(H):
        for j in range(1,W):
            if S[i][j] == '.':
                if S[i][j-1] == '.': 
                    L[i][j] = L[i][j-1] + 1
            if S[i][W-j-1] == '.':
                if S[i][W-j] == '.': 
                    R[i][W-j-1] = R[i][W-j] + 1
    
    # U[i][j]: このマスが光る時に上方向に照らされるマスの個数
    U = [[0]*W for _ in range(H)]
    D = [[0]*W for _ in range(H)]

    for j in range(W):
        for i in range(1,H):
            if S[i][j] == '.':
                if S[i-1][j] == '.': 
                    U[i][j] = U[i-1][j] + 1
            if S[H-i-1][j] == '.':
                if S[H-i][j] == '.': 
                    D[H-i-1][j] = D[H-i][j] + 1
    ans = 0
    
    for i in range(H):
        for j in range(W):
            tmp = 1
            tmp += L[i][j] + R[i][j] + U[i][j] + D[i][j]
            ans = max(tmp,ans)
    
    print(ans)
    
if __name__ == "__main__":
    main()
### BUGGY CODE ###

def main():
    import sys
    from collections import Counter

    input = sys.stdin.readline

    s = str(input().rstrip())
    num = ""
    li = []
    f = 0
    mi = 0
    li_append = li.append

    cm = {}
    def cmb(n):
        if n in cm:
            return cm[n]
        else:
            a = n * (n - 1) // 2
            cm[n] = a
            return a



    for i in range(1, len(s) + 1):
        num = s[-i] + num
        li_append(int(num) % 2019)
        if num[0] == "0":
            f += 1
        else:
            mi += cmb(f+1)
            f = 0

    co = Counter(li)
    val = [i for i in co.values() if i > 1]
    ans_1 = 0

    for x in val:
        ans_1 += cmb(x)
    ans2 = 0
    if 0 in co:
        ans2 = co[0]
    print(ans_1 + ans2 - mi)

if __name__ == "__main__":
    main()

### FIXED CODE ###

def main():
    import sys
    from collections import defaultdict
    dic = defaultdict(int)

    input = sys.stdin.readline

    s = str(input().rstrip())
    m = 0
    before_m = 0.1

    for i in range(1, len(s) + 1):
        before_m = int(before_m*10)%2019
        m_ad = (int(s[-i]) * before_m) % 2019
        m = (m_ad + m) % 2019
        dic[m] += 1

    ans1 = 0

    for x in dic.values():
        if x > 1:
            ans1 += x * (x - 1) // 2
    ans2 = dic[0]

    print(ans1 + ans2)

if __name__ == "__main__":
    main()
### BUGGY CODE ###

def test(a):
    print(*a)
    for i in range(len(a) - 1):
        a = [abs(a1 - a0) for a0, a1 in zip(a, a[1:])]
        print(' ' * i, *a)


def first(aaa):
    aaa = list(map(int, aaa))
    aaa = [abs(a1 - a0) for a0, a1 in zip(aaa, aaa[1:])]
    return ''.join(map(str, aaa))


def last(aaa):
    aaa = list(map(int, aaa))
    for i in range(len(aaa) - 1):
        aaa = [abs(a1 - a0) for a0, a1 in zip(aaa, aaa[1:])]
    return aaa[0]


def prepare():
    # for v in product([0, 1, 2], repeat=10):
    ret = [0] * (3 ** 10)
    for i in range(3 ** 10):
        v = i
        v, m1 = divmod(v, 3)
        tmp = []
        for _ in range(9):
            v, m2 = divmod(v, 3)
            tmp.append(abs(m1 - m2))
            m1 = m2
        tmp.reverse()
        for _ in range(8):
            tmp = [abs(a1 - a0) for a0, a1 in zip(tmp, tmp[1:])]
        ret[i] = str(tmp[0])
    return ret


# test([2, 3, 1, 1, 3, 1, 2, 3, 1, 2])
# test([2, 3, 1, 1, 3, 2, 2, 3, 1, 2])
# test([2, 3, 1, 1, 3, 3, 2, 3, 1, 2])
# test([1, 3, 1, 3, 1, 3, 1, 3, 1, 3])

n = int(input())
aaa = input()
aaa = first(aaa)
ppp = prepare()
while len(aaa) >= 10:
    aaa = ''.join(ppp[int(aaa[i:i + 10], 3)] for i in range(len(aaa) - 9))
ans = last(aaa)
print(ans)


### FIXED CODE ###

def test(a):
    print(*a)
    for i in range(len(a) - 1):
        a = [abs(a1 - a0) for a0, a1 in zip(a, a[1:])]
        # print(' ' * i, *a)
        print(*a)


# test([2, 3, 1, 1, 3, 1, 2, 3, 1, 2])
# test([2, 3, 1, 1, 3, 2, 2, 3, 1, 2])
# test([2, 3, 1, 1, 3, 3, 2, 3, 1, 2])
# test([1, 2, 0, 1, 2, 2, 2, 0, 0, 2, 1])
# test([1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0])
# test([0, 0, 0, 0, 0, 1, 0, 0, 1, 2, 0, 2, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ])
# test([0] * 21 + [2] + [0] * 21)
# exit()

def solve(n, aaa):
    # シェルピンスキーの三角形
    if '2' not in aaa:
        factor = '3'
        effect = 2
    else:
        factor = '2'
        effect = 1
    # print(factor, effect)

    try_list = []
    m = n - 1
    while m:
        l = 1 << (m.bit_length() - 1)
        m ^= l
        try_list.append((l, m))
    # print(try_list)

    ans = 0
    for i, a in enumerate(aaa):
        if a == factor:
            for l, m in try_list:
                if i >= l:
                    i -= l
                if i == 0:
                    ans ^= effect
                    break
                elif i > m:
                    break
    return ans


n = int(input())
aaa = input()
print(solve(n, aaa))
### BUGGY CODE ###

# -*- coding: utf-8 -*-
from sys import stdin
# import numpy as np
# import sys
# sys.setrecursionlimit(10**4)

def _li(): return list(map(int, stdin.readline().split()))
def _li_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def _lf(): return list(map(float, stdin.readline().split()))
def _ls(): return stdin.readline().split()
def _i(): return int(stdin.readline())
def _f(): return float(stdin.readline())
def _s(): return stdin.readline()[:-1]


MOD = 10**9 + 7
L = list(map(int, list(_s())))
ans = 3**(len(L) - 1)
# for i in range(1, len(L)):
#     ans = (ans + 2**(2*i-1)) % MOD

sumL = sum(L)
ans = (ans + 2**(sumL)) % MOD
count = 0
for i, j in enumerate(L[::-1][:-1]):
    if j == 1:
        count += 1
        ans = (ans + 2 * (2**(sumL-count-1)) % MOD * (3**i) % MOD) % MOD

print(int(ans))


### FIXED CODE ###

# -*- coding: utf-8 -*-
from sys import stdin
# import numpy as np
# import sys
# sys.setrecursionlimit(10**4)

def _li(): return list(map(int, stdin.readline().split()))
def _li_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def _lf(): return list(map(float, stdin.readline().split()))
def _ls(): return stdin.readline().split()
def _i(): return int(stdin.readline())
def _f(): return float(stdin.readline())
def _s(): return stdin.readline()[:-1]


MOD = 10**9 + 7
L = _s()

ans = 3**(len(L) - 1) % MOD
# for i in range(1, len(L)):
#     ans = (ans + 2**(2*i-1)) % MOD

sumL = L.count('1')
ans = (ans + 2**(sumL) % MOD) % MOD

count = 0
for i in range(len(L)-1):
    if L[-1-i] == '1':
        count += 1
        ans = (ans + 2 * pow(2, sumL-count-1, MOD) * pow(3, i, MOD)) % MOD

print(int(ans))
### BUGGY CODE ###

X,Y,Z,K = map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
XY=[]
for a in A:
    for b in B:
        XY.append(a+b)
XY.sort(reverse=True)
XY_prime=XY[:K]
XYZ=[]
for xy in XY_prime:
    for c in C:
        XYZ.append(xy+c)
XYZ.sort(reverse=True)
for xyz in XYZ[:K]:
    print(xyz)


### FIXED CODE ###

X,Y,Z,K = map(int,input().split())
A = sorted(list(map(int, input().split())), reverse=True)
B = sorted(list(map(int, input().split())), reverse=True)
C = sorted(list(map(int, input().split())), reverse=True)
xy=[]
for a in A:
    for b in B:
        xy.append(a+b)
xy=sorted(xy,reverse=True)
xy=xy[:K]
xyz=[]
for c in C:
    for x in xy:
        xyz.append(x+c)
xyz=sorted(xyz,reverse=True)
for i in range(K):
    print(xyz[i])
### BUGGY CODE ###

s = input()
mod = 2019
ls = [1]+[0]*2018
ans = 0
for i in range(len(s)):
    ls[int(s[i:])%mod] += 1
for i in ls:
    ans += i*(i-1)//2
print(ans)

### FIXED CODE ###

s = input()
mod = 2019
ls = [1]+[0]*2018
ans = 0
temp=0
m=1
for i in range(len(s)):
    temp= (temp + m*int(s[-i-1]))%mod
    m=(m*10)%mod

    ls[temp] += 1

for i in ls:
    ans += i*(i-1)//2
print(ans)
### BUGGY CODE ###

X,Y,Z,K=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))

data=[]
N=0
while N<K:
  for i in range(0,X):
  
    for j in range(0,Y):
    
      for k in range(0,Z):
        data.append(int(A[i]+B[j]+C[k]))
        N=N+1
    
data.sort()
data.reverse()

for l in range(K):
  print(data[l])


### FIXED CODE ###

X,Y,Z,K=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
A.sort()
B.sort()
C.sort()
A.reverse()
B.reverse()
C.reverse()

data=[]

for i in range(0,X):
  if i+1>K: break
    
  for j in range(0,Y):
    if (i+1)*(j+1)>K: break
    
    for k in range(0,Z):
      if (i+1)*(j+1)*(k+1)>K: break
      data.append(int(A[i]+B[j]+C[k]))
        
    
data.sort()
data.reverse()

for l in range(K):
  print(data[l])
### BUGGY CODE ###

from itertools import combinations
from functools import lru_cache


@lru_cache(maxsize=None)
def solve(a, b):
    x = a * b
    return x - int(x) == 0


n = int(input())
arr = [float(input()) for _ in range(n)]
arr = [x for x in arr if x - int(x) >= 0.000005 or x == int(x)]

ans = []
for x, y in combinations(arr, 2):
    ans.append(solve(x, y))

print(sum(ans))

### FIXED CODE ###

def div(n, d):
    cnt = 0
    while n % d == 0 and cnt < 18:
        n //= d
        cnt += 1
    return cnt


n = int(input())
dp = [[0]*19 for _ in range(19)]

ans = 0
for _ in range(n):
    x = round(float(input()) * pow(10, 9))
    two = div(x, 2)
    five = div(x, 5)
    ans += dp[18 - two][18 - five]
    for i in range(two + 1):
        for j in range(five + 1):
            dp[i][j] += 1

print(ans)
### BUGGY CODE ###

#4問目
count = 0
N = int(input())
S = list(input())
for i in range(N):
    for j in range(i+1, N):
        for k in range(j+1, N):
            if(S[i] != S[j] and S[i] != S[k] and S[j] != S[k]):
                if((j - i) != (k - j)):
                    count+=1
print(count)

### FIXED CODE ###

# 先に組み合わせの数を決める
# RとGとBの数を先に数え上げると、Rの数 * Gの数 * Bの数が組み合わせの数になる
# 累積和でもできる

#組み合わせの数は
kumiawase = 0
countR=0
countG=0
countB=0
N = int(input())
S = list(input())
for i in range(N):
    if(S[i] == "R"):
        countR += 1
    elif(S[i] == "G"):
        countG += 1
    elif(S[i] == "B"):
        countB += 1
kumiawase = countR * countG * countB

count = 0
#その組み合わせの数から、j-i = k-jをみたす数を引けばいい
#条件を満たし、かつ1つ目の条件を満たすものは
for i in range(N):
    for j in range(i+1, N):
        k = 2 * j - i
        if(k < N):
            if(S[i] != S[j] and S[i] != S[k] and S[j] != S[k]):
                count+=1

print(kumiawase - count)
### BUGGY CODE ###

from math import factorial

N,M = map(int,input().split())

if N == M+1 or N+1 == M:
	print(factorial(N)*factorial(M))

elif N==M:
	print(2*factorial(N)*factorial(M))
	
else:
	print(0)

### FIXED CODE ###

from math import factorial

N,M = map(int,input().split())

def foo(N,M):
	if N == M+1 or N+1 == M:
		tm = factorial(min(N,M))
		return(tm*max(N,M)*tm)

	elif N==M:
		return((factorial(N)**2)*2)

	else:
		return(0)

print(foo(N,M)%(10**9+7))
### BUGGY CODE ###

x, y, z, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))

c = sorted(c, reverse=True)
ab = []
for i in range(x):
    for j in range(y):
        temp = a[i] + b[j]
        ab.append(temp)
ab = sorted(ab, reverse=True)
ans = []
for i in range(z):
    for j in range(x * y):
        temp = c[i] + ab[j]
        ans += [temp]
ans = sorted(ans, reverse=True)

for i in range(k):
    print(ans[i])

### FIXED CODE ###

x, y, z, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))

c = sorted(c, reverse=True)
ab = []
for i in range(x):
    for j in range(y):
        temp = a[i] + b[j]
        ab.append(temp)

ab = sorted(ab, reverse=True)
ans = []
for i in range(z):
    for j in range(min(x * y, k)):
        temp = c[i] + ab[j]
        ans += [temp]
ans = sorted(ans, reverse=True)

for i in range(k):
    print(ans[i])
### BUGGY CODE ###

n, k = map(int,input().split())

balls = list(map(int,input().split()))

unique_ball = []

for ball in balls:
    if not (ball in unique_ball):
        unique_ball.append(ball)

ball_counts = []

for ball in unique_ball:
    ball_counts.append(balls.count(ball))
    
ball_counts = sorted(ball_counts)

c = 0

while len(ball_counts) > k:
    c += ball_counts[0]
    del ball_counts[0]

print(c)

### FIXED CODE ###

n, k = map(int,input().split())

balls = list(map(int,input().split()))

max_n = 200000

ball_counts = [0]*max_n

for ball in balls:
    ball_counts[ball-1] += 1


counts = []

for n in ball_counts:
    if n !=0:
        counts.append(n)
        
counts = sorted(counts)

print(sum(counts[0:len(counts)-k]))
### BUGGY CODE ###

def gcd(x,y):
    if x<y:
        x,y=y,x
    #x>y
    if y==0:
        return x
    if x%y==0:
        return y
    else:
        return gcd(y,x%y)

N=int(input())
A=tuple(map(int, input().split()))

ans = 0

for i in range(N):
    newA = list(A)
    del newA[i]
    temp = 0
    for j in range(N-1):
        temp = gcd(temp, newA[j])
    ans = max(temp, ans)

print(ans)

### FIXED CODE ###

def gcd(x,y):
    if x<y:
        x,y=y,x
    #x>y
    if y==0:
        return x
    if x%y==0:
        return y
    else:
        return gcd(y,x%y)

N=int(input())
A=[int(i) for i in input().split()]

L = [0 for i in range(N)]
R = [0 for i in range(N)]

for i in range(1,N):
    L[i] = gcd(L[i-1],A[i-1])

for i in range(N-1)[::-1]:
    R[i] = gcd(R[i+1],A[i+1])

Z=[gcd(L[i],R[i]) for i in range(N)]

print(max(Z))
### BUGGY CODE ###

import fractions

N = int(input())
A = list(map(int,input().split()))
ans = 0

for j in range(N):
    B = A[:]
    B.pop(j)
    tmp = max(B)
    for i in B:
        tmp = fractions.gcd(tmp, i)
    if tmp > ans:
        ans = tmp
print(ans)

### FIXED CODE ###

import fractions

n = int(input())
a = list(map(int,input().split()))
b = a[:]

for i in range(1,n):
    a[i] = fractions.gcd(a[i],a[i-1])
    b[n-i-1] = fractions.gcd(b[n-i-1],b[n-i])
a = [0]+a #左に0を追加
b = b+[0] #右に0を追加
print(max(fractions.gcd(a[i],b[i+1]) for i in range(n)))
### BUGGY CODE ###

N = int(input())
s = [''.join(sorted(input())) for i in range(N)]
s.sort()
count = 0
num = 0
i = 0
while i < N-1:
    num = s.count(s[i])
    count += num * (num - 1) // 2
    i += num
print(count)

### FIXED CODE ###

N = int(input())
s = [''.join(sorted(input())) for i in range(N)]
s.sort()
count = 0
num = 1
for i in range(N-1):
    if s[i] == s[i+1]:
        num += 1
    else:
        count += num * (num - 1) // 2
        num = 1
print(count + num * (num - 1) // 2)
### BUGGY CODE ###

n, k, q = map(int, input().split())
S = []
A = []

for a in range(q) :
    A.append(int(input()))

for i in range(n) :
    S.append(int(k))
    S[i] = S[i] - len(A) + A.count(i+1)
    if S[i] > 0 :
        print('Yes')
    else :
        print('No')

### FIXED CODE ###

n, k, q = map(int, input().split())
 
C = [0] * n
 
for a in range(q) :
    C[int(input())-1] += 1
 
sum_c = sum(C)
 
for i in range(n) :
    minus = sum_c - C[i]
    if minus < k :
        print('Yes')
    else :
        print('No')
### BUGGY CODE ###

n= int(input())
s = str(input())

r = []
g = []
b = []
for i in range(n):
    if s[i]=="R":
        r.append(i)
    elif s[i]=="G":
        g.append(i)
    elif s[i]=="B":
        b.append(i)

score = len(r)*len(g)*len(b)
for i in r:
    for j in g:
        dist=abs(j-i)
        if (i>j):
            bi = i+dist
            if bi in b:
                score -=1
            bi = j-dist
            if bi in b:
                score -=1
        else:
            bi = j+dist
            if bi in b:
                score-=1
            bi = i-dist
            if bi in b:
                score-=1
        if((i+j)%2==0 and (i+j)/2 in b):
            score-=1
# print(count_)
print(score)

### FIXED CODE ###

n= int(input())
s = str(input())

r=set()
g=set()
b=set()
for i in range(n):
    if s[i]=='R':
        r.add(i)
    if s[i]=='G':
        g.add(i)
    if s[i]=='B':
        b.add(i)
score = len(r)*len(g)*len(b)
for i in r:
    for j in g:
        dist=abs(j-i)
        if (i>j):
            bi = i+dist
            if bi in b:
                score -=1
            bi = j-dist
            if bi in b:
                score -=1
        else:
            bi = j+dist
            if bi in b:
                score-=1
            bi = i-dist
            if bi in b:
                score-=1
        if((i+j)%2==0 and (i+j)/2 in b):
            score-=1
# print(count_)
print(score)
### BUGGY CODE ###

while 1:
    n=input()
    if(n==0):break
    a=[]
    for i in range(n):
        a.append(input())
    ans=-100001
    for i in range(n):
        for j in range(i+1,n+1):
            ans=max(ans,sum(a[i:j]))
    print ans

### FIXED CODE ###

while 1:
    n=input()
    if(n==0):break
    a=[]
    for i in range(n):
        a.append(input())
    s=[0]
    for i in range(n):
        s.append(s[-1]+a[i])
    ans=-100001
    for i in range(n):
        for j in range(i+1,n+1):
            ans=max(ans,s[j]-s[i])
    print ans
### BUGGY CODE ###

import sys
from collections import *
from heapq import *
from fractions import gcd
import itertools
import math
import numpy as np

sys.setrecursionlimit(10**6)

def InMap(): return list(map(int, input().split(' ')))
def In(): return int(input())
def InS(): return input()

N, K = InMap()
P = InMap()
E = [(p+1)/2 for p in P]
v = np.ones(K)
Res = np.convolve(E, v)
# Res = [sum(E[i:i+K]) for i in range(N-K+1)]
print(max(Res))

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)

def InMap(): return list(map(int, input().split(' ')))
def In(): return int(input())
def InS(): return input()

N, K = InMap()
P = InMap()

Res = [0]*(N - K + 1)
tmp = sum(P[0:K])
for i in range(K, N):
    Res[i-K] = tmp
    tmp -= P[i-K]
    tmp += P[i]
Res[-1] = tmp
print((max(Res) + K) / 2)
### BUGGY CODE ###

S = input()
n = len(S)

R = [0]*2019

for i in range(n):
    s = int(S[-i-1:])
    R[s % 2019] += 1

ans = R[0]
for r in R:
    ans += r*(r-1)//2

print(ans)

### FIXED CODE ###

S = input()
n = len(S)
*S, = map(int, S[::-1])
R = [0]*2019

p = 0
for i, s in enumerate(S):
    q = 10**(i % 224) % 2019
    p += s*q
    p %= 2019
    R[p] += 1

ans = R[0]
for r in R:
    ans += r*(r-1)//2

print(ans)
### BUGGY CODE ###

n,k = map(int,input().split())
H = list(map(int,input().split()))
inf = float('INF')
dp = [inf]*n
dp[0] = 0
for i in range(1,n):
    for j in range(1,min(i,k)+1):
        # print(j)
        dp[i]=min(dp[i],dp[i-j]+abs(H[i]-H[i-j]))
    # print(dp)

    # dp[i]=min(dp[i],dp[i-1]+abs(H[i]-H[i-1]))
# print(dp)
print(dp[-1])

### FIXED CODE ###

N,K=map(int, input().split())
a = list(map(int, input().split()))
dp = [0]+[float("inf")]*N
for i,h1 in enumerate(a):
    for j in range(i+1,min(i+K+1,N)):
        dp[j] = min(dp[j],dp[i]+abs(h1-a[j]))
print(dp[N-1])
### BUGGY CODE ###

def find(data, s):
    l = 0
    r = len(data)
    while l < r:
        ind = (l + r) // 2
        if data[ind] == s:
            return True
        elif data[ind] < s:
            l = ind + 1
        else:
            r = ind
    return False

n = int(input())
data = []
for _ in range(n):
    command = input().split()
    if command[0] == "insert":
        data.append(command[1])
        data.sort()
    elif command[0] == "find":
        if find(data, command[1]):
            print("yes")
        else:
            print("no")


### FIXED CODE ###

n = int(input())
data = set()
for _ in range(n):
    command = input().split()
    if command[0] == "insert":
        data.add(command[1])
    elif command[0] == "find":
        if command[1] in data:
            print("yes")
        else:
            print("no")