mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-24 13:48:48 +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;
|
||
|
}
|