{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003e\n zz6d likes reading very much, so he bought a lot of books. One day, zz6d brought n books to a classroom in school. The books of zz6d is so popular that K students in the classroom want to borrow his books to read. Every book of zz6d has a number i (1\u0026lt;\u003di\u0026lt;\u003dn). Every student in the classroom wants to get a continuous number books. Every book has a pleasure value, which can be 0 or even negative (causing discomfort). Now zz6d needs to distribute these books to K students. The pleasure value of each student is defined as the sum of the pleasure values of all the books he obtains.Zz6d didn\u0027t want his classmates to be too happy, so he wanted to minimize the maximum pleasure of the K classmates. zz6d can hide some last numbered books and not distribute them,which means he can just split the first x books into k parts and ignore the rest books, every part is consecutive and no two parts intersect with each other.However,every classmate must get at least one book.Now he wonders how small can the maximum pleasure of the K classmates be.\u003cbr\u003e\u003cbr\u003e\n 1\u0026lt;\u003dT\u0026lt;\u003d10 \u003cbr\u003e\n 1\u0026lt;\u003dn\u0026lt;\u003d2*$10^5$ \u003cbr\u003e\n 1\u0026lt;\u003dk\u0026lt;\u003dn \u003cbr\u003e\n -$10^9$\u0026lt;\u003d$a_i$\u0026lt;\u003d$10^9$\n\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"Input contains multiple test cases. \u003cbr\u003e\nThe first line of the input is a single integer T which is the number of test cases. T test cases follow. \u003cbr\u003e\nFor each test case, the first line contains two integer n,k: the number of books and the number of his classmates. The second line contains n integers $a_1$ ,$a_2$,…, $a_{n-1}$,$a_n$. ($a_i$means the pleasure value of book i.)$\\sum_{}$n\u0026lt;\u003d2*$10^5$.\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"For each case, print the smallest maximum pleasure of the K classmates, and one line one case."}},{"title":"Sample","value":{"format":"HTML","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\u003e\u003cpre\u003e2\r\n4 2\r\n3 -2 4 -2\r\n5 4\r\n-1 -1 -1 -1 6\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e\u003cpre\u003e2\r\n-1\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Hint","value":{"format":"HTML","content":"In the first example,classmate 1 get book 1,2, classmate 2 get book 3,4.the maximum pleasure is max((3-2),(4-2))\u003d2;\u003cbr\u003e\u003cbr\u003e\nIn the second example,he can ignore book 5 and spilt the first 4 books into 4 parts,give them to his classmates."}}]}