poj3981

简单题

View Code
#include <iostream>
#include
<cstdio>
#include
<cstdlib>
#include
<cstring>
using namespace std;

int main()
{
//freopen("t.txt", "r", stdin);
string st;
while (getline(cin, st))
{
int pos;
while ((pos = st.find("you")) != string::npos)
{
st.erase(pos,
3);
st.insert(pos,
"we");
}
cout
<< st << endl;
}
return 0;
}

posted @ 2011-07-03 20:06  undefined2024  阅读(165)  评论(1)    收藏  举报