Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cmath>
- #include<cstring>
- #include<vector>
- using namespace std;
- int main(){
- int range;
- cin >> range;
- for(int i = 0; i < range; i++){
- string str;
- cin >> str;
- char* c = new char[100000];
- strcpy(c,str.c_str());
- string reverse = "";
- for(int i = str.length() - 1; i >= 0; i--){
- reverse += c[i];
- }
- if(reverse == str){
- cout << "Yes" << endl;
- }else{
- cout << "No" << endl;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement