Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
6215 | 张育斌 | 回文字符串I | C++ | Runtime Error | 0 MS | 260 KB | 524 | 2025-01-13 16:05:24 |
#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 c[1001]; cin>>c; int n; for(int i=0;c[i]!='\0';i++) n++; bool f=true; for(int i=0;i<=n/2;i++){ if(c[i]!=c[n-1-i]) {f=false;break;} } if(f==false) cout<<"no"<<endl; else cout<<"yes"<<endl; return 0; }
Runtime Error:Segmentation fault