{"trustable":true,"sections":[{"title":"Problem Description","value":{"format":"MD","content":"**Original problem from: USACO 2011 Open Gold**\n\nA year after winning the best lawn competition in town, FJ has become lazy and hasn\u0027t mowed the lawn since. Now, a new round of the best lawn competition has started, and FJ hopes to win again.\n\nHowever, FJ\u0027s lawn is very messy, so he can only rely on his cows to do the job. FJ has $N$ cows lined up in a row, numbered from $1$ to $N$. Each cow has a different efficiency, with cow $i$\u0027s efficiency being $E_i$.\n\nThe nearby cows are familiar with each other, and if FJ arranges more than $K$ consecutive cows, they will go on strike and party. Therefore, FJ needs your help now to calculate the maximum efficiency FJ can achieve, with no more than $K$ consecutive cows in the arrangement."}},{"title":"Input Format","value":{"format":"MD","content":"The first line: two integers separated by a space, $N$ and $K$.\n\nThe second to $N+1$ lines: the $i+1$th line contains an integer $E_i$."}},{"title":"Output Format","value":{"format":"MD","content":"One value per line, representing the maximum efficiency value FJ can achieve."}},{"title":"Example","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e5 2\n1\n2\n3\n4\n5\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e12\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\nFJ has $5$ cows with efficiencies $1,2,3,4,5$. They want to select cows with the maximum total efficiency, but he cannot select more than $2$ consecutive cows. FJ selects all cows except the third one, with a total efficiency of $1+2+4+5\u003d12$."}},{"title":"Constraints and Hints","value":{"format":"MD","content":"For all data, $1\\le N\\le 10^5,0\\le E_i\\le 10^9$."}}]}