一维数组的最大和问题

一维数组的最大和问题,具体可以参见hdu1003:http://acm.hdu.edu.cn/showproblem.php?pid=1003
input:The first line of the input contains an integer T(1<=T<=20) which means the number of test cases. Then T lines follow, each line starts with a number N(1<=N<=100000), then N integers followed(all the integers are between -1000 and 1000).
output: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.
sample input:
2
5 6 -1 5 4 -7
7 0 6 -1 1 -6 7 -5
sample output:
Case 1:
14 1 4

Case 2:
7 1 6