资本 • 4天前
using namespace std; int j = 0; string s1;
void f(string a, string b) {
int temp = a.size();
if (temp > 0) {
char c = b[temp - 1];
cout << c;
int t = a.find(c);
f(a.substr(0, t), b.substr(0, t));
f(a.substr(t + 1, temp), b.substr(t, temp - t - 1));
}
}
int main() {
string z, h;
cin >> z;
cin >> h;
f(z, h);
return 0;
}
评论:
请先登录,才能进行评论