| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 155028 | 王晏林 | 回文字符串I | C++ | Compile Error | 0 MS | 0 KB | 265 | 2026-05-31 12:12:27 |
#include<bits/stdc++.h> using namespace std; int main (){ char a[1001]={} int n=0,b=1; cin>>a; while(a[n]!='\0')n++; for(int i=0;i<=n/2;i++){ if(a[i]!=a[n-1-i]){ b=0; break; } } if(b==1)cout<<"Yes"; else cout<<"No"; return 0; }
Main.cc: In function 'int main()':
Main.cc:5:2: error: expected ',' or ';' before 'int'
int n=0,b=1;
^
Main.cc:7:10: error: 'n' was not declared in this scope
while(a[n]!='\0')n++;
^
Main.cc:8:17: error: 'n' was not declared in this scope
for(int i=0;i<=n/2;i++){
^
Main.cc:10:4: error: 'b' was not declared in this scope
b=0;
^
Main.cc:14:5: error: 'b' was not declared in this scope
if(b==1)cout<<"Yes";
^