//printf(" \b");
添上这一句后WA。\b无效?
#include<stdio.h>
#include<string.h>
const int max = 200;
int res[max];
void tree(int pos);
int main()
{
//
freopen("input.txt","r",stdin);
int numcase = 1;
int root;
while(scanf("%d", &root)==1 && root!=-1)
{
memset(res, 0, sizeof(res) );
int pos = max/2;
res[pos] = root;
tree(pos-1);
tree(pos+1);
printf("Case %d:\n",numcase++);
int i;
for(i = 0; i < max && !res[i];i++);
printf("%d",res[i]);
for(i++; i < max;i++)
if(res[i]) printf(" %d",res[i]);
//printf(" \b");
printf("\n\n");
}
}
void tree(int pos)
{
int num;
scanf("%d", &num);
if(num == -1) return;
res[pos] += num;
tree(pos-1);
tree(pos+1);
}