#include<bits/stdc++.h>
using namespace std;
int Random(int x)
{
return rand() % x;
}
int main()
{
srand(time(0));
string s;
char ch;
vector<string> v;
while(cin >> s)
{
ch = getchar();
v.push_back(s);
if(ch == 10)
{
break;
}
}
string x;
string y;
cin >> x >> y;
for(auto i : v)
{
cout << ((i == x) ? y : i) << " ";
}
return 0;
}
以上便是我写的代码,有什么问题吗???