{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"题目描述","value":{"format":"MD","content":"“摸鱼乃是大事”,月读非常同意这句话,于是准备在刷题时摸鱼,月读的具体操作是这样的,月读首先设定一个摸鱼指数r,然后开始刷题,月读有个题目列表,他会按顺序刷这个列表上的题目,看到题的瞬间,月读会计算出写这道题需要花费的时间ti分钟,如果ti\u003c\u003dr,那月读会写这道题,否则就会跳过去看下一题,依次类推知道列表上的题目被刷完。第二,月读决定在写完m道题后休息一下,休息的时间等于写m道题所花费的时间,第三,月读还决定在s分钟之后去看直播,不论此时月读在休息还是做题,他都会放下手里的事情直接去看直播(并且之后就把刷题这事忘掉了),在这基础上,月读决定刷尽量多的题目,他已经决定好了题单,m,s,现在月读想请你帮他决定r值,使得月读可以刷到最多的题目。"}},{"title":"Input","value":{"format":"MD","content":"第一行输入c,代表测试样例的数量,接下来跟着c个测试样例\n每个测试样例有两行,第一行有三个数字,分别是题单的长度l,m,s。\n第二行有l个数字t1,t2,……tl,代表题单上第1,2,……,l题所需要花费的时间"}},{"title":"Output","value":{"format":"MD","content":"输出c行,每行有两个数字,代表该测试样例下能完成的最多题目和完成最多题目需要设定的摸鱼指数,如果摸鱼指数r有多重可能,可以输入任意一个"}},{"title":"Examples","value":{"format":"MD","content":"\u003cdiv class\u003d\"sample-test\"\u003e\n \u003cdiv class\u003d\"input\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Input\n \u003c/div\u003e\n \u003cpre\u003e4\u003cbr\u003e5 2 16\u003cbr\u003e5 6 1 4 7\u003cbr\u003e5 3 30\u003cbr\u003e5 6 1 4 7\u003cbr\u003e6 4 15\u003cbr\u003e12 5 15 7 20 17\u003cbr\u003e1 1 50\u003cbr\u003e100\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"output\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Output\n \u003c/div\u003e\n \u003cpre\u003e3 5\u003cbr\u003e4 7\u003cbr\u003e2 10\u003cbr\u003e0 25\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"input\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Input\n \u003c/div\u003e\n \u003cpre\u003e3\u003cbr\u003e11 1 29\u003cbr\u003e6 4 3 7 5 3 4 7 3 5 3\u003cbr\u003e7 1 5\u003cbr\u003e1 1 1 1 1 1 1\u003cbr\u003e5 2 18\u003cbr\u003e2 3 3 7 5\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"output\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Output\n \u003c/div\u003e\n \u003cpre\u003e4 3\u003cbr\u003e3 1\u003cbr\u003e4 5\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e\n\u003c/div\u003e"}},{"title":"Note","value":{"format":"MD","content":""}}]}