1 条题解

  • 1
    @ 2024-10-19 13:30:18
    #include <bits/stdc++.h>
    using namespace std;
    string x,y;
    void dfs (string x,string y) {
    	if (x=="" || y=="") return ;
    	cout<<y[y.size ()-1];
    	int t=x.find (y[y.size ()-1]);
    	string x1=x.substr (0,t),y1=y.substr (0,t);
    	for (int i=0;i<t;i++) x1[i]=x[i],y1[i]=y[i];
    	dfs (x1,y1);
    	x1=x.substr (t+1);
    	y1=y.substr (t,x1.size());
    	dfs (x1,y1);
    }
    int main() {
    	cin>>x>>y;
    	dfs (x,y);
    	return 0;
    }
    
    • 1

    信息

    ID
    193
    时间
    1000ms
    内存
    256MiB
    难度
    1
    标签
    (无)
    递交数
    95
    已通过
    63
    上传者