“回文”顺读和倒读都一样的字符串称为“回文”
#include <iostream>
#include<Cstring>
using namespace std;
int main()
{
string line;
while(cin>>line)
{
bool status=true;
string::size_type index2=line.size();
for(string::size_type index1=0;index1!=line.size();++index1)
{
if(line[index1]!=line[index2-1])
{
status=false;
}
index2--;
}
if(status)
{
cout<<"YES"<<endl;
}
else
{
cout<<"NO"<<endl;
}
}
return 0;
}