Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
6221 柯宇希 回文字符串I C++ Accepted 0 MS 264 KB 559 2025-01-13 16:09:34

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 s[1001],a[1001]; cin>>s; int n=0; for(int i=0;s[i]!='\0';i++) n++; bool f=true; for(int i=0;i<=n/2;i++){ if(s[i]!=s[n-1-i]){f=false;break;} } if (f==false){ cout<<"No"; } else cout<<"Yes"; return 0; }