13 条题解

  • 0
    @ 2024-7-24 15:05:17
    #include <bits/stdc++.h>
    using namespace std;
    int main(){
    	string a,b;
    	getline(cin,a);
    	getline(cin,b);
    	int cxr;
    	for(int i=0;i<a.size();i++){
    		for(int j=0;j<b.size();j++){
    			cxr=a.find(b[j]);
    		    if(cxr<0)
                        {
    			 a.erase(cxr,1);
    		    }
    		}
    	}
    	cout<<a;
    	return 0;
    }
    

    信息

    ID
    344
    时间
    1000ms
    内存
    64MiB
    难度
    8
    标签
    递交数
    115
    已通过
    21
    上传者