{"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":"\u003cdiv\u003e\n 这是一道分治递归或者动态规划都能够解决的题目。当然动归的效率最高啦~\n\u003c/div\u003e \n\u003cdiv\u003e \n \u003cspan\u003e网络boys\u003c/span\u003e and girls!GOOD LUCK~\n\u003c/div\u003e \n\u003cdiv\u003e\n \u0026nbsp;\n\u003c/div\u003e \n\u003cdiv\u003e\n Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + (-1) + 5 + 4 \u003d 14.\n\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e The first line of the input contains an integer T(1\u0026lt;\u003dT\u0026lt;\u003d20) which means the number of test cases. Then T lines follow, each line starts with a number N(1\u0026lt;\u003dN\u0026lt;\u003d100000), then N integers followed(all the integers are between -1000 and 1000).\u003cbr\u003e \u0026nbsp;\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003e For each test case, you should output two lines. The first line is \"Case #:\", # means the number of the test case. The second line contains three integers, the Max Sum in the sequence, the start position of the sub-sequence, the end position of the sub-sequence. If there are more than one result, output the first one. Output a blank line between two cases.\u003cbr\u003e \u0026nbsp;\u003c/p\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e\r\n2\r\n5 6 -1 5 4 -7\r\n7 0 6 -1 1 -6 7 -5\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e\r\nCase 1:\r\n14 1 4\r\n\r\nCase 2:\r\n7 1 6\u003c/pre\u003e"}}]}