题解 | #回文字符串#
回文字符串
https://www.nowcoder.com/practice/df00c27320b24278b9c25f6bb1e2f3b8
#include<iostream> #include<algorithm> using namespace std; int main() { string a; while(cin >> a) { string b = a; reverse(a.begin(),a.end()); if(b != a) cout << "No!" << endl; else cout << "Yes!" << endl; } }