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;
}

原文地址:https://www.cnblogs.com/rainydays/p/2096900.html