| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 150283 | 李亭绪 | 回文字符串I | C++ | Compile Error | 0 MS | 0 KB | 460 | 2026-03-25 19:35:51 |
#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(){ int s; char a[1000]; cin>>a; for(int i=0;a[i]!='\0';i++){ s++; } for(int i=0;i<s//2;i++){ if(a[i]!=s/2-1){ cout<<"no"; return 0; } } cout<< "yes" ; return 0;
Main.cc: In function 'int main()':
Main.cc:15:1: error: expected ';' before 'if'
if(a[i]!=s/2-1){
^
Main.cc:15:1: error: expected primary-expression before 'if'
Main.cc:15:1: error: expected ')' before 'if'
Main.cc: At global scope:
Main.cc:21:1: error: 'cout' does not name a type
cout<< "yes" ;
^
Main.cc:22:1: error: expected unqualified-id before 'return'
return 0;
^