杭电ACM 第2029题
2018-03-10 15:14
211 查看
#include<iostream> #include<string> using namespace std; void main(){ unsigned n; while(cin>>n){ bool q=true; while(n--){ char s[99]; if(q){ q=false; getchar(); } gets(s); bool t=true; int i=0; int j=strlen(s)-1; for(;i<=j;++i,--j){ if(s[i]!=s[j]){ t=false; break; } } if(t) cout<<"yes"<<endl; else cout<<"no"<<endl; } } }
相关文章推荐
- 杭电ACM 2023 求平均成绩
- 杭电ACM 2040 亲和数
- 杭电ACM 分类
- 杭电ACM第1003题——Max Sum
- 杭电ACM大数JAVA提交实例
- 杭电ACM---1003(水过)
- 杭电ACM 1002
- 杭电acm 1850Being a Good Boy in Spring Festival(尼姆博弈)
- 杭电 HDU 4282 A very hard mathematic problem 2012 ACM/ICPC 天津网赛
- ACM刷题之HDU————献给杭电五十周年校庆的礼物
- 杭电acm_step1.2.2
- 杭电acm 1001
- 【ACM】杭电1036:Average is not Fast Enough!
- 杭电_ACM_The 3n + 1 problem
- 【ACM】杭电1178:Heritage from father 小心溢出!
- 杭电ACM 1000 A + B Problem
- 杭电acm 2532Engine(字符串)
- 杭电ACM 2002 计算球体积
- 杭电acm 1073Online Judge
- 杭电ACM分类