1 #include<iostream>
2 #include<cstdio>
3 using namespace std;
4 const int m=100005;
5 int a[m];
6
7 int main()
8 {
9 int t,k=0;
10 scanf("%d",&t);
11 while(t--)
12 {
13 int n,i,maxn,before,begin=1,end=1;
14 scanf("%d",&n);
15 for(i=1;i<=n;i++)
16 {
17
18 scanf("%d",&a[i]);
19 if(i==1)
20 {
21 maxn=a[i]; before=a[i];
22 }
23 else
24 {
25 if(before+a[i]<a[i])
26 {
27 before=a[i];
28 begin=i;
29 }
30 else
31 {
32 before+=a[i];
33 }
34
35 }
36 if(before>maxn)
37 {
38 maxn=before;
39 //x=begin;
40 end=i;
41 }
42
43 }
44 k++;
45 printf("Case %d:\n",k);
46 printf("%d %d %d\n",maxn,begin,end);
47 if(t)
48 printf("\n");
49
50 }
51
52 return 0;
53 }