Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

EISARR - Subarray

Given an array of length n, find the subarray of length k which have largest sum of values.

Input

The first line contains two integers n and k (k ≤ n ≤ 105)

The second line contains n integers which are elements of the array, each integer has absolute values not exceed 106, respectively.

Output

The sum of values in the subarray

Sample

 

Input

Output

6 3

-3 -4 -1 -2 -4 -1

-7

There are 4 large test cases and 16 small test cases. Student can use two nested loops to solve first 16 testcases and earn 80% score.

 


Added by:Ha Minh Ngoc
Date:2019-12-15
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: GOSU
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.