| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 128704 | 周子潇 | 31回文字符串II | C++ | Compile Error | 0 MS | 0 KB | 779 | 2025-08-19 13:53:35 |
V#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; string a; bool FUN(int left,int right) { int len=(right-left+1)/2; for(int i=0;i<len;i++) { if(a[left+i]!=a[right-i]) { return false; } } return true; } int main(){ cin>>a; int len=a.length(); for(int i=0;i<len-1;i++) { for(int j=len-1;j>i;j--) { if(FUN(i,j)&&i-j!=1) { cout<<"Yes"<<endl; return 0; } } } cout<<"No"<<endl; return 0; }
Main.cc:1:2: error: stray '#' in program
V#include // cin\cout\endl
^
Main.cc:1:1: error: 'V' does not name a type
V#include // cin\cout\endl
^
In file included from /usr/include/c++/5/cmath:43:0,
from Main.cc:5:
/usr/include/c++/5/ext/type_traits.h:160:35: error: '__gnu_cxx::__is_null_pointer' declared as an 'inline' variable
__is_null_pointer(std::nullptr_t)
^
/usr/include/c++/5/ext/type_traits.h:160:35: error: 'bool __gnu_cxx::__is_null_pointer' redeclared as different kind of symbol
/usr/include/c++/5/ext/type_traits.h:155:5: note: previous declaration 'template bool __gnu_cxx::__is_null_pointer(_Type)'
__is_null_pointer(_Type)
^
/usr/include/c++/5/ext/type_traits.h:160:21: error: 'nullptr_t' is not a member of 'std'
__is_null_pointer(std::nullptr_t)
^
Main.cc:7:1: error: 'string' does not name a type
string a;
^
Main.cc: In function 'bool FUN(int, int)':
Main.cc:13:12: error: 'a' was not declared in this scope
if(a[left+i]!=a[right-i])
^
Main.cc: In function 'int main()':
Main.cc:21:5: error: 'cin' was not declared in this scope
cin>>a;
^
Main.cc:21:10: error: 'a' was not declared in this scope
cin>>a;
^
Main.cc:29:17: error: 'cout' was not declared in this scope
cout<<"Yes"<