#include <iostream>
#include <string>
using namespace std;
string a;
int main ( ) {
cin >> a;
int c = a.find ( "WUB" ); //找a中WUB的开始位置。若没有则为 -1
while ( c != -1 ) {
a.replace ( c, 3, " " ); //从位置 c 开始的 3个数 用 “ ”替代
c = a.find ( "WUB" );
}
cout << a << endl;
}
codeforces 208A (STL做法)
最新推荐文章于 2019-09-11 21:48:39 发布