Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
88367 | 陈昊然 | 回文字符串I | C++ | Compile Error | 0 MS | 0 KB | 257 | 2024-08-19 10:46:36 |
#include<bits/stdc++.h> using namespace std; char c[1001]; int main(){ cin>>c; int n=strlen(c); int l=0,r=n-1; while(l<=r){ if(s[l]==s[r]){ l++; r--; }else{ cout<<"no"; return 0; } } cout<<"yes"; return 0; }
Main.cc: In function 'int main()': Main.cc:9:6: error: 's' was not declared in this scope if(s[l]==s[r]){ ^