submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s150838269
p00006
C
#include<stdio.h> #include<string.h> #define MAX 30 int main() { char str[MAX]; scanf("%s",str); int num = strlen(str); int i; for(i=0;i<num;i++) { printf("%c",str[num-i-1]); } printf("\n"); } return 0; }
main.c:18:9: error: expected identifier or '(' before 'return' 18 | return 0; | ^~~~~~ main.c:19:1: error: expected identifier or '(' before '}' token 19 | } | ^
s525013313
p00006
C
#include<stdio.h> int main(void){ int i; char str[21]; gets(str); for(i=20;i>=0;--i){ if(str[i]!='\0'){ printf("%c",str[i]); } } printf("\n"); return 0; }
main.c: In function 'main': main.c:7:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 7 | gets(str); | ^~~~ | fgets
s438511997
p00006
C
#include<stdio.h> int main(void){ int i; char str[21]; gets(str); for(i=20;i>=0;--i){ if(str[i]!='\0'){ printf("%c",str[i]); } } printf("\n"); return 0; }
main.c: In function 'main': main.c:7:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 7 | gets(str); | ^~~~ | fgets
s069980617
p00006
C
#include<stdio.h> int main(void){ int i; char str[21]; gets(str); for(i=20;i>=0;--i){ if(str[i]!='\0'){ if(str[i]!='\n'){ printf("%c",str[i]); } } } printf("\n"); return 0; }
main.c: In function 'main': main.c:7:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 7 | gets(str); | ^~~~ | fgets
s756836168
p00006
C
#include<stdio.h> char str[21]; int main(void){ int i; gets(str); for(i=20;i>=0;--i){ if(str[i]!='\0'){ if(str[i]!='\n'){ printf("%c",str[i]); } } } printf("\n"); return 0; }
main.c: In function 'main': main.c:7:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 7 | gets(str); | ^~~~ | fgets
s645672185
p00006
C
#include<stdio.h> char str[25]; int main(void){ int i; gets(str); for(i=24;i>=0;--i){ if(str[i]!='\0'){ if(str[i]!='\n'){ printf("%c",str[i]); } } } printf("\n"); return 0; }
main.c: In function 'main': main.c:7:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 7 | gets(str); | ^~~~ | fgets
s951320212
p00006
C
main(a[20],i){for(i=0;~scanf("%c",&a[i]);i++);while(i--)printf("%c",a[i]);}
main.c:1:6: error: unknown type name 'a' 1 | main(a[20],i){for(i=0;~scanf("%c",&a[i]);i++);while(i--)printf("%c",a[i]);} | ^ main.c:1:12: error: unknown type name 'i' 1 | main(a[20],i){for(i=0;~scanf("%c",&a[i]);i++);while(i--)printf("%c",a[i]);} | ^
s179445850
p00006
C
main(a[20],i){for(i=0;~scanf("%c",&a[i]);i++);while(i--)printf("%c",a[i]);}
main.c:1:6: error: unknown type name 'a' 1 | main(a[20],i){for(i=0;~scanf("%c",&a[i]);i++);while(i--)printf("%c",a[i]);} | ^ main.c:1:12: error: unknown type name 'i' 1 | main(a[20],i){for(i=0;~scanf("%c",&a[i]);i++);while(i--)printf("%c",a[i]);} | ^
s441083595
p00006
C
main(){char a;~scanf("%c",&a)&&(main()||printf("%c",a);)}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(){char a;~scanf("%c",&a)&&(main()||printf("%c",a);)} | ^~~~ main.c: In function 'main': main.c:1:16: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | main(){char a;~scanf("%c",&a)&&(main()||printf("%c",a);)} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | main(){char a;~scanf("%c",&a)&&(main()||printf("%c",a);)} main.c:1:16: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | main(){char a;~scanf("%c",&a)&&(main()||printf("%c",a);)} | ^~~~~ main.c:1:16: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:1:41: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 1 | main(){char a;~scanf("%c",&a)&&(main()||printf("%c",a);)} | ^~~~~~ main.c:1:41: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:1:41: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:1:41: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:1:55: error: expected ')' before ';' token 1 | main(){char a;~scanf("%c",&a)&&(main()||printf("%c",a);)} | ~ ^ | ) main.c:1:57: error: expected ';' before '}' token 1 | main(){char a;~scanf("%c",&a)&&(main()||printf("%c",a);)} | ^ | ;
s362216882
p00006
C
main(){char a;~scanf("%c",&a)&&(main()||printf("%c",a));)}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(){char a;~scanf("%c",&a)&&(main()||printf("%c",a));)} | ^~~~ main.c: In function 'main': main.c:1:16: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | main(){char a;~scanf("%c",&a)&&(main()||printf("%c",a));)} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | main(){char a;~scanf("%c",&a)&&(main()||printf("%c",a));)} main.c:1:16: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | main(){char a;~scanf("%c",&a)&&(main()||printf("%c",a));)} | ^~~~~ main.c:1:16: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:1:41: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 1 | main(){char a;~scanf("%c",&a)&&(main()||printf("%c",a));)} | ^~~~~~ main.c:1:41: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:1:41: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:1:41: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:1:57: error: expected statement before ')' token 1 | main(){char a;~scanf("%c",&a)&&(main()||printf("%c",a));)} | ^
s557843280
p00006
C
#include <stdio.h> #include <string.h> int main( void ){ int i; char s[21]; for(i=strlen(gets(s));i--;putchar(s[i])); return 0; }
main.c: In function 'main': main.c:6:22: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 6 | for(i=strlen(gets(s));i--;putchar(s[i])); | ^~~~ | fgets main.c:6:22: error: passing argument 1 of 'strlen' makes pointer from integer without a cast [-Wint-conversion] 6 | for(i=strlen(gets(s));i--;putchar(s[i])); | ^~~~~~~ | | | int In file included from main.c:2: /usr/include/string.h:407:35: note: expected 'const char *' but argument is of type 'int' 407 | extern size_t strlen (const char *__s) | ~~~~~~~~~~~~^~~
s760858738
p00006
C
main(i){ char s[21]; for(i=strlen(fgets(s,21,stdin));i--;putchar(s[i])); i=!puts(""); }
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(i){ | ^~~~ main.c: In function 'main': main.c:1:1: error: type of 'i' defaults to 'int' [-Wimplicit-int] main.c:3:15: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration] 3 | for(i=strlen(fgets(s,21,stdin));i--;putchar(s[i])); | ^~~~~~ main.c:1:1: note: include '<string.h>' or provide a declaration of 'strlen' +++ |+#include <string.h> 1 | main(i){ main.c:3:15: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch] 3 | for(i=strlen(fgets(s,21,stdin));i--;putchar(s[i])); | ^~~~~~ main.c:3:15: note: include '<string.h>' or provide a declaration of 'strlen' main.c:3:22: error: implicit declaration of function 'fgets' [-Wimplicit-function-declaration] 3 | for(i=strlen(fgets(s,21,stdin));i--;putchar(s[i])); | ^~~~~ main.c:3:33: error: 'stdin' undeclared (first use in this function) 3 | for(i=strlen(fgets(s,21,stdin));i--;putchar(s[i])); | ^~~~~ main.c:1:1: note: 'stdin' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>' +++ |+#include <stdio.h> 1 | main(i){ main.c:3:33: note: each undeclared identifier is reported only once for each function it appears in 3 | for(i=strlen(fgets(s,21,stdin));i--;putchar(s[i])); | ^~~~~ main.c:3:45: error: implicit declaration of function 'putchar' [-Wimplicit-function-declaration] 3 | for(i=strlen(fgets(s,21,stdin));i--;putchar(s[i])); | ^~~~~~~ main.c:3:45: note: include '<stdio.h>' or provide a declaration of 'putchar' main.c:4:12: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration] 4 | i=!puts(""); | ^~~~ main.c:4:12: note: include '<stdio.h>' or provide a declaration of 'puts'
s117151115
p00006
C
i;main(){char s[21];for(scanf("%s",s),i=strlen();i--;putchar(s[i]));i=!puts("");}
main.c:1:1: warning: data definition has no type or storage class 1 | i;main(){char s[21];for(scanf("%s",s),i=strlen();i--;putchar(s[i]));i=!puts("");} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int] main.c:1:3: error: return type defaults to 'int' [-Wimplicit-int] 1 | i;main(){char s[21];for(scanf("%s",s),i=strlen();i--;putchar(s[i]));i=!puts("");} | ^~~~ main.c: In function 'main': main.c:1:25: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | i;main(){char s[21];for(scanf("%s",s),i=strlen();i--;putchar(s[i]));i=!puts("");} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | i;main(){char s[21];for(scanf("%s",s),i=strlen();i--;putchar(s[i]));i=!puts("");} main.c:1:25: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | i;main(){char s[21];for(scanf("%s",s),i=strlen();i--;putchar(s[i]));i=!puts("");} | ^~~~~ main.c:1:25: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:1:41: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration] 1 | i;main(){char s[21];for(scanf("%s",s),i=strlen();i--;putchar(s[i]));i=!puts("");} | ^~~~~~ main.c:1:1: note: include '<string.h>' or provide a declaration of 'strlen' +++ |+#include <string.h> 1 | i;main(){char s[21];for(scanf("%s",s),i=strlen();i--;putchar(s[i]));i=!puts("");} main.c:1:41: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch] 1 | i;main(){char s[21];for(scanf("%s",s),i=strlen();i--;putchar(s[i]));i=!puts("");} | ^~~~~~ main.c:1:41: note: include '<string.h>' or provide a declaration of 'strlen' main.c:1:41: error: too few arguments to function 'strlen' main.c:1:54: error: implicit declaration of function 'putchar' [-Wimplicit-function-declaration] 1 | i;main(){char s[21];for(scanf("%s",s),i=strlen();i--;putchar(s[i]));i=!puts("");} | ^~~~~~~ main.c:1:54: note: include '<stdio.h>' or provide a declaration of 'putchar' main.c:1:72: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration] 1 | i;main(){char s[21];for(scanf("%s",s),i=strlen();i--;putchar(s[i]));i=!puts("");} | ^~~~ main.c:1:72: note: include '<stdio.h>' or provide a declaration of 'puts'
s926384878
p00006
C
#include<stdio.h> #include<stdlib.h> int main(void){ char a,b,i,j; char rarara[1000]; char papapa[1000]; gets(rarara); for(i=0;rarara[i]!=NULL;i++){}; a=i; for(i=0;i<a;i++) papapa[i]=rarara[a-i-1]; papapa[a]=NULL; printf("%s\n",papapa); return 0; }
main.c: In function 'main': main.c:7:2: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 7 | gets(rarara); | ^~~~ | fgets main.c:8:19: warning: comparison between pointer and integer 8 | for(i=0;rarara[i]!=NULL;i++){}; | ^~ main.c:12:12: error: assignment to 'char' from 'void *' makes integer from pointer without a cast [-Wint-conversion] 12 | papapa[a]=NULL; | ^
s259375298
p00006
C
#include<stdio.h> #include<string.h> int main(){ char in[30]; fgets(in, 30, stdin); for(i = strlen(in) - 2; i >= 0; i--) putchar(in[i]); puts(""); return 0; }
main.c: In function 'main': main.c:7:6: error: 'i' undeclared (first use in this function); did you mean 'in'? 7 | for(i = strlen(in) - 2; i >= 0; i--) putchar(in[i]); | ^ | in main.c:7:6: note: each undeclared identifier is reported only once for each function it appears in
s200779444
p00006
C
#include<stdio.h> int main(void) { char str[20+1]; int flag = 0; int i = 0; scanf("%s",str); for(i=20;i >= 0;i--) { if(str[i] == 0x00) { flag = 1; } else if (flag) { printf("%c", str[i]); } } printf("\n"); return 0;
main.c: In function 'main': main.c:20:9: error: expected declaration or statement at end of input 20 | return 0; | ^~~~~~
s084986258
p00006
C
#include<stdio.h> #include<string.h> int main(void) { char m[21]; int f1, s; scanf("%s",m); s = strlen(m); for(f1 = s - 1; f1 >= 0; f1---) { printf("%c",m[f1]); } printf("\n"); return 0; }
main.c: In function 'main': main.c:10:39: error: expected expression before ')' token 10 | for(f1 = s - 1; f1 >= 0; f1---) | ^
s280389721
p00006
C
#include<stdio.h> #include<string.h> int main(void) { char m[21]; int f1, s; scanf("%s",m); s = strlen(m); for(f1 = s - 1; f1 >= 0; f1--) { printf("%c",m[f1]; } printf("\n"); return 0; }
main.c: In function 'main': main.c:12:34: error: expected ')' before ';' token 12 | printf("%c",m[f1]; | ~ ^ | ) main.c:12:35: error: expected ';' before '}' token 12 | printf("%c",m[f1]; | ^ | ; 13 | } | ~
s264925918
p00006
C
#include<stdio.h> int main(){ char a[21]; int i=0; fgets(a,sizeof(a),stdin); while(a[i]!='\n') i++; for(i=i-1;i>=0;i--) printf("%c",a[i]); printf("\n"); return 0;
main.c: In function 'main': main.c:14:3: error: expected declaration or statement at end of input 14 | return 0; | ^~~~~~
s470794138
p00006
C
#include<stdio.h> #include<string> int main() { char seq[21]; int x; scanf("%s",&seq); x=strlen(seq); while(--x>=0) printf("%c",seq[x]); printf("\n"); }
main.c:2:9: fatal error: string: No such file or directory 2 | #include<string> | ^~~~~~~~ compilation terminated.
s252896789
p00006
C
#include<iostream> #include<string> using namespace std; int main() { string str; while(cin>>str) { int i; for(i=str.size()-1;i>=0;--i) cout<<str[i]; cout<<endl; } return 0; }
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s394280377
p00006
C
# include <stdio.h> # include <string.h> void main() { char str[1024]; gets(str); int len; len=strlen(str); for(int i=len-1;i>=0;i--) putchar(str[i]); }
main.c: In function 'main': main.c:6:1: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 6 | gets(str); | ^~~~ | fgets
s734480633
p00006
C
}
main.c:1:1: error: expected identifier or '(' before '}' token 1 | } | ^
s101763017
p00006
C
#include <stdio.h> #include <string.h> int main(void) { char str[21]; scanf("%s", str); strrev(str); printf("%s\n", str); return (0); }
main.c: In function 'main': main.c:10:9: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 10 | strrev(str); | ^~~~~~ | strsep
s450869462
p00006
C
// // main.cpp // TestCppCode // // Created by Shahab Uddin on 04/20/13. // Copyright (c) 2013 ___Shahab__. All rights reserved. // #include <cstdio> #include <cstring> int main(int argc, const char * argv[]) { char input [20 + 10]; scanf ("%s", input); int length = strlen (input); for ( int i = length - 1; i >= 0; i-- ) { printf ("%c", input [i]); } return 0; }
main.c:9:10: fatal error: cstdio: No such file or directory 9 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s596661417
p00006
C
#include<stdio.h> int main(void){ int a[21],b[21];; int i =0,j=0; while(a[i] != '\0'){ scanf("%d",&num[i]); i++; } i--; for(; i>=0; i--){ b[j] = a[i] j++; } j++; b[j]='\0'; printf("%s\n",b); return 0; }
main.c: In function 'main': main.c:7:30: error: 'num' undeclared (first use in this function) 7 | scanf("%d",&num[i]); | ^~~ main.c:7:30: note: each undeclared identifier is reported only once for each function it appears in main.c:12:32: error: expected ';' before 'j' 12 | b[j] = a[i] | ^ | ; 13 | j++; | ~
s393334172
p00006
C
#include<stdio.h> int main(void){ char a[21],b[21];; int i =0,j=0; while(a[i] != '\0'){ scanf("%d",&num[i]); i++; } i--; for(; i>=0; i--){ b[j] = a[i]; j++; } j++; b[j]='\0'; printf("%s\n",b); return 0; }
main.c: In function 'main': main.c:7:30: error: 'num' undeclared (first use in this function) 7 | scanf("%d",&num[i]); | ^~~ main.c:7:30: note: each undeclared identifier is reported only once for each function it appears in
s140670513
p00006
C
include <stdio.h> int main(){ int a,cnt=0; char str[20]; scanf("%str",str); while(str[cnt]!='\0'){ cnt++; } for(;cnt>=0;cnt--) printf("%c",str[cnt]); printf("\n"); return 0; }
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s032898858
p00006
C
include <stdio.h> int main(){ int a,cnt=0; char str[20]; scanf("%s",str); while(str[cnt]!='\0'){ cnt++; } for(;cnt>=0;cnt--) printf("%c",str[cnt]); printf("\n"); return 0; }
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s560344612
p00006
C
#include <stdio.h> #include <conio.h> int main(void){ char sets[20]; int i; for(i=0; i<20; i++){ sets[i] = getche(); } for(i=19; i>=0; i--){ printf("%c",sets[i]); } return 0; }
main.c:2:10: fatal error: conio.h: No such file or directory 2 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s878487399
p00006
C
#include <stdio.h> int main(void){ char sets[20]; int i; for(i=0; i<20; i++){ sets[i] = getche(); } for(i=19; i>=0; i--){ printf("%c",sets[i]); } return 0; }
main.c: In function 'main': main.c:7:18: error: implicit declaration of function 'getche'; did you mean 'getchar'? [-Wimplicit-function-declaration] 7 | sets[i] = getche(); | ^~~~~~ | getchar
s068444923
p00006
C
include <stdio.h> #include <string.h> int main(){ int i; char s[21]; scanf("%s",s); i=strlen(s); for(i=i-1;s[i] > 0;i--){ printf("%c",s[i]); } printf("\n"); return (0); }
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^ In file included from main.c:2: /usr/include/string.h:44:22: error: unknown type name 'size_t' 44 | size_t __n) __THROW __nonnull ((1, 2)); | ^~~~~~ /usr/include/string.h:34:1: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' 33 | #include <stddef.h> +++ |+#include <stddef.h> 34 | /usr/include/string.h:47:56: error: unknown type name 'size_t' 47 | extern void *memmove (void *__dest, const void *__src, size_t __n) | ^~~~~~ /usr/include/string.h:47:56: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' /usr/include/string.h:55:32: error: unknown type name 'size_t' 55 | int __c, size_t __n) | ^~~~~~ /usr/include/string.h:55:32: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' /usr/include/string.h:61:42: error: unknown type name 'size_t' 61 | extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1)); | ^~~~~~ /usr/include/string.h:61:42: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' /usr/include/string.h:64:56: error: unknown type name 'size_t' 64 | extern int memcmp (const void *__s1, const void *__s2, size_t __n) | ^~~~~~ /usr/include/string.h:64:56: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' /usr/include/string.h:80:60: error: unknown type name 'size_t' 80 | extern int __memcmpeq (const void *__s1, const void *__s2, size_t __n) | ^~~~~~ /usr/include/string.h:80:60: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' /usr/include/string.h:107:48: error: unknown type name 'size_t' 107 | extern void *memchr (const void *__s, int __c, size_t __n) | ^~~~~~ /usr/include/string.h:107:48: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' /usr/include/string.h:145:53: error: unknown type name 'size_t' 145 | const char *__restrict __src, size_t __n) | ^~~~~~ /usr/include/string.h:145:53: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' /usr/include/string.h:153:23: error: unknown type name 'size_t' 153 | size_t __n) __THROW __nonnull ((1, 2)); | ^~~~~~ /usr/include/string.h:153:23: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' /usr/include/string.h:159:57: error: unknown type name 'size_t' 159 | extern int strncmp (const char *__s1, const char *__s2, size_t __n) | ^~~~~~ /usr/include/string.h:159:57: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' /usr/include/string.h:166:8: error: unknown type name 'size_t' 166 | extern size_t strxfrm (char *__restrict __dest, | ^~~~~~ /usr/include/string.h:166:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' /usr/include/string.h:167:54: error: unknown type name 'size_t' 167 | const char *__restrict __src, size_t __n) | ^~~~~~ /usr/include/string.h:167:54: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' /usr/include/string.h:179:8: error: unknown type name 'size_t' 179 | extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n, | ^~~~~~ /usr/include/string.h:179:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' /usr/include/string.h:179:59: error: unknown type name 'size_t' 179 | extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n, | ^~~~~~ /usr/include/string.h:179:59: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' /usr/include/string.h:195:45: error: unknown type name 'size_t' 195 | extern char *strndup (const char *__string, size_t __n) | ^~~~~~ /usr/include/string.h:195:45: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' /usr/include/string.h:293:8: error: unknown type name 'size_t' 293 | extern size_t strcspn (const char *__s, const char *__reject) | ^~~~~~ /usr/include/string.h:293:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' /usr/include/string.h:297:8: error: unknown type name 'size_t' 297 | extern size_t strspn (const char *__s, const char *__accept) | ^~~~~~ /usr/include/string.h:297:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' /usr/include/string.h:389:46: error: unknown type name 'size_t' 389 | extern void *memmem (const void *__haystack, size_t __haystacklen, | ^~~~~~ /usr/include/string.h:389:46: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' /usr/include/string.h:390:44: error: unknown type name 'size_t' 390 | const void *__needle, size_t __needlelen) | ^~~~~~ /usr/include/string.h:390:44: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' /usr/include/string.h:398:55: error: unknown type name 'size_t' 398 | const void *__restrict __src, size_t __n) | ^~~~~~ /usr/include/string.h:398:55: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' /usr/include/string.h:401:53: error: unknown type name 'size_t' 401 | const void *__restrict __src, size_t __n) | ^~~~~~ /usr/include/string.h:401:53: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' /usr/include/string.h:407:8: error: unknown type name 'size_t' 407 | extern size_t strlen (const char *__s) | ^~~~~~ /usr/include/string.h:407:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' /usr/include/string.h:413:8: error: unknown type name 'size_t' 413 | extern size_t strnlen (const char *__string, size_t __maxlen) | ^~~~~~ /usr/include/string.h:413:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' /usr/include/string.h:413:46: error: unknown type name 'size_t' 413 | extern size_t strnlen (const char *__string, size_t __maxlen) | ^~~~~~ /usr/include/string.h:413:46: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33, from /usr/include/string.h:26: /usr/include/string.h:432:12: error: unknown type name 'size_t' 432 | extern int __REDIRECT_NTH (strerror_r, | ^~~~~~~~~~~~~~ /usr/include/string.h:432:12: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' In file included from /usr/include/string.h:462: /usr/include/strings.h:34:54: error: unknown type name 'size_t' 34 | extern int bcmp (const void *__s1, const void *__s2, size_t __n) | ^~~~~~ /usr/include/strings.h:24:1: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' 23 | #include <stddef.h> +++ |+#include <stddef.h> 24 | /usr/include/strings.h:38:53: error: unknown type name 'size_t' 38 | extern void bcopy (const void *__src, void *__dest, size_t __n) | ^~~~~~ /usr/include/strings.h:38:53: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' /usr/include/strings.h:42:31: error: unknown type name 'size_t' 42 | extern void bzero (void *__s, size_t __n) __THROW __nonnull ((1)); | ^~~~~~ /usr/include/strings.h:42:31: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' /usr/include/strings.h:120:61: error: unknown type name 'size_t' 120 | extern int strncasecmp (const char *__s1, const char *__s2, size_t __n) | ^~~~~~ /usr/include/strings.h:120:61: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' /usr/include/strings.h:134:27: error: unknown type name 'size_t' 134 | size_t __n, locale_t __loc) | ^~~~~~ /usr/include/strings.h:134:27: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' /usr/include/string.h:466:40: error: unknown type na
s480050677
p00006
C
#include <stdio.h> int main(void){ char str[20],strr[20]; int i; scanf("%s",&str); for(i=0;str[i]!=\0;i++){ strr[20-i]=str[i]; } printf("%s\n",strr); return 0; }
main.c: In function 'main': main.c:7:21: error: stray '\' in program 7 | for(i=0;str[i]!=\0;i++){ | ^
s575167129
p00006
C
#include <conio.h> int main(void){ char str[20],strr[20]; int i,j; for(i=0;str[i]!=\0;i++){ str[i]=getchar(); } j=i; for(;j>=0;j--){ printf("%c",str[j]); } printf("\n"); return 0; }
main.c:1:10: fatal error: conio.h: No such file or directory 1 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s792230818
p00006
C
#include <stdio.h> int main(void){ char str[20],strr[20]; int i,j; for(i=0;str[i]!=\0;i++){ str[i]=getchar(); } j=i; for(;j>=0;j--){ printf("%c",str[j]); } printf("\n"); return 0; }
main.c: In function 'main': main.c:6:21: error: stray '\' in program 6 | for(i=0;str[i]!=\0;i++){ | ^
s688551807
p00006
C
main(){char s[21];gets(s);printf("%s\n",strrev(s));return 0;}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(){char s[21];gets(s);printf("%s\n",strrev(s));return 0;} | ^~~~ main.c: In function 'main': main.c:1:19: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration] 1 | main(){char s[21];gets(s);printf("%s\n",strrev(s));return 0;} | ^~~~ main.c:1:27: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 1 | main(){char s[21];gets(s);printf("%s\n",strrev(s));return 0;} | ^~~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf' +++ |+#include <stdio.h> 1 | main(){char s[21];gets(s);printf("%s\n",strrev(s));return 0;} main.c:1:27: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] 1 | main(){char s[21];gets(s);printf("%s\n",strrev(s));return 0;} | ^~~~~~ main.c:1:27: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:1:41: error: implicit declaration of function 'strrev' [-Wimplicit-function-declaration] 1 | main(){char s[21];gets(s);printf("%s\n",strrev(s));return 0;} | ^~~~~~
s084266007
p00006
C
#include <stdio.h> #include <string.h> int main(void) { char str[21]; scanf("%s", str); printf("%s\n",strrev(str)); return (0); }
main.c: In function 'main': main.c:10:23: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 10 | printf("%s\n",strrev(str)); | ^~~~~~ | strsep
s809278664
p00006
C
#include <stdio.h> #include <string.h> int main(void) { char str[21]; char str2[21]; scanf("%s", str); strrev(str); strcpy(str2, str); printf("%s\n", str2); return (0); }
main.c: In function 'main': main.c:11:9: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 11 | strrev(str); | ^~~~~~ | strsep
s260890974
p00006
C
#include<stdio.h> #include<string.h> int main(){ int n,t; char str[20]; while(scanf("%s",str)!=EOF){ n=strlen(str); for(t=n;t>=0;t--){ printf("%c",a[t]); } printf("\n"); } return (0); }
main.c: In function 'main': main.c:9:19: error: 'a' undeclared (first use in this function) 9 | printf("%c",a[t]); | ^ main.c:9:19: note: each undeclared identifier is reported only once for each function it appears in
s819527807
p00006
C
#include <stdio.h> int main(){ char moji[21]={'\0'}; int i,j,t,f; scanf("%s",moji); for(i=0;moji[i]!=\0;i++){ } t=i; for(j=0;j<t/2;j++){ f=moji[j]; moji[j]=moji[i-1]; moji[i-1]=f; i--; } printf("%s\n",moji); return 0; }
main.c: In function 'main': main.c:8:18: error: stray '\' in program 8 | for(i=0;moji[i]!=\0;i++){ | ^
s168954290
p00006
C
#include<stdio.h> #include<string.h> int main(){ char str[20]; gets(str); puts(strrev(str)); }
main.c: In function 'main': main.c:5:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 5 | gets(str); | ^~~~ | fgets main.c:6:10: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 6 | puts(strrev(str)); | ^~~~~~ | strsep main.c:6:10: error: passing argument 1 of 'puts' makes pointer from integer without a cast [-Wint-conversion] 6 | puts(strrev(str)); | ^~~~~~~~~~~ | | | int In file included from main.c:1: /usr/include/stdio.h:714:30: note: expected 'const char *' but argument is of type 'int' 714 | extern int puts (const char *__s); | ~~~~~~~~~~~~^~~
s448864419
p00006
C
#include <stdio.h> int main(void) { char str[20]; int i; scanf("%s", str); for(i = 0; i < 20; i++) { if(str[i] != \0) printf("%c", str[i]); } }
main.c: In function 'main': main.c:10:22: error: stray '\' in program 10 | if(str[i] != \0) | ^
s178134348
p00006
C
#include <Stdio.h> #include <string.h> int main(void) { char str[20]; int i, len; scanf("%s", str); len = (int)strlen(str); for(i = len - 1; i >= 0; i--) { printf("%c", str[i]); } putchar('\n'); return(0); }
main.c:1:10: fatal error: Stdio.h: No such file or directory 1 | #include <Stdio.h> | ^~~~~~~~~ compilation terminated.
s834986064
p00006
C
#include<stdio.h> int main(){ char str[21]; int A; scanf("%s",str); for(A=0;str[A];A++); for(A--;A>=0;A--) printf("%c",str[A]); printf("\n") return 0; }
main.c: In function 'main': main.c:10:21: error: expected ';' before 'return' 10 | printf("\n") | ^ | ; 11 | return 0; | ~~~~~~
s637017247
p00006
C
#include<stdio.h> #include<string.h> int main(void) { int len; char str[20]; scanf("%s",str); len=strlen(str)-1; for(i=len;i>=0;i--) putchar(str[i]); return 0; }
main.c: In function 'main': main.c:9:13: error: 'i' undeclared (first use in this function) 9 | for(i=len;i>=0;i--) | ^ main.c:9:13: note: each undeclared identifier is reported only once for each function it appears in
s324362809
p00006
C
#include<stdio.h> #include<string.h> int main(void) { int len; char str[20]; scanf("%s",str); len=strlen(str)-1; for(i=len;i>=0;i--) putchar(str[i]); return 0; }
main.c: In function 'main': main.c:9:13: error: 'i' undeclared (first use in this function) 9 | for(i=len;i>=0;i--) | ^ main.c:9:13: note: each undeclared identifier is reported only once for each function it appears in
s325804429
p00006
C
#include <stdio.h> int main() { char ch[20]={'\0'}; int i=0,n=0; for(i=0;i<20;i++) { ch[i]=getche(); if(ch[i]=='\r')break; n++; } for(i=n-1;i>=0;i--) printf("%c",ch[i]); return 0; }
main.c: In function 'main': main.c:8:15: error: implicit declaration of function 'getche'; did you mean 'getchar'? [-Wimplicit-function-declaration] 8 | ch[i]=getche(); | ^~~~~~ | getchar
s585691165
p00006
C
#include <iostream> using namespace std; int main(){ string str,ans; int i; cin >> str; for(i = str.size() - 1 ; i != -1 ; i--){ ans += str[i]; } cout << ans << endl; return 0; }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s977183489
p00006
C
#include <stdio.h> #include <string.h> int main() { char arr[100]; printf("\n"); gets(arr); strrev(arr); printf("\n%s\n",arr); return 0; }
main.c: In function 'main': main.c:9:4: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 9 | gets(arr); | ^~~~ | fgets main.c:11:4: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 11 | strrev(arr); | ^~~~~~ | strsep
s239161950
p00006
C
#include <stdio.h> int main() { char str[20]; gets(str); strrev(str); puts(str); return 0; }
main.c: In function 'main': main.c:5:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 5 | gets(str); | ^~~~ | fgets main.c:6:5: error: implicit declaration of function 'strrev' [-Wimplicit-function-declaration] 6 | strrev(str); | ^~~~~~
s755071194
p00006
C
#include <stdio.h> #include <string.h> int main() { char str[20]; int i; gets(str); strrev(str); puts(str); return 0; }
main.c: In function 'main': main.c:7:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 7 | gets(str); | ^~~~ | fgets main.c:8:5: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 8 | strrev(str); | ^~~~~~ | strsep
s858884109
p00006
C
a = raw_input() print a[::-1]
main.c:1:1: warning: data definition has no type or storage class 1 | a = raw_input() | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:1:5: error: implicit declaration of function 'raw_input' [-Wimplicit-function-declaration] 1 | a = raw_input() | ^~~~~~~~~ main.c:1:5: error: initializer element is not constant main.c:3:1: error: expected ',' or ';' before 'print' 3 | print a[::-1] | ^~~~~
s798852939
p00006
C
#include<stdio.h> #include<string.h> int main(){ char ch[21],c; int i=0,j; gets(ch); puts(strrev(ch)); return 0; }
main.c: In function 'main': main.c:6:1: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 6 | gets(ch); | ^~~~ | fgets main.c:7:6: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 7 | puts(strrev(ch)); | ^~~~~~ | strsep main.c:7:6: error: passing argument 1 of 'puts' makes pointer from integer without a cast [-Wint-conversion] 7 | puts(strrev(ch)); | ^~~~~~~~~~ | | | int In file included from main.c:1: /usr/include/stdio.h:714:30: note: expected 'const char *' but argument is of type 'int' 714 | extern int puts (const char *__s); | ~~~~~~~~~~~~^~~
s711217149
p00006
C
#include<stdio.h> #include<string.h> int main() { char name[20]; scanf("%s",name); printf("%s",strrev(name)); return 0; }
main.c: In function 'main': main.c:10:16: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 10 | printf("%s",strrev(name)); | ^~~~~~ | strsep
s839667853
p00006
C
main(i){char s[99];gets(s);for(i=strlen();i;)putchar(s[--i]);return!puts("");}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(i){char s[99];gets(s);for(i=strlen();i;)putchar(s[--i]);return!puts("");} | ^~~~ main.c: In function 'main': main.c:1:1: error: type of 'i' defaults to 'int' [-Wimplicit-int] main.c:1:20: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration] 1 | main(i){char s[99];gets(s);for(i=strlen();i;)putchar(s[--i]);return!puts("");} | ^~~~ main.c:1:34: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration] 1 | main(i){char s[99];gets(s);for(i=strlen();i;)putchar(s[--i]);return!puts("");} | ^~~~~~ main.c:1:1: note: include '<string.h>' or provide a declaration of 'strlen' +++ |+#include <string.h> 1 | main(i){char s[99];gets(s);for(i=strlen();i;)putchar(s[--i]);return!puts("");} main.c:1:34: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch] 1 | main(i){char s[99];gets(s);for(i=strlen();i;)putchar(s[--i]);return!puts("");} | ^~~~~~ main.c:1:34: note: include '<string.h>' or provide a declaration of 'strlen' main.c:1:34: error: too few arguments to function 'strlen' main.c:1:46: error: implicit declaration of function 'putchar' [-Wimplicit-function-declaration] 1 | main(i){char s[99];gets(s);for(i=strlen();i;)putchar(s[--i]);return!puts("");} | ^~~~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'putchar' +++ |+#include <stdio.h> 1 | main(i){char s[99];gets(s);for(i=strlen();i;)putchar(s[--i]);return!puts("");} main.c:1:69: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration] 1 | main(i){char s[99];gets(s);for(i=strlen();i;)putchar(s[--i]);return!puts("");} | ^~~~ main.c:1:69: note: include '<stdio.h>' or provide a declaration of 'puts'
s730370686
p00006
C++
#include <bits/stdc++.h> int main () { assdasd asd a sd a sda sd a s d as d as dassssssssssssssssssss }
a.cc: In function 'int main()': a.cc:4:1: error: 'assdasd' was not declared in this scope 4 | assdasd | ^~~~~~~
s887487100
p00006
C++
print(reversed(input()))
a.cc:1:6: error: expected constructor, destructor, or type conversion before '(' token 1 | print(reversed(input())) | ^
s396983081
p00006
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main(){ string str; cin >> str; reverse(str.begin(),str.end()); cout << x << endl; return 0; }
a.cc: In function 'int main()': a.cc:21:17: error: 'x' was not declared in this scope 21 | cout << x << endl; | ^
s698946576
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { string s; cin >> s; reverse(s.begin(),s.end()); cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:3: error: 'reverse' was not declared in this scope 9 | reverse(s.begin(),s.end()); | ^~~~~~~
s903884770
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { string str,a; a = 0 cin >> str; for(i =str.size()-1;i>=0;i--){ a += str[i]; } cout << a << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:13: error: ambiguous overload for 'operator=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 7 | a = 0 | ^ In file included from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/basic_string.h:817:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 817 | operator=(const basic_string& __str) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:828:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 828 | operator=(const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:840:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 840 | operator=(_CharT __c) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:858:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 858 | operator=(basic_string&& __str) | ^~~~~~~~ a.cc:9:13: error: 'i' was not declared in this scope 9 | for(i =str.size()-1;i>=0;i--){ | ^
s337145157
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { string str,a; a = 0 cin >> str; for(int i =str.size()-1;i>=0;i--){ a += str[i]; } cout << a << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:13: error: ambiguous overload for 'operator=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 7 | a = 0 | ^ In file included from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/basic_string.h:817:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 817 | operator=(const basic_string& __str) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:828:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 828 | operator=(const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:840:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 840 | operator=(_CharT __c) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:858:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 858 | operator=(basic_string&& __str) | ^~~~~~~~
s072639760
p00006
C++
#include<iostream> using namespace std; int main () { string mozi; cin >> mozi; int y; y = mozi.length(); for(i=0;i<y;++i){ string reverse; reverse[i]=mozi[y-i]; } cout << reverse << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: 'i' was not declared in this scope 8 | for(i=0;i<y;++i){ | ^ a.cc:12:13: error: 'reverse' was not declared in this scope 12 | cout << reverse << endl; | ^~~~~~~
s790335692
p00006
C++
#include<iostream> using namespace std; int main () { string mozi; cin >> mozi; int y; y = mozi.length(); for(int i=0;i<y;++i){ string reverse; reverse[i]=mozi[y-i]; } cout << reverse << endl; return 0; }
a.cc: In function 'int main()': a.cc:12:13: error: 'reverse' was not declared in this scope 12 | cout << reverse << endl; | ^~~~~~~
s421312695
p00006
C++
t = input() s=t[::-1] print (s)
a.cc:1:1: error: 't' does not name a type 1 | t = input() | ^
s982038355
p00006
C++
print(input()[::-1])
a.cc:1:6: error: expected constructor, destructor, or type conversion before '(' token 1 | print(input()[::-1]) | ^
s867184337
p00006
C++
print(input()[::-1])
a.cc:1:6: error: expected constructor, destructor, or type conversion before '(' token 1 | print(input()[::-1]) | ^
s545304231
p00006
C++
//============================================================================ // Name : 0006.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include <iostream> using namespace std; int main() { string s; while( cin >> s ){ reverse(s.begin() , s.end()); cout << s <<endl; } return 0; }
a.cc: In function 'int main()': a.cc:15:17: error: 'reverse' was not declared in this scope 15 | reverse(s.begin() , s.end()); | ^~~~~~~
s333350096
p00006
C++
#include<iostream> #include<string> using namespace std; int main(){ string str; cin<<str; for(int i=str.size();-1<i;i--){ cout<<str[i]; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:12: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 8 | cin<<str; | ~~~^~~~~ | | | | | std::string {aka std::__cxx11::basic_string<char>} | std::istream {aka std::basic_istream<char>} In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)' 763 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin<<str; | ^~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin<<str; | ^~~ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)' 125 | operator<<(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed: a.cc:8:9: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 8 | cin<<str; | ^~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin<<str; | ^~~ /usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin<<str; | ^~~ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin<<str; | ^~~ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 8 | cin<<str; | ^~~ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 8 | cin<<str; | ^~~ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 8 | cin<<str; | ^~~ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin<<str; | ^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin<<str; | ^~~ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 8 | cin<<str; | ^~~ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)' 684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 8 | cin<<str; | ^~~ /usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)' 689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:689:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 8 | cin<<str; | ^~~ /usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~ /usr/include/c++/14/ostream:810:5: note: template argument deduction/substitution failed: /usr/include/c++/14/ostream: In substitution of 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_istream<char>&; _Tp = std::__cxx11::basic_string<char>]': a.cc:8:7: required from here 8 | cin<<str; | ^~~ /usr/include/c++/14/ostream:810:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~
s976725369
p00006
C++
#include <cstdio> #include <cmath> #include <cstring> #include <cstdlib> #include <climits> #include <ctime> #include <queue> #include <stack> #include <algorithm> #include <list> #include <vector> #include <set> #include <map> #include <iostream> #include <deque> #include <complex> #include <string> #include <iomanip> #include <sstream> #include <bitset> #include <valarray> #include <iterator> using namespace std; typedef long long int ll; typedef unsigned int uint; typedef unsigned char uchar; typedef unsigned long long ull; typedef pair<int, int> pii; typedef vector<int> vi; #define REP(i,x) for(int i=0;i<(int)(x);i++) #define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();i++) #define RREP(i,x) for(int i=((int)(x)-1);i>=0;i--) #define RFOR(i,c) for(__typeof((c).rbegin())i=(c).rbegin();i!=(c).rend();i++) #define ALL(container) container.begin(), container.end() #define RALL(container) container.rbegin(), container.rend() #define SZ(container) ((int)container.size()) #define mp(a,b) make_pair(a, b) #define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() ); template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; } template<class T> ostream& operator<<(ostream &os, const vector<T> &t) { os<<"["; FOR(it,t) {if(it!=t.begin()) os<<","; os<<*it;} os<<"]"; return os; } template<class T> ostream& operator<<(ostream &os, const set<T> &t) { os<<"{"; FOR(it,t) {if(it!=t.begin()) os<<","; os<<*it;} os<<"}"; return os; } template<class S, class T> ostream& operator<<(ostream &os, const pair<S,T> &t) { return os<<"("<<t.first<<","<<t.second<<")";} const int INF = 1<<28; const double EPS = 1e-8; const int MOD = 1000000007; string s main(){ while(cin >> s){ reverse(ALL(s)); cout << s << endl; } return 0; }
a.cc:58:1: error: expected initializer before 'main' 58 | main(){ | ^~~~
s370392722
p00006
C++
#include<stdio.h> #include<string.h> int main(){ int i,len; char str[22]; scanf'("%s",str); len=strlen(str); for(i=len-1;i>=0;i--){ printf("%c",str[i]); } printf("\n"); return 0; }
a.cc:9:6: warning: missing terminating ' character 9 | scanf'("%s",str); | ^ a.cc:9:6: error: missing terminating ' character 9 | scanf'("%s",str); | ^~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:9:6: error: expected ';' before 'len' 9 | scanf'("%s",str); | ^ | ; 10 | 11 | len=strlen(str); | ~~~
s027202459
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { string str; getline(cin,str); reverse(str.begin(),str.end()); cout << str<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:3: error: 'reverse' was not declared in this scope 9 | reverse(str.begin(),str.end()); | ^~~~~~~
s037036369
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { string str; getline(cin,str); reverse(str.begin(),str.end()); cout << str<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:3: error: 'reverse' was not declared in this scope 9 | reverse(str.begin(),str.end()); | ^~~~~~~
s448961153
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { string str; getline(cin,str); reverse(begin(str),end(str)); cout << str<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:3: error: 'reverse' was not declared in this scope 9 | reverse(begin(str),end(str)); | ^~~~~~~
s758222796
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { string str; cin>>str; reverse(begin(str),end(str)); cout << str<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:3: error: 'reverse' was not declared in this scope 9 | reverse(begin(str),end(str)); | ^~~~~~~
s879423419
p00006
C++
#include <iostream> #include <string> int main() { std::string str; while (std::cin >> str) { for (size_t i = str.size() - 1; i != 0; --i) { std::cout << str[i]; } std::cout << endl; } return 0; }
a.cc: In function 'int main()': a.cc:11:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 11 | std::cout << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s841922974
p00006
C++
#include<iostream> #include<algorithm> #include<cstdio> using namespace std; int main() { char s[20]; int n,T; while(cin>>s){ n=strlen(s); for(int i=0;i<(n/2);i++){ T=s[i]; s[i]=s[n-i-1]; s[n-i-1]=T; } cout<<s<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:12:10: error: 'strlen' was not declared in this scope 12 | n=strlen(s); | ^~~~~~ a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<cstdio> +++ |+#include <cstring> 4 |
s917739684
p00006
C++
#include<cstdio> #include<cstring> using namespace std; int main() { char s[20]; int n,T; while(cin>>s){ n=strlen(s); for(int i=0;i<(n/2);i++){ T=s[i]; s[i]=s[n-i-1]; s[n-i-1]=T; } cout<<s<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:12:11: error: 'cin' was not declared in this scope 12 | while(cin>>s){ | ^~~ a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 4 | #include<cstring> +++ |+#include <iostream> 5 | a.cc:20:8: error: 'cout' was not declared in this scope 20 | cout<<s<<endl; | ^~~~ a.cc:20:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:20:17: error: 'endl' was not declared in this scope 20 | cout<<s<<endl; | ^~~~ a.cc:5:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' 4 | #include<cstring> +++ |+#include <ostream> 5 |
s947331752
p00006
C++
char s[22]; main(i){ for(;~scanf("%c",s+i);i++); for(;i;putchar(--i?s[i]:10)); }
a.cc:2:5: error: expected constructor, destructor, or type conversion before '(' token 2 | main(i){ | ^
s137832035
p00006
C++
#include <cstdio> #include <iostream> #include <algorithm> using namespace std; int main() { char a[25], i; scanf("%s", a); for(i=strlen(a)-1;i>=0;i--){ printf("%c", a[i]); } printf("\n"); return 0; }
a.cc: In function 'int main()': a.cc:9:11: error: 'strlen' was not declared in this scope 9 | for(i=strlen(a)-1;i>=0;i--){ | ^~~~~~ a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <algorithm> +++ |+#include <cstring> 4 | using namespace std;
s273201437
p00006
C++
#include <cstdio> #include <iostream> #include <algorithm> using namespace std; int main() { char a[25], i; scanf("%s", &a); for(i=strlen(a)-1;i>=0;i--){ printf("%c", a[i]); } printf("\n"); return 0; }
a.cc: In function 'int main()': a.cc:9:11: error: 'strlen' was not declared in this scope 9 | for(i=strlen(a)-1;i>=0;i--){ | ^~~~~~ a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <algorithm> +++ |+#include <cstring> 4 | using namespace std;
s347721181
p00006
C++
#include<stdio.h> #include<string.h> int main() { char s[20]; gets(s); strrev(s); puts(s); printf("\n"); return 0; }
a.cc: In function 'int main()': a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 6 | gets(s); | ^~~~ | getw a.cc:7:5: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 7 | strrev(s); | ^~~~~~ | strsep
s079885514
p00006
C++
#include <stdio.h> #include <string.h> int main() { char str[19]; gets(str); strrev(str); printf("%s\n",str); return 0; }
a.cc: In function 'int main()': a.cc:8:4: error: 'gets' was not declared in this scope; did you mean 'getw'? 8 | gets(str); | ^~~~ | getw a.cc:10:4: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 10 | strrev(str); | ^~~~~~ | strsep
s884457239
p00006
C++
#include <stdio.h> #include <string.h> int main () { char str[20]; while(scanf("%s",str)!=EOF) { strrev(str); printf("%s",str); printf("\n"); } return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 8 | strrev(str); | ^~~~~~ | strsep
s800324148
p00006
C++
#include<stdio.h> int main () { char str[20],s2[20]; scanf("%s",str); int i,len=0; for (i=0;str[i]!='\0';i++) { len++; } strrev(str); for (i=0;i<len;i++) printf ("%c", str[i]); printf ("\n"); return 0; }
a.cc: In function 'int main()': a.cc:15:6: error: 'strrev' was not declared in this scope 15 | strrev(str); | ^~~~~~
s276613680
p00006
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace coding { class Program { static void Main(string[] args) { string input = Console.ReadLine(); string output = ""; for (int i = input.Length - 1; i >= 0; i--) { output = output + input[i]; } Console.WriteLine(output); } } }
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.Linq; | ^~~~~~ a.cc:4:7: error: expected nested-name-specifier before 'System' 4 | using System.Text; | ^~~~~~ a.cc:5:7: error: expected nested-name-specifier before 'System' 5 | using System.Threading.Tasks; | ^~~~~~ a.cc:11:26: error: 'string' has not been declared 11 | static void Main(string[] args) | ^~~~~~ a.cc:11:35: error: expected ',' or '...' before 'args' 11 | static void Main(string[] args) | ^~~~ a.cc:21:6: error: expected ';' after class definition 21 | } | ^ | ; a.cc: In static member function 'static void coding::Program::Main(int*)': a.cc:13:13: error: 'string' was not declared in this scope 13 | string input = Console.ReadLine(); | ^~~~~~ a.cc:14:20: error: expected ';' before 'output' 14 | string output = ""; | ^~~~~~ a.cc:15:26: error: 'input' was not declared in this scope; did you mean 'int'? 15 | for (int i = input.Length - 1; i >= 0; i--) | ^~~~~ | int a.cc:17:17: error: 'output' was not declared in this scope 17 | output = output + input[i]; | ^~~~~~ a.cc:19:13: error: 'Console' was not declared in this scope 19 | Console.WriteLine(output); | ^~~~~~~ a.cc:19:31: error: 'output' was not declared in this scope 19 | Console.WriteLine(output); | ^~~~~~
s173569462
p00006
C++
#include <stdio.h> #include <string.h> int main() { char str[20]; gets(str); strrev(str); printf("%s\n",str); return 0; }
a.cc: In function 'int main()': a.cc:7:2: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(str); | ^~~~ | getw a.cc:8:2: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 8 | strrev(str); | ^~~~~~ | strsep
s375318172
p00006
C++
while line = gets print line.reverse+"\n" end
a.cc:1:1: error: expected unqualified-id before 'while' 1 | while line = gets | ^~~~~
s758148051
p00006
C++
print raw_input().strip()[::-1]
a.cc:1:1: error: 'print' does not name a type; did you mean 'int'? 1 | print raw_input().strip()[::-1] | ^~~~~ | int
s436367146
p00006
C++
#include <cstdio> #include <cmath> #include <cstring> #include <cstdlib> #include <climits> #include <ctime> #include <queue> #include <stack> #include <algorithm> #include <list> #include <vector> #include <set> #include <map> #include <iostream> #include <deque> #include <complex> #include <string> #include <iomanip> #include <sstream> #include <bitset> #include <valarray> #include <iterator> using namespace std; typedef long long int ll; typedef unsigned int uint; typedef unsigned char uchar; typedef unsigned long long ull; typedef pair<int, int> pii; typedef vector<int> vi; #define REP(i,x) for(int i=0;i<(int)(x);i++) #define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();i++) #define RREP(i,x) for(int i=((int)(x)-1);i>=0;i--) #define RFOR(i,c) for(__typeof((c).rbegin())i=(c).rbegin();i!=(c).rend();i++) #define ALL(container) container.begin(), container.end() #define RALL(container) container.rbegin(), container.rend() #define SZ(container) ((int)container.size()) #define mp(a,b) make_pair(a, b) #define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() ); template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; } template<class T> ostream& operator<<(ostream &os, const vector<T> &t) { os<<"["; FOR(it,t) {if(it!=t.begin()) os<<","; os<<*it;} os<<"]"; return os; } template<class T> ostream& operator<<(ostream &os, const set<T> &t) { os<<"{"; FOR(it,t) {if(it!=t.begin()) os<<","; os<<*it;} os<<"}"; return os; } template<class S, class T> ostream& operator<<(ostream &os, const pair<S,T> &t) { return os<<"("<<t.first<<","<<t.second<<")";} const int INF = 1<<28; const double EPS = 1e-8; const int MOD = 1000000007; int n, m; string str; main(){ cin >> str; reverse(ALL(str)); cout << str < endl; return 0; }
a.cc:58:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 58 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:61:21: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 61 | cout << str < endl; | ~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/bits/specfun.h:43, from /usr/include/c++/14/cmath:3906, from a.cc:2: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 61 | cout << str < endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 61 | cout << str < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 61 | cout << str < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 61 | cout << str < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 61 | cout << str < endl; | ^~~~ In file included from /usr/include/c++/14/deque:66, from /usr/include/c++/14/queue:62, from a.cc:7: /usr/include/c++/14/bits/stl_deque.h:2334:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator<(const deque<_Tp, _Alloc>&, const deque<_Tp, _Alloc>&)' 2334 | operator<(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_deque.h:2334:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::deque<_Tp, _Alloc>' 61 | cout << str < endl; | ^~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/deque:81: /usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2600 | operator<(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>' 61 | cout << str < endl; | ^~~~ In file included from /usr/include/c++/14/vector:66, from /usr/include/c++/14/queue:63: /usr/include/c++/14/bits/stl_vector.h:2089:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator<(const vector<_Tp, _Alloc>&, const vector<_Tp, _Alloc>&)' 2089 | operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:2089:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::vector<_Tp, _Alloc>' 61 | cout << str < endl; | ^~~~ In file included from /usr/include/c++/14/queue:66: /usr/include/c++/14/bits/stl_queue.h:397:5: note: candidate: 'template<class _Tp, class _Seq> bool std::operator<(const queue<_Tp, _Seq>&, const queue<_Tp, _Seq>&)' 397 | operator<(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_queue.h:397:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::queue<_Tp, _Seq>' 61 | cout << str < endl; | ^~~~ In file included from /usr/include/c++/14/stack:63, from a.cc:8: /usr/include/c++/14/bits/stl_stack.h:373:5: note: candidate: 'template<class _Tp, class _Seq> bool std::operator<(const stack<_Tp, _Seq>&, const stack<_Tp, _Seq>&)' 373 | operator<(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_stack.h:373:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::stack<_Tp, _Seq>' 61 | cout << str < endl; | ^~~~ In file included from /usr/include/c++/14/list:65, from a.cc:10: /usr/include/c++/14/bits/stl_list.h:2188:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator<(const __cxx11::list<_Tp, _Alloc>&, const __cxx11::list<_Tp, _Alloc>&)' 2188 | operator<(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_list.h:2188:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::list<_Tp, _Alloc>' 61 | cout << str < endl; | ^~~~ In file included from /usr/include/c++/14/set:63, from a.cc:12: /usr/include/c++/14/bits/stl_set.h:1025:5: note: candidate: 'template<class _Key, class _Compare, class _Alloc> bool std::operator<(const set<_Key, _Compare, _Allocator>&, const set<_Key, _Compare, _Allocator>&)' 1025 | operator<(const set<_Key, _Compare, _Alloc>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_set.h:1025:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::set<_Key, _Compare, _Allocator>' 61 | cout << str < endl; | ^~~~ In file included from /usr/include/c++/14/set:64: /usr/include/c++/14/bits/stl_multiset.h:1011:5: note: candidate: 'template<class _Key, class _Compare, class _Alloc> bool std::operator<(const multiset<_Key, _Compare, _Allocator>&, const multiset<_Key, _Compare, _Allocator>&)' 1011 | operator<(const multiset<_Key, _Compare, _Alloc>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_multiset.h:1011:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::multiset<_Key, _Compare, _Allocator>' 61 | cout << str < endl; | ^~~~ In file included from /usr/include/c++/14/map:63, from a.cc:13: /usr/include/c++/14/bits/stl_map.h:1550:5: note: candidate: 'template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator<(const map<_Key, _Tp, _Compare, _Allocator>&, const map<_Key, _Tp, _Compare, _Allocator>&)' 1550 | operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_map.h:1550:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::map<_Key, _Tp, _Compare, _Allocator>' 61 | cout << str < endl; | ^~~~ In file included from /usr/include/c++/14/map:64: /usr/include/c++/14/bits/stl_multimap.h:1172:5: note: candidate: 'template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator<(const multimap<_Key, _Tp, _Compare, _Allocator>&, const multimap<_Key, _Tp, _Compare, _Allocator>&)' 1172 | operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_multimap.h:1172:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::multimap<_Key, _Tp, _Compare, _Allocator>' 61 | cout << str < endl; | ^~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41,
s080677103
p00006
C++
#include <cstdio> #include <cmath> #include <cstring> #include <cstdlib> #include <climits> #include <ctime> #include <queue> #include <stack> #include <algorithm> #include <list> #include <vector> #include <set> #include <map> #include <iostream> #include <deque> #include <complex> #include <string> #include <iomanip> #include <sstream> #include <bitset> #include <valarray> #include <iterator> using namespace std; typedef long long int ll; typedef unsigned int uint; typedef unsigned char uchar; typedef unsigned long long ull; typedef pair<int, int> pii; typedef vector<int> vi; #define REP(i,x) for(int i=0;i<(int)(x);i++) #define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();i++) #define RREP(i,x) for(int i=((int)(x)-1);i>=0;i--) #define RFOR(i,c) for(__typeof((c).rbegin())i=(c).rbegin();i!=(c).rend();i++) #define ALL(container) container.begin(), container.end() #define RALL(container) container.rbegin(), container.rend() #define SZ(container) ((int)container.size()) #define mp(a,b) make_pair(a, b) #define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() ); template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; } template<class T> ostream& operator<<(ostream &os, const vector<T> &t) { os<<"["; FOR(it,t) {if(it!=t.begin()) os<<","; os<<*it;} os<<"]"; return os; } template<class T> ostream& operator<<(ostream &os, const set<T> &t) { os<<"{"; FOR(it,t) {if(it!=t.begin()) os<<","; os<<*it;} os<<"}"; return os; } template<class S, class T> ostream& operator<<(ostream &os, const pair<S,T> &t) { return os<<"("<<t.first<<","<<t.second<<")";} const int INF = 1<<28; const double EPS = 1e-8; const int MOD = 1000000007; int n, m; string str; main(){ cin >> str; reverse(ALL(str)); cout << str < endl; return 0; }
a.cc:58:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 58 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:61:21: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 61 | cout << str < endl; | ~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/bits/specfun.h:43, from /usr/include/c++/14/cmath:3906, from a.cc:2: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 61 | cout << str < endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 61 | cout << str < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 61 | cout << str < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 61 | cout << str < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 61 | cout << str < endl; | ^~~~ In file included from /usr/include/c++/14/deque:66, from /usr/include/c++/14/queue:62, from a.cc:7: /usr/include/c++/14/bits/stl_deque.h:2334:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator<(const deque<_Tp, _Alloc>&, const deque<_Tp, _Alloc>&)' 2334 | operator<(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_deque.h:2334:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::deque<_Tp, _Alloc>' 61 | cout << str < endl; | ^~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/deque:81: /usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2600 | operator<(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>' 61 | cout << str < endl; | ^~~~ In file included from /usr/include/c++/14/vector:66, from /usr/include/c++/14/queue:63: /usr/include/c++/14/bits/stl_vector.h:2089:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator<(const vector<_Tp, _Alloc>&, const vector<_Tp, _Alloc>&)' 2089 | operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:2089:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::vector<_Tp, _Alloc>' 61 | cout << str < endl; | ^~~~ In file included from /usr/include/c++/14/queue:66: /usr/include/c++/14/bits/stl_queue.h:397:5: note: candidate: 'template<class _Tp, class _Seq> bool std::operator<(const queue<_Tp, _Seq>&, const queue<_Tp, _Seq>&)' 397 | operator<(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_queue.h:397:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::queue<_Tp, _Seq>' 61 | cout << str < endl; | ^~~~ In file included from /usr/include/c++/14/stack:63, from a.cc:8: /usr/include/c++/14/bits/stl_stack.h:373:5: note: candidate: 'template<class _Tp, class _Seq> bool std::operator<(const stack<_Tp, _Seq>&, const stack<_Tp, _Seq>&)' 373 | operator<(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_stack.h:373:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::stack<_Tp, _Seq>' 61 | cout << str < endl; | ^~~~ In file included from /usr/include/c++/14/list:65, from a.cc:10: /usr/include/c++/14/bits/stl_list.h:2188:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator<(const __cxx11::list<_Tp, _Alloc>&, const __cxx11::list<_Tp, _Alloc>&)' 2188 | operator<(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_list.h:2188:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::list<_Tp, _Alloc>' 61 | cout << str < endl; | ^~~~ In file included from /usr/include/c++/14/set:63, from a.cc:12: /usr/include/c++/14/bits/stl_set.h:1025:5: note: candidate: 'template<class _Key, class _Compare, class _Alloc> bool std::operator<(const set<_Key, _Compare, _Allocator>&, const set<_Key, _Compare, _Allocator>&)' 1025 | operator<(const set<_Key, _Compare, _Alloc>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_set.h:1025:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::set<_Key, _Compare, _Allocator>' 61 | cout << str < endl; | ^~~~ In file included from /usr/include/c++/14/set:64: /usr/include/c++/14/bits/stl_multiset.h:1011:5: note: candidate: 'template<class _Key, class _Compare, class _Alloc> bool std::operator<(const multiset<_Key, _Compare, _Allocator>&, const multiset<_Key, _Compare, _Allocator>&)' 1011 | operator<(const multiset<_Key, _Compare, _Alloc>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_multiset.h:1011:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::multiset<_Key, _Compare, _Allocator>' 61 | cout << str < endl; | ^~~~ In file included from /usr/include/c++/14/map:63, from a.cc:13: /usr/include/c++/14/bits/stl_map.h:1550:5: note: candidate: 'template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator<(const map<_Key, _Tp, _Compare, _Allocator>&, const map<_Key, _Tp, _Compare, _Allocator>&)' 1550 | operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_map.h:1550:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::map<_Key, _Tp, _Compare, _Allocator>' 61 | cout << str < endl; | ^~~~ In file included from /usr/include/c++/14/map:64: /usr/include/c++/14/bits/stl_multimap.h:1172:5: note: candidate: 'template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator<(const multimap<_Key, _Tp, _Compare, _Allocator>&, const multimap<_Key, _Tp, _Compare, _Allocator>&)' 1172 | operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_multimap.h:1172:5: note: template argument deduction/substitution failed: a.cc:61:23: note: 'std::basic_ostream<char>' is not derived from 'const std::multimap<_Key, _Tp, _Compare, _Allocator>' 61 | cout << str < endl; | ^~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41,
s502083786
p00006
C++
line = input() ret = ""; for i in range(1,len(line)): ret += line[len(line)-1-i]; print(ret)
a.cc:1:1: error: 'line' does not name a type 1 | line = input() | ^~~~ a.cc:4:1: error: expected unqualified-id before 'for' 4 | for i in range(1,len(line)): | ^~~ a.cc:7:6: error: expected constructor, destructor, or type conversion before '(' token 7 | print(ret) | ^
s849120959
p00006
C++
#include<stdio.h> #include<iostream> #include<math.h> #include<algorithm> #include<string> #include<string.h> #include<stack> #include<queue> #include<stdlib.h> #include<ctype.h> #include<map> #include<iomanip> #define r 6371.01 #define pi 3.141592653589 #define PI acos(0.0) #define EPS 1e-7 using namespace std; int main() { char str[20]; scanf("%s",&str); printf("%s\n",strrev(str)); return 0; }
a.cc: In function 'int main()': a.cc:23:19: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 23 | printf("%s\n",strrev(str)); | ^~~~~~ | strsep
s281371726
p00006
C++
#include <stdio.h> int main(void) { char str[20]; int i; scanf("%s",str); for(i = 0; strlen(str) > i; i++){ printf("%c",str[strlen(str)-1 - i]); } printf("\n"); return 0; }
a.cc: In function 'int main()': a.cc:7:20: error: 'strlen' was not declared in this scope 7 | for(i = 0; strlen(str) > i; i++){ | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <stdio.h> +++ |+#include <cstring> 2 |
s766813776
p00006
C++
import java.util.Scanner; import java.lang.StringBuffer; class Main{ public static void main(String[] args){ Scanner in = new Scanner(System.in); StringBuffer sb = new StringBuffer(in.nextLine()); System.out.println(sb.reverse().toString()); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.lang.StringBuffer; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:11: error: expected ':' before 'static' 5 | public static void main(String[] args){ | ^~~~~~~ | : a.cc:5:29: error: 'String' has not been declared 5 | public static void main(String[] args){ | ^~~~~~ a.cc:5:38: error: expected ',' or '...' before 'args' 5 | public static void main(String[] args){ | ^~~~ a.cc:10:2: error: expected ';' after class definition 10 | } | ^ | ; a.cc: In static member function 'static void Main::main(int*)': a.cc:6:9: error: 'Scanner' was not declared in this scope 6 | Scanner in = new Scanner(System.in); | ^~~~~~~ a.cc:7:9: error: 'StringBuffer' was not declared in this scope 7 | StringBuffer sb = new StringBuffer(in.nextLine()); | ^~~~~~~~~~~~ a.cc:8:9: error: 'System' was not declared in this scope 8 | System.out.println(sb.reverse().toString()); | ^~~~~~ a.cc:8:28: error: 'sb' was not declared in this scope 8 | System.out.println(sb.reverse().toString()); | ^~
s433966755
p00006
C++
#include <cstdio> #include <cstring> using namespace std; int main(){ char str[25]; fill(str, str + 25, 0); scanf("%s", str); int p = 25; while(str[--p] == 0); while(p >= 0){ printf("%c", str[p--]); } return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: 'fill' was not declared in this scope 8 | fill(str, str + 25, 0); | ^~~~
s554080623
p00006
C++
#include <iostream> #include <string> using namespace std; int main(){ string s; cin >> s; reverse(s.begin(),s.end()); cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: 'reverse' was not declared in this scope 8 | reverse(s.begin(),s.end()); | ^~~~~~~
s877346474
p00006
C++
#include<iostream> #include<string> using namespace std; int main(){ string s; cin >> s; reverse(s.begin(), s.end()); cout << s << endl; }
a.cc: In function 'int main()': a.cc:10:9: error: 'reverse' was not declared in this scope 10 | reverse(s.begin(), s.end()); | ^~~~~~~
s831563877
p00006
C++
#include<iostream> #include<string> using namespace std; int main(){ string s; cin >> s; reverse(s.begin(), s.end()); cout << s << endl; }
a.cc: In function 'int main()': a.cc:10:9: error: 'reverse' was not declared in this scope 10 | reverse(s.begin(), s.end()); | ^~~~~~~
s935070365
p00006
C++
#include<iostream> #include<string> using namespace std; int main(){ string s; cin >> s; reverse(s.begin(), s.end()); cout << s << endl; }
a.cc: In function 'int main()': a.cc:10:9: error: 'reverse' was not declared in this scope 10 | reverse(s.begin(), s.end()); | ^~~~~~~
s977717713
p00006
C++
#include <iostream> #include <cstdio> #include <cstdlib> #include <time.h> #include <math.h> #include <vector> #include <queue> #include <map> #include <set> #include <algorithm> #include <iterator> #include <sstream> #include <string> #include <bitset> using namespace std; #define FOR(I,F,N) for(int I = F; I < (int)(N); I++) #define rep(i, n) FOR(i, 0, n) #define FIN(V) cout<<V<<endl #define pb push_back #define INF (1 << 30) typedef pair<int, int> P; typedef long long ll; typedef priority_queue<int> pq; int StrToInt(string); string IntToStr(int); int dx[4] = {1, -1, 0, 0}; int dy[4] = {0, 0, 1, -1}; int main(void){ string S; cin >> S; for(int i = S.size(); i--)cout << S[i]; cout << endl; return 0; } int StrToInt(string s){ stringstream ss; ss << s; int val; ss >> val; return val; } string IntToStr(int i){ stringstream ss; ss << i; return ss.str(); }
a.cc: In function 'int main()': a.cc:32:34: error: expected ';' before ')' token 32 | for(int i = S.size(); i--)cout << S[i]; | ^ | ;