#include <bits/stdc++.h>
using namespace std;
string s1,s2;
void f(string s1,string s2){
if(s1.size()<=0)return;
cout<<s2[s2.size()-1];
int flag;
for(int i=0;i<s1.size();i++){
if(s1[i]==s2[s2.size()-1]){
flag=i;break;
}
}
f(s1.substr(0,flag),s2.substr(0,flag));
f(s1.substr(flag+1,s1.size()-flag-1),s2.substr(flag,s1.size()-flag-1));
}
int main() {
cin>>s1>>s2;
f(s1,s2);
return 0;
}
已知前序或后序任一再加上中序可确定一棵二叉树
通过前/后序找出根,再根据该根和中序确定该根的两棵子树,不断递推可得到确定二叉树
Want to win? 9winbet caught my attention. I had a good run with them. Give it a try 9winbet, you might just get lucky!
Taigoo88, eh? It’s got a nice interface and seems like a decent place to play. I tried only a few games here, all smooth. Give it a try, you might like it. Here’s a link: taigoo88
Alright, v88bet has been around for a bit. Lots of game choices. Payouts are reliable so far. Check it out and let me know what you think! Go for: v88bet