提交时间:2025-03-28 19:28:32
运行 ID: 314858
#include<bits/stdc++.h> using namespace std; int main(){ string s,a,b; int c; getline(cin,s); getline(cin,a); getline(cin,b); c=s.find(a); while(c!= -1){ s.replace(c,a.size(),b); c=c+b.size(); c=s.find(a,c); } cout<<s; return 0; }