Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
116894 | 张暄浩 | 回文字符串I | C++ | Accepted | 1 MS | 276 KB | 538 | 2025-04-12 18:27:04 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ char a[1000]; int f=1,s=0; cin>>a; while(a[s]!='\0') s++; for(int i=0;i<=s/2;i++){ if(a[i]!=a[s-i-1]){ f=0; break; } } if(f) cout<<"Yes"<<endl; else cout<<"No"<<endl; return 0; }