求救,漂亮国血统11分,玄关
查看原帖
求救,漂亮国血统11分,玄关
778382
wch666楼主2023/12/30 13:44
#include<bits/stdc++.h>
using namespace std;
string s1,s2;
void post(string pre,string mid)
{
	if(mid.size() <= 0)
		return ;
	char root=pre[pre.size()-1];
	cout<<root;
	int rootid=mid.find(root);
	post(pre.substr(0,rootid),mid.substr(0,rootid));
	post(pre.substr(rootid),mid.substr(rootid+1));
}
int main()
{
	cin>>s1>>s2;
	post(s1,s2);
	return 0;
}
2023/12/30 13:44
加载中...