submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s303759547
p00048
C
main(){ int t[99]; int r[99]; int sum=0; int i=0; double n=0; while(scanf("%d,%d",&t[i],&r[i])!=EOF){ sum=sum+t[i]*r[i]; n=n+r[i++]; } printf("%d\n%.0f\n",sum,round(n/i)); exit(0); }
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(){ | ^~~~ main.c: In function 'main': main.c:8:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 8 | while(scanf("%d,%d",&t[i],&r[i])!=EOF){ | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | main(){ main.c:8:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 8 | while(scanf("%d,%d",&t[i],&r[i])!=EOF){ | ^~~~~ main.c:8:9: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:8:37: error: 'EOF' undeclared (first use in this function) 8 | while(scanf("%d,%d",&t[i],&r[i])!=EOF){ | ^~~ main.c:8:37: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>' main.c:8:37: note: each undeclared identifier is reported only once for each function it appears in main.c:12:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 12 | printf("%d\n%.0f\n",sum,round(n/i)); | ^~~~~~ main.c:12:3: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:12:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:12:3: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:12:27: error: implicit declaration of function 'round' [-Wimplicit-function-declaration] 12 | printf("%d\n%.0f\n",sum,round(n/i)); | ^~~~~ main.c:1:1: note: include '<math.h>' or provide a declaration of 'round' +++ |+#include <math.h> 1 | main(){ main.c:12:27: warning: incompatible implicit declaration of built-in function 'round' [-Wbuiltin-declaration-mismatch] 12 | printf("%d\n%.0f\n",sum,round(n/i)); | ^~~~~ main.c:12:27: note: include '<math.h>' or provide a declaration of 'round' main.c:13:3: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration] 13 | exit(0); | ^~~~ main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit' +++ |+#include <stdlib.h> 1 | main(){ main.c:13:3: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch] 13 | exit(0); | ^~~~ main.c:13:3: note: include '<stdlib.h>' or provide a declaration of 'exit'
s884714824
p00048
C
main(){ int t[99]; int r[99]; int sum=0; int i=0; double n=0; while(scanf("%d,%d",&t[i],&r[i])!=EOF){ sum=sum+t[i]*r[i]; n=n+r[i++]; } printf("%d\n%.0f\n",sum,round(n/i)); return 0; }
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(){ | ^~~~ main.c: In function 'main': main.c:8:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 8 | while(scanf("%d,%d",&t[i],&r[i])!=EOF){ | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | main(){ main.c:8:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 8 | while(scanf("%d,%d",&t[i],&r[i])!=EOF){ | ^~~~~ main.c:8:9: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:8:37: error: 'EOF' undeclared (first use in this function) 8 | while(scanf("%d,%d",&t[i],&r[i])!=EOF){ | ^~~ main.c:8:37: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>' main.c:8:37: note: each undeclared identifier is reported only once for each function it appears in main.c:12:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 12 | printf("%d\n%.0f\n",sum,round(n/i)); | ^~~~~~ main.c:12:3: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:12:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:12:3: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:12:27: error: implicit declaration of function 'round' [-Wimplicit-function-declaration] 12 | printf("%d\n%.0f\n",sum,round(n/i)); | ^~~~~ main.c:1:1: note: include '<math.h>' or provide a declaration of 'round' +++ |+#include <math.h> 1 | main(){ main.c:12:27: warning: incompatible implicit declaration of built-in function 'round' [-Wbuiltin-declaration-mismatch] 12 | printf("%d\n%.0f\n",sum,round(n/i)); | ^~~~~ main.c:12:27: note: include '<math.h>' or provide a declaration of 'round'
s625634807
p00048
C
#include<math.h> main(){ int t[99]; int r[99]; int sum=0; int i=0; double n=0; while(scanf("%d,%d",&t[i],&r[i])!=EOF){ sum=sum+t[i]*r[i]; n=n+r[i++]; } printf("%d\n%.0f\n",sum,round(n/i)); return 0; }
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:9:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 9 | while(scanf("%d,%d",&t[i],&r[i])!=EOF){ | ^~~~~ main.c:2:1: note: include '<stdio.h>' or provide a declaration of 'scanf' 1 | #include<math.h> +++ |+#include <stdio.h> 2 | main(){ main.c:9:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 9 | while(scanf("%d,%d",&t[i],&r[i])!=EOF){ | ^~~~~ main.c:9:9: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:9:37: error: 'EOF' undeclared (first use in this function) 9 | while(scanf("%d,%d",&t[i],&r[i])!=EOF){ | ^~~ main.c:9:37: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>' main.c:9:37: note: each undeclared identifier is reported only once for each function it appears in main.c:13:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 13 | printf("%d\n%.0f\n",sum,round(n/i)); | ^~~~~~ main.c:13:3: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:13:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:13:3: note: include '<stdio.h>' or provide a declaration of 'printf'
s922998819
p00048
C
#include<math.h> int main(){ int t[99]; int r[99]; int sum=0; int i=0; double n=0; while(scanf("%d,%d",&t[i],&r[i])!=EOF){ sum=sum+t[i]*r[i]; n=n+r[i++]; } printf("%d\n%.0f\n",sum,round(n/i)); return 0; }
main.c: In function 'main': main.c:9:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 9 | while(scanf("%d,%d",&t[i],&r[i])!=EOF){ | ^~~~~ main.c:2:1: note: include '<stdio.h>' or provide a declaration of 'scanf' 1 | #include<math.h> +++ |+#include <stdio.h> 2 | int main(){ main.c:9:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 9 | while(scanf("%d,%d",&t[i],&r[i])!=EOF){ | ^~~~~ main.c:9:9: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:9:37: error: 'EOF' undeclared (first use in this function) 9 | while(scanf("%d,%d",&t[i],&r[i])!=EOF){ | ^~~ main.c:9:37: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>' main.c:9:37: note: each undeclared identifier is reported only once for each function it appears in main.c:13:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 13 | printf("%d\n%.0f\n",sum,round(n/i)); | ^~~~~~ main.c:13:3: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:13:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:13:3: note: include '<stdio.h>' or provide a declaration of 'printf'
s447976207
p00048
C
#include <stdio.h> int main(){ double n; while(scanf("%d",&n)!=EOF){ if(n<=48){ printf("light fly\n"); }else if(n<=51){ printf("fly\n"); }else if(n<=54){ printf("bantam\n"); }else if(n<=57){ printf("feather\n"); }else if(n<=60){ printf("light\n"); }else if(n<=64){ printf("light welter\n"); }else if(n<=69){ printf("welter\n"); }else if(n<=75){ printf("light middle\n"); }else if(n<=81){ printf("middle\n"); }else if(n<=91){ printf("light heavy\n") }else{ printf("heavy\n"); }} return 0; }
main.c: In function 'main': main.c:24:24: error: expected ';' before '}' token 24 | printf("light heavy\n") | ^ | ; 25 | }else{ | ~
s546159183
p00048
C
#include<stdio.h> char cls[11][14]= {{"light fly"}, {"fly"}, {"bantam"}, {"feather"}, {"light"}, {"light welter"}, {"welter"}, {"light middle"}, {"middle"}, {"light heavy"}, {"heavy"}}; int dif[10]={30,30,30,30,40,50,60,60,100,1}; int main() { int t,x,i; double w; while(scanf("%lf",&w)!=EOF) { t=480,x=w*10; for(i=0;i<10&&x>t;i++) { t+=dif[i]; } printf("%s\n",cls[i]); }      return 0; }
main.c: In function 'main': main.c:31:1: error: stray '\343' in program 31 | <U+3000><U+3000><U+3000><U+3000> return 0; | ^~~~~~~~ main.c:31:3: error: stray '\343' in program 31 | <U+3000><U+3000><U+3000><U+3000> return 0; | ^~~~~~~~ main.c:31:5: error: stray '\343' in program 31 | <U+3000><U+3000><U+3000><U+3000> return 0; | ^~~~~~~~ main.c:31:7: error: stray '\343' in program 31 | <U+3000><U+3000><U+3000><U+3000> return 0; | ^~~~~~~~
s070134274
p00048
C
#include<stdio.h> int main(){ float kg; while(scanf("%f", &kg) != EOF){ if(kg <= 48.00){ printf("light fly\n"); }else if(kg <= 51.00){ printf("fly\n"); }else if(kg <= 54.00){ printf("bantam\n"); }else if(kg <= 57.00){ printf("feather\n"); }else if(kg <= 60.00){ printf("light\n"); }else if(kg <= 64.00){ printf("light welter\n"); }else if(kg <= 69.00){ printf("welter\n"); }else if(kg <= 75.00){ printf("light middle\n"); }else if(kg <= 81.00){ printf("middle\n"); }else(kg <= 91.00){ printf("light heavy\n"); }else{ printf("heavy\n"); } } return 0; }
main.c: In function 'main': main.c:24:35: error: expected ';' before '{' token 24 | }else(kg <= 91.00){ | ^ | ;
s157436501
p00048
C
#include<stdio.h> int main(){ double kg; while(scanf("%f", &kg) != EOF){ if(kg <= 48.00){ printf("light fly\n"); }else if(kg <= 51.00){ printf("fly\n"); }else if(kg <= 54.00){ printf("bantam\n"); }else if(kg <= 57.00){ printf("feather\n"); }else if(kg <= 60.00){ printf("light\n"); }else if(kg <= 64.00){ printf("light welter\n"); }else if(kg <= 69.00){ printf("welter\n"); }else if(kg <= 75.00){ printf("light middle\n"); }else if(kg <= 81.00){ printf("middle\n"); }else(kg <= 91.00){ printf("light heavy\n"); }else{ printf("heavy\n"); } } return 0; }
main.c: In function 'main': main.c:24:35: error: expected ';' before '{' token 24 | }else(kg <= 91.00){ | ^ | ;
s537721840
p00048
C
#include<stdio.h> int main(){ double kg; while(scanf("%f", &kg) != EOF){ if(kg <= 48.00){ printf("light fly\n"); } if(48.00 < kg <= 51.00){ printf("fly\n"); } if(51 < kg <= 54.00){ printf("bantam\n"); if(54 < kg <= 57.00){ printf("feather\n"); } if(57 < kg <= 60.00){ printf("light\n"); } if(60 < kg <= 64.00){ printf("light welter\n"); } if(64 < kg <= 69.00){ printf("welter\n"); } if(69 < kg <= 75.00){ printf("light middle\n"); } if(75 <kg <= 81.00){ printf("middle\n"); } if(81 < kg <= 91.00){ printf("light heavy\n"); } if(91 < kg){ printf("heavy\n"); } } return 0; }
main.c: In function 'main': main.c:41:1: error: expected declaration or statement at end of input 41 | } | ^
s530514051
p00048
C
#include <stdio.h> void judge(double); int main(void){ double weight; while( scanf("%lf" ,&weight) != EOF ) judge(wight); return 0; } void judge(double weight){ if( wight <= 48 ) printf("light fly\n"); else if( 48 < weight && weight <= 51 ) printf("fly\n"); else if( 51 < weight && weight <= 54 ) printf("bantam\n"); else if( 54 < weight && weight <= 57 ) printf("feather\n"); else if( 57 < weight && weight <= 60 ) printf("light\n"); else if( 60 < weight && weight <= 64 ) printf("light welter\n"); else if( 64 < weight && weight <= 69 ) printf("welter\n"); else if( 69 < weight && weight <= 75 ) printf("light middle\n"); else if( 75 < weight && weight <= 81 ) printf("middle\n"); else if( 81 < weight && weight <= 91 ) printf("light heavy\n"); else printf("heavy\n"); }
main.c: In function 'main': main.c:8:47: error: 'wight' undeclared (first use in this function); did you mean 'weight'? 8 | while( scanf("%lf" ,&weight) != EOF ) judge(wight); | ^~~~~ | weight main.c:8:47: note: each undeclared identifier is reported only once for each function it appears in main.c: In function 'judge': main.c:15:7: error: 'wight' undeclared (first use in this function); did you mean 'weight'? 15 | if( wight <= 48 ) printf("light fly\n"); | ^~~~~ | weight
s851032524
p00048
C
#include<stdio.h> int main(void) { float tai; scanf("%d",&tai); else if(tai<=48.00){ printf("light fly"); } else if(48.00<=tai && tai<=51.00){ printf("fly"); } else if(51.00<=tai && tai<=54.00){ printf("bantam"); } else if(54.00<=tai && tai<=57.00){ printf("feather"); } else if(57.00<=tai && tai<=60.00){ printf("light"); } else if(60.00<=tai && tai<=64.00){ printf("light welter"); } else if(64.00<=tai && tai<=69.00){ printf("wllter"); } else if(69.00<=tai && tai<=75.00){ printf("light middle"); } else if(75.00<=tai && tai<=81.00){ printf("middle"); } else if(81.00<=tai && tai<=91.00){ printf("light heavy"); } else{ printf("heavy"); } return 0; }
main.c: In function 'main': main.c:7:9: error: 'else' without a previous 'if' 7 | else if(tai<=48.00){ | ^~~~
s930340836
p00048
C++
import java.util.Scanner; public class AOJ0048 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(sc.hasNext()){ double x = sc.nextDouble(); System.out.println(x<=48.00?"light fly":x<=51.00?"fly":x<=54.00?"bantam":x<=57.00?"feather": x<=60.00?"light":x<=64.00?"light welter":x<=69.00?"welter": x<=75.00?"light middle":x<=81.00?"middle":x<=91.00?"light heavy":x>=91.00?"heavy"); } } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class AOJ0048 { | ^~~~~~
s638420861
p00048
C++
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(sc.hasNext()){ double x = sc.nextDouble(); System.out.println(x<=48.00?"light fly":x<=51.00?"fly":x<=54.00?"bantam":x<=57.00?"feather": x<=60.00?"light":x<=64.00?"light welter":x<=69.00?"welter": x<=75.00?"light middle":x<=81.00?"middle":x<=91.00?"light heavy":x>=91.00?"heavy"); } } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s454508846
p00048
C++
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(sc.hasNext()){ double x = sc.nextDouble(); System.out.println(x<=48.00?"light fly":x<=51.00?"fly":x<=54.00?"bantam":x<=57.00?"feather": x<=60.00?"light":x<=64.00?"light welter":x<=69.00?"welter": x<=75.00?"light middle":x<=81.00?"middle":x<=91.00?"light heavy":"heavy"); } } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s357244129
p00048
C++
#include<stdio.h> #include<iostream> int ft(double N) {int f; if(N<=48.00)f=11; else if(N<=51.00)f=1; else if(N<=54.00)f=2; else if(N<=57.00)f=3; else if(N<=60.00)f=4; else if(N<=64.00)f=5; else if(N<=69.00)f=6; else if(N<=75.00)f=7; else if(N<=81.00)f=8; else if(N<=91.00)f=9; return f; } int main() { int f=0; int x; double N; while(scanf("%lf",&N)!=EOF) { f=ft(N); switch(f){ case 11: cout<<light fly<<endl;break; case 1: cout<<bantam<<endl;break; case 2: cout<<feather<<endl;break; case 3: cout<<light<<endl;break; case 4: cout<<light welter<<endl;break; case 5: cout<<welter<<endl;break; case 6: cout<<light middle<<endl;break; case 7: cout<<middle<<endl;break; case 8: cout<<light heavy<<endl;break; case 9: cout<<heavy<<endl;break; } } return 0; }
a.cc: In function 'int main()': a.cc:30:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 30 | cout<<light fly<<endl;break; | ^~~~ | std::cout In file included from a.cc:2: /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:30:7: error: 'light' was not declared in this scope 30 | cout<<light fly<<endl;break; | ^~~~~ a.cc:33:7: error: 'bantam' was not declared in this scope 33 | cout<<bantam<<endl;break; | ^~~~~~ a.cc:33:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 33 | cout<<bantam<<endl;break; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:36:7: error: 'feather' was not declared in this scope 36 | cout<<feather<<endl;break; | ^~~~~~~ a.cc:45:7: error: 'welter' was not declared in this scope 45 | cout<<welter<<endl;break; | ^~~~~~ a.cc:51:7: error: 'middle' was not declared in this scope 51 | cout<<middle<<endl;break; | ^~~~~~ a.cc:57:7: error: 'heavy' was not declared in this scope 57 | cout<<heavy<<endl;break; | ^~~~~
s556177907
p00048
C++
while gets puts case $_.to_f when 0...48 "light fly" when 48...51 "fly" when 51...54 "bantam" when 54...57 "feather" when 57...60 "light" when 60...64 "light welter" when 64...69 "welter" when 69...75 "light middle" when 75...81 "middle" when 81...91 "light heavy" else "heavy" end end
a.cc:3:8: error: too many decimal points in number 3 | when 0...48 | ^~~~~~ a.cc:5:8: error: too many decimal points in number 5 | when 48...51 | ^~~~~~~ a.cc:7:8: error: too many decimal points in number 7 | when 51...54 | ^~~~~~~ a.cc:9:8: error: too many decimal points in number 9 | when 54...57 | ^~~~~~~ a.cc:11:8: error: too many decimal points in number 11 | when 57...60 | ^~~~~~~ a.cc:13:8: error: too many decimal points in number 13 | when 60...64 | ^~~~~~~ a.cc:15:8: error: too many decimal points in number 15 | when 64...69 | ^~~~~~~ a.cc:17:8: error: too many decimal points in number 17 | when 69...75 | ^~~~~~~ a.cc:19:8: error: too many decimal points in number 19 | when 75...81 | ^~~~~~~ a.cc:21:8: error: too many decimal points in number 21 | when 81...91 | ^~~~~~~ a.cc:1:1: error: expected unqualified-id before 'while' 1 | while gets | ^~~~~
s145671530
p00048
C++
while gets puts case $_.to_f.ceil when 0..48 "light fly" when 48..51 "fly" when 51..54 "bantam" when 54..57 "feather" when 57..60 "light" when 60..64 "light welter" when 64..69 "welter" when 69..75 "light middle" when 75..81 "middle" when 81..91 "light heavy" else "heavy" end end
a.cc:3:8: error: too many decimal points in number 3 | when 0..48 | ^~~~~ a.cc:5:8: error: too many decimal points in number 5 | when 48..51 | ^~~~~~ a.cc:7:8: error: too many decimal points in number 7 | when 51..54 | ^~~~~~ a.cc:9:8: error: too many decimal points in number 9 | when 54..57 | ^~~~~~ a.cc:11:8: error: too many decimal points in number 11 | when 57..60 | ^~~~~~ a.cc:13:8: error: too many decimal points in number 13 | when 60..64 | ^~~~~~ a.cc:15:8: error: too many decimal points in number 15 | when 64..69 | ^~~~~~ a.cc:17:8: error: too many decimal points in number 17 | when 69..75 | ^~~~~~ a.cc:19:8: error: too many decimal points in number 19 | when 75..81 | ^~~~~~ a.cc:21:8: error: too many decimal points in number 21 | when 81..91 | ^~~~~~ a.cc:1:1: error: expected unqualified-id before 'while' 1 | while gets | ^~~~~
s960330003
p00048
C++
#include <cstdio> int main() { float n; int m; const char *rank[] = {"light fly", "fly", "bantam", "feather", "light", "light welter","welter", "light middle", "middle", "light heavy", "heavy"}; while(~scanf("%f\n", &n)){ if(n <= 48.0) m = 0; else if(n <= 51.0) m = 1; else if(n <= 54.0) m = 2; else if(n <= 57.0) m = 3; else if(n <= 60.0) m = 4; else if(n <= 64.0) m = 5; else if(n <= 69.0) m = 6; else if(n <= 75.0) m = 7; else if(n <= 81.0) m = 8; else if(n <= 91.0) m = 9; else m = 10; puts(rank[m]); } return 0;
a.cc: In function 'int main()': a.cc:24:18: error: expected '}' at end of input 24 | return 0; | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s526430478
p00048
C++
#include <cstdio> int main() { float n; int m; const char *rank[] = {"light fly", "fly", "bantam", "feather", "light", "light welter", "welter", "light middle", "middle", "light heavy", "heavy"}; while(~scanf("%f\n", &n)){ if(n <= 48.0) m = 0; else if(n <= 51.0) m = 1; else if(n <= 54.0) m = 2; else if(n <= 57.0) m = 3; else if(n <= 60.0) m = 4; else if(n <= 64.0) m = 5; else if(n <= 69.0) m = 6; else if(n <= 75.0) m = 7; else if(n <= 81.0) m = 8; else if(n <= 91.0) m = 9; else m = 10; puts(rank[m]); } return 0;
a.cc: In function 'int main()': a.cc:24:18: error: expected '}' at end of input 24 | return 0; | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s273847382
p00048
C++
#include <cstdio> int main() { float n; int m; const char *rank[] = {"light fly", "fly", "bantam", "feather", "light", "light welter", "welter", "light middle", "middle", "light heavy", "heavy"}; while(~scanf("%f\n", &n)){ if(n <= 48.0) m = 0; else if(n <= 51.0) m = 1; else if(n <= 54.0) m = 2; else if(n <= 57.0) m = 3; else if(n <= 60.0) m = 4; else if(n <= 64.0) m = 5; else if(n <= 69.0) m = 6; else if(n <= 75.0) m = 7; else if(n <= 81.0) m = 8; else if(n <= 91.0) m = 9; else m = 10; puts(rank[m]); } return 0;
a.cc: In function 'int main()': a.cc:23:18: error: expected '}' at end of input 23 | return 0; | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s141159874
p00048
C++
404 Not Found #include <cstdio> int main() { float n; int m; const char *rank[] = {"light fly", "fly", "bantam", "feather", "light", "light welter", "welter", "light middle", "middle", "light heavy", "heavy"}; while(~scanf("%f\n", &n)){ if(n <= 48.0) m = 0; else if(n <= 51.0) m = 1; else if(n <= 54.0) m = 2; else if(n <= 57.0) m = 3; else if(n <= 60.0) m = 4; else if(n <= 64.0) m = 5; else if(n <= 69.0) m = 6; else if(n <= 75.0) m = 7; else if(n <= 81.0) m = 8; else if(n <= 91.0) m = 9; else m = 10; puts(rank[m]); } return 0; }
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 404 Not Found | ^~~
s892300364
p00048
C++
404 Not Found #include <cstdio> int main() { float n; int m; const char *rank[] = {"light fly", "fly", "bantam", "feather", "light", "light welter", "welter", "light middle", "middle", "light heavy", "heavy"}; while(~scanf("%f\n", &n)){ if(n <= 48.0) m = 0; else if(n <= 51.0) m = 1; else if(n <= 54.0) m = 2; else if(n <= 57.0) m = 3; else if(n <= 60.0) m = 4; else if(n <= 64.0) m = 5; else if(n <= 69.0) m = 6; else if(n <= 75.0) m = 7; else if(n <= 81.0) m = 8; else if(n <= 91.0) m = 9; else m = 10; puts(rank[m]); } return 0; }
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 404 Not Found | ^~~
s993727989
p00048
C++
#include <bits/stdc++.h> main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}}
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}} | ^~~~ a.cc: In function 'int main()': a.cc:2:19: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}} | ^~~~~~~~~~~ a.cc:2:31: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}} | ^~~~~ a.cc:2:37: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}} | ^~~~~~~~ a.cc:2:46: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}} | ^~~~~~~~~ a.cc:2:56: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}} | ^~~~~~~ a.cc:2:64: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}} | ^~~~~~~~~~~~~~ a.cc:2:79: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}} | ^~~~~~~~ a.cc:2:88: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}} | ^~~~~~~~~~~~~~ a.cc:2:103: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}} | ^~~~~~~~ a.cc:2:112: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}} | ^~~~~~~~~~~~~ a.cc:2:126: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}} | ^~~~~~~ a.cc:2:215: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 2 | main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}} | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~
s064217548
p00048
C++
#include <bits/stdc++.h> main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}}
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}} | ^~~~ a.cc: In function 'int main()': a.cc:2:19: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}} | ^~~~~~~~~~~ a.cc:2:31: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}} | ^~~~~ a.cc:2:37: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}} | ^~~~~~~~ a.cc:2:46: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}} | ^~~~~~~~~ a.cc:2:56: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}} | ^~~~~~~ a.cc:2:64: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}} | ^~~~~~~~~~~~~~ a.cc:2:79: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}} | ^~~~~~~~ a.cc:2:88: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}} | ^~~~~~~~~~~~~~ a.cc:2:103: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}} | ^~~~~~~~ a.cc:2:112: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}} | ^~~~~~~~~~~~~ a.cc:2:126: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}} | ^~~~~~~ a.cc:2:215: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 2 | main(){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};float a;while(cin>>a)for(int i=0;;i++)if(a<=f[i]){printf("%s\n",s[i]);break;}} | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~
s009467202
p00048
C++
main(float v){for(;~scanf("%f",&v);)puts(v>91?"heavy":v>81?"light heavy":v>75?"middle":v>69?"light middle":v>64?"welter":v>60?"light welter":v>57?"light":v>54?"feather":v>51?"bantam":v>48?"fly":"light fly");}
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | main(float v){for(;~scanf("%f",&v);)puts(v>91?"heavy":v>81?"light heavy":v>75?"middle":v>69?"light middle":v>64?"welter":v>60?"light welter":v>57?"light":v>54?"feather":v>51?"bantam":v>48?"fly":"light fly");} | ^~~~ a.cc:1:1: warning: first argument of 'int main(float)' should be 'int' [-Wmain] a.cc:1:1: warning: 'int main(float)' takes only zero or two arguments [-Wmain] a.cc: In function 'int main(float)': a.cc:1:21: error: 'scanf' was not declared in this scope 1 | main(float v){for(;~scanf("%f",&v);)puts(v>91?"heavy":v>81?"light heavy":v>75?"middle":v>69?"light middle":v>64?"welter":v>60?"light welter":v>57?"light":v>54?"feather":v>51?"bantam":v>48?"fly":"light fly");} | ^~~~~ a.cc:1:37: error: 'puts' was not declared in this scope 1 | main(float v){for(;~scanf("%f",&v);)puts(v>91?"heavy":v>81?"light heavy":v>75?"middle":v>69?"light middle":v>64?"welter":v>60?"light welter":v>57?"light":v>54?"feather":v>51?"bantam":v>48?"fly":"light fly");} | ^~~~
s652341344
p00048
C++
#include <bits/stdc++.h> main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}}
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}} | ^~~~ a.cc:2:1: warning: 'int main(int)' takes only zero or two arguments [-Wmain] a.cc: In function 'int main(int)': a.cc:2:24: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}} | ^~~~~~~~~~~ a.cc:2:36: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}} | ^~~~~ a.cc:2:42: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}} | ^~~~~~~~ a.cc:2:51: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}} | ^~~~~~~~~ a.cc:2:61: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}} | ^~~~~~~ a.cc:2:69: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}} | ^~~~~~~~~~~~~~ a.cc:2:84: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}} | ^~~~~~~~ a.cc:2:93: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}} | ^~~~~~~~~~~~~~ a.cc:2:108: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}} | ^~~~~~~~ a.cc:2:117: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}} | ^~~~~~~~~~~~~ a.cc:2:131: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}} | ^~~~~~~ a.cc:2:245: error: expected ';' before ')' token 2 | main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}} | ^ | ;
s590318319
p00048
C++
#include <bits/stdc++.h> main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}}
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}} | ^~~~ a.cc:2:1: warning: 'int main(int)' takes only zero or two arguments [-Wmain] a.cc: In function 'int main(int)': a.cc:2:24: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}} | ^~~~~~~~~~~ a.cc:2:36: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}} | ^~~~~ a.cc:2:42: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}} | ^~~~~~~~ a.cc:2:51: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}} | ^~~~~~~~~ a.cc:2:61: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}} | ^~~~~~~ a.cc:2:69: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}} | ^~~~~~~~~~~~~~ a.cc:2:84: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}} | ^~~~~~~~ a.cc:2:93: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}} | ^~~~~~~~~~~~~~ a.cc:2:108: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}} | ^~~~~~~~ a.cc:2:117: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}} | ^~~~~~~~~~~~~ a.cc:2:131: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 2 | main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}} | ^~~~~~~ a.cc:2:245: error: expected ';' before ')' token 2 | main(int i){char* s[]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"};float f[]={0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1e9};while(std::cin>>*f){for(i=1;*f>f[i++]){}printf("%s\n",s[i-1]);}} | ^ | ;
s717742689
p00048
C++
nclude <iostream> using namespace std; int main() { double w; while (cin >> w){ if (w <= 48.0) cout << "light fly"; else if (w <= 51.0) cout << "fly"; else if (w <= 54.0) cout << "bantam"; else if (w <= 57.0) cout << "feather"; else if (w <= 60.0) cout << "light"; else if (w <= 64.0) cout << "light welter"; else if (w <= 69.0) cout << "welter"; else if (w <= 75.0) cout << "light middle"; else if (w <= 81.0) cout << "middle"; else if (w <= 91.0) cout << "light heavy"; else cout << "heavy"; cout << endl; } return (0); }
a.cc:1:1: error: 'nclude' does not name a type 1 | nclude <iostream> | ^~~~~~ a.cc: In function 'int main()': a.cc:8:12: error: 'cin' was not declared in this scope 8 | while (cin >> w){ | ^~~ a.cc:9:23: error: 'cout' was not declared in this scope 9 | if (w <= 48.0) cout << "light fly"; | ^~~~ a.cc:11:27: error: 'cout' was not declared in this scope 11 | else if (w <= 51.0) cout << "fly"; | ^~~~ a.cc:13:27: error: 'cout' was not declared in this scope 13 | else if (w <= 54.0) cout << "bantam"; | ^~~~ a.cc:15:27: error: 'cout' was not declared in this scope 15 | else if (w <= 57.0) cout << "feather"; | ^~~~ a.cc:17:27: error: 'cout' was not declared in this scope 17 | else if (w <= 60.0) cout << "light"; | ^~~~ a.cc:19:27: error: 'cout' was not declared in this scope 19 | else if (w <= 64.0) cout << "light welter"; | ^~~~ a.cc:21:27: error: 'cout' was not declared in this scope 21 | else if (w <= 69.0) cout << "welter"; | ^~~~ a.cc:23:27: error: 'cout' was not declared in this scope 23 | else if (w <= 75.0) cout << "light middle"; | ^~~~ a.cc:25:27: error: 'cout' was not declared in this scope 25 | else if (w <= 81.0) cout << "middle"; | ^~~~ a.cc:27:27: error: 'cout' was not declared in this scope 27 | else if (w <= 91.0) cout << "light heavy"; | ^~~~ a.cc:29:13: error: 'cout' was not declared in this scope 29 | else cout << "heavy"; | ^~~~ a.cc:30:7: error: 'cout' was not declared in this scope 30 | cout << endl; | ^~~~ a.cc:30:15: error: 'endl' was not declared in this scope 30 | cout << endl; | ^~~~
s237698899
p00048
C++
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(sc.hasNext()){ double x = sc.nextDouble(); System.out.println(x<=48?"light fly": x<=51?"fly": x<=54?"bantam": x<=57?"feather": x<=60?"light": x<=64?"light welter": x<=69?"welter": x<=75?"light middle": x<=81?"middle": x<=91?"light heavy":"heavy"); } } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: expected unqualified-id before 'public' 4 | public class Main { | ^~~~~~
s606324844
p00048
C++
#define _USE_MATH_DEFINES #include<iostream> #include<iomanip> #include<algorithm> #include<cctype> #include<cmath> #include<cstdio> #include<deque> #include<list> #include<set> #include<stack> #include<string> #include<sstream> #include<map> #include<queue> #include<vector> using namespace std; int main() { string s[11] = { "light fly", "fly", "bantam", "feather", "light", "light welter", "welter", "light middle", "middle", "light heavy", "heavy", }; int a[12] = { 0,48,51,54,57,60,64,69,75,81,91,INT_MAX }; for (double b; cin >> b;) for (int i = 0; i < 11; i++) if (a[i] <= b&&b < a[i + 1]) { cout << s[i] << endl; break; } return 0; }
a.cc: In function 'int main()': a.cc:33:55: error: 'INT_MAX' was not declared in this scope 33 | int a[12] = { 0,48,51,54,57,60,64,69,75,81,91,INT_MAX }; | ^~~~~~~ a.cc:16:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 15 | #include<queue> +++ |+#include <climits> 16 | #include<vector>
s485815603
p00048
C++
#define _USE_MATH_DEFINES #include<iostream> #include<iomanip> #include<algorithm> #include<cctype> #include<cmath> #include<cstdio> #include<deque> #include<list> #include<set> #include<stack> #include<string> #include<sstream> #include<map> #include<queue> #include<vector> using namespace std; int main() { string s[11] = { "light fly", "fly", "bantam", "feather", "light", "light welter", "welter", "light middle", "middle", "light heavy", "heavy", }; int a[12] = { 0,48,51,54,57,60,64,69,75,81,91,INT_MAX }; for (double b; cin >> b;) for (int i = 0; i < 11; i++) if (a[i] <= b&&b < a[i + 1]) { cout << s[i] << endl; break; } return 0; }
a.cc: In function 'int main()': a.cc:33:55: error: 'INT_MAX' was not declared in this scope 33 | int a[12] = { 0,48,51,54,57,60,64,69,75,81,91,INT_MAX }; | ^~~~~~~ a.cc:16:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 15 | #include<queue> +++ |+#include <climits> 16 | #include<vector>
s538727145
p00048
C++
#define _USE_MATH_DEFINES #include<iostream> #include<iomanip> #include<algorithm> #include<cctype> #include<cmath> #include<cstdio> #include<deque> #include<limits> #include<list> #include<set> #include<stack> #include<string> #include<sstream> #include<map> #include<queue> #include<vector> using namespace std; int main() { string s[11] = { "light fly", "fly", "bantam", "feather", "light", "light welter", "welter", "light middle", "middle", "light heavy", "heavy", }; int a[12] = { 0,48,51,54,57,60,64,69,75,81,91,INT_MAX }; for (double b; cin >> b;) for (int i = 0; i < 11; i++) if (a[i] <= b&&b < a[i + 1]) { cout << s[i] << endl; break; } return 0; }
a.cc: In function 'int main()': a.cc:34:55: error: 'INT_MAX' was not declared in this scope 34 | int a[12] = { 0,48,51,54,57,60,64,69,75,81,91,INT_MAX }; | ^~~~~~~ a.cc:17:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 16 | #include<queue> +++ |+#include <climits> 17 | #include<vector>
s652932783
p00048
C++
#include <iostream> using namespace std; int main() { double kg; while (cin >> kg){ if (kg <= 48.0) cout << "light fly" << endl; else if (kg <= 51.0) cout << "fly" << endl; else if (kg <= 54.0) cout << "bantam" << endl; else if (kg <= 57.0) cout << "feather" << endl; else if (kg <= 60.0) cout << "light" << endl; else if (kg <= 64.0) cout << "light welter" << endl; else if (kg <= 69.0) cout << "welter" << endl; else if (kg <= 75.0) cout << "light middle" << endl; else if (kg <= 81.0) cout << "middle" << endl; else if (kg <= 91.0) cout << "light heavy" << endl; else cout << "heavy" << endl; return (0); }
a.cc: In function 'int main()': a.cc:22:2: error: expected '}' at end of input 22 | } | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s171419610
p00048
C++
#include<iostream> using namespace std; int main(){ double w; while(cin >> w){ if(w <= 48.00) cout << "light fly" << endl; else if(w <= 51.00) cout << "fly" << endl; else if(w <= 54.00) cout << "bantam" <, endl; else if(w <= 57.00) cout << "feather" << endl; else if(w <= 60.00) cout << "light" << endl; else if(w <= 64.00) cout << "light welter" <, endl; else if(w <= 69.00) cout << "welter" << endl; else if(w <= 75.00) cout << "light middle" << endl; else if(w <= 81.00) cout << "middle" << endl; else if(w <= 91.00) cout << "light heavy" <, endl; else cout << "heavy" << endl; } }
a.cc: In function 'int main()': a.cc:11:43: error: expected primary-expression before ',' token 11 | cout << "bantam" <, endl; | ^ a.cc:17:49: error: expected primary-expression before ',' token 17 | cout << "light welter" <, endl; | ^ a.cc:25:48: error: expected primary-expression before ',' token 25 | cout << "light heavy" <, endl; | ^
s999786784
p00048
C++
#include<iostream> #include<string> using namespace std; int main() { double w[50]; string k[50]; int i = 0; while (cin >> w[i]) { i++; } for (int j = 0; j < i; j++) { if (w[j] <= 48.00) { k[j] = "light fly"; } else if ((w[j] > 48.00) && (w[j] <= 51.00)) { k[j] = "fly"; } else if ((w[j] > 51.00) && (w[j] <= 54.00)) { k[j] = "bantam"; } else if ((w[j] > 54.00) && (w[j] <= 57.00)) { k[j] = "feather"; } else if ((w[j] > 57.00) && (w[j] <= 60.00)) { k[j] = "light"; } else if ((w[j] > 60.00) && (w[j] <= 64.00)) { k[j] = "light welter"; } else if ((w[j] > 64.00) && (w[j] <= 69.00)) { k[j] = "welter"; } else if ((w[j] > 69.00) && (w[j] <= 75.00)) { k[j] = "light middle"; } else if ((w[j] > 75.00) && (w[j] <= 81.00)) { k[j] = "middle"; } else if ((w[j] > 81.00) && (w[j] <= 91.00)) { k[j] = "light heavy"; } else { k[j] = "heavy"; } cout << k[j] << endl; } return 0;
a.cc: In function 'int main()': a.cc:52:18: error: expected '}' at end of input 52 | return 0; | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s689443535
p00048
C++
#include<iostream> #include<stdio.h> #include<string> #include<math.h> #include<iomanip> #include<algorithm> #include<string.h> #include<cctype> #include<map> #include<set> #include<vector> #include<sstream> #include<stack> #include<queue> using namespace std; int main() { double n; while(cin>>n) { switch(n) { case n>=91: cout<<"heavy"<<endl; continue; case n>=81&&n<91: cout<<"light heavy"<<endl; continue; case n>=75&&n<81: cout<<"middle"<<endl; continue; case n>=69&&n<75: cout<<"light middle"<<endl; continue; case n>=64&&n<69: cout<<"welter"<<endl; continue; case n>=60&&n<64: cout<<"light welter"<<endl; continue; case n>=57&&n<60: cout<<"light"<<endl; continue; case n>=54&&n<57: cout<<"feather"<<endl; continue; case n>=51&&n<54: cout<<"bantam"<<endl; continue; case n>=48&&n<51: cout<<"fly"<<endl; continue; default: cout<<"light fly"<<endl; continue; } } //while(1); return 0; }
a.cc: In function 'int main()': a.cc:23:13: error: switch quantity not an integer 23 | switch(n) | ^ a.cc:25:13: error: the value of 'n' is not usable in a constant expression 25 | case n>=91: | ^ a.cc:20:11: note: 'n' was not declared 'constexpr' 20 | double n; | ^ a.cc:28:13: error: the value of 'n' is not usable in a constant expression 28 | case n>=81&&n<91: | ^ a.cc:20:11: note: 'n' was not declared 'constexpr' 20 | double n; | ^ a.cc:31:13: error: the value of 'n' is not usable in a constant expression 31 | case n>=75&&n<81: | ^ a.cc:20:11: note: 'n' was not declared 'constexpr' 20 | double n; | ^ a.cc:34:13: error: the value of 'n' is not usable in a constant expression 34 | case n>=69&&n<75: | ^ a.cc:20:11: note: 'n' was not declared 'constexpr' 20 | double n; | ^ a.cc:37:13: error: the value of 'n' is not usable in a constant expression 37 | case n>=64&&n<69: | ^ a.cc:20:11: note: 'n' was not declared 'constexpr' 20 | double n; | ^ a.cc:40:13: error: the value of 'n' is not usable in a constant expression 40 | case n>=60&&n<64: | ^ a.cc:20:11: note: 'n' was not declared 'constexpr' 20 | double n; | ^ a.cc:43:13: error: the value of 'n' is not usable in a constant expression 43 | case n>=57&&n<60: | ^ a.cc:20:11: note: 'n' was not declared 'constexpr' 20 | double n; | ^ a.cc:46:13: error: the value of 'n' is not usable in a constant expression 46 | case n>=54&&n<57: | ^ a.cc:20:11: note: 'n' was not declared 'constexpr' 20 | double n; | ^ a.cc:49:13: error: the value of 'n' is not usable in a constant expression 49 | case n>=51&&n<54: | ^ a.cc:20:11: note: 'n' was not declared 'constexpr' 20 | double n; | ^ a.cc:52:13: error: the value of 'n' is not usable in a constant expression 52 | case n>=48&&n<51: | ^ a.cc:20:11: note: 'n' was not declared 'constexpr' 20 | double n; | ^
s640083680
p00048
C++
#include<iostream> using namespace std; int main(){ float w; while(cin>>w){ if(w<=48.00){ cout<<"light fly"<<endl; }else if(w>48.00&&w<=51.00){ cout<<"fly"<<endl; }else if(w>51.00&&w<=54.00){ cout<<"bantam"<<endl; }else if(w>54.00&&w<=57.00){ cout<<"feather"<<endl; }else if(w>57.00&&w<=60.00){ cout<<"light"<<endl; }else if(w>60.00&&w<=64.00){ cout<<"light welter"<<endl; }else if(w>64.00&&w<=69.00){ cout<<"welter"<<endl; }else if(w>69.00&&w<=75.00){ cout<<"light middle"<<endl; }else if(w>75.00&&w<81.00){ cout<<"middle"<<endl; }else if(w>81.00&&w<=91.00){ cout<<"light heavy"<<endl; }else{ cout<<"heavy"<<endl: } return 0; }
a.cc: In function 'int main()': a.cc:27:44: error: expected ';' before ':' token 27 | cout<<"heavy"<<endl: | ^ | ; a.cc:30:10: error: expected '}' at end of input 30 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s767920733
p00048
C++
#include <iostream> using namespace std; int main() { double weight; while (cin >> n) { if (n <= 48.0) cout << "light fly" << endl; else if (n <= 51.0) cout << "fly" << endl; else if (n <= 54.0) cout << "bantam" << endl; else if (n <= 57.0) cout << "feather" << endl; else if (n <= 60.0) cout << "light" << endl; else if (n <= 64.0) cout << "light welter" << endl; else if (n <= 69.0) cout << "welter" << endl; else if (n <= 75.0) cout << "light middle" << endl; else if (n <= 81.0) cout << "middle" << endl; else if (n <= 91.0) cout << "light heavy" << endl; else cout << "heavy" << endl; } }
a.cc: In function 'int main()': a.cc:7:23: error: 'n' was not declared in this scope 7 | while (cin >> n) { | ^
s184805845
p00048
C++
#include <st
a.cc:1:13: error: missing terminating > character 1 | #include <st | ^ a.cc:1:10: fatal error: st: No such file or directory 1 | #include <st | ^ compilation terminated.
s889878436
p00048
C++
#include <stdio.h> int main(){ double n; while(scanf("%d",&n)!=EOF){ if(n<=48){ printf("light fly\n"); }else if(n<=51){ printf("fly\n"); }else if(n<=54){ printf("bantam\n"); }else if(n<=57){ printf("feather\n"); }else if(n<=60){ printf("light\n"); }else if(n<=64){ printf("light welter\n"); }else if(n<=69){ printf("welter\n"); }else if(n<=75){ printf("light middle\n"); }else if(n<=81){ printf("middle\n"); }else if(n<=91){ printf("light heavy\n") }else{ printf("heavy\n"); }} return 0; }
a.cc: In function 'int main()': a.cc:24:24: error: expected ';' before '}' token 24 | printf("light heavy\n") | ^ | ; 25 | }else{ | ~
s355220051
p00048
C++
#include<iostream> #include<string> using namespace std; int main(){ double a[10]={48,51,54,57,60,64,69,75,81,91}; string c[11]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"}; double b; bool ans; while(cin>>b){ ans=false; for(int i=0;i<10;i++){ if(b<=a[i]){cout<<c[i]<<endl; ans=true; break;}} if(!ans)cout<<c[10]<<endl;}}
a.cc:7:15: warning: missing terminating " character 7 | string c[11]={"light | ^ a.cc:7:15: error: missing terminating " character 7 | string c[11]={"light | ^~~~~~ a.cc:13:14: warning: missing terminating " character 13 | heavy","heavy"}; | ^ a.cc:13:14: error: missing terminating " character 13 | heavy","heavy"}; | ^~~ a.cc: In function 'int main()': a.cc:9:1: error: 'fly' was not declared in this scope 9 | fly","fly","bantam","feather","light","light | ^~~ a.cc:9:4: error: expected '}' before user-defined string literal 9 | fly","fly","bantam","feather","light","light | ^~~~~~ a.cc:7:14: note: to match this '{' 7 | string c[11]={"light | ^ a.cc:9:4: error: expected ',' or ';' before user-defined string literal 9 | fly","fly","bantam","feather","light","light | ^~~~~~ a.cc:16:12: error: 'b' was not declared in this scope 16 | while(cin>>b){ | ^
s964731167
p00048
C++
#include<iostream> #include<string> using namespace std; int main(){ double a[10]={48,51,54,57,60,64,69,75,81,91}; string c[11]={"light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"}; double b; bool ans; while(cin>>b){ ans=false; for(int i=0;i<10;i++){ if(b<=a[i]){cout<<c[i]<<endl; ans=true; break;}} if(!ans)cout<<c[10]<<endl;}}
a.cc:7:15: warning: missing terminating " character 7 | string c[11]={"light | ^ a.cc:7:15: error: missing terminating " character 7 | string c[11]={"light | ^~~~~~ a.cc:13:14: warning: missing terminating " character 13 | heavy","heavy"}; | ^ a.cc:13:14: error: missing terminating " character 13 | heavy","heavy"}; | ^~~ a.cc: In function 'int main()': a.cc:9:1: error: 'fly' was not declared in this scope 9 | fly","fly","bantam","feather","light","light | ^~~ a.cc:9:4: error: expected '}' before user-defined string literal 9 | fly","fly","bantam","feather","light","light | ^~~~~~ a.cc:7:14: note: to match this '{' 7 | string c[11]={"light | ^ a.cc:9:4: error: expected ',' or ';' before user-defined string literal 9 | fly","fly","bantam","feather","light","light | ^~~~~~ a.cc:16:12: error: 'b' was not declared in this scope 16 | while(cin>>b){ | ^
s861222513
p00048
C++
#include <iostream> #include <string> #define LIGHT_FLY 48.00 #define FLY 51.00 #define BANTAM 54.00 #define FEATHER 57.00 #define LIGHT 60.00 #define LIGHT_WELTER 64.00 #define WELTER 69.00 #define LIGHT_MIDDLE 75.00 #define MIDDLE 81.00 #define LIGHT_HEAVY 91.00 using namespace std; int main() { double weight; string strWeight; while(cin>>weight, !cin.eof()){ strWeight = ""; switch(weight){ case LIGHT_FLY: strWeight = "light fly"; break; case FLY: strWeight = "fly"; break; case BANTAM: strWeight = "bantam"; break; case FEATHER: strWeight = "feather"; break; case LIGHT: strWeight = "light"; break; case LIGHT_WELTER: strWeight = "light welter"; break; case WELTER: strWeight = "welter"; break; case LIGHT_MIDDLE: strWeight = "light middle"; break; case MIDDLE: strWeight = "middle"; break; case LIGHT_HEAVY: strWeight = "light heavy"; break; default: strWeight = "heavy"; break; } cout<<strWeight<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:22:24: error: switch quantity not an integer 22 | switch(weight){ | ^~~~~~
s665258282
p00048
C++
#include <iostream> #include <string> #define LIGHT_FLY 48.00 #define FLY 51.00 #define BANTAM 54.00 #define FEATHER 57.00 #define LIGHT 60.00 #define LIGHT_WELTER 64.00 #define WELTER 69.00 #define LIGHT_MIDDLE 75.00 #define MIDDLE 81.00 #define LIGHT_HEAVY 91.00 using namespace std; int main() { double weight; string strWeight; while(cin>>weight, !cin.eof()){ strWeight = ""; switch((int)weight){ case LIGHT_FLY: strWeight = "light fly"; break; case FLY: strWeight = "fly"; break; case BANTAM: strWeight = "bantam"; break; case FEATHER: strWeight = "feather"; break; case LIGHT: strWeight = "light"; break; case LIGHT_WELTER: strWeight = "light welter"; break; case WELTER: strWeight = "welter"; break; case LIGHT_MIDDLE: strWeight = "light middle"; break; case MIDDLE: strWeight = "middle"; break; case LIGHT_HEAVY: strWeight = "light heavy"; break; default: strWeight = "heavy"; break; } cout<<strWeight<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:4:25: error: conversion from 'double' to 'int' in a converted constant expression 4 | #define LIGHT_FLY 48.00 | ^~~~~ a.cc:23:30: note: in expansion of macro 'LIGHT_FLY' 23 | case LIGHT_FLY: | ^~~~~~~~~ a.cc:4:25: error: could not convert '4.8e+1' from 'double' to 'int' 4 | #define LIGHT_FLY 48.00 | ^~~~~ | | | double a.cc:23:30: note: in expansion of macro 'LIGHT_FLY' 23 | case LIGHT_FLY: | ^~~~~~~~~ a.cc:5:33: error: conversion from 'double' to 'int' in a converted constant expression 5 | #define FLY 51.00 | ^~~~~ a.cc:25:30: note: in expansion of macro 'FLY' 25 | case FLY: | ^~~ a.cc:5:33: error: could not convert '5.1e+1' from 'double' to 'int' 5 | #define FLY 51.00 | ^~~~~ | | | double a.cc:25:30: note: in expansion of macro 'FLY' 25 | case FLY: | ^~~ a.cc:6:25: error: conversion from 'double' to 'int' in a converted constant expression 6 | #define BANTAM 54.00 | ^~~~~ a.cc:27:30: note: in expansion of macro 'BANTAM' 27 | case BANTAM: | ^~~~~~ a.cc:6:25: error: could not convert '5.4e+1' from 'double' to 'int' 6 | #define BANTAM 54.00 | ^~~~~ | | | double a.cc:27:30: note: in expansion of macro 'BANTAM' 27 | case BANTAM: | ^~~~~~ a.cc:7:25: error: conversion from 'double' to 'int' in a converted constant expression 7 | #define FEATHER 57.00 | ^~~~~ a.cc:29:30: note: in expansion of macro 'FEATHER' 29 | case FEATHER: | ^~~~~~~ a.cc:7:25: error: could not convert '5.7e+1' from 'double' to 'int' 7 | #define FEATHER 57.00 | ^~~~~ | | | double a.cc:29:30: note: in expansion of macro 'FEATHER' 29 | case FEATHER: | ^~~~~~~ a.cc:8:25: error: conversion from 'double' to 'int' in a converted constant expression 8 | #define LIGHT 60.00 | ^~~~~ a.cc:31:30: note: in expansion of macro 'LIGHT' 31 | case LIGHT: | ^~~~~ a.cc:8:25: error: could not convert '6.0e+1' from 'double' to 'int' 8 | #define LIGHT 60.00 | ^~~~~ | | | double a.cc:31:30: note: in expansion of macro 'LIGHT' 31 | case LIGHT: | ^~~~~ a.cc:9:22: error: conversion from 'double' to 'int' in a converted constant expression 9 | #define LIGHT_WELTER 64.00 | ^~~~~ a.cc:33:30: note: in expansion of macro 'LIGHT_WELTER' 33 | case LIGHT_WELTER: | ^~~~~~~~~~~~ a.cc:9:22: error: could not convert '6.4e+1' from 'double' to 'int' 9 | #define LIGHT_WELTER 64.00 | ^~~~~ | | | double a.cc:33:30: note: in expansion of macro 'LIGHT_WELTER' 33 | case LIGHT_WELTER: | ^~~~~~~~~~~~ a.cc:10:25: error: conversion from 'double' to 'int' in a converted constant expression 10 | #define WELTER 69.00 | ^~~~~ a.cc:35:30: note: in expansion of macro 'WELTER' 35 | case WELTER: | ^~~~~~ a.cc:10:25: error: could not convert '6.9e+1' from 'double' to 'int' 10 | #define WELTER 69.00 | ^~~~~ | | | double a.cc:35:30: note: in expansion of macro 'WELTER' 35 | case WELTER: | ^~~~~~ a.cc:11:22: error: conversion from 'double' to 'int' in a converted constant expression 11 | #define LIGHT_MIDDLE 75.00 | ^~~~~ a.cc:37:30: note: in expansion of macro 'LIGHT_MIDDLE' 37 | case LIGHT_MIDDLE: | ^~~~~~~~~~~~ a.cc:11:22: error: could not convert '7.5e+1' from 'double' to 'int' 11 | #define LIGHT_MIDDLE 75.00 | ^~~~~ | | | double a.cc:37:30: note: in expansion of macro 'LIGHT_MIDDLE' 37 | case LIGHT_MIDDLE: | ^~~~~~~~~~~~ a.cc:12:25: error: conversion from 'double' to 'int' in a converted constant expression 12 | #define MIDDLE 81.00 | ^~~~~ a.cc:39:30: note: in expansion of macro 'MIDDLE' 39 | case MIDDLE: | ^~~~~~ a.cc:12:25: error: could not convert '8.1e+1' from 'double' to 'int' 12 | #define MIDDLE 81.00 | ^~~~~ | | | double a.cc:39:30: note: in expansion of macro 'MIDDLE' 39 | case MIDDLE: | ^~~~~~ a.cc:13:25: error: conversion from 'double' to 'int' in a converted constant expression 13 | #define LIGHT_HEAVY 91.00 | ^~~~~ a.cc:41:30: note: in expansion of macro 'LIGHT_HEAVY' 41 | case LIGHT_HEAVY: | ^~~~~~~~~~~ a.cc:13:25: error: could not convert '9.1e+1' from 'double' to 'int' 13 | #define LIGHT_HEAVY 91.00 | ^~~~~ | | | double a.cc:41:30: note: in expansion of macro 'LIGHT_HEAVY' 41 | case LIGHT_HEAVY: | ^~~~~~~~~~~
s617350315
p00049
Java
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = 0; int b = 0; int ab = 0; int o = 0; while(true){ String x = sc.next(); String[] str = x.split(",",0); if(str[1].equals("A"))a++; if(str[1].equals("B"))b++; if(str[1].equals("AB"))ab++; if(str[1].equals("O"))o++; } System.out.println(a); System.out.println(b); System.out.println(ab); System.out.println(o); } }
Main.java:18: error: unreachable statement System.out.println(a); ^ 1 error
s393124995
p00049
Java
// // main.cpp // AizuOnline // // Created by ?????¬ ?????? on 19/05/2016. // Copyright ?? 2016 ?????¬ ??????. All rights reserved. // #include <iostream> int main(int argc, const char * argv[]) { int a = 0; int b = 0; int ab = 0; int o = 0; int k; char s[5]; while (scanf("%d,%s",&k,s)!= EOF){ if(s[0] == 'A' && s[1] == 'B'){ ab = ab + 1; }else if(s[0] == 'A'){ a++; }else if(s[0] == 'B'){ b++; }else if(s[0] == 'O'){ o++; } std::cout << a << std::endl; std::cout << b << std::endl; std::cout << ab << std::endl; std::cout << o << std::endl; } }
Main.java:9: error: illegal character: '#' #include <iostream> ^ Main.java:9: error: unnamed classes are a preview feature and are disabled by default. #include <iostream> ^ (use --enable-preview to enable unnamed classes) Main.java:11: error: illegal start of type int main(int argc, const char * argv[]) { ^ Main.java:11: error: class, interface, enum, or record expected int main(int argc, const char * argv[]) { ^ Main.java:17: error: class, interface, enum, or record expected char s[5]; ^ Main.java:19: error: class, interface, enum, or record expected while (scanf("%d,%s",&k,s)!= EOF){ ^ Main.java:22: error: class, interface, enum, or record expected }else if(s[0] == 'A'){ ^ Main.java:24: error: class, interface, enum, or record expected }else if(s[0] == 'B'){ ^ Main.java:26: error: class, interface, enum, or record expected }else if(s[0] == 'O'){ ^ Main.java:28: error: class, interface, enum, or record expected } ^ Main.java:31: error: class, interface, enum, or record expected std::cout << b << std::endl; ^ Main.java:32: error: class, interface, enum, or record expected std::cout << ab << std::endl; ^ Main.java:33: error: class, interface, enum, or record expected std::cout << o << std::endl; ^ Main.java:35: error: class, interface, enum, or record expected } ^ 14 errors
s991735051
p00049
Java
import java.util.Scanner; import java.io.*; public class Main { &#160; &#160; public static void main(String[] args)throws IOException{ &#160; &#160; &#160; &#160; int[] blood = new int[4]; &#160; &#160; &#160; &#160; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); &#160; &#160; &#160; &#160; String buf; &#160; &#160; &#160; &#160; while((buf = br.readLine())!=null){ &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; else if("B".equals(b)) &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[1]++; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; else if("AB".equals(b)) &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[2]++; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; else &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[3]++; &#160; &#160; &#160; &#160; } &#160; &#160; &#160; &#160; for(int i =0; i<blood.length;i++){ &#160; &#160; &#160; &#160; &#160; &#160; System.out.println(blood[i]); &#160; &#160; &#160; &#160; } &#160; &#160; } }
Main.java:12: error: illegal start of type &#160; &#160; public static void main(String[] args)throws IOException{ ^ Main.java:12: error: illegal character: '#' &#160; &#160; public static void main(String[] args)throws IOException{ ^ Main.java:12: error: illegal start of type &#160; &#160; public static void main(String[] args)throws IOException{ ^ Main.java:12: error: illegal character: '#' &#160; &#160; public static void main(String[] args)throws IOException{ ^ Main.java:13: error: illegal start of expression &#160; &#160; &#160; &#160; int[] blood = new int[4]; ^ Main.java:13: error: illegal character: '#' &#160; &#160; &#160; &#160; int[] blood = new int[4]; ^ Main.java:13: error: illegal start of expression &#160; &#160; &#160; &#160; int[] blood = new int[4]; ^ Main.java:13: error: illegal character: '#' &#160; &#160; &#160; &#160; int[] blood = new int[4]; ^ Main.java:13: error: illegal start of expression &#160; &#160; &#160; &#160; int[] blood = new int[4]; ^ Main.java:13: error: illegal character: '#' &#160; &#160; &#160; &#160; int[] blood = new int[4]; ^ Main.java:13: error: illegal start of expression &#160; &#160; &#160; &#160; int[] blood = new int[4]; ^ Main.java:13: error: illegal character: '#' &#160; &#160; &#160; &#160; int[] blood = new int[4]; ^ Main.java:14: error: illegal start of expression &#160; &#160; &#160; &#160; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^ Main.java:14: error: illegal character: '#' &#160; &#160; &#160; &#160; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^ Main.java:14: error: illegal start of expression &#160; &#160; &#160; &#160; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^ Main.java:14: error: illegal character: '#' &#160; &#160; &#160; &#160; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^ Main.java:14: error: illegal start of expression &#160; &#160; &#160; &#160; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^ Main.java:14: error: illegal character: '#' &#160; &#160; &#160; &#160; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^ Main.java:14: error: illegal start of expression &#160; &#160; &#160; &#160; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^ Main.java:14: error: illegal character: '#' &#160; &#160; &#160; &#160; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^ Main.java:15: error: illegal start of expression &#160; &#160; &#160; &#160; String buf; ^ Main.java:15: error: illegal character: '#' &#160; &#160; &#160; &#160; String buf; ^ Main.java:15: error: illegal start of expression &#160; &#160; &#160; &#160; String buf; ^ Main.java:15: error: illegal character: '#' &#160; &#160; &#160; &#160; String buf; ^ Main.java:15: error: illegal start of expression &#160; &#160; &#160; &#160; String buf; ^ Main.java:15: error: illegal character: '#' &#160; &#160; &#160; &#160; String buf; ^ Main.java:15: error: illegal start of expression &#160; &#160; &#160; &#160; String buf; ^ Main.java:15: error: illegal character: '#' &#160; &#160; &#160; &#160; String buf; ^ Main.java:16: error: illegal start of expression &#160; &#160; &#160; &#160; while((buf = br.readLine())!=null){ ^ Main.java:16: error: illegal character: '#' &#160; &#160; &#160; &#160; while((buf = br.readLine())!=null){ ^ Main.java:16: error: illegal start of expression &#160; &#160; &#160; &#160; while((buf = br.readLine())!=null){ ^ Main.java:16: error: illegal character: '#' &#160; &#160; &#160; &#160; while((buf = br.readLine())!=null){ ^ Main.java:16: error: illegal start of expression &#160; &#160; &#160; &#160; while((buf = br.readLine())!=null){ ^ Main.java:16: error: illegal character: '#' &#160; &#160; &#160; &#160; while((buf = br.readLine())!=null){ ^ Main.java:16: error: illegal start of expression &#160; &#160; &#160; &#160; while((buf = br.readLine())!=null){ ^ Main.java:16: error: illegal character: '#' &#160; &#160; &#160; &#160; while((buf = br.readLine())!=null){ ^ Main.java:17: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:17: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:17: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:17: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:17: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:17: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:17: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:17: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:17: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:17: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:17: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:17: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:18: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:18: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:18: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:18: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:18: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:18: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:18: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:18: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:18: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:18: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:18: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:18: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:18: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:18: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:18: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:18: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:19: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:19: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:19: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:19: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:19: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:19: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:19: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:19: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:19: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:19: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:19: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:19: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++;
s399469163
p00049
Java
import java.util.Scanner; import java.io.*; public class Main { &#160; &#160; public static void main(String[] args)throws IOException{ &#160; &#160; &#160; &#160; int[] blood = new int[4]; &#160; &#160; &#160; &#160; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); &#160; &#160; &#160; &#160; String buf; &#160; &#160; &#160; &#160; while((buf = br.readLine())!=null){ &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; else if("B".equals(b)) &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[1]++; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; else if("AB".equals(b)) &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[2]++; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; else &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[3]++; &#160; &#160; &#160; &#160; } &#160; &#160; &#160; &#160; for(int i =0; i<blood.length;i++){ &#160; &#160; &#160; &#160; &#160; &#160; System.out.println(blood[i]); &#160; &#160; &#160; &#160; } &#160; &#160; } }
Main.java:4: error: illegal start of type &#160; &#160; public static void main(String[] args)throws IOException{ ^ Main.java:4: error: illegal character: '#' &#160; &#160; public static void main(String[] args)throws IOException{ ^ Main.java:4: error: illegal start of type &#160; &#160; public static void main(String[] args)throws IOException{ ^ Main.java:4: error: illegal character: '#' &#160; &#160; public static void main(String[] args)throws IOException{ ^ Main.java:5: error: illegal start of expression &#160; &#160; &#160; &#160; int[] blood = new int[4]; ^ Main.java:5: error: illegal character: '#' &#160; &#160; &#160; &#160; int[] blood = new int[4]; ^ Main.java:5: error: illegal start of expression &#160; &#160; &#160; &#160; int[] blood = new int[4]; ^ Main.java:5: error: illegal character: '#' &#160; &#160; &#160; &#160; int[] blood = new int[4]; ^ Main.java:5: error: illegal start of expression &#160; &#160; &#160; &#160; int[] blood = new int[4]; ^ Main.java:5: error: illegal character: '#' &#160; &#160; &#160; &#160; int[] blood = new int[4]; ^ Main.java:5: error: illegal start of expression &#160; &#160; &#160; &#160; int[] blood = new int[4]; ^ Main.java:5: error: illegal character: '#' &#160; &#160; &#160; &#160; int[] blood = new int[4]; ^ Main.java:6: error: illegal start of expression &#160; &#160; &#160; &#160; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^ Main.java:6: error: illegal character: '#' &#160; &#160; &#160; &#160; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^ Main.java:6: error: illegal start of expression &#160; &#160; &#160; &#160; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^ Main.java:6: error: illegal character: '#' &#160; &#160; &#160; &#160; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^ Main.java:6: error: illegal start of expression &#160; &#160; &#160; &#160; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^ Main.java:6: error: illegal character: '#' &#160; &#160; &#160; &#160; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^ Main.java:6: error: illegal start of expression &#160; &#160; &#160; &#160; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^ Main.java:6: error: illegal character: '#' &#160; &#160; &#160; &#160; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^ Main.java:7: error: illegal start of expression &#160; &#160; &#160; &#160; String buf; ^ Main.java:7: error: illegal character: '#' &#160; &#160; &#160; &#160; String buf; ^ Main.java:7: error: illegal start of expression &#160; &#160; &#160; &#160; String buf; ^ Main.java:7: error: illegal character: '#' &#160; &#160; &#160; &#160; String buf; ^ Main.java:7: error: illegal start of expression &#160; &#160; &#160; &#160; String buf; ^ Main.java:7: error: illegal character: '#' &#160; &#160; &#160; &#160; String buf; ^ Main.java:7: error: illegal start of expression &#160; &#160; &#160; &#160; String buf; ^ Main.java:7: error: illegal character: '#' &#160; &#160; &#160; &#160; String buf; ^ Main.java:8: error: illegal start of expression &#160; &#160; &#160; &#160; while((buf = br.readLine())!=null){ ^ Main.java:8: error: illegal character: '#' &#160; &#160; &#160; &#160; while((buf = br.readLine())!=null){ ^ Main.java:8: error: illegal start of expression &#160; &#160; &#160; &#160; while((buf = br.readLine())!=null){ ^ Main.java:8: error: illegal character: '#' &#160; &#160; &#160; &#160; while((buf = br.readLine())!=null){ ^ Main.java:8: error: illegal start of expression &#160; &#160; &#160; &#160; while((buf = br.readLine())!=null){ ^ Main.java:8: error: illegal character: '#' &#160; &#160; &#160; &#160; while((buf = br.readLine())!=null){ ^ Main.java:8: error: illegal start of expression &#160; &#160; &#160; &#160; while((buf = br.readLine())!=null){ ^ Main.java:8: error: illegal character: '#' &#160; &#160; &#160; &#160; while((buf = br.readLine())!=null){ ^ Main.java:9: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:9: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:9: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:9: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:9: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:9: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:9: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:9: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:9: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:9: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:9: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:9: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:10: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:11: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: e
s047592441
p00049
Java
import java.util.Scanner; import java.io.*; class Main { public static void main(String[] args)throws IOException{ int[] blood = new int[4]; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String buf; while((buf = br.readLine())!=null){ &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; else if("B".equals(b)) &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[1]++; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; else if("AB".equals(b)) &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[2]++; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; else &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[3]++; &#160; &#160; &#160; &#160; } &#160; &#160; &#160; &#160; for(int i =0; i<blood.length;i++){ &#160; &#160; &#160; &#160; &#160; &#160; System.out.println(blood[i]); &#160; &#160; &#160; &#160; } &#160; &#160; } }
Main.java:6: error: illegal character: '\u3000' BufferedReader br = new BufferedReader(new?InputStreamReader(System.in)); ^ Main.java:6: error: ';' expected BufferedReader br = new BufferedReader(new?InputStreamReader(System.in)); ^ Main.java:9: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:9: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:9: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:9: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:9: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:9: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:9: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:9: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:9: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:9: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:9: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:9: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; String b = buf.split(",")[1]; ^ Main.java:10: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:10: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if("A".equals(b)) ^ Main.java:11: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:11: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[0]++; ^ Main.java:12: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; else if("B".equals(b)) ^ Main.java:12: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; else if("B".equals(b)) ^ Main.java:12: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; else if("B".equals(b)) ^ Main.java:12: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; else if("B".equals(b)) ^ Main.java:12: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; else if("B".equals(b)) ^ Main.java:12: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; else if("B".equals(b)) ^ Main.java:12: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; else if("B".equals(b)) ^ Main.java:12: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; else if("B".equals(b)) ^ Main.java:12: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; else if("B".equals(b)) ^ Main.java:12: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; else if("B".equals(b)) ^ Main.java:12: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; else if("B".equals(b)) ^ Main.java:12: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; else if("B".equals(b)) ^ Main.java:12: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; else if("B".equals(b)) ^ Main.java:12: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; else if("B".equals(b)) ^ Main.java:12: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; else if("B".equals(b)) ^ Main.java:12: error: illegal character: '#' &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; else if("B".equals(b)) ^ Main.java:13: error: illegal start of expression &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; blood[1]++; ^ Main.java:13: error: illegal character: '#' &#160; &#160; &#16
s554876128
p00049
Java
import java.util.Scanner; import java.io.*; class Main { public static void main(String[] args)throws IOException{ int[] blood = new int[4]; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String buf; while((buf = br.readLine())!=null){ String b = buf.split(",")[1]; if("A".equals(b)) blood[0]++; else if("B".equals(b)) blood[1]++; else if("AB".equals(b)) blood[2]++; else blood[3]++; } for(int i =0; i<blood.length;i++){ System.out.println(blood[i]); } } }
Main.java:6: error: illegal character: '\u3000' BufferedReader br = new BufferedReader(new?InputStreamReader(System.in)); ^ Main.java:6: error: ';' expected BufferedReader br = new BufferedReader(new?InputStreamReader(System.in)); ^ 2 errors
s496298796
p00049
Java
import java.io.*; import java.util.*; public class BloodGroups { public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String str,arr[]; List<String> list = new ArrayList<String>(); while(null!=(str = in.readLine())){ arr = str.split(",",0); list.add(arr[1]); } System.out.println(count("A",list)); System.out.println(count("B",list)); System.out.println(count("AB",list)); System.out.println(count("O",list)); } private static long count(String bl,List<String> list){ int i=0; while(list.remove(new String(bl)))i++; return i; } }
Main.java:4: error: class BloodGroups is public, should be declared in a file named BloodGroups.java public class BloodGroups { ^ 1 error
s632277799
p00049
Java
import java.io.*; import java.util.*; public class BloodGroups { public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String str,arr[]; List<String> list = new ArrayList<String>(); while(null!=(str = in.readLine())){ arr = str.split(",",0); list.add(arr[1]); } System.out.println(count("A",list)); System.out.println(count("B",list)); System.out.println(count("AB",list)); System.out.println(count("O",list)); } private static long count(String bl,List<String> list){ int i=0; while(list.remove(new String(bl)))i++; return i; } }
Main.java:4: error: class BloodGroups is public, should be declared in a file named BloodGroups.java public class BloodGroups { ^ 1 error
s744642585
p00049
Java
#include <iostream>#include <map>#include <string>using namespace std; int main(){ int id; char c; string bt; map<string, int> b; while(cin >> id >> c >> bt){ b[bt]++; } cout << b["A"] << endl; cout << b["B"] << endl; cout << b["AB"] << endl; cout << b["O"] << endl; return 0;}
Main.java:1: error: illegal character: '#' #include <iostream>#include <map>#include <string>using namespace std; int main(){ int id; char c; string bt; map<string, int> b; while(cin >> id >> c >> bt){ b[bt]++; } cout << b["A"] << endl; cout << b["B"] << endl; cout << b["AB"] << endl; cout << b["O"] << endl; return 0;} ^ Main.java:1: error: illegal character: '#' #include <iostream>#include <map>#include <string>using namespace std; int main(){ int id; char c; string bt; map<string, int> b; while(cin >> id >> c >> bt){ b[bt]++; } cout << b["A"] << endl; cout << b["B"] << endl; cout << b["AB"] << endl; cout << b["O"] << endl; return 0;} ^ Main.java:1: error: illegal character: '#' #include <iostream>#include <map>#include <string>using namespace std; int main(){ int id; char c; string bt; map<string, int> b; while(cin >> id >> c >> bt){ b[bt]++; } cout << b["A"] << endl; cout << b["B"] << endl; cout << b["AB"] << endl; cout << b["O"] << endl; return 0;} ^ Main.java:1: error: not a statement #include <iostream>#include <map>#include <string>using namespace std; int main(){ int id; char c; string bt; map<string, int> b; while(cin >> id >> c >> bt){ b[bt]++; } cout << b["A"] << endl; cout << b["B"] << endl; cout << b["AB"] << endl; cout << b["O"] << endl; return 0;} ^ Main.java:1: error: not a statement #include <iostream>#include <map>#include <string>using namespace std; int main(){ int id; char c; string bt; map<string, int> b; while(cin >> id >> c >> bt){ b[bt]++; } cout << b["A"] << endl; cout << b["B"] << endl; cout << b["AB"] << endl; cout << b["O"] << endl; return 0;} ^ Main.java:1: error: not a statement #include <iostream>#include <map>#include <string>using namespace std; int main(){ int id; char c; string bt; map<string, int> b; while(cin >> id >> c >> bt){ b[bt]++; } cout << b["A"] << endl; cout << b["B"] << endl; cout << b["AB"] << endl; cout << b["O"] << endl; return 0;} ^ Main.java:1: error: not a statement #include <iostream>#include <map>#include <string>using namespace std; int main(){ int id; char c; string bt; map<string, int> b; while(cin >> id >> c >> bt){ b[bt]++; } cout << b["A"] << endl; cout << b["B"] << endl; cout << b["AB"] << endl; cout << b["O"] << endl; return 0;} ^ Main.java:1: error: unnamed classes are a preview feature and are disabled by default. #include <iostream>#include <map>#include <string>using namespace std; int main(){ int id; char c; string bt; map<string, int> b; while(cin >> id >> c >> bt){ b[bt]++; } cout << b["A"] << endl; cout << b["B"] << endl; cout << b["AB"] << endl; cout << b["O"] << endl; return 0;} ^ (use --enable-preview to enable unnamed classes) 8 errors
s126146635
p00049
Java
#include <iostream>#include <string>using namespace std; int main() { string str; int a = 0, b = 0, ab = 0, o = 0; while (getline(cin, str)) { string s = str.substr(str.find_first_of(",")+1); if (s == "A") { a++; } else if (s == "B") { b++; } else if (s == "O") { o++; } else { ab++; } } cout << a << endl << b << endl << ab << endl << o << endl; return 0;}
Main.java:1: error: illegal character: '#' #include <iostream>#include <string>using namespace std; int main() { string str; int a = 0, b = 0, ab = 0, o = 0; while (getline(cin, str)) { string s = str.substr(str.find_first_of(",")+1); if (s == "A") { a++; } else if (s == "B") { b++; } else if (s == "O") { o++; } else { ab++; } } cout << a << endl << b << endl << ab << endl << o << endl; return 0;} ^ Main.java:1: error: illegal character: '#' #include <iostream>#include <string>using namespace std; int main() { string str; int a = 0, b = 0, ab = 0, o = 0; while (getline(cin, str)) { string s = str.substr(str.find_first_of(",")+1); if (s == "A") { a++; } else if (s == "B") { b++; } else if (s == "O") { o++; } else { ab++; } } cout << a << endl << b << endl << ab << endl << o << endl; return 0;} ^ Main.java:1: error: not a statement #include <iostream>#include <string>using namespace std; int main() { string str; int a = 0, b = 0, ab = 0, o = 0; while (getline(cin, str)) { string s = str.substr(str.find_first_of(",")+1); if (s == "A") { a++; } else if (s == "B") { b++; } else if (s == "O") { o++; } else { ab++; } } cout << a << endl << b << endl << ab << endl << o << endl; return 0;} ^ Main.java:1: error: unnamed classes are a preview feature and are disabled by default. #include <iostream>#include <string>using namespace std; int main() { string str; int a = 0, b = 0, ab = 0, o = 0; while (getline(cin, str)) { string s = str.substr(str.find_first_of(",")+1); if (s == "A") { a++; } else if (s == "B") { b++; } else if (s == "O") { o++; } else { ab++; } } cout << a << endl << b << endl << ab << endl << o << endl; return 0;} ^ (use --enable-preview to enable unnamed classes) 4 errors
s605748982
p00049
Java
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStream;import java.io.InputStreamReader;import java.io.PrintStream; class Main { public static void main(String[] args) throws IOException { doit(args, System.in, System.out); } static void doit(String[] args, InputStream in, PrintStream out) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(in)); int[] counts = new int[4]; while (true) { String line = reader.readLine(); if (line == null || line.isEmpty()) { break; } String[] values = line.split(","); String type = values[1]; if (type.equals("A")) { counts[0]++; } else if (type.equals("B")) { counts[1]++; } else if (type.equals("AB")) { counts[2]++; } else { counts[3]++; } } for (int count : counts) { out.println(count); } }} Compile Error Logs: Status Judge: 1/1 JAVA CPU: 00.04 sec Memory: 8976 [KB] Length: 1102 [B] 2012-10-08 15:16 2012-10-08 15:16 Results for testcases Case #1: : Accepted - - - NA - NA < | 1 / 1 | > : Accepted - - Input #1 ( ) Output #1 ( ) Not available. Not available. Comments Under Construction. Categories Free Tags
Main.java:9: error: class, interface, enum, or record expected Compile Error Logs: ^ Main.java:55: error: illegal character: '#' Case #1: ^ Main.java:95: error: illegal character: '#' Input #1 ( ) ^ Main.java:98: error: illegal character: '#' Output #1 ( ) ^ 4 errors
s150495736
p00049
Java
#include<iostream>#include<string>#include<cstdio>using namespace std; int main(){ string type; int t[4]={0}; while(cin>>type){ type+=" "; int i; for(i=0;type[i]!=',';i++); i++; if(type[i]=='A'&&type[i+1]=='B'){ t[2]++; }else if(type[i]=='A'){ t[0]++; }else if(type[i]=='B'){ t[1]++; }else if(type[i]=='O'){ t[3]++; } } for(int i=0;i<4;i++){ cout<<t[i]<<endl; } }
Main.java:1: error: illegal character: '#' #include<iostream>#include<string>#include<cstdio>using namespace std; int main(){ string type; int t[4]={0}; while(cin>>type){ type+=" "; int i; for(i=0;type[i]!=',';i++); i++; if(type[i]=='A'&&type[i+1]=='B'){ t[2]++; }else if(type[i]=='A'){ t[0]++; }else if(type[i]=='B'){ t[1]++; }else if(type[i]=='O'){ t[3]++; } } for(int i=0;i<4;i++){ cout<<t[i]<<endl; } } ^ Main.java:1: error: illegal character: '#' #include<iostream>#include<string>#include<cstdio>using namespace std; int main(){ string type; int t[4]={0}; while(cin>>type){ type+=" "; int i; for(i=0;type[i]!=',';i++); i++; if(type[i]=='A'&&type[i+1]=='B'){ t[2]++; }else if(type[i]=='A'){ t[0]++; }else if(type[i]=='B'){ t[1]++; }else if(type[i]=='O'){ t[3]++; } } for(int i=0;i<4;i++){ cout<<t[i]<<endl; } } ^ Main.java:1: error: illegal character: '#' #include<iostream>#include<string>#include<cstdio>using namespace std; int main(){ string type; int t[4]={0}; while(cin>>type){ type+=" "; int i; for(i=0;type[i]!=',';i++); i++; if(type[i]=='A'&&type[i+1]=='B'){ t[2]++; }else if(type[i]=='A'){ t[0]++; }else if(type[i]=='B'){ t[1]++; }else if(type[i]=='O'){ t[3]++; } } for(int i=0;i<4;i++){ cout<<t[i]<<endl; } } ^ Main.java:1: error: not a statement #include<iostream>#include<string>#include<cstdio>using namespace std; int main(){ string type; int t[4]={0}; while(cin>>type){ type+=" "; int i; for(i=0;type[i]!=',';i++); i++; if(type[i]=='A'&&type[i+1]=='B'){ t[2]++; }else if(type[i]=='A'){ t[0]++; }else if(type[i]=='B'){ t[1]++; }else if(type[i]=='O'){ t[3]++; } } for(int i=0;i<4;i++){ cout<<t[i]<<endl; } } ^ Main.java:1: error: not a statement #include<iostream>#include<string>#include<cstdio>using namespace std; int main(){ string type; int t[4]={0}; while(cin>>type){ type+=" "; int i; for(i=0;type[i]!=',';i++); i++; if(type[i]=='A'&&type[i+1]=='B'){ t[2]++; }else if(type[i]=='A'){ t[0]++; }else if(type[i]=='B'){ t[1]++; }else if(type[i]=='O'){ t[3]++; } } for(int i=0;i<4;i++){ cout<<t[i]<<endl; } } ^ Main.java:1: error: unnamed classes are a preview feature and are disabled by default. #include<iostream>#include<string>#include<cstdio>using namespace std; int main(){ string type; int t[4]={0}; while(cin>>type){ type+=" "; int i; for(i=0;type[i]!=',';i++); i++; if(type[i]=='A'&&type[i+1]=='B'){ t[2]++; }else if(type[i]=='A'){ t[0]++; }else if(type[i]=='B'){ t[1]++; }else if(type[i]=='O'){ t[3]++; } } for(int i=0;i<4;i++){ cout<<t[i]<<endl; } } ^ (use --enable-preview to enable unnamed classes) Main.java:1: error: ']' expected #include<iostream>#include<string>#include<cstdio>using namespace std; int main(){ string type; int t[4]={0}; while(cin>>type){ type+=" "; int i; for(i=0;type[i]!=',';i++); i++; if(type[i]=='A'&&type[i+1]=='B'){ t[2]++; }else if(type[i]=='A'){ t[0]++; }else if(type[i]=='B'){ t[1]++; }else if(type[i]=='O'){ t[3]++; } } for(int i=0;i<4;i++){ cout<<t[i]<<endl; } } ^ Main.java:1: error: ';' expected #include<iostream>#include<string>#include<cstdio>using namespace std; int main(){ string type; int t[4]={0}; while(cin>>type){ type+=" "; int i; for(i=0;type[i]!=',';i++); i++; if(type[i]=='A'&&type[i+1]=='B'){ t[2]++; }else if(type[i]=='A'){ t[0]++; }else if(type[i]=='B'){ t[1]++; }else if(type[i]=='O'){ t[3]++; } } for(int i=0;i<4;i++){ cout<<t[i]<<endl; } } ^ 8 errors
s800284459
p00049
C
#include <string.h> #include <stdio.h> int main(){ static int data[1<<20]; int i,in=0,t; char blood[5]; int a=0, b=0, o=0, ab=0; memset(data,-1,sizeof(data)); while(scanf("%d,%s",&t, blood)!=EOF){ if(blood[0]=='A'&&blood[1]=='B') data[t] = 3; else if(blood[0]=='A') data[t] = 0; else if(blood[0]=='B') data[t] = 1; else if(blood[0]=='O') data[t] = 2; if(in < t) in= t; blood[0]=0; blood[1]=0; } for(i=0; i<=max_in; i++){ if(data[i]==0) a++; if(data[i]==1) b++; if(data[i]==2) o++; if(data[i]==3) ab++; } printf("%d\n%d\n%d\n%d\n",a,b,ab,o); return 0; }
main.c: In function 'main': main.c:19:15: error: 'max_in' undeclared (first use in this function); did you mean 'main'? 19 | for(i=0; i<=max_in; i++){ | ^~~~~~ | main main.c:19:15: note: each undeclared identifier is reported only once for each function it appears in
s499379381
p00049
C
1,B 2,A 3,B 4,AB 5,B 6,O 7,A 8,O 9,AB 10,A 11,A 12,B 13,AB 14,A
main.c:1:1: error: expected identifier or '(' before numeric constant 1 | 1,B | ^
s687113372
p00049
C
1,B 2,A 3,B 4,AB 5,B 6,O 7,A 8,O 9,AB 10,A 11,A 12,B 13,AB 14,A
main.c:1:1: error: expected identifier or '(' before numeric constant 1 | 1,B | ^
s567486205
p00049
C
#include <stdio.h> int main(void){ int A=0,B=0,AB=0,O=0,i; char blood while (scanf("%d,%c",&i,&blood) != EOF){ if(i>=50) bleak; if(blood =='A') A++; if(blood =='B') B++; if(blood =='AB') AB++; if(blood =='O') O++; } printf("%d\n",A); printf("%d\n",B); printf("%d\n",AB); printf("%d\n",O); return 0; }
main.c: In function 'main': main.c:8:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'while' 8 | while (scanf("%d,%c",&i,&blood) != EOF){ | ^~~~~ main.c:8:34: error: 'blood' undeclared (first use in this function) 8 | while (scanf("%d,%c",&i,&blood) != EOF){ | ^~~~~ main.c:8:34: note: each undeclared identifier is reported only once for each function it appears in main.c:9:33: error: 'bleak' undeclared (first use in this function) 9 | if(i>=50) bleak; | ^~~~~ main.c:12:28: warning: multi-character character constant [-Wmultichar] 12 | if(blood =='AB') AB++; | ^~~~
s648961458
p00049
C
#include <stdio.h> int main(void){ int A=0,B=0,AB=0,O=0,i; char blood while (scanf("%d,%c",&i,&blood) != EOF){ if(i>=50) bleak; if(blood =='A') A++; if(blood =='B') B++; if(blood =='AB') AB++; if(blood =='O') O++; } printf("%d\n",A); printf("%d\n",B); printf("%d\n",AB); printf("%d\n",O); return 0; }
main.c: In function 'main': main.c:8:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'while' 8 | while (scanf("%d,%c",&i,&blood) != EOF){ | ^~~~~ main.c:8:34: error: 'blood' undeclared (first use in this function) 8 | while (scanf("%d,%c",&i,&blood) != EOF){ | ^~~~~ main.c:8:34: note: each undeclared identifier is reported only once for each function it appears in main.c:9:33: error: 'bleak' undeclared (first use in this function) 9 | if(i>=50) bleak; | ^~~~~ main.c:12:28: warning: multi-character character constant [-Wmultichar] 12 | if(blood =='AB') AB++; | ^~~~
s335539847
p00049
C
#include<stdio.h> int main(){ int x,a=0,b=0,o=0,ab=0; char y; while(scanf("%d,%c",&x,&y);){ switch (y){ case 'A' :a++;break; case 'B' :b++;break; case 'O' :o++;break; case 'AB' :ab++;break; } printf("%d\n%d\n%d\n%d\n",a,b,o,ab); return 0; }
main.c: In function 'main': main.c:5:27: error: expected ')' before ';' token 5 | while(scanf("%d,%c",&x,&y);){ | ~ ^ | ) main.c:10:6: warning: multi-character character constant [-Wmultichar] 10 | case 'AB' :ab++;break; | ^~~~ main.c:10:1: warning: case label value exceeds maximum value for type [-Wswitch-outside-range] 10 | case 'AB' :ab++;break; | ^~~~ main.c:14:1: error: expected declaration or statement at end of input 14 | } | ^
s410888859
p00049
C
#include<stdio.h> int main(){ int x,a=0,b=0,o=0,ab=0; char y; while(scanf("%d,%c",&x,&y);){ switch (y){ case 'A' :a++;break; case 'B' :b++;break; case 'O' :o++;break; case 'AB' :ab++;break; } } printf("%d\n%d\n%d\n%d\n",a,b,o,ab); return 0; }
main.c: In function 'main': main.c:5:27: error: expected ')' before ';' token 5 | while(scanf("%d,%c",&x,&y);){ | ~ ^ | ) main.c:10:6: warning: multi-character character constant [-Wmultichar] 10 | case 'AB' :ab++;break; | ^~~~ main.c:10:1: warning: case label value exceeds maximum value for type [-Wswitch-outside-range] 10 | case 'AB' :ab++;break; | ^~~~
s706225745
p00049
C
#include <stdio.h> int main(void) { int i, n; char t[4]; int c[4]; for (i=0; i<4; ++i) c[i]=0; while (scanf("%d,%s", &n, t) != EOF) { switch (t[0]) { case 'A': if (t[1]=='B') c[2]++; else c[0]++; break; case 'B': c[1]++; break; case 'O': c[3]++; break; } } for (i=0; i<4; ++i) printf("%d\n", c[i]); return 0; } ~
main.c:18:1: error: expected identifier or '(' before '~' token 18 | ~ | ^
s251477476
p00049
C
int*a;main(c,d,e){for(;~scanf("%*d,%c%c",&c,&d);*(a+((d-66)?(c>68)?3:(c-65):2))++);for(e=0;e<4;printf("%d\n",a[e++]));}
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int] 1 | int*a;main(c,d,e){for(;~scanf("%*d,%c%c",&c,&d);*(a+((d-66)?(c>68)?3:(c-65):2))++);for(e=0;e<4;printf("%d\n",a[e++]));} | ^~~~ main.c: In function 'main': main.c:1:7: error: type of 'c' defaults to 'int' [-Wimplicit-int] main.c:1:7: error: type of 'd' defaults to 'int' [-Wimplicit-int] main.c:1:7: error: type of 'e' defaults to 'int' [-Wimplicit-int] main.c:1:25: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | int*a;main(c,d,e){for(;~scanf("%*d,%c%c",&c,&d);*(a+((d-66)?(c>68)?3:(c-65):2))++);for(e=0;e<4;printf("%d\n",a[e++]));} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int*a;main(c,d,e){for(;~scanf("%*d,%c%c",&c,&d);*(a+((d-66)?(c>68)?3:(c-65):2))++);for(e=0;e<4;printf("%d\n",a[e++]));} main.c:1:25: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | int*a;main(c,d,e){for(;~scanf("%*d,%c%c",&c,&d);*(a+((d-66)?(c>68)?3:(c-65):2))++);for(e=0;e<4;printf("%d\n",a[e++]));} | ^~~~~ main.c:1:25: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:1:80: error: lvalue required as increment operand 1 | int*a;main(c,d,e){for(;~scanf("%*d,%c%c",&c,&d);*(a+((d-66)?(c>68)?3:(c-65):2))++);for(e=0;e<4;printf("%d\n",a[e++]));} | ^~ main.c:1:96: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 1 | int*a;main(c,d,e){for(;~scanf("%*d,%c%c",&c,&d);*(a+((d-66)?(c>68)?3:(c-65):2))++);for(e=0;e<4;printf("%d\n",a[e++]));} | ^~~~~~ main.c:1:96: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:1:96: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:1:96: note: include '<stdio.h>' or provide a declaration of 'printf'
s065447373
p00049
C
main(){1=!puts("10\n6\n10\n0");}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(){1=!puts("10\n6\n10\n0");} | ^~~~ main.c: In function 'main': main.c:1:11: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration] 1 | main(){1=!puts("10\n6\n10\n0");} | ^~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'puts' +++ |+#include <stdio.h> 1 | main(){1=!puts("10\n6\n10\n0");} main.c:1:9: error: lvalue required as left operand of assignment 1 | main(){1=!puts("10\n6\n10\n0");} | ^
s787594687
p00049
C
main(){puts("10 6 10 0");}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(){puts("10 | ^~~~ main.c: In function 'main': main.c:1:8: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration] 1 | main(){puts("10 | ^~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'puts' +++ |+#include <stdio.h> 1 | main(){puts("10 main.c:1:13: warning: missing terminating " character 1 | main(){puts("10 | ^ main.c:1:13: error: missing terminating " character 1 | main(){puts("10 | ^~~ main.c:2:2: error: expected ')' before numeric constant 2 | 6 | ^ | ) 3 | 10 | ~~ main.c:1:12: note: to match this '(' 1 | main(){puts("10 | ^ main.c:4:2: warning: missing terminating " character 4 | 0");} | ^ main.c:4:2: error: missing terminating " character 4 | 0");} | ^~~~ main.c:2:1: error: passing argument 1 of 'puts' makes pointer from integer without a cast [-Wint-conversion] 2 | 6 | ^ | | | int main.c:2:1: note: expected 'const char *' but argument is of type 'int' main.c:4:1: error: expected declaration or statement at end of input 4 | 0");} | ^
s517080189
p00049
C
main(){puts("10 6 10 0");}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(){puts("10 | ^~~~ main.c: In function 'main': main.c:1:8: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration] 1 | main(){puts("10 | ^~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'puts' +++ |+#include <stdio.h> 1 | main(){puts("10 main.c:1:13: warning: missing terminating " character 1 | main(){puts("10 | ^ main.c:1:13: error: missing terminating " character 1 | main(){puts("10 | ^~~ main.c:2:2: error: expected ')' before numeric constant 2 | 6 | ^ | ) 3 | 10 | ~~ main.c:1:12: note: to match this '(' 1 | main(){puts("10 | ^ main.c:4:2: warning: missing terminating " character 4 | 0");} | ^ main.c:4:2: error: missing terminating " character 4 | 0");} | ^~~~ main.c:2:1: error: passing argument 1 of 'puts' makes pointer from integer without a cast [-Wint-conversion] 2 | 6 | ^ | | | int main.c:2:1: note: expected 'const char *' but argument is of type 'int' main.c:4:1: error: expected declaration or statement at end of input 4 | 0");} | ^
s573601564
p00049
C
import java.util.*; import java.io.*; public class Main{ public static void main(String[] args) throws IOException{ Scanner stdIn = null; Map<String, Integer> result = new LinkedHashMap<String, Integer>(); result.put("A", 0); result.put("B", 0); result.put("AB", 0); result.put("O", 0); try{ stdIn = new Scanner(new BufferedReader(new InputStreamReader(System.in))); while( stdIn.hasNext() ){ String str = stdIn.next(); String[] s = str.split(","); Integer num = result.get(s[1]); result.put(s[1], num+1); } for(Integer num : result.values()){ System.out.println(num); } } finally { if( stdIn != null ){ stdIn.close(); } } } }
main.c:1:1: error: unknown type name 'import' 1 | import java.util.*; | ^~~~~~ main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | import java.util.*; | ^ main.c:2:1: error: unknown type name 'import' 2 | import java.io.*; | ^~~~~~ main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 2 | import java.io.*; | ^ main.c:4:1: error: unknown type name 'public' 4 | public class Main{ | ^~~~~~ main.c:4:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main' 4 | public class Main{ | ^~~~
s630992029
p00049
C
#include<stdio.h> main(){ int a,b,o,ab,n; char c[3]={'p','p','\0'}; a=b=o=ab=0; while(scanf("%d,%s",&n,c) != EOF){ if(c[0]=='A' && c[1]!='B'){ a++; } else if(c[0]=='B'){ b++; } else if(c[0]=='O'){ o++; } else{ ab++; } c[0]=c[1]=p; } printf("%d\n%d\n%d\n%d\n",a,b,o,ab); return 0; }
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:19:15: error: 'p' undeclared (first use in this function) 19 | c[0]=c[1]=p; | ^ main.c:19:15: note: each undeclared identifier is reported only once for each function it appears in
s004991552
p00049
C
#include<stdio.h> int main(){ int i; int a = 0; int b = 0; int o = 0; int ab = 0; char bld[2]; while(scanf("%d", &i) != EOF){ scanf("%s", &bld); if(bld == "AB"){ ab++; }else if(bld == "O"){ o++; }else if(bld == "A"){ a++; }else if(bld == "b"){ b++; } } printf("%d\n %d\n %d\n %d\n", a, b ab, o); return 0; }
main.c: In function 'main': main.c:22:43: error: expected ')' before 'ab' 22 | printf("%d\n %d\n %d\n %d\n", a, b ab, o); | ~ ^~~ | )
s869087945
p00049
C
#include<stdio.h> int main(){ int i; int a = 0; int b = 0; int o = 0; int ab = 0; char bld[2]; while(scanf("%d", &i) != EOF){ scanf("%s", &bld); if(bld == "AB"){ ab++; }else if(bld == "O"){ o++; }else if(bld == "A"){ a++; }else if(bld == "B"){ b++; } } printf("%d\n %d\n %d\n %d\n", a, b ab, o); return 0; }
main.c: In function 'main': main.c:22:43: error: expected ')' before 'ab' 22 | printf("%d\n %d\n %d\n %d\n", a, b ab, o); | ~ ^~~ | )
s901806360
p00049
C
include<stdio.h> #include<string.h> int main() { int n,s[4]={0}; char b[3]; for(;;) { if(scanf("%d",&n)==EOF) break; scanf(",%s",&b); if(!strcmp("A",b)) s[0]++; else if(!strcmp("B",b)) s[1]++; else if(!strcmp("AB",b)) s[2]++; else s[3]++; } for(n=0;n<4;n++) printf("%d\n",s[n]); 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
s287824121
p00049
C
#include<stdio.h> #include<string.h> int main(void){ int a,b,ab,o,g; char x[2],a; a=b=ab=o=0; while(scanf("%d%c%s",&g,x)!=EOF){ if(x[0]=='A')(x[1]=='B')?ab++:a++; else if(x[0]=='B')b++; else o++; } printf("%d\n%d\n%d\n%d\n",a,b,ab,o); return 0; }
main.c: In function 'main': main.c:5:15: error: conflicting types for 'a'; have 'char' 5 | char x[2],a; | ^ main.c:4:9: note: previous declaration of 'a' with type 'int' 4 | int a,b,ab,o,g; | ^
s902088983
p00049
C++
#include<ios> int cnt[4];char s[9]; main() { while(~scanf("%*d,%s\n",s)) { cnt[strcmp(s,"AB")?strcmp(s,"A")?strcmp(s,"B")?3:1:0:2]++; } for(int i=0;i<4;i++)printf("%d\n",cnt[i]); }
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main() | ^~~~ a.cc: In function 'int main()': a.cc:7:13: error: 'strcmp' was not declared in this scope 7 | cnt[strcmp(s,"AB")?strcmp(s,"A")?strcmp(s,"B")?3:1:0:2]++; | ^~~~~~ a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<ios> +++ |+#include <cstring> 2 | int cnt[4];char s[9];
s318494470
p00049
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b,ab,o; char var[10]; int now while (cin>>now>>var) { if (var[1]=='B') { ab++; } else if (var[0]=='A') { a++; } else if (var[0]=='B') { b++; } else if (var[0]=='O') { o++; } } printf("%d%d%d%d\n",a,b,ab,o ); }
a.cc: In function 'int main()': a.cc:8:9: error: expected initializer before 'while' 8 | while (cin>>now>>var) | ^~~~~
s202640713
p00049
C++
#include <stdio.h> int main(){ int a; char c[10]; int ans[4]; ans[0] = 0; ans[1] = 0; ans[2] = 0; ans[3] = 0; while(scanf("%d,%s",&a,&c) != EOF){ if(strcmp(c,"A") == 0){ ans[0]++; } if(strcmp(c,"B") == 0){ ans[1]++; } if(strcmp(c,"O") == 0){ ans[2]++; } if(strcmp(c,"AB") == 0){ ans[3]++; } } printf("%d\n%d\n%d\n%d\n",a[0],a[1],a[2],a[3]); return 0; }
a.cc: In function 'int main()': a.cc:12:20: error: 'strcmp' was not declared in this scope 12 | if(strcmp(c,"A") == 0){ | ^~~~~~ a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <stdio.h> +++ |+#include <cstring> 2 | a.cc:15:20: error: 'strcmp' was not declared in this scope 15 | if(strcmp(c,"B") == 0){ | ^~~~~~ a.cc:15:20: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' a.cc:18:20: error: 'strcmp' was not declared in this scope 18 | if(strcmp(c,"O") == 0){ | ^~~~~~ a.cc:18:20: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' a.cc:21:20: error: 'strcmp' was not declared in this scope 21 | if(strcmp(c,"AB") == 0){ | ^~~~~~ a.cc:21:20: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' a.cc:25:36: error: invalid types 'int[int]' for array subscript 25 | printf("%d\n%d\n%d\n%d\n",a[0],a[1],a[2],a[3]); | ^ a.cc:25:41: error: invalid types 'int[int]' for array subscript 25 | printf("%d\n%d\n%d\n%d\n",a[0],a[1],a[2],a[3]); | ^ a.cc:25:46: error: invalid types 'int[int]' for array subscript 25 | printf("%d\n%d\n%d\n%d\n",a[0],a[1],a[2],a[3]); | ^ a.cc:25:51: error: invalid types 'int[int]' for array subscript 25 | printf("%d\n%d\n%d\n%d\n",a[0],a[1],a[2],a[3]); | ^
s320751790
p00049
C++
#include <stdio.h> int main(){ int a; char c[10]; int ans[4]; ans[0] = 0; ans[1] = 0; ans[2] = 0; ans[3] = 0; while(scanf("%d,%s",&a,&c) != EOF){ if(strcmp(c,"A") == 0){ ans[0]++; } if(strcmp(c,"B") == 0){ ans[1]++; } if(strcmp(c,"O") == 0){ ans[2]++; } if(strcmp(c,"AB") == 0){ ans[3]++; } } printf("%d\n%d\n%d\n%d\n",ans[0],ans[1],ans[2],ans[3]); return 0; }
a.cc: In function 'int main()': a.cc:12:20: error: 'strcmp' was not declared in this scope 12 | if(strcmp(c,"A") == 0){ | ^~~~~~ a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <stdio.h> +++ |+#include <cstring> 2 | a.cc:15:20: error: 'strcmp' was not declared in this scope 15 | if(strcmp(c,"B") == 0){ | ^~~~~~ a.cc:15:20: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' a.cc:18:20: error: 'strcmp' was not declared in this scope 18 | if(strcmp(c,"O") == 0){ | ^~~~~~ a.cc:18:20: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' a.cc:21:20: error: 'strcmp' was not declared in this scope 21 | if(strcmp(c,"AB") == 0){ | ^~~~~~ a.cc:21:20: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
s696170786
p00049
C++
#include<iostream> #include<string> #include<vector> #include<cstdio> #include<sstream> #include<algorithm> #include<cmath> #include<map> using namespace std; int ta[4]; string dx[]={"A","B","AB","O"}; int main(){ int a;string b; while(cin>>a,a!=EOF){ cin.ignore();cin>>b; for(int j=0;j<4;j++)if(b==dx[j])ta[j]++; } for(int j=0;j<4;j++)cout<<ta[j]<<endl; } return 0; }
a.cc:21:9: error: expected unqualified-id before 'return' 21 | return 0; | ^~~~~~ a.cc:22:1: error: expected declaration before '}' token 22 | } | ^
s239830052
p00049
C++
#include<stdio.h> int main() { int K,TB=0,TA=0,Tab=0,TM=0; char ch; while(scanf("%c,%d",&ch,&K)!=EOF) { if(ch=="A")TA++; else if(ch=="B")TB++; else if(ch=="AB")Tab++; else if(ch=="O")TM++; } printf("%d\n%d\n%d\n%d\n",TA,TB,Tab,TM); return 0; }
a.cc: In function 'int main()': a.cc:10:6: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | if(ch=="A")TA++; | ~~^~~~~ a.cc:11:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | else if(ch=="B")TB++; | ~~^~~~~ a.cc:12:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 12 | else if(ch=="AB")Tab++; | ~~^~~~~~ a.cc:13:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 13 | else if(ch=="O")TM++; | ~~^~~~~
s311924262
p00049
C++
#include<stdio.h> #include<string> int main() { string str; int K,TB=0,TA=0,Tab=0,TM=0; char ch; while(scanf("%d,%s",&K,str)!=EOF) { if(str=='A')TA++; else if(str=='B')TB++; else if(str=='AB')Tab++; else if(str=='O')TM++; } printf("%d\n%d\n%d\n%d\n",TA,TB,Tab,TM); return 0; }
a.cc:12:14: warning: multi-character character constant [-Wmultichar] 12 | else if(str=='AB')Tab++; | ^~~~ a.cc: In function 'int main()': a.cc:5:1: error: 'string' was not declared in this scope 5 | string str; | ^~~~~~ a.cc:5:1: note: suggested alternatives: In file included from /usr/include/c++/14/string:41, from a.cc:2: /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:8:24: error: 'str' was not declared in this scope; did you mean 'std'? 8 | while(scanf("%d,%s",&K,str)!=EOF) | ^~~ | std
s050404954
p00049
C++
#include <iostream> #include <map> #define FIN(V) cout<<V<<endl int main(void){ map<string, int> map; int n; char c; string s; while(cin >> n >> c >> s){ map[s]++; } FIN(map["A"]); FIN(map["B"]); FIN(map["AB"]); FIN(map["O"]); }
a.cc: In function 'int main()': a.cc:5:9: error: 'map' was not declared in this scope 5 | map<string, int> map; | ^~~ a.cc:5:9: note: suggested alternatives: In file included from /usr/include/c++/14/map:63, from a.cc:2: /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:5:13: error: 'string' was not declared in this scope 5 | map<string, int> map; | ^~~~~~ a.cc:5:13: 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:5:21: error: expected primary-expression before 'int' 5 | map<string, int> map; | ^~~ a.cc:8:15: error: expected ';' before 's' 8 | string s; | ^~ | ; a.cc:9:15: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 9 | while(cin >> n >> c >> 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:9:32: error: 's' was not declared in this scope 9 | while(cin >> n >> c >> s){ | ^ a.cc:3:16: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 3 | #define FIN(V) cout<<V<<endl | ^~~~ a.cc:12:9: note: in expansion of macro 'FIN' 12 | FIN(map["A"]); | ^~~ /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:3:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 3 | #define FIN(V) cout<<V<<endl | ^~~~ a.cc:12:9: note: in expansion of macro 'FIN' 12 | FIN(map["A"]); | ^~~ /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s743133452
p00049
C++
#include <iostream> #include <map> #include <string> #define FIN(V) cout<<V<<endl int main(void){ map<string, int> map; int n; char c; string s; while(cin >> n >> c >> s){ map[s]++; } FIN(map["A"]); FIN(map["B"]); FIN(map["AB"]); FIN(map["O"]); }
a.cc: In function 'int main()': a.cc:6:9: error: 'map' was not declared in this scope 6 | map<string, int> map; | ^~~ a.cc:6:9: note: suggested alternatives: In file included from /usr/include/c++/14/map:63, from a.cc:2: /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: 'string' was not declared in this scope 6 | map<string, int> map; | ^~~~~~ a.cc:6:13: 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:21: error: expected primary-expression before 'int' 6 | map<string, int> map; | ^~~ a.cc:9:15: error: expected ';' before 's' 9 | string s; | ^~ | ; a.cc:10:15: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 10 | while(cin >> n >> c >> 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:10:32: error: 's' was not declared in this scope 10 | while(cin >> n >> c >> s){ | ^ a.cc:4:16: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 4 | #define FIN(V) cout<<V<<endl | ^~~~ a.cc:13:9: note: in expansion of macro 'FIN' 13 | FIN(map["A"]); | ^~~ /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:4:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 4 | #define FIN(V) cout<<V<<endl | ^~~~ a.cc:13:9: note: in expansion of macro 'FIN' 13 | FIN(map["A"]); | ^~~ /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s351472737
p00049
C++
#include<iostream> using namespace std; int main(){ int n; int b[4]={0}; char s[4],comma; while(cin>>n>>comma>>s){ if(strcmp(s,"A")==0) b[0]++; else if(strcmp(s,"B")==0) b[1]++; else if(strcmp(s,"AB")==0) b[2]++; else if(strcmp(s,"O")==0) b[3]++; else break; } for(int i=0;i<4;i++) cout<<b[i]<<endl; }
a.cc: In function 'int main()': a.cc:11:20: error: 'strcmp' was not declared in this scope 11 | if(strcmp(s,"A")==0) | ^~~~~~ a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2 | using namespace std;
s208743048
p00049
C++
#include<iostream> #include<string> using namespace std; int main(){ int n; int b[4]={0}; char s[4],comma; while(cin>>n>>comma>>s){ if(strcmp(s,"A")==0) b[0]++; else if(strcmp(s,"B")==0) b[1]++; else if(strcmp(s,"AB")==0) b[2]++; else if(strcmp(s,"O")==0) b[3]++; else break; } for(int i=0;i<4;i++) cout<<b[i]<<endl; }
a.cc: In function 'int main()': a.cc:12:20: error: 'strcmp' was not declared in this scope 12 | if(strcmp(s,"A")==0) | ^~~~~~ a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2 | #include<string>
s201358912
p00049
C++
#include<iostream> #include<string> using namespace std; int main(){ int n; int b[4]={0}; char s[4],comma; while(cin>>n>>comma>>s){ if(strcmp(s,"A")==0) b[0]++; else if(strcmp(s,"B")==0) b[1]++; else if(strcmp(s,"AB")==0) b[2]++; else if(strcmp(s,"O")==0) b[3]++; } for(int i=0;i<4;i++) cout<<b[i]<<endl; }
a.cc: In function 'int main()': a.cc:12:20: error: 'strcmp' was not declared in this scope 12 | if(strcmp(s,"A")==0) | ^~~~~~ a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2 | #include<string>
s629725109
p00049
C++
#include <iostream> #include <string> using namespace std; int main(){ int a; char b; string c; int t[4] = {0,0,0,0} while(cin >> a >> b >> c){ if(c=="A") t[0]++; if(c=="B") t[1]++; if(c=="AB") t[2]++; if(c=="O") t[3]++; } cout << t[0] << " " << t[1] << " " << t[2] << " " << t[3] << endl; }
a.cc: In function 'int main()': a.cc:9:9: error: expected ',' or ';' before 'while' 9 | while(cin >> a >> b >> c){ | ^~~~~
s617989736
p00049
C++
#include <iostream> #include <string> using namespace std; int main(){ int a; char b; string c; int t[4] = {0,0,0,0} while(cin >> a >> b >> c){ if(c=="A") t[0]++; if(c=="B") t[1]++; if(c=="AB") t[2]++; if(c=="O") t[3]++; } cout << t[0] << " " << t[1] << " " << t[2] << " " << t[3] << endl; }
a.cc: In function 'int main()': a.cc:9:9: error: expected ',' or ';' before 'while' 9 | while(cin >> a >> b >> c){ | ^~~~~
s404802172
p00049
C++
#include<cstdio> #include<cmath> #include<algorithm> #include<cstdio> #include<cmath> #include<iostream> using namespace std; void Solution() { int n; char type; char comma; int a, b, ab, o = 0; //for counting the blood types while (cin>>n>>comma>>type) { if(type == "A") { a++; } else if(type == "B") { b++; } else if(type == "O") { o++; } else { ab++; } } cout<<a<<endl; cout<<b<<endl; cout<<ab<<endl; cout<<o<<endl; } int main() { Solution(); return 0; }
a.cc: In function 'void Solution()': a.cc:23:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 23 | if(type == "A") | ~~~~~^~~~~~ a.cc:27:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 27 | else if(type == "B") | ~~~~~^~~~~~ a.cc:31:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 31 | else if(type == "O") | ~~~~~^~~~~~
s588228347
p00049
C++
#include <string> #include <iostream> using namespace std; int main() { int N, B[4]; string S; memset(B, 0, sizeof(B)); while (cin >> N >> S) { if (S == "A") { B[0] += 1; } else if (S == "B") { B[1] += 1; } else if (S == "AB") { B[2] += 1; } else if (S == "O") { B[3] += 1; } } cout << B[0] << endl << B[1] << endl << B[2] << endl << B[3] << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:9: error: 'memset' was not declared in this scope 10 | memset(B, 0, sizeof(B)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <iostream> +++ |+#include <cstring> 3 |
s623421337
p00049
C++
use strict; use warnings; my $s; my @case = (0, 0, 0, 0); while($s = <>) { chomp $s; my @arr = split /\,/, $s; if($arr[1] eq "A") { $case[0]++; } elsif($arr[1] eq "B") { $case[1]++; } elsif($arr[1] eq "AB") { $case[2]++; } elsif($arr[1] eq "O") { $case[3]++; } } foreach my $i (@case) { print "$i\n"; } exit;
a.cc:5:4: error: stray '@' in program 5 | my @case = (0, 0, 0, 0); | ^ a.cc:8:12: error: stray '@' in program 8 | my @arr = split /\,/, $s; | ^ a.cc:8:26: error: stray '\' in program 8 | my @arr = split /\,/, $s; | ^ a.cc:20:16: error: stray '@' in program 20 | foreach my $i (@case) { | ^ a.cc:1:1: error: 'use' does not name a type 1 | use strict; | ^~~ a.cc:2:1: error: 'use' does not name a type 2 | use warnings; | ^~~ a.cc:4:1: error: 'my' does not name a type 4 | my $s; | ^~ a.cc:5:1: error: 'my' does not name a type 5 | my @case = (0, 0, 0, 0); | ^~ a.cc:6:1: error: expected unqualified-id before 'while' 6 | while($s = <>) { | ^~~~~ a.cc:20:1: error: 'foreach' does not name a type 20 | foreach my $i (@case) { | ^~~~~~~ a.cc:24:1: error: 'exit' does not name a type 24 | exit; | ^~~~ a.cc:1:1: note: 'exit' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>' +++ |+#include <cstdlib> 1 | use strict;
s412661231
p00049
C++
#include<iostream> #include<cstring> using namespace std; int main(){ int num,a[4]={}; char c; string s,b[4]={"A","B","AB","O"}; while(cin>>num>>c>>s){ if(s==b[0]) a[0]++; else if(s==b[1]) a[1]++; else if(s==b[2]) a[2]++; else a[3]++; } for(int i=0;i<4;i++) cout<<a[i]<<endl; return 0;
a.cc: In function 'int main()': a.cc:21:11: error: expected '}' at end of input 21 | return 0; | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s814234410
p00049
C++
#include <string> #include <cstdio> #include <iostream> using namespace std; int main() { int n; string str; int c1, c2, c3, c4 c1 = c2 - c3 = c4 = 0; while (scanf("%d,%s", &n, str){ if (str == "A"){c1++;} if (str == "B"){c2++;} if (str == "AB"){c3++;} if (str == "O"){c4++;} } cout << c1 << "\n" << c2 << "\n" << c3 << "\n" << c4 << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:3: error: expected initializer before 'c1' 11 | c1 = c2 - c3 = c4 = 0; | ^~ a.cc:13:33: error: expected ')' before '{' token 13 | while (scanf("%d,%s", &n, str){ | ~ ^ | ) a.cc:17:21: error: 'c4' was not declared in this scope; did you mean 'c3'? 17 | if (str == "O"){c4++;} | ^~ | c3 a.cc:19:53: error: 'c4' was not declared in this scope; did you mean 'c3'? 19 | cout << c1 << "\n" << c2 << "\n" << c3 << "\n" << c4 << endl; | ^~ | c3
s501158165
p00049
C++
//#define scanf_s scanf //#define gets_s gets #include <stdio.h> #include <string> #include <iostream> #include <math.h> using namespace std; #define MIN 39 #define MAX 150 int main(void) { char c[3]; int A = 0, B = 0, AB = 0, O = 0, x; while (scanf_s("%d,%s", &x, &c) != EOF) { if (c[0] == 'A' && c[1] == 'B') ++B; else if (c[0] == 'A') ++A; else if (c[0] == 'B') ++B; else if (c[0] == 'O') ++O; } printf("%d\n%d\n%d\n%d\n", A, B, AB, O); }
a.cc: In function 'int main()': a.cc:14:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 14 | while (scanf_s("%d,%s", &x, &c) != EOF) { | ^~~~~~~ | scanf
s271114310
p00049
C++
#define scanf_s scanf //#define gets_s gets #include <stdio.h> #include <string> #include <iostream> #include <math.h> using namespace std; #define MIN 39 #define MAX 150 int main(void) { char c[3]; int A = 0, B = 0, AB = 0, O = 0, x; while (scanf_s("%d,", &x) != EOF) { gets_s(c, 3); if (c[0] == 'A' && c[1] == 'B') ++AB; else if (c[0] == 'A') ++A; else if (c[0] == 'B') ++B; else if (c[0] == 'O') ++O; } printf("%d\n%d\n%d\n%d\n", A, B, AB, O); }
a.cc: In function 'int main()': a.cc:15:17: error: 'gets_s' was not declared in this scope 15 | gets_s(c, 3); | ^~~~~~
s158212510
p00049
C++
#include<iostream> #include<string> using namespace std; int main(){ int n, a = b = o = ab = 0; char delim; string type; while( cin >> n >> delim >> type ){ if ( type == "A" ) a++; else if ( type == "B" ) b++; else if ( type == "AB" ) ab++; else if ( type == "O" ) o++; } cout << a << endl << b << endl << ab << endl << o << endl; }
a.cc: In function 'int main()': a.cc:5:20: error: 'b' was not declared in this scope 5 | int n, a = b = o = ab = 0; | ^ a.cc:5:24: error: 'o' was not declared in this scope 5 | int n, a = b = o = ab = 0; | ^ a.cc:5:28: error: 'ab' was not declared in this scope; did you mean 'a'? 5 | int n, a = b = o = ab = 0; | ^~ | a
s144719508
p00049
C++
#include<iostream> #include<cstdio> #include<string> using namespace std; int main() { char commma; int num; string blood; int a = 0, b = 0, ab = 0, o = 0; while (1) { cin >> num >> commma >> blood; if (cin.eof)break;//??\????????????????????°break if (blood == "A")a++; else if (blood == "B")b++; else if (blood == "AB")ab++; else o++; } cout << a << endl; cout << b << endl; cout << ab << endl; cout << o << endl; return 0; }
a.cc: In function 'int main()': a.cc:14:28: error: cannot convert 'std::basic_ios<char>::eof' from type 'bool (std::basic_ios<char>::)() const' to type 'bool' 14 | if (cin.eof)break;//??\????????????????????°break | ^
s446013807
p00049
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a[4]={0}; string s; while(cin>>s){ if(s.size()>3)a[3]++; else if(s[3]=='B')a[1]++; else if(s[3]=='O')a[2]++; else a[0]++; } for(int i=0;i<4;i++)cout<<a[i]<<end; }
a.cc: In function 'int main()': a.cc:12:39: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 12 | for(int i=0;i<4;i++)cout<<a[i]<<end; | ~~~~~~~~~~^~~~~ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127, from a.cc:1: /usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'} 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]' 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ^~~~~~~~ /usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 174 | operator<<(long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int' 174 | operator<<(long __n) | ~~~~~^~~ /usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 178 | operator<<(unsigned long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int' 178 | operator<<(unsigned long __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 182 | operator<<(bool __n) | ^~~~~~~~ /usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool' 182 | operator<<(bool __n) | ~~~~~^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]' 96 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int' 97 | operator<<(short __n) | ~~~~~~^~~ /usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 189 | operator<<(unsigned short __n) | ^~~~~~~~ /usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int' 189 | operator<<(unsigned short __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]' 110 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int' 111 | operator<<(int __n) | ~~~~^~~ /usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 200 | operator<<(unsigned int __n) | ^~~~~~~~ /usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int' 200 | operator<<(unsigned int __n) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 211 | operator<<(long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int' 211 | operator<<(long long __n) | ~~~~~~~~~~^~~ /usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 215 | operator<<(unsigned long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int' 215 | operator<<(unsigned long long __n) | ~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 231 | operator<<(double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double' 231 | operator<<(double __f) | ~~~~~~~^~~ /usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 235 | operator<<(float __f) | ^~~~~~~~ /usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float' 235 | operator<<(float __f) | ~~~~~~^~~ /usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 243 | operator<<(long double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double' 243 | operator<<(long double __f) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 301 | operator<<(const void* __p) | ^~~~~~~~ /usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*' 301 | operator<<(const void* __p) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std:
s087715229
p00049
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a[4]={0}; string s; while(cin>>s){ if(s.size()>3)a[3]++; else if(s[2]=='B')a[1]++; else if(s[2]=='O')a[2]++; else a[0]++; } for(int i=0;i<4;i++)cout<<a[i]<<end; }
a.cc: In function 'int main()': a.cc:12:39: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 12 | for(int i=0;i<4;i++)cout<<a[i]<<end; | ~~~~~~~~~~^~~~~ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127, from a.cc:1: /usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'} 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]' 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ^~~~~~~~ /usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 174 | operator<<(long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int' 174 | operator<<(long __n) | ~~~~~^~~ /usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 178 | operator<<(unsigned long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int' 178 | operator<<(unsigned long __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 182 | operator<<(bool __n) | ^~~~~~~~ /usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool' 182 | operator<<(bool __n) | ~~~~~^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]' 96 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int' 97 | operator<<(short __n) | ~~~~~~^~~ /usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 189 | operator<<(unsigned short __n) | ^~~~~~~~ /usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int' 189 | operator<<(unsigned short __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]' 110 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int' 111 | operator<<(int __n) | ~~~~^~~ /usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 200 | operator<<(unsigned int __n) | ^~~~~~~~ /usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int' 200 | operator<<(unsigned int __n) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 211 | operator<<(long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int' 211 | operator<<(long long __n) | ~~~~~~~~~~^~~ /usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 215 | operator<<(unsigned long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int' 215 | operator<<(unsigned long long __n) | ~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 231 | operator<<(double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double' 231 | operator<<(double __f) | ~~~~~~~^~~ /usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 235 | operator<<(float __f) | ^~~~~~~~ /usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float' 235 | operator<<(float __f) | ~~~~~~^~~ /usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 243 | operator<<(long double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double' 243 | operator<<(long double __f) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 301 | operator<<(const void* __p) | ^~~~~~~~ /usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*' 301 | operator<<(const void* __p) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std:
s476137054
p00049
C++
#include<iostream> #include<string> using namespace std; int main() { int s[50]; string str[50]; int i = 0; int a, b, ab, o = 0; while (scanf_s("%d,%s", s[i], str[i])) { i++; if (str[i] == "A") { a++; } else if (str[i] == "B") { b++; } else if (str[i] == "AB") { ab++; } else if (str[i] == "O") { o++; } } cout << a << endl; cout << b << endl; cout << ab << endl; cout << o << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 10 | while (scanf_s("%d,%s", s[i], str[i])) { | ^~~~~~~ | scanf