submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s373303511
p00435
C
1 #include <stdio.h> 2 3 int main(){ 4 char ch = 'a'; 5 int i; 6 7 while(ch != '\n'){ 8 scanf("%c", &ch); 9 ch += 3; 10 printf("%c", ch); 11 12 } 13 14 printf("\n"); 15 return 0; 16 } ~ ~ ~ ~ ~
main.c:1:3: error: expected identifier or '(' before numeric constant 1 | 1 #include <stdio.h> | ^ main.c:1:5: error: stray '#' in program 1 | 1 #include <stdio.h> | ^ main.c:17:1: error: expected identifier or '(' before '~' token 17 | ~ | ^
s025934159
p00435
C
#include <stdio.h> #include <string.h> int main(void) { char code[1000]; char decode[1000]; int i; scanf("%[^\n]", code); i = 0; while (code[i] != '\0'){ code[i] == 'A' ? decode[i] = 'X' : code[i] == 'B' ? decode[i] = 'Y' : code[i] == 'C' ? decode[i] = 'Z' : decode[i] = code[i] - 3; } decode[i] = '\0'; printf("%s\n", decode); return (0); }
main.c: In function 'main': main.c:14:132: error: lvalue required as left operand of assignment 14 | code[i] == 'A' ? decode[i] = 'X' : code[i] == 'B' ? decode[i] = 'Y' : code[i] == 'C' ? decode[i] = 'Z' : decode[i] = code[i] - 3; | ^
s499968122
p00435
C
#include <stdio.h> #include <string.h> int main(void) { char code[1000]; char decode[1000]; int i; scanf("%s", code); i = 0; while (code[i] != '\0'){ code[i] == 'A' ? decode[i] = 'X' : code[i] == 'B' ? decode[i] = 'Y' : code[i] == 'C' ? decode[i] = 'Z' : decode[i] = code[i] - 3; } decode[i] = '\0'; printf("%s\n", decode); return (0); }
main.c: In function 'main': main.c:14:132: error: lvalue required as left operand of assignment 14 | code[i] == 'A' ? decode[i] = 'X' : code[i] == 'B' ? decode[i] = 'Y' : code[i] == 'C' ? decode[i] = 'Z' : decode[i] = code[i] - 3; | ^
s901732007
p00435
C
#include<stdio.h> #include<string.h> int main(void) { int i,j,k; char ch[30]={0}; scanf("%s",ch); k = strlen(ch); for(i=0;i<k;i++){ if(ch[i] == 'A'){ ch[i]+=23; } else if(ch[i] == 'B'){ ch[i]+=24; } else if(ch[i] == 'C'){ ch[i]+=25; } else { ch[i]-=3 } } printf("%s",ch); printf("\n"); return 0; }
main.c: In function 'main': main.c:20:21: error: expected ';' before '}' token 20 | ch[i]-=3 | ^ | ; 21 | } | ~
s662202317
p00435
C
#include<stdio.h> #include<iostream> using namespace std; int main(void) { int a,i=0,j; char bet,c[1001]; for (;;) { scanf("%c", &bet); a = bet; if (a == 10) { break; } c[i] = a - 3; if (a == 65) { a = 88; c[i] = a; } if (a == 66) { a = 89; c[i] = a; } if (a == 67) { a = 90; c[i] = a; } i++; } for (j = 0; j < i; j++) { printf("%c", c[j]); } printf("\n"); return 0; }
main.c:2:9: fatal error: iostream: No such file or directory 2 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s892383330
p00435
C
#include <stdio.h> #include <string.h> #include <ctype.h> int main(void) { int i,j; int count; char p[1001]; while (1) { j = 0; count = 0; fgets(p, sizeof(p), stdin); while (p[j++] != '\0') { count++; //何故かカウントが一回多くされる。なんも入力しなくても(=p[0]='\0')でもcountが1される } for (i = 0; i<count-1; i++) { if (!isalpha(p[i])) { printf("アルファベットの大文字で入力してください\n"); fflush(stdin); break; } } if (i == count - 1) break; } for(i=0;i<count-1;i++){ switch(p[i]){ case 'A':p[i]='X'; break; case 'B':p[i]='Y'; break; case 'C':p[i]='Z'; break; default:p[i]=p[i]-3; break; } } printf("%s",p); return 0; }
main.c: In function 'main': main.c:8:16: error: invalid suffix "1" on integer constant 8 | char p[1001]; | ^~~~~
s690526379
p00435
C
include<stdio.h> int main(){ char a; while(scanf("%c",&a) != EOF){ switch(a){ case 'A': printf('X');break; case 'B': printf('Y');break; case 'C': printf('Z');break; default:printf("%c",a-3);break; } } printf("\n"); return 0; }
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^
s794517646
p00435
C
include<stdio.h> int main(){ char a; while(scanf("%c",&a) != EOF){ switch(a){ case 'A': printf('X');break; case 'B': printf('Y');break; case 'C': printf('Z');break; default:printf("%c",(char)((int)a - 3));break; } } printf("\n"); return 0; }
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^
s106975772
p00435
C
include<stdio.h> int main(){ char a; while(scanf("%c",&a) != EOF){ switch(a){ case 'A': printf("X");break; case 'B': printf("Y");break; case 'C': printf("Z");break; default:printf("%c",(char)((int)a - 3));break; } } printf("\n"); return 0; }
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^
s176629008
p00435
C
include<stdio.h> int main(){ char a; while(scanf("%c",&a) != EOF){ switch(a){ case 'A': printf("X");break; case 'B': printf("Y");break; case 'C': printf("Z");break; default:printf("%c",a - 3);break; } } printf("\n"); return 0; }
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^
s142868407
p00435
C
include<stdio.h> int main(){ char a; while(scanf("%c",&a) != EOF){ switch(a){ case 'A': printf('X');break; case 'B': printf('Y');break; case 'C': printf('Z');break; default : printf("%c",a - 3);break; } } printf("\n"); return 0; }
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^
s834365179
p00435
C
include<stdio.h> int main(){ char a; while(scanf("%c",&a) != EOF){ switch(a){ case 'A': printf("X");break; case 'B': printf("Y");break; case 'C': printf("Z");break; default : printf("%c",a - 3);break; } } printf("\n"); return 0; }
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^
s591233332
p00435
C
include <stdio.h> int main(void){ char a; while(scanf("%c",&a) != EOF){ switch(a){ case 'A': printf("X");break; case 'B': printf("Y");break; case 'C': printf("Z");break; default : printf("%c",a - 3);break; } } printf("\n"); return 0; }
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s342003149
p00435
C
include <stdio.h> int main(void){ char a; while(scanf("%c",&a) != EOF){ switch(a){ case 'A': printf("X");break; case 'B': printf("Y");break; case 'C': printf("Z");break; default : printf("%c",a - 3);break; } } printf("\n"); return 0; }
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s729152690
p00435
C
#include <stdio.h> int main(void){ char a; while(scanf("%c",&a) != EOF){ switch(a){ case 'A': printf("X");break; case 'B': printf("Y");break; case 'C': printf("Z");break; default : printf("%c",(char)(int(a) - 3);break; } } return 0; }
main.c: In function 'main': main.c:10:38: error: expected ')' before 'a' 10 | default : printf("%c",(char)(int(a) - 3);break; | ^ | ) main.c:10:40: error: expected ')' before '-' token 10 | default : printf("%c",(char)(int(a) - 3);break; | ~ ^~ | ) main.c:10:45: error: expected ')' before ';' token 10 | default : printf("%c",(char)(int(a) - 3);break; | ~ ^ | ) main.c:10:52: error: expected ';' before '}' token 10 | default : printf("%c",(char)(int(a) - 3);break; | ^ | ; 11 | } | ~
s271543489
p00435
C
main(c){for(gets(&c);c=getchar(),~c;putchar(c>10?65+c%68%42:c));exit(0);}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(c){for(gets(&c);c=getchar(),~c;putchar(c>10?65+c%68%42:c));exit(0);} | ^~~~ main.c: In function 'main': main.c:1:1: error: type of 'c' defaults to 'int' [-Wimplicit-int] main.c:1:13: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration] 1 | main(c){for(gets(&c);c=getchar(),~c;putchar(c>10?65+c%68%42:c));exit(0);} | ^~~~ main.c:1:24: error: implicit declaration of function 'getchar' [-Wimplicit-function-declaration] 1 | main(c){for(gets(&c);c=getchar(),~c;putchar(c>10?65+c%68%42:c));exit(0);} | ^~~~~~~ main.c:1:1: note: 'getchar' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>' +++ |+#include <stdio.h> 1 | main(c){for(gets(&c);c=getchar(),~c;putchar(c>10?65+c%68%42:c));exit(0);} main.c:1:37: error: implicit declaration of function 'putchar' [-Wimplicit-function-declaration] 1 | main(c){for(gets(&c);c=getchar(),~c;putchar(c>10?65+c%68%42:c));exit(0);} | ^~~~~~~ main.c:1:37: note: include '<stdio.h>' or provide a declaration of 'putchar' main.c:1:65: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration] 1 | main(c){for(gets(&c);c=getchar(),~c;putchar(c>10?65+c%68%42:c));exit(0);} | ^~~~ main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit' +++ |+#include <stdlib.h> 1 | main(c){for(gets(&c);c=getchar(),~c;putchar(c>10?65+c%68%42:c));exit(0);} main.c:1:65: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch] 1 | main(c){for(gets(&c);c=getchar(),~c;putchar(c>10?65+c%68%42:c));exit(0);} | ^~~~ main.c:1:65: note: include '<stdlib.h>' or provide a declaration of 'exit'
s764708251
p00435
C
include<stdio.h> #include<string.h> int main(){ int i,slen; char str[1001],b; fgets(str,1000,stdin); slen=strlen(str); for(i=0;i<slen;i++){ if(isalpha(str[i])){ b=(int)str[i]-(int)'A'-3; b=(b>-1?b:26+b)+'A'; printf("%c",b); }else{ printf("%c",str[i]); } } return 0; }
main.c:1:8: 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 name
s061311496
p00435
C
main(a){for(;~scanf("%d",&c);printf("%c",(c-62)%26+65));}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(a){for(;~scanf("%d",&c);printf("%c",(c-62)%26+65));} | ^~~~ main.c: In function 'main': main.c:1:1: error: type of 'a' defaults to 'int' [-Wimplicit-int] main.c:1:15: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | main(a){for(;~scanf("%d",&c);printf("%c",(c-62)%26+65));} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | main(a){for(;~scanf("%d",&c);printf("%c",(c-62)%26+65));} main.c:1:15: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | main(a){for(;~scanf("%d",&c);printf("%c",(c-62)%26+65));} | ^~~~~ main.c:1:15: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:1:27: error: 'c' undeclared (first use in this function) 1 | main(a){for(;~scanf("%d",&c);printf("%c",(c-62)%26+65));} | ^ main.c:1:27: note: each undeclared identifier is reported only once for each function it appears in main.c:1:30: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 1 | main(a){for(;~scanf("%d",&c);printf("%c",(c-62)%26+65));} | ^~~~~~ main.c:1:30: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:1:30: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:1:30: note: include '<stdio.h>' or provide a declaration of 'printf'
s096526932
p00435
C
main(c){for(;~scanf("%c",&c);printf("%c",c+3-(c>90)?26:0);}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(c){for(;~scanf("%c",&c);printf("%c",c+3-(c>90)?26:0);} | ^~~~ main.c: In function 'main': main.c:1:1: error: type of 'c' defaults to 'int' [-Wimplicit-int] main.c:1:15: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | main(c){for(;~scanf("%c",&c);printf("%c",c+3-(c>90)?26:0);} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | main(c){for(;~scanf("%c",&c);printf("%c",c+3-(c>90)?26:0);} main.c:1:15: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | main(c){for(;~scanf("%c",&c);printf("%c",c+3-(c>90)?26:0);} | ^~~~~ main.c:1:15: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:1:30: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 1 | main(c){for(;~scanf("%c",&c);printf("%c",c+3-(c>90)?26:0);} | ^~~~~~ main.c:1:30: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:1:30: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:1:30: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:1:58: error: expected ')' before ';' token 1 | main(c){for(;~scanf("%c",&c);printf("%c",c+3-(c>90)?26:0);} | ~ ^ | ) main.c:1:59: error: expected expression before '}' token 1 | main(c){for(;~scanf("%c",&c);printf("%c",c+3-(c>90)?26:0);} | ^
s439617257
p00435
C
#include<stdio.h> #include<string.h> int main(){ char a[27]="ABCDEFGHIJKLMNOPQRSTUVWXYZ",b[1000],bstr,c,check,d; scanf("%1001[^\n]",b); bstr=strlen(b); for(c=0;c<bstr;c++){ for(d=0;d<27;d++){ f(b[c]==a[d]){ b[c]=a[d-3]; } } } printf("%s\n",b); return 0; }
main.c: In function 'main': main.c:11:25: error: implicit declaration of function 'f' [-Wimplicit-function-declaration] 11 | f(b[c]==a[d]){ | ^ main.c:11:38: error: expected ';' before '{' token 11 | f(b[c]==a[d]){ | ^ | ;
s246604265
p00435
C
#include<iostream> #include<string> using namespace std; int main(){ string s; while(cin>>s){ for(int i = 0; i < s.size(); i++){ s[i] -= 3; if(s[i]<'A' || s[i]>'Z')s[i] += 26; } cout<<s<<endl; } }
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s743972142
p00435
C
#include <stdio.h> int main(){ char x[1000]; int i=0; while(scanf("%s",&x) != EOF){ x[i] -= 3; printf("%c",x[i]; i++; } printf("\n"); return 0; }
main.c: In function 'main': main.c:7:27: error: expected ')' before ';' token 7 | printf("%c",x[i]; | ~ ^ | ) main.c:8:16: error: expected ';' before '}' token 8 | i++; | ^ | ; 9 | } | ~
s923435875
p00435
C
#include <stdio.h> int main(){ char x[1001; int i=0; while(x[i] != EOF){ scanf("%c",&x[i]); if(x[i]=='A'){ x[i]='X'; } else if(x[i]=='B'){ x[i]='Y'; } else if(x[i]=='C'){ x[i]='Z'; } else{ x[i] -= 3; } printf("%c",x[i]); i++; } return 0; }
main.c: In function 'main': main.c:3:15: error: expected ']' before ';' token 3 | char x[1001; | ^ | ] main.c:23:1: error: expected declaration or statement at end of input 23 | } | ^
s058045974
p00435
C
#include <stdio.h> int main(){ char x[1002]; int i=0; while(scanf("%c",&x[i]) != EOF){ if(x[i]=='A'){ x[i]=X; } else if(x[i]=='B'){ x[i]=Y; } else if(x[i]=='C'){ x[i]=Z; } else{ x[i] -= 3; } printf("%c",x[i]); i++; } printf("\n"); return 0; }
main.c: In function 'main': main.c:7:22: error: 'X' undeclared (first use in this function) 7 | x[i]=X; | ^ main.c:7:22: note: each undeclared identifier is reported only once for each function it appears in main.c:10:22: error: 'Y' undeclared (first use in this function) 10 | x[i]=Y; | ^ main.c:13:22: error: 'Z' undeclared (first use in this function) 13 | x[i]=Z; | ^
s516385877
p00435
C
#include<stdio.h> int main(){ char c; while(1){ getchar(c); if(c == '\n')return 0; int x = c - 'A'; x = (x - 3) % 26; putchar(c + x); } }
main.c: In function 'main': main.c:6:5: error: too many arguments to function 'getchar' 6 | getchar(c); | ^~~~~~~ In file included from main.c:1: /usr/include/stdio.h:582:12: note: declared here 582 | extern int getchar (void); | ^~~~~~~
s592935095
p00435
C
#include<stdio.h> int main() { int x[26]={'X','Y','Z','A','B','C','D','E','F','G','H','I','J','K', 'L','M','N','O','P','Q','R','S','T','U','V','W'); char input[1001]; int i; scanf("%s",input); char c=input[0]; for(i=0; (c!='\0'); i++){ printf("%c", x[(c-65)]; c = x[i+1]; } putchar('\n'); return 0; }
main.c: In function 'main': main.c:5:50: error: expected '}' before ')' token 5 | 'L','M','N','O','P','Q','R','S','T','U','V','W'); | ^ main.c:4:13: note: to match this '{' 4 | int x[26]={'X','Y','Z','A','B','C','D','E','F','G','H','I','J','K', | ^ main.c:5:50: error: expected ',' or ';' before ')' token 5 | 'L','M','N','O','P','Q','R','S','T','U','V','W'); | ^ main.c:11:25: error: expected ')' before ';' token 11 | printf("%c", x[(c-65)]; | ~ ^ | ) main.c:12:14: error: expected ';' before '}' token 12 | c = x[i+1]; | ^ | ; 13 | } | ~
s538253172
p00435
C
#include <stdio.h> int main(void){ char str[1001]; int i=0; scanf("%s",str); while(str[i]!='\0'){ str[i]-=3; if(str[i]<'A'){ c+=26; } } printf("%s",str); return 0; }
main.c: In function 'main': main.c:10:25: error: 'c' undeclared (first use in this function) 10 | c+=26; | ^ main.c:10:25: note: each undeclared identifier is reported only once for each function it appears in
s993682045
p00435
C
c;main(i){for(;~scanf("%d",&c);i++)printf("%c",(c>67)?c-3:c+23) return 0;}
main.c:1:1: warning: data definition has no type or storage class 1 | c;main(i){for(;~scanf("%d",&c);i++)printf("%c",(c>67)?c-3:c+23) | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int] main.c:1:3: error: return type defaults to 'int' [-Wimplicit-int] 1 | c;main(i){for(;~scanf("%d",&c);i++)printf("%c",(c>67)?c-3:c+23) | ^~~~ main.c: In function 'main': main.c:1:3: error: type of 'i' defaults to 'int' [-Wimplicit-int] main.c:1:17: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | c;main(i){for(;~scanf("%d",&c);i++)printf("%c",(c>67)?c-3:c+23) | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | c;main(i){for(;~scanf("%d",&c);i++)printf("%c",(c>67)?c-3:c+23) main.c:1:17: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | c;main(i){for(;~scanf("%d",&c);i++)printf("%c",(c>67)?c-3:c+23) | ^~~~~ main.c:1:17: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:1:36: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 1 | c;main(i){for(;~scanf("%d",&c);i++)printf("%c",(c>67)?c-3:c+23) | ^~~~~~ main.c:1:36: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:1:36: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:1:36: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:1:64: error: expected ';' before 'return' 1 | c;main(i){for(;~scanf("%d",&c);i++)printf("%c",(c>67)?c-3:c+23) | ^ | ; 2 | return 0;} | ~~~~~~
s897526311
p00435
C++
#include<iostream> #include<string> using namespace std; int main () { string s; cin >> s; for(i=0;i<s.length();i++){ s[i] = s[i]-3; } cout << s << endl; }
a.cc: In function 'int main()': a.cc:8:9: error: 'i' was not declared in this scope 8 | for(i=0;i<s.length();i++){ | ^
s169295421
p00435
C++
#include<iostream> #include<string> using namespace std; int main () { int i; string s; cin >> s; for(i=0;i<s.length();i++){ if(s[i]==A) s[i] = X; else if (s[i]==B) s[i] = Y; else if (s[i]==C) s[i] = Z; else s[i] = s[i]-3; } cout << s << endl; }
a.cc: In function 'int main()': a.cc:10:18: error: 'A' was not declared in this scope 10 | if(s[i]==A) s[i] = X; | ^ a.cc:10:28: error: 'X' was not declared in this scope 10 | if(s[i]==A) s[i] = X; | ^ a.cc:11:24: error: 'B' was not declared in this scope 11 | else if (s[i]==B) s[i] = Y; | ^ a.cc:11:34: error: 'Y' was not declared in this scope 11 | else if (s[i]==B) s[i] = Y; | ^ a.cc:12:24: error: 'C' was not declared in this scope 12 | else if (s[i]==C) s[i] = Z; | ^ a.cc:12:34: error: 'Z' was not declared in this scope 12 | else if (s[i]==C) s[i] = Z; | ^
s039918466
p00435
C++
#include <cstring> using namespace std; int main(){ char str[1000]; char a[] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'}; cin >> str; int len = strlen(str); for(int i = 0; i < len; i++){ for(int j = 0; j < 26; j++){ if(str[i] == a[j]){ str[i] = a[j-3]; break; } } } cout << str << endl; return 0; }
a.cc: In function 'int main()': a.cc:13:9: error: 'cin' was not declared in this scope 13 | cin >> str; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include <cstring> +++ |+#include <iostream> 2 | using namespace std; a.cc:24:9: error: 'cout' was not declared in this scope 24 | cout << str << endl; | ^~~~ a.cc:24:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:24:24: error: 'endl' was not declared in this scope 24 | cout << str << endl; | ^~~~ a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' 1 | #include <cstring> +++ |+#include <ostream> 2 | using namespace std;
s734052181
p00435
C++
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <time.h> #include <limits.h> //#include <windows.h> #include <iostream> #include <algorithm> #include <set> #include <queue> #include <functional> using namespace std; typedef unsigned int uint; typedef long long int llint; typedef pair<llint,llint> pii; #define mpq(T) priority_queue<T,vector<T>,greater<T> > #define FOR(i,a,b) for(int i = (a),i < (b); i++) #define REP(i,a) for(int i = 0; i < (a); i++) class BIT { private: int s; llint* d; public: BIT(int size) { s = size; d = (llint*)malloc(sizeof(llint) * s); for(int i = 0; i < s; i++) { d[i] = 0; } } void add(int b,int x) { for(int i = b + 1; i <= s; i += (i & -i)) { d[i - 1] += x; } } llint sum(int b) { llint all = 0; for(int i = b + 1; i > 0; i -= (i & -i)) { all += d[i - 1]; } return all; } ~BIT() { free(d); } }; class unionfind { private: int s; int* o; int* r; public: unionfind(int dsize) { s = dsize; o = (int*)malloc(sizeof(int) * s); r = (int*)malloc(sizeof(int) * s); for(int i = 0; i < s; i++) { o[i] = i; r[i] = 0; } } int mfind(int b) { if(o[b] != b) { o[b] = mfind(o[b]); } return o[b]; } void munion(int a,int b) { int aw = mfind(a); int bw = mfind(b); if(aw == bw) { return; } if(r[aw] > r[bw]) { o[bw] = a; } else if(r[aw] < r[bw]) { o[aw] = bw; } else { o[bw] = aw; r[aw]++; } s--; } int size() { return s; } ~unionfind() { free(o); free(r); } }; template<class T> int lbound(T* d,T key,int s,int e) { s--; while(e - s > 1) { int m = (s + e) / 2; if(d[m] < key) { s = m; } else { e = m; } } return e; } template<class T> int ubound(T* d,T key,int s,int e) { s--; while(e - s > 1) { int m = (s + e) / 2; if(key < d[m]) { e = m; } else { s = m; } } return e; } class zpress { private: int ms; pii* md; int n; int s; llint* d; int* t; public: zpress(int dsize = 1000000) { int ms = dsize; md = (pii*)malloc(sizeof(pii) * ms); d = (llint*)malloc(sizeof(llint) * ms); t = (int*)malloc(sizeof(int) * ms); n = 0; } void in(llint x) { in2(x,n); n++; } void in2(llint x,int b) { md[b] = make_pair(x,b); } void syori() { syori2(n); } void syori2(int k) { sort(md,md + k); llint mae = LLONG_MIN; s = 0; REP(i,k) { if(md[i].first != mae) { d[s] = md[i].first; s++; mae = md[i].first; } t[md[i].second] = s - 1; } } llint iti(int b) { return t[b]; } int size() { return s; } int first(llint x) { return lbound(d,x,0,s); } int end(llint x) { return ubound(d,x,0,s);; } ~zpress() { free(md); free(d); free(t); } }; class xorshift { private: unsigned int a,b,c,d; public: xorshift(unsigned int aw = 123456789,unsigned int bw = 362436069,unsigned int cw = 521288629,unsigned int dw = 88675123,unsigned int e = 97) { a = aw; b = bw; c = cw; d = dw; for(unsigned int i = 0; i < e; i++) { operator()(); } } unsigned int operator()() { unsigned int w = a ^ (a << 11); a = b; b = c; c = d; d = (d ^ (d >> 19)) ^ (w ^ (w >> 8)); return d; } }; llint gcd(llint a,llint b) { while(1) { llint w = a % b; if(w == 0) { return b; } a = b; b = w; } } llint sei(llint d,llint p) { if(d < 0) { d -= ((d + 1) / p - 1) * p; } else { d %= p; } return d; } llint inv(llint a,llint p) { llint r0 = sei(a,p); llint r1 = p; llint a0 = 1; llint b0 = 0; llint a1 = 0; llint b1 = 1; while(1) { llint q = r0 / r1; llint w = r0 - q * r1; if(w == 0) { break; } r0 = r1; r1 = w; w = a0 - q * a1; a0 = a1; a1 = w; } return sei(a1,p); } template <llint P> class mod { private: llint d; public: mod(llint a = 0) { d = a; d = sei(d,P); } mod operator-() const { return mod(P - d); } mod operator+=(const mod& a) { d = d + a.d; d = sei(d,P); return *this; } mod operator-=(const mod& a) { return operator+=(-a); } mod operator*=(const mod& a) { d = d * a.d; d = sei(d,P); return *this; } mod operator/=(const mod& a) { return a * mod(inv(d,P)); } mod operator+(const mod& a) const { mod w = *this; return (w += a); } mod operator-(const mod& a) const { mod w = *this; return (w -= a); } mod operator*(const mod& a) const { mod w = *this; return (w *= a); } mod operator/(const mod& a) const { mod w = *this; return (w /= a); } bool operator==(const mod& a) const { return (d == a.d); } bool operator!=(const mod& a) const { return (d != a.d); } operator llint() const { return d; } }; ///////////////////////////////////////////////////// FILE* fi; FILE* fo; void err(char* a) { printf("%s\n",a); getchar(); } llint in() { llint w; fscanf(fi,"%lld",&w); return w; } void ins(char* a) { fscanf(fi,"%s",a); } void out(llint a) { fprintf(fo,"%lld\n",a); } void outs(char* a) { fprintf(fo,"%s\n",a); } void func(); int main() { fi = stdin; fo = stdout; func(); return 0; } bool s[1111]; void func() { ins(s); int l = strlen(s); REP(i,l) { s[i] -= 3; if(s[i] < 'A') { s[i] = s[i] - 'A' + 'Z' + 1; } } outs(s); }
a.cc: In function 'void func()': a.cc:451:13: error: cannot convert 'bool*' to 'char*' 451 | ins(s); | ^ | | | bool* a.cc:422:16: note: initializing argument 1 of 'void ins(char*)' 422 | void ins(char* a) | ~~~~~~^ a.cc:452:24: error: cannot convert 'bool*' to 'const char*' 452 | int l = strlen(s); | ^ | | | bool* In file included from a.cc:3: /usr/include/string.h:407:35: note: initializing argument 1 of 'size_t strlen(const char*)' 407 | extern size_t strlen (const char *__s) | ~~~~~~~~~~~~^~~ a.cc:461:14: error: cannot convert 'bool*' to 'char*' 461 | outs(s); | ^ | | | bool* a.cc:432:17: note: initializing argument 1 of 'void outs(char*)' 432 | void outs(char* a) | ~~~~~~^
s978006133
p00435
C++
#include<stdio.h> #include<hamakou.h> main(){ int now,k,i=0,n; char c[1024]; n=getstring("文字列: ",c); k=getint("キー : "); while(i<n){ now=k;//kを操作するためのコピー if(k<0){ now-=('~'-c[i]);//余りを足したときはみ出さないように範囲の最大まで移動した場合のキーの調整 c[i]+=('~'-c[i]);//余りを足したときはみ出さないように範囲の最大まで移動 now=now%('~'-' '+1);//余りを出して周回をすませる c[i]+=now;//最終移動 } else{ now+=(c[i]-' ');//余りを足したときはみ出さないように範囲の最小まで移動した場合のキーの調整 c[i]-=(c[i]-' ');//余りを足したときはみ出さないように範囲の最小まで移動 now=now%('~'-' '+1);//余りを出して周回をすませる c[i]+=now;//最終移動 } i++; } printf("%s\n",c); return 0; }
a.cc:2:9: fatal error: hamakou.h: No such file or directory 2 | #include<hamakou.h> | ^~~~~~~~~~~ compilation terminated.
s320514917
p00435
C++
#include<stdio.h> #include<hamakou.h> main(){ int now,k,i=0,n; char c[1024]; n=getstring("文字列: ",c); k=getint("キー : "); while(i<n){ now=k;//kを操作するためのコピー if(k<0){ now-=('~'-c[i]);//余りを足したときはみ出さないように範囲の最大まで移動した場合のキーの調整 c[i]+=('~'-c[i]);//余りを足したときはみ出さないように範囲の最大まで移動 now=now%('~'-' '+1);//余りを出して周回をすませる c[i]+=now;//最終移動 } else{ now+=(c[i]-' ');//余りを足したときはみ出さないように範囲の最小まで移動した場合のキーの調整 c[i]-=(c[i]-' ');//余りを足したときはみ出さないように範囲の最小まで移動 now=now%('~'-' '+1);//余りを出して周回をすませる c[i]+=now;//最終移動 } i++; } cout<<c<<endl; return 0; }
a.cc:2:9: fatal error: hamakou.h: No such file or directory 2 | #include<hamakou.h> | ^~~~~~~~~~~ compilation terminated.
s138642312
p00435
C++
#include<stdio.h> int main(){ char ch,ST; char N[27]={}; while(scanf("%c",&ch)!=EOF){ if(ch=='A')printf("D",ch); else if(ch=='A')printf("D",ch); else if(ch=='B')printf("E",ch); else if(ch=='C')printf("F",ch); else if(ch=='D')printf("G",ch); else if(ch=='E')printf("H",ch); else if(ch=='F')printf("I",ch); else if(ch=='G')printf("J",ch); else if(ch=='H')printf("K",ch); else if(ch=='I')printf("L",ch); else if(ch=='J')printf("M",ch); else if(ch=='K')printf("N",ch); else if(ch=='L')printf("O",ch); else if(ch=='M')printf("P",ch); else if(ch=='N')printf("Q",ch); else if(ch=='O')printf("R",ch); else if(ch=='P')printf("S",ch); else if(ch=='Q')printf("T",ch); else if(ch=='R')printf("U",ch); else if(ch=='S')printf("V",ch); else if(ch=='T')printf("W",ch); else if(ch=='U')printf("X",ch); else if(ch=='V')printf("Y",ch); else if(ch=='W')printf("Z",ch); else if(ch=='X')printf("A",ch); else if(ch=='Y')printf("B",ch); else if(ch=='Z')printf("C",ch); } printf("\n"); return0; }
a.cc: In function 'int main()': a.cc:40:1: error: 'return0' was not declared in this scope 40 | return0; | ^~~~~~~
s719157625
p00435
C++
#include<stdio.h> int main(){ char ch; while(scanf("%c",&ch)!=EOF){ if(ch>='D')ch-=3; else ch+=23; printf("%c",c); }printf("\n"); return 0; }
a.cc: In function 'int main()': a.cc:9:13: error: 'c' was not declared in this scope; did you mean 'ch'? 9 | printf("%c",c); | ^ | ch
s804424463
p00435
C++
#include<iostream> #include<string> using namespace std; int main() { char alphabet[30] ="XYZABCDEFGHIJKLMNOPQRSTUVWXYZ"; char input[1000] = { "" }; char output[1000] = { "" }; scanf_s("%s",&input[0],1000); for (int a = 0; a < 1000; a++) { for (int b = 3; b < 30; b++) { if (input[a] == alphabet[b]) { output[a] = alphabet[b-3]; break; } } } cout << output << endl; return 0; }
a.cc: In function 'int main()': a.cc:13:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 13 | scanf_s("%s",&input[0],1000); | ^~~~~~~ | scanf
s917250468
p00435
C++
char ans(char t){ if(t == 'G'){return 'D';} if(t == 'H'){return 'E';} if(t == 'I'){return 'F';} if(t == 'J'){return 'G';} if(t == 'K'){return 'H';} if(t == 'L'){return 'I';} if(t == 'N'){return 'J';} if(t == 'M'){return 'K';} if(t == 'O'){return 'L';} if(t == 'P'){return 'M';} if(t == 'Q'){return 'N';} if(t == 'R'){return 'O';} if(t == 'S'){return 'P';} if(t == 'T'){return 'Q';} if(t == 'U'){return 'R';} if(t == 'V'){return 'S';} if(t == 'W'){return 'T';} if(t == 'X'){return 'U';} if(t == 'Y'){return 'V';} if(t == 'Z'){return 'W';} if(t == 'A'){return 'X';} if(t == 'B'){return 'Y';} if(t == 'C'){return 'Z';} if(t == 'D'){return 'A';} if(t == 'E'){return 'B';} if(t == 'F'){return 'C';} } int main() { char a[1000]; int i = 0; while(cin >> a[i]){i++;} for(int j = 0;j<i;j++){ cout<<ans(a[j]); } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:33:15: error: 'cin' was not declared in this scope 33 | while(cin >> a[i]){i++;} | ^~~ a.cc:35:17: error: 'cout' was not declared in this scope 35 | cout<<ans(a[j]); | ^~~~ a.cc:37:9: error: 'cout' was not declared in this scope 37 | cout<<endl; | ^~~~ a.cc:37:15: error: 'endl' was not declared in this scope 37 | cout<<endl; | ^~~~ a.cc: In function 'char ans(char)': a.cc:28:9: warning: control reaches end of non-void function [-Wreturn-type] 28 | } | ^
s643104040
p00435
C++
#include <cstdio.h> #include <vector> using namespace std; int main(void) { char str[1024]; scanf("%s", str); int i = 0; while (str[i] != '\0'){ if (str[i] >= 88){ str[i] -= 23; } else { str[i] -= 3; } i++; } printf("%s\n", str); return (0); }
a.cc:1:10: fatal error: cstdio.h: No such file or directory 1 | #include <cstdio.h> | ^~~~~~~~~~ compilation terminated.
s783725580
p00435
C++
#include <cstdio.h> using namespace std; int main(void) { char str[1024]; scanf("%s", str); int i = 0; while (str[i] != '\0'){ if (str[i] >= 88){ str[i] -= 23; } else { str[i] -= 3; } i++; } printf("%s\n", str); return (0); }
a.cc:1:10: fatal error: cstdio.h: No such file or directory 1 | #include <cstdio.h> | ^~~~~~~~~~ compilation terminated.
s164884929
p00435
C++
#include <cstdio.h> using namespace std; int main(void) { char str[1024]; scanf("%s", str); int i = 0; while (str[i] != '\0'){ if (str[i] >= 88){ str[i] -= 23; } else { str[i] -= 3; } i++; } printf("%s\n", str); return (0); }
a.cc:1:10: fatal error: cstdio.h: No such file or directory 1 | #include <cstdio.h> | ^~~~~~~~~~ compilation terminated.
s719408680
p00435
C++
FURDWLD
a.cc:1:1: error: 'FURDWLD' does not name a type 1 | FURDWLD | ^~~~~~~
s101328532
p00435
C++
#include <iostream> using namespace std; int main() { int a[1000]; char b[1000]; cin >> b; for (int i = 0; b[i] != "\0"; i++) { a[i] = b[i]; if (b[i] != "A" && b[i] != "B" && b[i] != "C") a[i] -= 3; else a[i] += 23; b[i] = a[i]; } for (int i = 0; i < 26; i++){ cout << b[i]; } cout << endl; }
a.cc: In function 'int main()': a.cc:11:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | for (int i = 0; b[i] != "\0"; i++) { | ~~~~~^~~~~~~ a.cc:13:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 13 | if (b[i] != "A" && b[i] != "B" && b[i] != "C") a[i] -= 3; | ~~~~~^~~~~~ a.cc:13:41: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 13 | if (b[i] != "A" && b[i] != "B" && b[i] != "C") a[i] -= 3; | ~~~~~^~~~~~ a.cc:13:56: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 13 | if (b[i] != "A" && b[i] != "B" && b[i] != "C") a[i] -= 3; | ~~~~~^~~~~~
s348547308
p00435
C++
#include<iostream> #include<string> using namespace std; char T[30]="XYZABCDEFGHIJKLMNOPQRSTUVWXYZ" main(){ string S;cin>>S; for(int i=0;i<S.size();i++){for(int j=3;j<29;j++){if(S[i]==T[j]){cout<<T[j-3];}}} cout<<endl;}
a.cc:5:1: error: expected ',' or ';' before 'main' 5 | main(){ | ^~~~
s868748977
p00435
C++
#include <bits/stdc++.h> using namespace std; int main() { string a="ABCDEFGHIJKLMNOPQRSTUVWXYZ",s; cin>>s; int q[s.size()]; for(int i=0; i<s.size(); i++){ for(int j=0; j<a.size(); j++){ if(s[i]==a[j]){ q[i]=j; break; } } if(q[i]<3) cout<<a[q[i]+23] else cout<<a[q[i]-3]; } return 0; }
a.cc: In function 'int main()': a.cc:17:33: error: expected ';' before 'else' 17 | cout<<a[q[i]+23] | ^ | ; 18 | else | ~~~~
s956182636
p00435
C++
#include <iostream> #include <string> using namespace std; int main() { string InStr; char *OutStr; cin >> InStr; OutStr = new char[ InStr.size() ]; for( unsigned short i = 0; i < InStr.size(); i++ ) { if( InStr[i] - 3 >= 64 ) { OutStr[i] = InStr[i] - 3; } else { OutStr[i] = InStr[i] + 23; } } for (unsigned short i = 0; i < InStr.size(); i++) { printf_s( "%c", OutStr[i] ); } printf_s( "\n" ); delete []OutStr; return 0; }
a.cc: In function 'int main()': a.cc:27:17: error: 'printf_s' was not declared in this scope; did you mean 'printf'? 27 | printf_s( "%c", OutStr[i] ); | ^~~~~~~~ | printf a.cc:30:9: error: 'printf_s' was not declared in this scope; did you mean 'printf'? 30 | printf_s( "\n" ); | ^~~~~~~~ | printf
s645104061
p00435
C++
int main(void){char*t,s[1001];scanf("%s",s);for(t=s;*t;t++)(*t)-=3,(*t<'A')&&((*t)+=26);puts(s);return 0;}
a.cc: In function 'int main()': a.cc:1:31: error: 'scanf' was not declared in this scope 1 | int main(void){char*t,s[1001];scanf("%s",s);for(t=s;*t;t++)(*t)-=3,(*t<'A')&&((*t)+=26);puts(s);return 0;} | ^~~~~ a.cc:1:89: error: 'puts' was not declared in this scope 1 | int main(void){char*t,s[1001];scanf("%s",s);for(t=s;*t;t++)(*t)-=3,(*t<'A')&&((*t)+=26);puts(s);return 0;} | ^~~~
s094140223
p00435
C++
s = gets.chomp s.length.count.times do |i| s[i].to_i += 3 print s[i].to_s end print "\n"
a.cc:1:1: error: 's' does not name a type 1 | s = gets.chomp | ^
s183193435
p00435
C++
s = gets.chomp s.length.count.times do |i| s[i].to_i! += 3 print s[i].to_s end print "\n"
a.cc:1:1: error: 's' does not name a type 1 | s = gets.chomp | ^
s869749715
p00435
C++
a = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ") b = list("DEFGHIJKLMNOPQRSTUVWXYZABC") x = list(input()) for i in range(len(x)): for j in range(len(a)): if x[i] == b[j]: x[i] = a[j] break for i in range(len(x)): print(x[i], end = "") print("")
a.cc:1:1: error: 'a' does not name a type 1 | a = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ") | ^
s207210951
p00435
C++
#include<iostream> #include<cstdio> #include<cctype> using namespace std; #define LEN 1000 int main(){ char angou[LEN]; char buff[27] = {"ABCDEFGHIJKLMNOPQRSTUVWXYZ"}; int i, str; cin >> angou; str = strlen(angou); for(i = 0; i < str; i ++){ angou[i] = tolower(angou[i]); } for(i = 0; angou[i] != '\0'; i++){ if(angou[i] - 'A' - 3 >= 0){ printf("%c", buff[angou[i]-'a'-3]); } else{ printf("%c", buff[angou[i] - 'a' - 3 + 26]); } } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:14:15: error: 'strlen' was not declared in this scope 14 | str = strlen(angou); | ^~~~~~ a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<cctype> +++ |+#include <cstring> 4 | using namespace std;
s591050572
p00435
C++
#include<iostream> #include<cstdio> #include<cctype> #include<string> using namespace std; #define LEN 1000 int main(){ char angou[LEN]; char buff[27] = {"ABCDEFGHIJKLMNOPQRSTUVWXYZ"}; int i, str; cin >> angou; str = strlen(angou); for(i = 0; i < str; i ++){ angou[i] = tolower(angou[i]); } for(i = 0; angou[i] != '\0'; i++){ if(angou[i] - 'A' - 3 >= 0){ printf("%c", buff[angou[i]-'a'-3]); } else{ printf("%c", buff[angou[i] - 'a' - 3 + 26]); } } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:16:15: error: 'strlen' was not declared in this scope 16 | str = strlen(angou); | ^~~~~~ a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<cctype> +++ |+#include <cstring> 4 | #include<string>
s320557873
p00435
C++
#include<iostream> #include<stdio.h> #include<string.h> using namespace std; int main(void){ char a[26]={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'}; char b[1000]; int c[1000],i,n,s,kazu,; cin>>b; for(i=0;i<1000;i++){ c[i]=0; } kazu=strlen(b); n=0; for(i=0;i<kazu;i++){ for(s=0;s<26;s++){ if(b[i]==a[s]){ if(s-3<0){ c[n]=s+23; n++; } else{ c[n]=s-3; n++; } } } } for(i=0;i<kazu;i++){ cout<<a[c[i]]; } return 0; }
a.cc: In function 'int main()': a.cc:8:32: error: expected unqualified-id before ';' token 8 | int c[1000],i,n,s,kazu,; | ^
s603278049
p00435
C++
#include <bits/stdc++.h> int main(){ string s; cin >> s; map<char, char>m; m['D'] = 'A'; m['E'] = 'B'; m['F'] = 'C'; m['G'] = 'D'; m['H'] = 'E'; m['I'] = 'F'; m['J'] = 'G'; m['K'] = 'H'; m['L'] = 'I'; m['M'] = 'J'; m['N'] = 'K'; m['O'] = 'L'; m['P'] = 'M'; m['Q'] = 'N'; m['R'] = 'O'; m['S'] = 'P'; m['T'] = 'Q'; m['U'] = 'R'; m['V'] = 'S'; m['W'] = 'T'; m['X'] = 'U'; m['Y'] = 'V'; m['Z'] = 'W'; m['A'] = 'X'; m['B'] = 'Y'; m['C'] = 'Z'; for (int i = 0; i < s.size(); i++) { cout << m[s[i]]; } cout << "\n"; return 0; }
a.cc: In function 'int main()': a.cc:4:9: error: 'string' was not declared in this scope 4 | string s; | ^~~~~~ a.cc:4:9: note: suggested alternatives: In file included from /usr/include/c++/14/string:41, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:1: /usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string' 77 | typedef basic_string<char> string; | ^~~~~~ /usr/include/c++/14/string:76:11: note: 'std::pmr::string' 76 | using string = basic_string<char>; | ^~~~~~ a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin >> s; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:5:16: error: 's' was not declared in this scope 5 | cin >> s; | ^ a.cc:6:9: error: 'map' was not declared in this scope 6 | map<char, char>m; | ^~~ a.cc:6:9: note: suggested alternatives: In file included from /usr/include/c++/14/map:63, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152: /usr/include/c++/14/bits/stl_map.h:102:11: note: 'std::map' 102 | class map | ^~~ /usr/include/c++/14/map:89:13: note: 'std::pmr::map' 89 | using map | ^~~ a.cc:6:13: error: expected primary-expression before 'char' 6 | map<char, char>m; | ^~~~ a.cc:7:9: error: 'm' was not declared in this scope; did you mean 'tm'? 7 | m['D'] = 'A'; | ^ | tm a.cc:34:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 34 | cout << m[s[i]]; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:36:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 36 | cout << "\n"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s595851440
p00435
C++
#include <iostream> #include <string> int main() { string str, res; std::cin >> str; string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; for (int i = 0; i < (int)str.size(); ++i) { char s = str[i]; for (int j = 0; j < (int)alphabet.size(); j++) { if (s == alphabet[j]) { int size = (int)alphabet.size(); res += alphabet[(size + j - 3) % size]; break; } } } std::cout << res; }
a.cc: In function 'int main()': a.cc:5:5: error: 'string' was not declared in this scope 5 | string str, res; | ^~~~~~ a.cc:5:5: note: suggested alternatives: In file included from /usr/include/c++/14/iosfwd:41, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string' 77 | typedef basic_string<char> string; | ^~~~~~ In file included 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: /usr/include/c++/14/string:76:11: note: 'std::pmr::string' 76 | using string = basic_string<char>; | ^~~~~~ a.cc:6:17: error: 'str' was not declared in this scope; did you mean 'std'? 6 | std::cin >> str; | ^~~ | std a.cc:8:11: error: expected ';' before 'alphabet' 8 | string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | ^~~~~~~~~ | ; a.cc:11:34: error: 'alphabet' was not declared in this scope 11 | for (int j = 0; j < (int)alphabet.size(); j++) { | ^~~~~~~~ a.cc:14:17: error: 'res' was not declared in this scope 14 | res += alphabet[(size + j - 3) % size]; | ^~~ a.cc:19:18: error: 'res' was not declared in this scope 19 | std::cout << res; | ^~~
s294290478
p00435
C++
#include <iostream> #include <string> using namespace std:: int main(){ string str; string res = ""; cin >> str; string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; for (int i = 0; i <(int)s.size() ++i) { char s = str[i]; for (int j = 0; i < (int)alphabet.size(); res += alphabet[(size + j -3) % size]; } } } cout << res << end]; }
a.cc:4:1: error: expected identifier before 'int' 4 | int main(){ | ^~~ a.cc:3:22: error: expected ';' before 'int' 3 | using namespace std:: | ^ | ; 4 | int main(){ | ~~~ a.cc: In function 'int main()': a.cc:5:3: error: 'string' was not declared in this scope 5 | string str; | ^~~~~~ a.cc:5:3: note: suggested alternatives: In file included from /usr/include/c++/14/iosfwd:41, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string' 77 | typedef basic_string<char> string; | ^~~~~~ In file included 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: /usr/include/c++/14/string:76:11: note: 'std::pmr::string' 76 | using string = basic_string<char>; | ^~~~~~ a.cc:6:9: error: expected ';' before 'res' 6 | string res = ""; | ^~~~ | ; a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin >> str; | ^~~ | std::cin /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:7:10: error: 'str' was not declared in this scope; did you mean 'std'? 7 | cin >> str; | ^~~ | std a.cc:9:9: error: expected ';' before 'alphabet' 9 | string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | ^~~~~~~~~ | ; a.cc:11:27: error: 's' was not declared in this scope 11 | for (int i = 0; i <(int)s.size() ++i) { | ^ a.cc:11:38: error: expected ';' before 'i' 11 | for (int i = 0; i <(int)s.size() ++i) { | ^ | ; a.cc:13:31: error: 'alphabet' was not declared in this scope 13 | for (int j = 0; i < (int)alphabet.size(); | ^~~~~~~~ a.cc:14:6: error: 'res' was not declared in this scope 14 | res += alphabet[(size + j -3) % size]; | ^~~ a.cc:14:23: error: 'size' was not declared in this scope; did you mean 'std::size'? 14 | res += alphabet[(size + j -3) % size]; | ^~~~ | std::size In file included from /usr/include/c++/14/string:53: /usr/include/c++/14/bits/range_access.h:272:5: note: 'std::size' declared here 272 | size(const _Tp (&)[_Nm]) noexcept | ^~~~ a.cc:14:43: error: expected ')' before ';' token 14 | res += alphabet[(size + j -3) % size]; | ^ | ) a.cc:13:10: note: to match this '(' 13 | for (int j = 0; i < (int)alphabet.size(); | ^ a.cc: At global scope: a.cc:17:1: error: expected declaration before '}' token 17 | } | ^ a.cc:18:1: error: 'cout' does not name a type 18 | cout << res << end]; | ^~~~ a.cc:22:1: error: expected declaration before '}' token 22 | } | ^
s118603504
p00435
C++
#include <iostream> #include <string> using namespace std; int main(){ string str; string res = ""; cin >> str; string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; for (int i = 0; i <(int)s.size() ++i) { char s = str[i]; for (int j = 0; i < (int)alphabet.size(); res += alphabet[(size + j -3) % size]; } } } cout << res << end]; }
a.cc: In function 'int main()': a.cc:11:27: error: 's' was not declared in this scope 11 | for (int i = 0; i <(int)s.size() ++i) { | ^ a.cc:11:38: error: expected ';' before 'i' 11 | for (int i = 0; i <(int)s.size() ++i) { | ^ | ; a.cc:14:28: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+' 14 | res += alphabet[(size + j -3) % size]; | ~~~~~^~~ a.cc:14:43: error: expected ')' before ';' token 14 | res += alphabet[(size + j -3) % size]; | ^ | ) a.cc:13:10: note: to match this '(' 13 | for (int j = 0; i < (int)alphabet.size(); | ^ a.cc: At global scope: a.cc:17:1: error: expected declaration before '}' token 17 | } | ^ a.cc:18:1: error: 'cout' does not name a type 18 | cout << res << end]; | ^~~~ a.cc:22:1: error: expected declaration before '}' token 22 | } | ^
s463610286
p00435
C++
#include <iostream> #include <string> using namespace std; int main(){ string str; string res = ""; cin >> str; string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; for (int i = 0; i <(int)s.size() ++i) { char s = str[i]; for (int j = 0; i < (int)alphabet.size(); res += alphabet[(size + j -3) % size]; } } } cout << res << end]; }
a.cc: In function 'int main()': a.cc:11:27: error: 's' was not declared in this scope 11 | for (int i = 0; i <(int)s.size() ++i) { | ^ a.cc:11:38: error: expected ';' before 'i' 11 | for (int i = 0; i <(int)s.size() ++i) { | ^ | ; a.cc:14:28: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+' 14 | res += alphabet[(size + j -3) % size]; | ~~~~~^~~ a.cc:14:43: error: expected ')' before ';' token 14 | res += alphabet[(size + j -3) % size]; | ^ | ) a.cc:13:10: note: to match this '(' 13 | for (int j = 0; i < (int)alphabet.size(); | ^ a.cc: At global scope: a.cc:17:1: error: expected declaration before '}' token 17 | } | ^ a.cc:18:1: error: 'cout' does not name a type 18 | cout << res << end]; | ^~~~ a.cc:22:1: error: expected declaration before '}' token 22 | } | ^
s695695050
p00435
C++
#include <iostream> #include <string> using namespace std; int main(){ string str; string res = ""; cin >> str; string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; for (int i = 0; i <(int)s.size(); ++i) { char s = str[i]; for (int j = 0; j < (int)alphabet.size();j++) { res += alphabet[(size + j -3) % size]; } } } cout << res << end]; }
a.cc: In function 'int main()': a.cc:11:27: error: 's' was not declared in this scope 11 | for (int i = 0; i <(int)s.size(); ++i) { | ^ a.cc:14:28: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+' 14 | res += alphabet[(size + j -3) % size]; | ~~~~~^~~ a.cc: At global scope: a.cc:18:1: error: 'cout' does not name a type 18 | cout << res << end]; | ^~~~ a.cc:22:1: error: expected declaration before '}' token 22 | } | ^
s257679006
p00435
C++
#include <iostream> #include <string> using namespace std; int main(){ string str; string res = ""; cin >> str; string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; for (int i = 0; i <(int)str.size(); ++i) { char s = str[i]; for (int j = 0; j < (int)alphabet.size();j++) { res += alphabet[(size + j -3) % size]; } } } cout << res << end]; }
a.cc: In function 'int main()': a.cc:14:28: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+' 14 | res += alphabet[(size + j -3) % size]; | ~~~~~^~~ a.cc: At global scope: a.cc:18:1: error: 'cout' does not name a type 18 | cout << res << end]; | ^~~~ a.cc:22:1: error: expected declaration before '}' token 22 | } | ^
s682157069
p00435
C++
#include <iostream> #include <string> using namespace std; int main(){ string str; string res = ""; cin >> str; string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; for (int i = 0; i <(int)str.size(); ++i) { char s = str[i]; for (int j = 0; j < (int)alphabet.size();j++) { res += alphabet[(size + j -3) % size]; } } } cout << res << end]; }
a.cc: In function 'int main()': a.cc:14:28: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+' 14 | res += alphabet[(size + j -3) % size]; | ~~~~~^~~ a.cc: At global scope: a.cc:18:1: error: 'cout' does not name a type 18 | cout << res << end]; | ^~~~ a.cc:22:1: error: expected declaration before '}' token 22 | } | ^
s517445665
p00435
C++
#include <iostream> #include <string> using namespace std; int main(){ string str; string res = ""; cin >> str; string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; for (int i = 0; i <(int)str.size(); ++i) { char s = str[i]; for (int j = 0; j < (int)alphabet.size();j++) { int size = (int)alphabet.size(); res += alphabet[(size + j -3) % size]; } } } cout << res << end]; }
a.cc:19:1: error: 'cout' does not name a type 19 | cout << res << end]; | ^~~~ a.cc:23:1: error: expected declaration before '}' token 23 | } | ^
s995151098
p00435
C++
#include <stdio.h> #include <string> using namespace std; string S; unsigned int n; int main(void){ getline(cin,S); n = S.length(); for(int i = 0; i < n; i++){ char c = S[i]; int n = ((c - 'A') + 3)%26; printf("%c",'A' + n); } printf("\n"); }
a.cc: In function 'int main()': a.cc:9:13: error: 'cin' was not declared in this scope 9 | getline(cin,S); | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include <string> +++ |+#include <iostream> 3 | using namespace std;
s092666972
p00435
C++
#include<stdio.h> main(){ char S[1024]; scanf("%s",S); for(int i = 0;S[i] != '\0';i++){ char c = S[i] - 3; if(c < 'A'){ c += 26; } printf("%c",c); } printf('\n'); }
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:12:12: error: invalid conversion from 'char' to 'const char*' [-fpermissive] 12 | printf('\n'); | ^~~~ | | | char In file included from a.cc:1: /usr/include/stdio.h:363:43: note: initializing argument 1 of 'int printf(const char*, ...)' 363 | extern int printf (const char *__restrict __format, ...); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
s389491778
p00435
C++
#include<cstdio> #include<iostream> #include<algorithm> #include<vector> #include<string> #include<queue> #include<stack> #include<set> #include<functional> #include<cmath> using namespace std; typedef long long ll; int main() { char str[1050]; scanf("%s",str); char b; for (int i = 0; i < strlen(str); i++) { if(str[i]=='A'||str[i]=='B'||str[i]=='C'){ b=str[i] + 23; } else b=str[i] - 3; printf("%c", b); } return 0; }
a.cc: In function 'int main()': a.cc:23:29: error: 'strlen' was not declared in this scope 23 | for (int i = 0; i < strlen(str); i++) { | ^~~~~~ a.cc:11:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 10 | #include<cmath> +++ |+#include <cstring> 11 |
s083973606
p00435
C++
#include<cstdio> #include<iostream> #include<cstring> using namespace std; char a[1001]; int main() { int i,lena; char n; gets(a); lena=strlen(a); for(i=0;i<lena;i++) { n=a[i]-3; if(n<65)n=91-(65-n); cout<<n; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 10 | gets(a); | ^~~~ | getw
s263963205
p00435
C++
#include<cstdio> #include<iostream> #include<cstring> using namespace std; char a[1001]; int main() { int i,lena; char n; gets(a); lena=strlen(a); for(i=0;i<lena;i++) { n=a[i]-3; if(n<65)n=91-(65-n); cout<<n; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 10 | gets(a); | ^~~~ | getw
s719907828
p00435
C++
#include<cstdio> #include<iostream> #include<cstring> using namespace std; char a[1001]; int main() { int i,lena; char n; gets(a); lena=strlen(a); for(i=0;i<lena;i++) { n=a[i]-3; if(n<41)n=7B-(41-n); cout<<n; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 10 | gets(a); | ^~~~ | getw a.cc:15:27: error: unable to find numeric literal operator 'operator""B' 15 | if(n<41)n=7B-(41-n); | ^~
s986797506
p00435
C++
#include<cstdio> #include<iostream> #include<cstring> using namespace std; char a[1001]; int main() { int i,lena; char n; gets(a); lena=strlen(a); for(i=0;i<lena;i++) { if(a[i]<='C') { n=a[i]+23; } else n=a[i]-3; cout<<n; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 10 | gets(a); | ^~~~ | getw
s138684017
p00435
C++
#include<cstdio> #include<iostream> #include<cstring> using namespace std; char a[1001]; int main() { int i,lena; char n; gets(a); lena=strlen(a); for(i=0;i<lena;i++) { if(a[i]<='C') a[i]+=23; else a[i]-=3; cout<<a[i]; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 10 | gets(a); | ^~~~ | getw
s794704078
p00435
C++
#include<cstdio> #include<iostream> #include<cmath> #include<cstring> using namespace std; char a[1001]; int main() { int i,lena; char n; gets(a); lena=strlen(a); for(i=0;i<lena;i++) { if(a[i]<='C') a[i]+=23; else a[i]-=3; cout<<a[i]; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 11 | gets(a); | ^~~~ | getw
s196405877
p00435
C++
#include<cstdio> #include<iostream> #include<cmath> #include<cstring> using namespace std; char a[1001]; int main() { int i,lena; char n; gets(a); lena=strlen(a); for(i=0;i<lena;i++) { if(a[i]<='C') a[i]+=23; else a[i]-=3; cout<<a[i]; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 11 | gets(a); | ^~~~ | getw
s760910815
p00435
C++
#include <iostream> #include <string> using namespace std; int main(){ string str; cin>>str; for (i=0;i<str.size();i++) { if (str[i]<'D'){ str[i]=str[i]+23; }else{ str[i]=str[i]+3; } cout<<str<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:14: error: 'i' was not declared in this scope 7 | for (i=0;i<str.size();i++) | ^ a.cc:16:2: error: expected '}' at end of input 16 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s958113815
p00435
C++
#include <iostream> #include <string> using namespace std; int main(void){ string str; cin>>str; for (int i=0;i<str.size();i++) { if (str[i]<'D'){ str[i]=str[i]+23; }else{ str[i]=str[i]+3; } cout<<str<<endl; return 0; }
a.cc: In function 'int main()': a.cc:16:2: error: expected '}' at end of input 16 | } | ^ a.cc:4:15: note: to match this '{' 4 | int main(void){ | ^
s203910573
p00435
C++
#include <iostream> #include <string> using namespace std; int main(void){ string str; cin>>str; for (int i=0;i<str.size();i++) { if (str[i]<'D'){ str[i]=str[i]+23; }else{ str[i]=str[i]+3; } cout<<str<<endl; return 0; }
a.cc: In function 'int main()': a.cc:16:2: error: expected '}' at end of input 16 | } | ^ a.cc:4:15: note: to match this '{' 4 | int main(void){ | ^
s340569706
p00435
C++
#include <iostream> #include <string> using namespace std; int main(void){ string str; cin>>str; for (int i=0;i<str.size();i++) { if (str[i]<'D'){ str[i]=str[i]+23; }else{ str[i]=str[i]-3; } cout<<str<<endl; return 0; }
a.cc: In function 'int main()': a.cc:16:2: error: expected '}' at end of input 16 | } | ^ a.cc:4:15: note: to match this '{' 4 | int main(void){ | ^
s000908079
p00435
C++
#include <iostream> #include <string> using namespace std; int main(void){ string str; int i; cin>>str; for (i=0;i<str.size();i++) { if (str[i]<'D'){ str[i]=str[i]+23; }else{ str[i]=str[i]-3; } cout<<str<<endl; return 0; }
a.cc: In function 'int main()': a.cc:17:2: error: expected '}' at end of input 17 | } | ^ a.cc:4:15: note: to match this '{' 4 | int main(void){ | ^
s235645536
p00435
C++
#include<stdio.h> #include<iostream> #include<string> using namespace std; int main(void) { int a, siz,i; char c,b,p[1001]; scanf("%s", p); siz = strlen(p); for (i = 0; i <siz; i++) { a = p[i]; if (a >= 68) { a = a - 3; } else { a = a + 23; } b = a; printf("%c", b); } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:15: error: 'strlen' was not declared in this scope 10 | siz = strlen(p); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<iostream> +++ |+#include <cstring> 3 | #include<string>
s057215260
p00435
C++
#include<iostream> #include<string> using namespace std; int main(){ char moji[10000]={}; int len; cin>>moji; len=strlen(moji); for(int i=0;i<len;i++){ if(moji[i]-'A'<=22){ moji[i]=moji[i]-3; } else{ moji[i]=moji[i]+23; } } for(int i=0;i<len;i++){ cout<<moji[i]; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:13: error: 'strlen' was not declared in this scope 8 | len=strlen(moji); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2 | #include<string>
s442170708
p00435
C++
#include<iostream> #include<string> using namespace std; int main(){ char moji[1500]={}; int len; cin>>moji; len=strlen(moji); for(int i=0;i<len;i++){ if(moji[i]-'A'<=22){ moji[i]=moji[i]-3; } else{ moji[i]=moji[i]+23; } } for(int i=0;i<len;i++){ cout<<moji[i]; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:13: error: 'strlen' was not declared in this scope 8 | len=strlen(moji); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2 | #include<string>
s763811073
p00435
C++
#include<iostream> #include<string> using namespace std; int main(){ char moji[1500]={}; int len; cin>>moji; len=strlen(moji); for(int i=0;i<len;i++){ if(moji[i]-'A'<=22){ moji[i]=moji[i]-3; } else{ moji[i]=moji[i]+23; } } for(int i=0;i<len;i++){ cout<<moji[i]; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:13: error: 'strlen' was not declared in this scope 8 | len=strlen(moji); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2 | #include<string>
s629851882
p00435
C++
main(){char s[1001],*a;scanf("%s",a=s);for(;*a;a++)*a=(*a-42)%26+65;puts(s);return 0;}
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | main(){char s[1001],*a;scanf("%s",a=s);for(;*a;a++)*a=(*a-42)%26+65;puts(s);return 0;} | ^~~~ a.cc: In function 'int main()': a.cc:1:24: error: 'scanf' was not declared in this scope 1 | main(){char s[1001],*a;scanf("%s",a=s);for(;*a;a++)*a=(*a-42)%26+65;puts(s);return 0;} | ^~~~~ a.cc:1:69: error: 'puts' was not declared in this scope 1 | main(){char s[1001],*a;scanf("%s",a=s);for(;*a;a++)*a=(*a-42)%26+65;puts(s);return 0;} | ^~~~
s454687598
p00435
C++
main(a){for(;~scanf("%d",&c);printf("%c",(c-62)%26+65));}
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(a){for(;~scanf("%d",&c);printf("%c",(c-62)%26+65));} | ^
s114559240
p00435
C++
#include<iostream> #include<string> int main() { string s; while(cin>>s){ for(int i=0;i<s.size();i++){ int a=s[i]-'A'; a+=3; a%=26; char p='A'+a; cout<<p; } cout<<endl; } }
a.cc: In function 'int main()': a.cc:6:1: error: 'string' was not declared in this scope 6 | string s; | ^~~~~~ a.cc:6:1: note: suggested alternatives: In file included from /usr/include/c++/14/iosfwd:41, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string' 77 | typedef basic_string<char> string; | ^~~~~~ In file included 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: /usr/include/c++/14/string:76:11: note: 'std::pmr::string' 76 | using string = basic_string<char>; | ^~~~~~ a.cc:7:7: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | while(cin>>s){ | ^~~ | std::cin /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:7:12: error: 's' was not declared in this scope 7 | while(cin>>s){ | ^ a.cc:13:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 13 | cout<<p; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:15:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 15 | cout<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:15:7: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 15 | cout<<endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s720387637
p00435
C++
#include<iostream> #include<cstring> using namespace std; int main(){ int s[1001]; ci>>s; for(int i=0;i<strlen(s);i++){ switch(s[i]){ case 'X': cout<<'A'; break; case 'Y': cout<<'B'; break; case 'Z': cout<<'C'; break; default: cout<<(char)(s[i]+3); } } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'ci' was not declared in this scope 6 | ci>>s; | ^~ a.cc:7:30: error: cannot convert 'int*' to 'const char*' 7 | for(int i=0;i<strlen(s);i++){ | ^ | | | int* In file included from /usr/include/c++/14/cstring:43, from a.cc:2: /usr/include/string.h:407:35: note: initializing argument 1 of 'size_t strlen(const char*)' 407 | extern size_t strlen (const char *__s) | ~~~~~~~~~~~~^~~
s682150132
p00435
C++
#include<iostream> #include<cstring> using namespace std; int main(){ int s[1001]; cin>>s; for(int i=0;i<strlen(s);i++){ switch(s[i]){ case 'X': cout<<'A'; break; case 'Y': cout<<'B'; break; case 'Z': cout<<'C'; break; default: cout<<(char)(s[i]+3); } } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:12: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int [1001]') 6 | cin>>s; | ~~~^~~ | | | | | int [1001] | std::istream {aka std::basic_istream<char>} In file included from /usr/include/c++/14/iostream:42, from a.cc:1: /usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:7: note: conversion of argument 1 would be ill-formed: a.cc:6:14: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'int*' 6 | cin>>s; | ^ /usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match) 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:7: note: conversion of argument 1 would be ill-formed: a.cc:6:14: error: invalid conversion from 'int*' to 'short int' [-fpermissive] 6 | cin>>s; | ^ | | | int* a.cc:6:14: error: cannot bind rvalue '(short int)((int*)(& s))' to 'short int&' /usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:7: note: conversion of argument 1 would be ill-formed: a.cc:6:14: error: invalid conversion from 'int*' to 'short unsigned int' [-fpermissive] 6 | cin>>s; | ^ | | | int* a.cc:6:14: error: cannot bind rvalue '(short unsigned int)((int*)(& s))' to 'short unsigned int&' /usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match) 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:7: note: conversion of argument 1 would be ill-formed: a.cc:6:14: error: invalid conversion from 'int*' to 'int' [-fpermissive] 6 | cin>>s; | ^ | | | int* a.cc:6:14: error: cannot bind rvalue '(int)((int*)(& s))' to 'int&' /usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:7: note: conversion of argument 1 would be ill-formed: a.cc:6:14: error: invalid conversion from 'int*' to 'unsigned int' [-fpermissive] 6 | cin>>s; | ^ | | | int* a.cc:6:14: error: cannot bind rvalue '(unsigned int)((int*)(& s))' to 'unsigned int&' /usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:7: note: conversion of argument 1 would be ill-formed: a.cc:6:14: error: invalid conversion from 'int*' to 'long int' [-fpermissive] 6 | cin>>s; | ^ | | | int* a.cc:6:14: error: cannot bind rvalue '(long int)((int*)(& s))' to 'long int&' /usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:7: note: conversion of argument 1 would be ill-formed: a.cc:6:14: error: invalid conversion from 'int*' to 'long unsigned int' [-fpermissive] 6 | cin>>s; | ^ | | | int* a.cc:6:14: error: cannot bind rvalue '(long unsigned int)((int*)(& s))' to 'long unsigned int&' /usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:7: note: conversion of argument 1 would be ill-formed: a.cc:6:14: error: invalid conversion from 'int*' to 'long long int' [-fpermissive] 6 | cin>>s; | ^ | | | int* a.cc:6:14: error: cannot bind rvalue '(long long int)((int*)(& s))' to 'long long int&' /usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:7: note: conversion of argument 1 would be ill-formed: a.cc:6:14: error: invalid conversion from 'int*' to 'long long unsigned int' [-fpermissive] 6 | cin>>s; | ^ | | | int* a.cc:6:14: error: cannot bind rvalue '(long long unsigned int)((int*)(& s))' to 'long long unsigned int&' /usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:7: note: conversion of argument 1 would be ill-formed: a.cc:6:14: error: cannot bind non-const lvalue reference of type 'void*&' to an rvalue of type 'void*' 6 | cin>>s; | ^ /usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 219 | operator>>(float& __f) | ^~~~~~~~ /usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'int [1001]' to 'float&' 219 | operator>>(float& __f) | ~~~~~~~^~~ /usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 223 | operator>>(double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'int [1001]' to 'double&' 223 | operator>>(double& __f) | ~~~~~~~~^~~ /usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 227 | operator>>(long double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'int [1001]' to 'long double&' 227 | operator>>(long double& __f) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'int [1001]' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'int [1001]' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream
s523990830
p00435
C++
#include<cstdio> #include<iostream> #include<algorithm> #include<string> using namespace std; int main(){ int n = 0; char t[1001] = {0}; gets(t); for(n = 0; n < 1001; n++){ if(t[n] == 0) break; t[n] += 3; if(t[n] > 'z') t[n] -= 'z' - 'a' + 1; printf("%c", t[n]); } printf("\n");
a.cc: In function 'int main()': a.cc:11:3: error: 'gets' was not declared in this scope; did you mean 'getw'? 11 | gets(t); | ^~~~ | getw a.cc:20:16: error: expected '}' at end of input 20 | printf("\n"); | ^ a.cc:8:11: note: to match this '{' 8 | int main(){ | ^
s438420816
p00435
C++
#include<cstdio> #include<iostream> #include<algorithm> #include<string> using namespace std; int main(){ int n = 0; char t[1001] = {0}; gets(t); for(n = 0; n < 1001; n++){ if(t[n] == 0) break; t[n] += 3; if(t[n] > 'z') t[n] -= 'z' - 'a' + 1; printf("%c", t[n]); } printf("\n"); return0; }
a.cc: In function 'int main()': a.cc:11:3: error: 'gets' was not declared in this scope; did you mean 'getw'? 11 | gets(t); | ^~~~ | getw a.cc:21:3: error: 'return0' was not declared in this scope 21 | return0; | ^~~~~~~
s936723342
p00435
C++
#include<cstdio> #include<iostream> #include<algorithm> #include<string> using namespace std; int main(){ int n = 0; char t[1001] = {0}; gets(t); for(n = 0; n < 1001; n++){ if(t[n] == 0) break; t[n] += 3; if(t[n] > 'z') t[n] -= 'z' - 'a' + 1; printf("%c", t[n]); } printf("\n"); return0; }
a.cc: In function 'int main()': a.cc:11:3: error: 'gets' was not declared in this scope; did you mean 'getw'? 11 | gets(t); | ^~~~ | getw a.cc:21:2: error: 'return0' was not declared in this scope 21 | return0; | ^~~~~~~
s246008381
p00435
C++
#include<stdio.h> int main() { char a[1001]; int i=0; while (scanf("%c", &a[i]) != EOF){ if (a[i] == 'A'){ a[i] = 'X'; } else if (a[i] == 'B'){ a[i] = 'Y'; } else if (a[i] == 'C'){ a[i] = 'Z'; } else if('D'<=a[i]&&'Z'>=a[i]){ a[i] -= 3; } printf("%c", a[i]); i++; }
a.cc: In function 'int main()': a.cc:23:10: error: expected '}' at end of input 23 | } | ^ a.cc:3:1: note: to match this '{' 3 | { | ^
s096798839
p00435
C++
#include <iostream> #include <cstring> using namespace std; int main() { char a[1000],b[1000]; cin.getline(a,1000); size_t len; len=stlen(a); for(int i=0;i<len;i++){ if (a[i]>'C'){ b[i]=a[i]-3; cout<<b[i];} else{ b[i]=a[i]+26-3; cout<<b[i];}} return 0; }
a.cc: In function 'int main()': a.cc:8:5: error: 'stlen' was not declared in this scope; did you mean 'strlen'? 8 | len=stlen(a); | ^~~~~ | strlen
s138808134
p00435
C++
#include <iostream> #include <cstring> using namespace std; int main() { char a[1000],b[1000]; cin.getline(a,1000); size_t len; len=stren(a); for(int i=0;i<len;i++){ if (a[i]>'C'){ b[i]=a[i]-3; cout<<b[i];} else{ b[i]=a[i]+26-3; cout<<b[i];}} return 0; }
a.cc: In function 'int main()': a.cc:8:5: error: 'stren' was not declared in this scope; did you mean 'strlen'? 8 | len=stren(a); | ^~~~~ | strlen
s196782098
p00435
C++
include <iostream> #include <string> using namespace std; int main(){ string s; cin >> s; for(int i=0;i<s.size();i++){ if(s[i] >= 'D' && s[i] <= 'Z') s[i] -= 3; else s[i] += 23; } cout << s << endl; }
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from a.cc:2: /usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type 68 | typedef ptrdiff_t streamsize; // Signed integral type | ^~~~~~~~~ /usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' 40 | #include <cwchar> // For mbstate_t +++ |+#include <cstddef> 41 | In file included from /usr/include/c++/14/bits/char_traits.h:50: /usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std' 666 | struct is_null_pointer<std::nullptr_t> | ^~~~~~~~~ /usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid 666 | struct is_null_pointer<std::nullptr_t> | ^ /usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid 670 | struct is_null_pointer<const std::nullptr_t> | ^ /usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid 674 | struct is_null_pointer<volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid 678 | struct is_null_pointer<const volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^~~~~~ In file included from /usr/include/wchar.h:35, from /usr/include/c++/14/cwchar:44, from /usr/include/c++/14/bits/postypes.h:40: /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^ /usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1438 | : public integral_constant<std::size_t, 0> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid 1438 | : public integral_constant<std::size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared 1440 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope 1441 | struct rank<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid 1441 | struct rank<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:2086:26: error: 'std::size_t' has not been declared 2086 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:2087:30: error: '_Size' was not declared in this scope 2087 | struct remove_extent<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:2087:36: error: template argument 1 is invalid 2087 | struct remove_extent<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:2099:26: error: 'std::size_t' has not been declared 2099 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:2100:35: error: '_Size' was not declared in this scope 2100 | struct remove_all_extents<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:2100:41: error: template argument 1 is invalid 2100 | struct remove_all_extents<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:2171:12: error: 'std::size_t' has not been declared 2171 | template<std::size_t _Len> | ^~~ /usr/include/c++/14/type_traits:2176:30: error: '_Len' was not declared in this scope 2176 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/14/type_traits:2194:12: error: 'std::size_t' has not been declared 2194 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/14/type_traits:2194:30: error: 'std::size_t' has not been declared 2194 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/14/type_traits:2195:55: error: '_Len' was not declared in this scope 2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^~~~ /usr/include/c++/14/type_traits:2195:59: error: template argument 1 is invalid 2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^ /usr/include/c++/14/type_traits:2202:30: error: '_Len' was not declared in this scope 2202 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/14/type_traits:2203:44: error: '_Align' was not declared in this scope 2203 | struct __attribute__((__aligned__((_Align)))) { } __align; | ^~~~~~ /usr/include/c++/14/bits/char_traits.h:144:61: error: 'std::size_t' has not been declared 144 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n); | ^~~ /usr/include/c++/14/bits/char_traits.h:146:40: error: 'size_t' in namespace 'std' does not name a type 146 | static _GLIBCXX14_CONSTEXPR std::size_t | ^~~~~~ /usr/include/c++/14/bits/char_traits.h:150:34: error: 'std::size_t' has not been declared 150 | find(const char_type* __s, std::size_t __n, const char_type& __a); | ^~~ /usr/include/c++/14/bits/char_traits.h:153:52: error: 'std::size_t' has not been declared 153 | move(char_type* __s1, const char_type* __s2, std::size_t __n); | ^~~ /usr/include/c++/14/bits/char_traits.h:156:52: error: 'std::size_t' has not been declared 156 | copy(char_type* __s1, const char_type* __s2, std::size_t __n); | ^~~ /usr/include/c++/14/bits/char_traits.h:159:30: error: 'std::size_t' has not been declared 159 | assign(char_type* __s, std::size_t __n, char_type __a); | ^~~ /usr/include/c++/14/bits/char_traits.h:187:59: error: 'std::size_t' has not been declared 187 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n) | ^~~ /usr/include/c++/14/bits/char_traits.h: In static member function 'static constexpr int __gnu_cxx::char_traits<_CharT>::compare(const char_type*, const char_type*, int)': /usr/include/c++/14/bits/char_traits.h:189:17: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 189 | for (std::size_t __i = 0; __i < __n; ++__i) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/bits/char_traits.h:189:33: error: '__i' was not declared in this scope; did you mean '__n'? 189 | for (std::size_t __i = 0; __i < __n; ++__i) | ^~~ | __n /usr/include/c++/14/bits/char_traits.h: At global scope: /usr/include/c++/14/bits/char_traits.h:198:31: error: 'size_t' in namespace 'std' does not name a type 198 | _GLIBCXX14_CONSTEXPR std::size_t |
s441869827
p00435
C++
#include <iostream> #include <string> using namespace std; int main() { string S; cin >> S; for(int i=0;i<S.size();i++){ if(S[i]==(int)"A"||S[i]==(int)"B"||S[i]==(int)"C") S[i]+=26; S[i]-=3; cout << S[i] ; } return 0; }
a.cc: In function 'int main()': a.cc:11:26: error: cast from 'const char*' to 'int' loses precision [-fpermissive] 11 | if(S[i]==(int)"A"||S[i]==(int)"B"||S[i]==(int)"C") | ^~~~~~~~ a.cc:11:42: error: cast from 'const char*' to 'int' loses precision [-fpermissive] 11 | if(S[i]==(int)"A"||S[i]==(int)"B"||S[i]==(int)"C") | ^~~~~~~~ a.cc:11:58: error: cast from 'const char*' to 'int' loses precision [-fpermissive] 11 | if(S[i]==(int)"A"||S[i]==(int)"B"||S[i]==(int)"C") | ^~~~~~~~
s929317754
p00435
C++
// #include <iostream> #include <string> using namespace std; int main() { string S; cin >> S; for(int i=0;i<S.size();i++){ if(S[i]==(int)"A"||S[i]==(int)"B"||S[i]==(int)"C") S[i]+=26; S[i]-=3; cout << S[i] ; } return 0; }
a.cc: In function 'int main()': a.cc:12:26: error: cast from 'const char*' to 'int' loses precision [-fpermissive] 12 | if(S[i]==(int)"A"||S[i]==(int)"B"||S[i]==(int)"C") | ^~~~~~~~ a.cc:12:42: error: cast from 'const char*' to 'int' loses precision [-fpermissive] 12 | if(S[i]==(int)"A"||S[i]==(int)"B"||S[i]==(int)"C") | ^~~~~~~~ a.cc:12:58: error: cast from 'const char*' to 'int' loses precision [-fpermissive] 12 | if(S[i]==(int)"A"||S[i]==(int)"B"||S[i]==(int)"C") | ^~~~~~~~
s796858579
p00436
Java
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner stdIn = new Scanner(System.in); static int n = stdIn.nextInt(); static int[] cardSet = cardSet[2*n]; for(int i=0;i<n*2;i++){ cardSet[i] = i+1; } int m = stdIn.nextInt(); for(i=0;i<m;i++){ int shuffle = stdIn.nextInt(); if(shuffle != 0){ hinduShuffle(shuffle); }else{ riffleShuffle(); } } for(i=0;i<cardSet.length;i++){ System.out.println(cardSet[i]); } } public static void hinduShuffle(int shufflePosition){ int temp[] = new Integer[shufflePosition]; for(int i=0;i<shufflePosition;i++){ temp[i] = cardSet[i]; } int shufflePositionTemp = shufflePosition; for(i=0;i<cardSet.length-shufflePosition;i++){ cardSet[i] = cardSet[shufflePositionTemp]; shufflePositionTemp++; } } public static void riffleShuffle(){ int[] cardSetCopy = (Integer[])cardSet.clone(); for(int i=1;i<n;i++){ cardSet[i*2] = cardSet[i]; } int x = 0; for(int j=1;j<2*n;j+=2){ cardSet[j] = cardSetCopy[n+x]; x++; } } }
Main.java:6: error: illegal start of expression static int n = stdIn.nextInt(); ^ Main.java:9: error: illegal start of type for(int i=0;i<n*2;i++){ ^ Main.java:9: error: > or ',' expected for(int i=0;i<n*2;i++){ ^ Main.java:9: error: <identifier> expected for(int i=0;i<n*2;i++){ ^ Main.java:13: error: illegal start of type for(i=0;i<m;i++){ ^ Main.java:13: error: <identifier> expected for(i=0;i<m;i++){ ^ Main.java:13: error: > or ',' expected for(i=0;i<m;i++){ ^ Main.java:13: error: <identifier> expected for(i=0;i<m;i++){ ^ Main.java:21: error: illegal start of type for(i=0;i<cardSet.length;i++){ ^ Main.java:21: error: <identifier> expected for(i=0;i<cardSet.length;i++){ ^ Main.java:21: error: > or ',' expected for(i=0;i<cardSet.length;i++){ ^ Main.java:21: error: <identifier> expected for(i=0;i<cardSet.length;i++){ ^ Main.java:25: error: unnamed classes are a preview feature and are disabled by default. public static void hinduShuffle(int shufflePosition){ ^ (use --enable-preview to enable unnamed classes) Main.java:47: error: class, interface, enum, or record expected } ^ 14 errors
s539073740
p00436
Java
import java.util.Scanner; class Main{ static int n = 0; static int[] cardSet = null; public static void main(String[] args){ Scanner stdIn = new Scanner(System.in); n = stdIn.nextInt(); cardSet = Integer[2*n]; for(int i=0;i<n*2;i++){ cardSet[i] = i+1; } int m = stdIn.nextInt(); for(i=0;i<m;i++){ int shuffle = stdIn.nextInt(); if(shuffle != 0){ hinduShuffle(shuffle); }else{ riffleShuffle(); } } for(i=0;i<cardSet.length;i++){ System.out.println(cardSet[i]); } } public static void hinduShuffle(int shufflePosition){ int temp[] = new Integer[shufflePosition]; for(int i=0;i<shufflePosition;i++){ temp[i] = cardSet[i]; } int shufflePositionTemp = shufflePosition; for(i=0;i<cardSet.length-shufflePosition;i++){ cardSet[i] = cardSet[shufflePositionTemp]; shufflePositionTemp++; } } public static void riffleShuffle(){ int[] cardSetCopy = (Integer[])cardSet.clone(); for(int i=1;i<n;i++){ cardSet[i*2] = cardSet[i]; } int x = 0; for(int j=1;j<2*n;j+=2){ cardSet[j] = cardSetCopy[n+x]; x++; } } }
Main.java:9: error: cannot find symbol cardSet = Integer[2*n]; ^ symbol: variable Integer location: class Main Main.java:15: error: cannot find symbol for(i=0;i<m;i++){ ^ symbol: variable i location: class Main Main.java:15: error: cannot find symbol for(i=0;i<m;i++){ ^ symbol: variable i location: class Main Main.java:15: error: cannot find symbol for(i=0;i<m;i++){ ^ symbol: variable i location: class Main Main.java:23: error: cannot find symbol for(i=0;i<cardSet.length;i++){ ^ symbol: variable i location: class Main Main.java:23: error: cannot find symbol for(i=0;i<cardSet.length;i++){ ^ symbol: variable i location: class Main Main.java:23: error: cannot find symbol for(i=0;i<cardSet.length;i++){ ^ symbol: variable i location: class Main Main.java:24: error: cannot find symbol System.out.println(cardSet[i]); ^ symbol: variable i location: class Main Main.java:28: error: incompatible types: Integer[] cannot be converted to int[] int temp[] = new Integer[shufflePosition]; ^ Main.java:33: error: cannot find symbol for(i=0;i<cardSet.length-shufflePosition;i++){ ^ symbol: variable i location: class Main Main.java:33: error: cannot find symbol for(i=0;i<cardSet.length-shufflePosition;i++){ ^ symbol: variable i location: class Main Main.java:33: error: cannot find symbol for(i=0;i<cardSet.length-shufflePosition;i++){ ^ symbol: variable i location: class Main Main.java:34: error: cannot find symbol cardSet[i] = cardSet[shufflePositionTemp]; ^ symbol: variable i location: class Main Main.java:39: error: incompatible types: int[] cannot be converted to Integer[] int[] cardSetCopy = (Integer[])cardSet.clone(); ^ 14 errors
s588507167
p00436
Java
import java.util.Scanner; class Main{ static int n = 0; static int[] cardSet = null; public static void main(String[] args){ Scanner stdIn = new Scanner(System.in); n = stdIn.nextInt(); cardSet = new Integer[2*n]; for(int i=0;i<n*2;i++){ cardSet[i] = i+1; } int m = stdIn.nextInt(); for(int i=0;i<m;i++){ int shuffle = stdIn.nextInt(); if(shuffle != 0){ hinduShuffle(shuffle); }else{ riffleShuffle(); } } for(int i=0;i<cardSet.length;i++){ System.out.println(cardSet[i]); } } public static void hinduShuffle(int shufflePosition){ int temp[] = new Integer[shufflePosition]; for(int i=0;i<shufflePosition;i++){ temp[i] = cardSet[i]; } int shufflePositionTemp = shufflePosition; for(i=0;i<cardSet.length-shufflePosition;i++){ cardSet[i] = cardSet[shufflePositionTemp]; shufflePositionTemp++; } } public static void riffleShuffle(){ int[] cardSetCopy = (Integer[])cardSet.clone(); for(int i=1;i<n;i++){ cardSet[i*2] = cardSet[i]; } int x = 0; for(int j=1;j<2*n;j+=2){ cardSet[j] = cardSetCopy[n+x]; x++; } } }
Main.java:9: error: incompatible types: Integer[] cannot be converted to int[] cardSet = new Integer[2*n]; ^ Main.java:28: error: incompatible types: Integer[] cannot be converted to int[] int temp[] = new Integer[shufflePosition]; ^ Main.java:33: error: cannot find symbol for(i=0;i<cardSet.length-shufflePosition;i++){ ^ symbol: variable i location: class Main Main.java:33: error: cannot find symbol for(i=0;i<cardSet.length-shufflePosition;i++){ ^ symbol: variable i location: class Main Main.java:33: error: cannot find symbol for(i=0;i<cardSet.length-shufflePosition;i++){ ^ symbol: variable i location: class Main Main.java:34: error: cannot find symbol cardSet[i] = cardSet[shufflePositionTemp]; ^ symbol: variable i location: class Main Main.java:39: error: incompatible types: int[] cannot be converted to Integer[] int[] cardSetCopy = (Integer[])cardSet.clone(); ^ 7 errors
s858677056
p00436
C
#include<stdio.h> int main(){ int n,m,k,i,j,l=1; scanf("%d\n%d\n",&n,&m); int before[n*2],after[n*2]; for(i=0;i<n*2;i++){ before[i]=i+1; } for(i=0;i<m;i++){ scanf("%d\n",&k); if(k==0){ for(j=0;j<n*2;j++){ after[j]=before[j]; after[l]=before[n+j+1]; l+=2; } }else{ for(j=0;j<2*n-k;j++){ after[j]=before[k+j]; } for(j=0;j<k;j++){ after[2*n-k+j]=before[j]; } for(j=0;j<2*n;j++){ before[j]=after[j]; } } for(i=0;i<n*2;i++){ printf("%d\n",before[i]); } return 0; }
main.c: In function 'main': main.c:33:1: error: expected declaration or statement at end of input 33 | } | ^
s238808310
p00436
C
#include <stdio.h> #include <stdlib.h> void shuffle(int **p,int k,int arraynum){ int* first; first = (int *)calloc(k,sizeof(int)); if(first == NULL){ exit(EXIT_FAILURE); } int* second; second = (int *)calloc(arraynum-k,sizeof(int)); if(second == NULL){ exit(EXIT_FAILURE); } int i; for(i=0;i<k;i++){ first[i] = *p[i]; } for(;i<arraynum;i++){ second[i-k] = *p[i]; } for(i=0;i<2*arraynum;i++){ if(i<(arraynum-k)){ *p[i] = second[i]; } else{ *p[i] = first[i+k-arraynum]; } } } void refshf(int **p,int arraynum){ int* first; first = (int *)calloc(arraynum,sizeof(int)); int* second; second = (int *)calloc(arraynum,sizeof(int)); int i; for(i=0;i<arraynum;i++){ first[i] = *p[i]; second[i] = *p[i+arraynum]; } for(i=0;i<2*arraynum;i++){ switch(i%2){ case (0):*p[i] = first[i/2]; case (1):*p[i] = second[i/2]; } } } void center(int **p1,int **p2,int arraynum){ int i; for(i=0;i<sizeof(*p1);i++){ switch(*p1[i]){ case 0: refshf(&(*p2),arraynum);break; default: shuffle(&(*p2),*p1[i],arraynum);break; } } for(i=0;i<sizeof(p2);i++){ printf("%d\n",*p2[i]); } } int main(void) { int arraynum,times; int *shfjudge,*array; scanf_s("%d",&arraynum); array = (int *)calloc(2*arraynum,sizeof(int)); if(array == NULL){ return EXIT_FAILURE; } scanf_s("%d",&times); shfjudge = (int *)calloc(times,sizeof(int)); if(shfjudge == NULL){ return EXIT_FAILURE; } int i; for(i=0;i<arraynum;i++){ array[i] = i; } for(i=0;i<times;i++){ scanf_s("%d",&shfjudge[i]); } center(&shfjudge,&array,arraynum); return 0; }
main.c: In function 'main': main.c:69:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 69 | scanf_s("%d",&arraynum); | ^~~~~~~ | scanf