Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
120933 陈骏睿 回文字符串I C++ Accepted 1 MS 276 KB 558 2025-06-02 11:08:31

Tests(10/10):


Code:

#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 s,n=0,flag=1; cin>>a; while(a[n]!='\0') n++; for(s=0;s<n/2;s++){ if(a[s]!=a[n-1-s]){ flag=0; break; } } if(flag) cout<<"Yes"<<endl; else cout<<"No"<<endl; return 0; }