Untitled
#include <iostream> #include <string> int main() { std::string a, copy_a; std::cin >> a; copy_a = a; std::reverse(a.begin(), a.end()); if (a == copy_a) { std::cout << "YES"; } else { std::cout << "NO"; } }
#include <iostream> #include <string> int main() { std::string a, copy_a; std::cin >> a; copy_a = a; std::reverse(a.begin(), a.end()); if (a == copy_a) { std::cout << "YES"; } else { std::cout << "NO"; } }