#include<iostream> #include<vector> using namespace std; int main() { vector<char> l; vector<char>::iterator iter1; vector<char>::iterator iter2; char c; while(cin>>c) { l.push_back(c); } iter2=l.end()-1; int flag=1; for(iter1=l.begin();iter1<=iter2;iter1++,iter2--) { flag=1; if(*iter1 != *iter2) { flag=0; break; } } if(flag) cout<<"YES"<<endl; else cout<<"NO"<<endl; }
by: 发表于:2017-09-01 09:53:20 顶(0) | 踩(0) 回复
??
回复评论