AC

资本 · 发布于 2026-03-22 · 浏览 211 回复 0

include <bits/stdc++.h>

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;

}

全部回复 共 0 条

还没有人回复。往下写第一条。

发表回复