mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-12-27 09:11:58 +00:00
21 lines
332 B
C++
21 lines
332 B
C++
|
#include <bits/stdc++.h>
|
||
|
|
||
|
using namespace std;
|
||
|
|
||
|
int main() {
|
||
|
string s, s1, s2;
|
||
|
getline(cin, s);
|
||
|
stringstream ss;
|
||
|
ss << s;
|
||
|
cin >> s1 >> s2;
|
||
|
while (ss >> s) {
|
||
|
if (s == s1) {
|
||
|
cout << s2 << ' ';
|
||
|
} else {
|
||
|
cout << s << ' ';
|
||
|
}
|
||
|
}
|
||
|
cout << endl;
|
||
|
return 0;
|
||
|
}
|