Advertisement
momo2345

palindrome

Jul 22nd, 2020
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.19 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5.     int t;
  6.     cin>>t; while(t--){
  7.     string s,p;
  8.     cin>>s;
  9.     p=s;
  10.     reverse(p.begin(),p.end());
  11.     cout<<((p==s)? "Yes":"No")<<endl;
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement