| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 82451 | 黄睿杰 | 回文数 | C++ | Compile Error | 0 MS | 0 KB | 1084 | 2024-07-13 11:24:50 |
#include<bits/stdc++.h> using namespace std; char a[10000]; int main(){ gets(a); int s; int l=strlen(a); for(int i=0,j=l-1;i<l,j>=0;i++,j--){ if(a[i]==a[j]) s=1; else{ s=0; break; } } if(s==1) cout<<"YES"; else cout<<"NO"; return 0; }#include<bits/stdc++.h> using namespace std; char a[10000]; int main(){ gets(a); int s; int l=strlen(a); for(int i=0,j=l-1;i<l,j>=0;i++,j--){ if(a[i]==a[j]) s=1; else{ s=0; break; } } if(s==1) cout<<"YES"; else cout<<"NO"; return 0; }#include<bits/stdc++.h> using namespace std; char a[10000]; int main(){ gets(a); int s; int l=strlen(a); for(int i=0,j=l-1;i<l,j>=0;i++,j--){ if(a[i]==a[j]) s=1; else{ s=0; break; } } if(s==1) cout<<"YES"; else cout<<"NO"; return 0; }#include<bits/stdc++.h> using namespace std; char a[10000]; int main(){ gets(a); int s; int l=strlen(a); for(int i=0,j=l-1;i<l,j>=0;i++,j--){ if(a[i]==a[j]) s=1; else{ s=0; break; } } if(s==1) cout<<"YES"; else cout<<"NO"; return 0; }
Main.cc:18:2: error: stray '#' in program
}#include
^
Main.cc:35:2: error: stray '#' in program
}#include
^
Main.cc:52:2: error: stray '#' in program
}#include
^
Main.cc: In function 'int main()':
Main.cc:5:2: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
gets(a);
^
In file included from /usr/include/c++/5/cstdio:42:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:46,
from Main.cc:1:
/usr/include/stdio.h:638:14: note: declared here
extern char *gets (char *__s) __wur __attribute_deprecated__;
^
Main.cc:5:2: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
gets(a);
^
In file included from /usr/include/c++/5/cstdio:42:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:46,
from Main.cc:1:
/usr/include/stdio.h:638:14: note: declared here
extern char *gets (char *__s) __wur __attribute_deprecated__;
^
Main.cc:5:8: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
gets(a);
^
In file included from /usr/include/c++/5/cstdio:42:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:46,
from Main.cc:1:
/usr/include/stdio.h:638:14: note: declared here
extern char *gets (char *__s) __wur __attribute_deprecated__;
^
Main.cc:8:21: warning: left operand of comma operator has no effect [-Wunused-value]
for(int i=0,j=l-1;i=0;i++,j--){
^
Main.cc: At global scope:
Main.cc:18:3: error: 'include' does not name a type
}#include
^
Main.cc:20:13: error: redefinition of 'char a [10000]'
char a[10000];
^
Main.cc:3:6: note: 'char a [10000]' previously declared here
char a[10000];
^
Main.cc: In function 'int main()':
Main.cc:21:5: error: redefinition of 'int main()'
int main(){
^
Main.cc:4:5: note: 'int main()' previously defined here
int main(){
^
Main.cc:22:2: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
gets(a);
^
In file included from /usr/include/c++/5/cstdio:42:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:46,
from Main.cc:1:
/usr/include/stdio.h:638:14: note: declared here
extern char *gets (char *__s) __wur __attribute_deprecated__;
^
Main.cc:22:2: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
gets(a);
^
In file included from /usr/include/c++/5/cstdio:42:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:46,
from Main.cc:1:
/usr/include/stdio.h:638:14: note: declared here
extern char *gets (char *__s) __wur __attribute_deprecated__;
^
Main.cc:22:8: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
gets(a);
^
In file included from /usr/include/c++/5/cstdio:42:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:46,
from Main.cc:1:
/usr/include/stdio.h:638:14: note: declared here
extern char *gets (char *__s) __wur __attribute_deprecated__;
^
Main.cc:25:21: warning: left operand of comma operator has no effect [-Wunused-value]
for(int i=0,j=l-1;i=0;i++,j--){
^
Main.cc: At global scope:
Main.cc:35:3: error: 'include' does not name a type
}#include
^
Main.cc:37:13: error: redefinition of 'char a [10000]'
char a[10000];
^
Main.cc:3:6: note: 'char a [10000]' previously declared here
char a[10000];
^
Main.cc: In function 'int main()':
Main.cc:38:5: error: redefinition of 'int main()'
int main(){
^
Main.cc:4:5: note: 'int main()' previously defined here
int main(){
^
Main.cc:39:2: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
gets(a);
^
In file included from /usr/include/c++/5/cstdio:42:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:46,
from Main.cc:1:
/usr/include/stdio.h:638:14: note: declared here
extern char *gets (char *__s) __wur __attribute_deprecated__;
^
Main.cc:39:2: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
gets(a);
^
In file included from /usr/include/c++/5/cstdio:42:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:46,
from Main.cc:1:
/usr/include/stdio.h:638:14: note: declared here
extern char *gets (char *__s) __wur __attribute_deprecated__;
^
Main.cc:39:8: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
gets(a);
^
In file included from /usr/include/c++/5/cstdio:42:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:46,
from Main.cc:1:
/usr/include/stdio.h:638:14: note: declared here
extern char *gets (char *__s) __wur __attribute_deprecated__;
^
Main.cc:42:21: warning: left operand of comma operator has no effect [-Wunused-value]
for(int i=0,j=l-1;i=0;i++,j--){
^
Main.cc: At global scope:
Main.cc:52:3: error: 'include' does not name a type
}#include
^
Main.cc:54:13: error: redefinition of 'char a [10000]'
char a[10000];
^
Main.cc:3:6: note: 'char a [10000]' previously declared here
char a[10000];
^
Main.cc: In function 'int main()':
Main.cc:55:5: error: redefinition of 'int main()'
int main(){
^
Main.cc:4:5: note: 'int main()' previously defined here
int main(){
^
Main.cc:56:2: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
gets(a);
^
In file included from /usr/include/c++/5/cstdio:42:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:46,
from Main.cc:1:
/usr/include/stdio.h:638:14: note: declared here
extern char *gets (char *__s) __wur __attribute_deprecated__;
^
Main.cc:56:2: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
gets(a);
^
In file included from /usr/include/c++/5/cstdio:42:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:46,
from Main.cc:1:
/usr/include/stdio.h:638:14: note: declared here
extern char *gets (char *__s) __wur __attribute_deprecated__;
^
Main.cc:56:8: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
gets(a);
^
In file included from /usr/include/c++/5/cstdio:42:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:46,
from Main.cc:1:
/usr/include/stdio.h:638:14: note: declared here
extern char *gets (char *__s) __wur __attribute_deprecated__;
^
Main.cc:59:21: warning: left operand of comma operator has no effect [-Wunused-value]
for(int i=0,j=l-1;i=0;i++,j--){
^
Main.cc: In function 'int main()':
Main.cc:5:9: warning: ignoring return value of 'char* gets(char*)', declared with attribute warn_unused_result [-Wunused-result]
gets(a);
^
Main.cc: In function 'int main()':
Main.cc:22:9: warning: ignoring return value of 'char* gets(char*)', declared with attribute warn_unused_result [-Wunused-result]
gets(a);
^
Main.cc: In function 'int main()':
Main.cc:39:9: warning: ignoring return value of 'char* gets(char*)', declared with attribute warn_unused_result [-Wunused-result]
gets(a);
^
Main.cc: In function 'int main()':
Main.cc:56:9: warning: ignoring return value of 'char* gets(char*)', declared with attribute warn_unused_result [-Wunused-result]
gets(a);
^