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 '<std...
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 '<std...
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 '<std...
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> ...
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("welt...
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; ...
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>...
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(...
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...
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");...
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 ) pri...
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...
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<=6...
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": ...
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": ...
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": ...
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...
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; ...
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 ...
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 decim...
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...
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 poi...
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; el...
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...
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...
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...
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 = ...
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(i...
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(i...
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...
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)...
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)...
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"; ...
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 <...
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 w...
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...
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...
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...
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...
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 m...
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...
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" <...
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 << "...
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 wel...
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...
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...
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 ...
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){ ...
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 | } | ...
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" <<...
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("welt...
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++)...
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:...
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++)...
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:...
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 we...
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 we...
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: | ...
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]....
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",...
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[]) { ...
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;...
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(Str...
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; ...
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...
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....
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)); ...
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]+...
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)); ...
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...
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...
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; ...
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+...
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 ...
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 ...
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...
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]++; ...
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...
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){ ...
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){ ...
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:...
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:...
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; ...
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: e...
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: no...
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 d...
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 d...
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...
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:...
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\...
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 funct...
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...
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...
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)) ...
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)); | ...
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...
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]...
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> +++...
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]...
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> +++...
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]++; ...
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: e...
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/...
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:...
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:...
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++) ...
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> +++ |+...
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(in...
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> +++ |+...
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++) ...
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> +++ |+...
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.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") ...
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; } ...
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 <cstri...
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"; }...
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:...
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]<<en...
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...
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: erro...
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;...
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] == '...
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 << ...
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 dec...
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 i...
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/istre...
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/istre...
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] == ...
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