题解
2024-01-27 16:18:46
发布于:吉林
14阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
void dfs(string x,string y){
if(x.size()==0)return;
int soot=x.find(y[y.size()-1]);
cout<<x[soot];
dfs(x.substr(0,soot),y.substr(0,soot));
dfs(x.substr(soot+1,x.size()-soot),y.substr(soot,y.size()-soot-1));
}
int main(){
string a,b;
cin>>a>>b;
dfs(a,b);
return 0;
}
这里空空如也
有帮助,赞一个