| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
玩个小技巧#include<iostream>
#include<cstring>
using namespace std;
char line[1005] = {0};
int main(){
while(cin.getline(line,1005)){
int len = strlen(line);
for(int i = 0;i < len - 2;++i){
//No smile face, I persume?
if(line[i] == 'y' && line[i+1] == 'o' && line[i+2] == 'u'){ //就是不想调间距,咋的
line[i] = 'w';line[i+1] = 'e';line[i+2] = '\0';
}
}
for(int j = 0;j < len;++j)if(line[j])putchar(line[j]);
printf("\n");
memset(line,0,1005*sizeof(char));
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator