| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 135593 | 李明秦 | 31回文字符串II | C++ | Compile Error | 0 MS | 0 KB | 442 | 2025-11-07 18:12:09 |
#include<bits/stdc++.h> using namespace std; string a; bool FUN(int left,int right) { int len=(right-left+1)/2; for(int i=0;i<len;i++){ if(left+i)!=a[right-i]{ return false; } return true; } } int main() { cin>>a; int len=a.length(); for(int i=0;i<len;i++){ for(int j=len-1;j>i;j++){ if(FUN(i,j)&&j-i!=1) { cout<<"Yes"<<endl; return 0; } } } cout<<"No"<<endl return 0; }
Main.cc: In function 'bool FUN(int, int)':
Main.cc:8:13: error: expected primary-expression before '!=' token
if(left+i)!=a[right-i]{
^
Main.cc: In function 'int main()':
Main.cc:28:2: error: expected ';' before 'return'
return 0;
^
Main.cc: In function 'bool FUN(int, int)':
Main.cc:13:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^