Codeforces Round #130 (Div. 2) A. Dubstep(STL做法)
2015-08-10 00:22
381 查看
找到所有的WUB
直接用空格代替即可
用string很方便
直接用空格代替即可
用string很方便
#include <iostream> #include <sstream> #include <iomanip> #include <vector> #include <deque> #include <list> #include <set> #include <map> #include <stack> #include <queue> #include <bitset> #include <string> #include <numeric> #include <algorithm> #include <functional> #include <iterator> #include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <cctype> #include <complex> #include <ctime> /* int gcd(int a,int b) { return ! b ? a : gcd(b,a % b); } bool cmp(const data &a,const data &b) { if(a.val == b.val) return a.pos < b.pos; return a.val < b.val; } */ typedef long long LL; const double pi = acos(-1.0); const long long mod = 1e9 + 7; using namespace std; string s; int main() { //freopen("int.txt","r",stdin); //freopen("out.txt","w",stdout); cin >> s; int a = s.find("WUB"); while(a != -1) { s.replace(a,3," "); a = s.find("WUB"); } cout << s << endl; return 0; }
相关文章推荐
- springMVC MultipartFile file文件上传及参数接受
- Microsoft Dynamics CRM server 2013 系统和SQL server 备份 为升级 CRM 2015版本准备
- Microsoft Dynamics CRM server 2013 系统和SQL server 备份 为升级 CRM 2015版本准备
- delphi之模拟点击网页中的按钮
- 算法题:求二进制位中0的个数
- 命名管道客户端及服务器端简单代码示例
- HDOJ1394 Minimum Inversion Number(线段树)
- UI019---ITableviewcell的性能问题和缓存优化
- POJ_2352_Stars
- CentOS增加swap分区
- 使用Xcode实现第一个C语言程序——Hello world
- PBOC交易过程详解
- UI018---UITableView使用
- UVALive - 4329 Ping pong (树状数组)
- intellij idea 修改背景保护色&&修改字体&&快捷键大全
- Windows/Linux远程桌面
- Aria2 使用手札(简易部署 + 快速进阶)
- CF_560B_GeraldIsIntoArt
- 中文乱码辨识
- HDOJ2795 Billboard(线段树)