#612. NOIP2013TG-23

NOIP2013TG-23

  1. (阅读程序写结果)
#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

输出:{{ input(1) }}