//P177 test 6-3 #include<cstdio> #include<cstring> using namespace std; +],s2[+]; int rebuild(int L1,int R1,int L2,int R2){ ; char root = s1[L1]; ; while(root != s2[p])p++; int cnt = p - L2; rebuild(L1 + ,L1 + cnt,L2,p-); rebuild(L1 + cnt +,R1,p+,R2); printf("%c",root); } int main(){ ){ int len = strlen(s1); rebuild(,len-,,len-); printf("\n"); } ; }