60粪,怎么办
查看原帖
60粪,怎么办
1408583
chenqinghui楼主2024/11/22 16:56
#include<bits/stdc++.h>
using namespace std;
string s,a,b,s2;
int main(){
	getline(cin,s);
	cin>>a>>b;
	for(int i=0;i<s.size();i++){
		if(s[i]!=' ') s2=s2+s[i];
		else{
			if(s2==a)cout<<b<<" ";
			else cout<<s2<<" ";
			s2="";
		}
	}
	if(s2==a)cout<<b<<" ";
	else cout<<s2<<" ";
	return 0;
}

2024/11/22 16:56
加载中...