2044:【例5.12】回文字串
作者:互联网
#include <iostream> #include <algorithm> using namespace std; string s,t; int main() { getline(cin,s); s=s.substr(0,s.size()-1); t=s; reverse(t.begin(),t.end()); if(t==s) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
标签:std,2044,main,end,string,5.12,文字串,include 来源: https://www.cnblogs.com/zheng1945/p/16314619.html