{"trustable":false,"prependHtml":"\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 async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cscript type\u003d\u0027text/x-mathjax-config\u0027\u003eMathJax.Hub.Config({tex2jax: { inlineMath: [[\u0027$\u0027,\u0027$\u0027]] } }); \u003c/script\u003e\n\u003cscript type\u003d\u0027text/javascript\u0027 src\u003d\u0027https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\u0027\u003e\u003c/script\u003e\n\u003cscript type\u003d\u0027text/javascript\u0027\u003esetTimeout(function(){MathJax.Hub.Queue([\u0027Typeset\u0027, MathJax.Hub, \u0027left_view\u0027]);}, 2000);\u003c/script\u003e\n\u003cdiv class\u003d\"panel_content\"\u003e\n Han Junjun is a lazy boy , which made his teammate Wu Lala show the whites of her eyes.One day ,Wu Lala asked Han to go to the food street to by as much food as he can.There are N stores on the streat and stand in a line named 1,2,3,...N.However,not all the stores are good,some of them are bad stores and they not only don\u0027t sell food but also rob some food from custumers.Han Junjun knows the shop well because Wu Lala always asks him to buy foods.So,Han knows how many foods can get or loose in each store,we called this food -change number \"KFC\".For example,if custumers lose 10 foods in the second store,the second store\u0027s KFC is -10.But Han is so lazy that he can just visit some stores next to each other orderly.Please help him to find the continuous stores to buy the most foods.Please output three numbers:the maximum quantity of food ,the KFC of the first store and the last store of the continuous stores.\n\u003cbr\u003e\n\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The test input contains several test cases, each of which occupies two lines. Line 1 gives a positive integer N(\u003c 10000), and line 2 gives N integers separated by Spaces. When N is 0, the input ends and the use case is not processed.\n\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":" For each test case ,print 3 numbers as the Problem Description , separated by Spaces and in one line. If the maximum number of food is not unique, the smallest name i and j strores\u0027 KFC are output (as in groups 2 and 3 of the input sample). If all K elements are negative, define their maximum sum to be 0 and output the first and last KFC of the entire food street.\n\u003cbr\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e6\n-2 11 -4 13 -5 -2\n10\n-10 1 2 3 4 -5 -23 3 7 -21\n6\n5 -8 3 2 5 0\n1\n10\n3\n-1 -5 -2\n3\n-1 0 -2\n0\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e20 11 13\n10 1 4\n10 3 5\n10 10 10\n0 -1 -2\n0 0 0\n\n\n \n \u003ci style\u003d\"font-size:1px\"\u003e \u003c/i\u003e\nHuge input, scanf is recommended.\u003c/pre\u003e"}},{"title":"Hint","value":{"format":"HTML","content":"\u003cpre\u003eHint\n \n \u003c/pre\u003e"}}]}