int main()
{
int k=0;
cnt=0;
while(~scanf("%d",&n[k++])){}
for(int i=0;i<k/2;i++){
a[i]=n[i];
b[i]=n[i+k/2];
}
node* tree=buildtree(0,k/2-1,0,k/2-1);
pre_order(tree);
for(int i=0;i<cnt-1;i++){
printf("%d ",ans[i]);
}
printf("%d\n",ans[cnt-1]);
return 0;
}
Linux公社的RSS地址:https://www.linuxidc.com/rssFeed.aspx