2655

来源:互联网 发布:安卓版手机编程工具 编辑:程序博客网 时间:2024/06/06 19:13
#include <iostream>#include <string>#include <vector>using namespace std;bool judge(string str){string s(str.rbegin(),str.rend());return str==s;}int main(){vector<bool> bvec;string str;while(cin>>str){if(str=="END")break;bvec.push_back(judge(str));}vector<bool>::const_iterator iter = bvec.begin();while(iter != bvec.end()){if(*iter++)cout<<"YES"<<endl;elsecout<<"NO"<<endl;}return 0;}

原创粉丝点击