Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
100093 | hby | 回文字符串I | C++ | Accepted | 1 MS | 268 KB | 257 | 2024-12-01 19:20:42 |
#include<bits/stdc++.h> #include<cstdio> using namespace std; char a[1009]; int main() { gets(a); int len=strlen(a); for(int i=0,j=len-1;i<len/2;i++,j--){ if(a[i]!=a[j]){ cout<<"No"; return 0; } } cout<<"Yes"; return 0; }