Run ID:12216

提交时间:2021-05-20 12:20:02

#include<bits/stdc++.h> using namespace std; int main() { string str; while (cin >> str) { string str2 = str; int j = 0, len = str.length(); for (int i = len - 1; i >= 0; i--) { str2[len - i - 1] = str[i]; } if (str == str2) { cout << "YES" << endl; } else cout << "NO" << endl; } return 0; }