-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path208A.cpp
36 lines (36 loc) · 830 Bytes
/
208A.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <bits/stdc++.h>
#define ull unsigned long long
#define ll long long
#define init \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define fori(i, a, b) for (ll i = a; i <= (ll)b; i++)
using namespace std;
int main()
{
init;
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
string s;
int flag = 0;
cin >> s;
for (int i = 0; i < s.size(); i++)
{
if (s[i] == 'W' && s[i + 1] == 'U' && s[i + 2] == 'B')
{
i += 2;
flag = 1;
}
else if (flag)
{
cout << " " << s[i];
flag = 0;
}
else
cout << s[i];
}
return 0;
}