Advertisement
sajid161

4:2

Dec 31st, 2020
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. #define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
  3. using namespace std;
  4. int main()
  5. {
  6.     optimize();
  7.     int t;
  8.     cin>>t;
  9.     while(t--)
  10.     {
  11.         string st;
  12.         cin>>st;
  13.         string str=st;
  14.         reverse(str.begin(),str.end());
  15.         if(str==st) cout<<"Yes\n";
  16.         else cout<<"No\n";
  17.  
  18.     }
  19.  
  20.  
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement