A short problem

TimeLimit:1000MS  MemoryLimit:32MB
64-bit integer IO format:%I64d
未提交 | 登录后收藏
Problem Description

The description of this problem is very short. Now give you a string(length N), and ask you the max sum of the substring which the length can't small than M.

Input

The first line is one integer T(T≤20) indicates the number of the test cases. Then for every case, the first line is two integer N(1≤N≤1000000) and M(1≤M≤N).

Then one line contains N integer indicate the number. All the number is between -10000 and 10000.

Output

Output one line with an integer.

SampleInput
2
5 1
1 -2 -2 -2 1
5 2
1 -2 -2 -2 1
SampleOutput
1
-1
Submit
题目统计信息详细
总AC数28
通过人数23
尝试人数27
总提交量97
AC率23.71%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: