Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <cstdio>
- #include <algorithm>
- using namespace std;
- int main()
- {
- freopen("input.txt", "r", stdin);
- freopen("output.txt", "w", stdout);
- string s, s1;
- while (cin >> s1) {
- s += s1;
- }
- s1 = s;
- reverse(s.begin(), s.end());
- if (s == s1) {
- cout << "YES\n";
- } else {
- cout << "NO\n";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement