#include <bits/stdc++.h>
using namespace std;
int n;string s;
bool is(string s){
int l=s.length();
for(int i=0;i<l/2;i++)
if(s[i]!=s[l-i-1]) return false;
return true;
}
int main(){
cin>>n;
while(n--){
cin>>s;
if(is(s)) cout<<"yes"<<endl;
else cout<<"no"<<endl;
}
return 0;
}
HDU 2029 Palindromes _easy version
最新推荐文章于 2023-12-04 20:59:58 发布