文章
1
粉丝
112
获赞
0
访问
698
#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
string getS(string a1,string a2){
if(a1.size()==0||a2.size()==0)return "";
int i = a2.find(a1[0]);
return getS(a1.substr(1,i),a2.substr(0,i))+getS(a1.substr(i+1),a2.substr(i+1))+a1[0];
}
int main()
{
string a1,a2;
cin>>a1>>a2;
cout<<getS(a1,a2)<<endl;
return 0;
}
登录后发布评论
暂无评论,来抢沙发