#include<iostream> #include<string > using namespace std; int main( ) { string Str; cin>>str; int n = str.size( ); bool isPlalindrome = true; for (int i =0; i<n/2;i++){ if (str[i] !=str[n-i-1]) isPlalindrome = false; } if(isPlalindrome) cout << ”Yes” << endl; else cout << ”No” << endl; }
输入:abceecba
输出:_________