fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. string a;
  6. cin>>a;
  7. string b = a;
  8. reverse(b.begin(), b.end());
  9. if(b.compare(b)==0)
  10. cout<<"Yes"<<endl;
  11. else
  12. cout<<"No"<<endl;
  13. return 0;
  14. }
Success #stdin #stdout 0s 4336KB
stdin
010
stdout
Yes