submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s143090045
p00218
C++
#include<iostream> #include<algorithm> using namespace std; char hyakuten(int *students[][3],int n){ for(int i=0;i<3;i++){ if(students[n][i]==100)return 'A'; } if((students[n][0]+students[n][1])/2>=90)return 'A'; if((students[n][0]+students[n][1]+students[n][2])/3>=80)return 'A'; if((students[n][0]+student...
a.cc: In function 'char hyakuten(int* (*)[3], int)': a.cc:6:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 6 | if(students[n][i]==100)return 'A'; | ~~~~~~~~~~~~~~^~~~~ a.cc:8:21: error: invalid operands of types 'int*' and 'int*' to binary 'operator+' 8 | if((s...
s319399102
p00218
C++
#include<iostream> #include<algorithm> using namespace std; char hyakuten(int students[][3],int n){ for(int i=0;i<3;i++){ if(students[n][i]==100)return 'A'; } if((students[n][0]+students[n][1])/2>=90)return 'A'; if((students[n][0]+students[n][1]+students[n][2])/3>=80)return 'A'; if((students[n][0]+students...
a.cc: In function 'char hyakuten(int (*)[3], int)': a.cc:11:7: error: 'studnets' was not declared in this scope; did you mean 'students'? 11 | if((studnets[n][0]+studnets[n][1]+students[n][2])/3>=50&&students[n][0]>=80||students[n][1]>=80)return 'B'; | ^~~~~~~~ | students a.cc: In function ...
s445172150
p00218
C++
#include<iostream> #include<algorithm> using namespace std; char hyakuten(int students[][3],int n){ for(int i=0;i<3;i++){ if(students[n][i]==100)return 'A'; } if((students[n][0]+students[n][1])/2>=90)return 'A'; if((students[n][0]+students[n][1]+students[n][2])/3>=80)return 'A'; if((students[n][0]+students...
a.cc: In function 'char hyakuten(int (*)[3], int)': a.cc:11:22: error: 'studnets' was not declared in this scope; did you mean 'students'? 11 | if((students[n][0]+studnets[n][1]+students[n][2])/3>=50&&students[n][0]>=80||students[n][1]>=80)return 'B'; | ^~~~~~~~ | ...
s322770267
p00218
C++
#include<iostream> #include<algorithm> using namespace std; char hyakuten(int students[][3],int n){ for(int i=0;i<3;i++){ if(students[n][i]==100)return 'A'; } if((students[n][0]+students[n][1])/2>=90)return 'A'; if((students[n][0]+students[n][1]+students[n][2])/3>=80)return 'A'; if((students[n][0]+students...
a.cc: In function 'int main()': a.cc:26:22: error: invalid conversion from 'int' to 'int (*)[3]' [-fpermissive] 26 | cout<<hyakuten(i)<<endl; | ^ | | | int a.cc:26:21: error: too few arguments to function 'char hyakuten(int (*)[3]...
s245608764
p00218
C++
#include<iostream> #include<algorithm> using namespace std; char hyakuten(int students[][3],int n){ for(int i=0;i<3;i++){ if(students[n][i]==100)return 'A'; } if((students[n][0]+students[n][1])/2>=90)return 'A'; if((students[n][0]+students[n][1]+students[n][2])/3>=80)return 'A'; if((students[n][0]+students...
a.cc: In function 'int main()': a.cc:26:32: error: cannot convert 'int*' to 'int (*)[3]' 26 | cout<<hyakuten(students[i],i)<<endl; | ~~~~~~~~~~^ | | | int* a.cc:4:19: note: initializing argument 1 of 'char hy...
s737257033
p00218
C++
#include<iostream> #include<algorithm> using namespace std; char hyakuten(int students[][3],int n){ for(int i=0;i<3;i++){ if(students[n][i]==100)return 'A'; } if((students[n][0]+students[n][1])/2>=90)return 'A'; if((students[n][0]+students[n][1]+students[n][2])/3>=80)return 'A'; if((students[n][0]+students...
a.cc: In function 'int main()': a.cc:26:34: error: expected primary-expression before ']' token 26 | cout<<hyakuten(students[i][],i)<<endl; | ^
s165665571
p00218
C++
#include<iostream> #include<algorithm> using namespace std; char hyakuten(int students[][3],int n){ for(int i=0;i<3;i++){ if(students[n][i]==100)return 'A'; } if((students[n][0]+students[n][1])/2>=90)return 'A'; if((students[n][0]+students[n][1]+students[n][2])/3>=80)return 'A'; if((students[n][0]+students...
a.cc: In function 'int main()': a.cc:26:35: error: invalid conversion from 'int' to 'int (*)[3]' [-fpermissive] 26 | cout<<hyakuten(students[i][0],i)<<endl; | ~~~~~~~~~~~~~^ | | | int a.cc:4:19: note: i...
s787004049
p00218
C++
#include<iostream> using namespace std; int main(){ while(true){ int n; cin >> n; if(n == 0)break; for(int i = 0; i < n; i++){ int pm, pe, pj; cin >> pm >> pe >> pj; if(pm,pe,pj == 100 || (pm + pe) / 2 >= 90 || (pm + pe + pj) / 3 >= 80){ cout << "A" << endl; } else if((pm + pe + pj) / 3 >= 7...
a.cc: In function 'int main()': a.cc:24:2: error: expected '}' at end of input 24 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s981285106
p00218
C++
#include<stdio.h> int main(void) { int i,a,b[10001],c[10001],d[10001]; while(1){ scanf("%d",&a); if(a==0) break; for(i=0;i<a;i++){ scanf("%d %d %d",&b[i],&c[i],&d[i]); } for(i=0;i<a;i++){ if(b==100||c==100||d==100){ printf("A\n"); } else if((b+c)/2>=90){ printf("A\n"); } else if((b+c+d)/3>=80){ print...
a.cc: In function 'int main()': a.cc:12:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 12 | if(b==100||c==100||d==100){ | ~^~~~~ a.cc:12:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 12 | if(b==100||c==100||d==10...
s733856827
p00218
C++
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <queue> #include <bitset> #include <set> #include <map> #include <stack> #include <list> #define rep(i,n) for(int i=0;i<n;i++) #define REP(i,b,n) for(int i=b;i<n;i++) #define SORT(c) sort((c).begin(),(c).end()) #define DESCSORT(c) so...
a.cc: In function 'int main()': a.cc:34:16: error: expected primary-expression before '>' token 34 | if(tmp1 => 90 || tmp2 => 80 || pm == 100 || pe == 100 || pj == 100) { | ^ a.cc:34:30: error: expected primary-expression before '>' token 34 | if(tmp1 => 90 || tmp2 => 80 || pm == ...
s800241857
p00218
C++
#include<stdio.h> int main(void) { int n,a,b,c,i; scanf("%d",&n); while(n!=0){ for(i=0;i<n;i++){ scanf("%d %d %d",&a,&b,&c); if(a==100 || b==100 || c==100 || (a+b)/2>89 || (a+b+c)/3>79) printf("A\n"); else if((a+b+c)/3>69 && (a+b+c)/3>49 && (a>79 || b>79)) printf("A\n"); else if((a+b+c)/3>69 || (a+b+...
a.cc: In function 'int main()': a.cc:16:18: error: expected '}' at end of input 16 | return 0; | ^ a.cc:3:1: note: to match this '{' 3 | { | ^
s718014332
p00218
C++
#include<iostream> int n,pm,pe,pj; char solve(int m, int e, int j){ char ans='C'; if(m==100 || e==100 || j==100 || m+e>=180 || m+e+j>=240) ans = 'A'; else if(m+e+j>=210 || (m+e+j>=50 && (m>=80 || e>=80))) ans = 'B'; return ans; } int main(){ while(true){ std::cin >> n; if(!n) return 0; for(int i=0;...
a.cc: In function 'int main()': a.cc:23:26: error: 'c' was not declared in this scope 23 | delete[] c; | ^
s636523328
p00218
C++
#include<iostream> char *c; int n,pm,pe,pj; char solve(int m, int e, int j){ char ans='C'; if(m==100 || e==100 || j==100 || m+e>=180 || m+e+j>=240) ans = 'A'; else if(m+e+j>=210 || (m+e+j>=150 && (m>=80 || e>=80))) ans = 'B'; return ans; } int main(){ while(true){ std::cin >> n; if(!n) return 0; c ...
a.cc: In function 'int main()': a.cc:26:46: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 26 | std::cout << c[i] << endl; | ^~~~ | std::endl In file included from /u...
s622743576
p00218
C++
g#include <iostream> using namespace std; char divide(int m, int e, int j) { if (m == 100 || e == 100 || j == 100) return 'A'; if ( (m+e)/2 >= 90 ) return 'A'; if ( (m+e+j)/3 >= 80 ) return 'A'; if ( (m+e+j)/3 >= 70 ) return 'B'; if ( (m+e+j)/3 >= 50 && (m >= 80 || e >= 80) ) return 'B'; retur...
a.cc:1:2: error: stray '#' in program 1 | g#include <iostream> | ^ a.cc:1:1: error: 'g' does not name a type 1 | g#include <iostream> | ^ a.cc: In function 'int main()': a.cc:16:12: error: 'cin' was not declared in this scope 16 | while (cin >> n, n) { | ^~~ a.cc:20:13: erro...
s317100454
p00218
C++
#include <iostream> using namespace std; &#160; char judge(int pm, int pe, int pj) { &#160; &#160; if(pm == 100 || pe == 100 || pj == 100 || pm + pe >= 180 || pm + pe + pj >= 240) return 'A'; &#160; &#160; else if(pm + pe + pj >= 210 || pm + pe + pj >= 150 && (pm >= 80 || pe >= 80)) return 'B'; &#160; &#160; return 'C'...
a.cc:3:2: error: stray '#' in program 3 | &#160; | ^ a.cc:6:2: error: stray '#' in program 6 | &#160; &#160; if(pm == 100 || pe == 100 || pj == 100 || pm + pe >= 180 || pm + pe + pj >= 240) return 'A'; | ^ a.cc:6:9: error: stray '#' in program 6 | &#160; &#160; if(pm == 100 || pe == 100 || pj ...
s714102804
p00218
C++
#include<cstdio> using namespace std; int main(){ int n, a, b, c, i , ans[10000]; while(1){ scanf("%d", &n); if(n == 0) break; for(i = 0; i < n; i++){ ans[i] = 0; scanf("%d %d %d", &a, &b, &c); if((a == 100 || b == 100 || c == 100) || (a + b) / 2 >= ...
a.cc: In function 'int main()': a.cc:20:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 20 | if(ans > 1) printf("%s\n", 'A'); | ~~~~^~~ a.cc:21:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 21 | if(ans...
s422222699
p00218
C++
#include<cstdio> using namespace std; int main(){ int n, a, b, c, i , ans[10000]; while(1){ scanf("%d", &n); if(n == 0) break; for(i = 0; i < n; i++){ ans[i] = 0; scanf("%d %d %d", &a, &b, &c); if((a == 100 || b == 100 || c == 100) || (a + b) / 2 >= ...
a.cc: In function 'int main()': a.cc:18:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 18 | if(ans > 1) printf("A\n"); | ~~~~^~~ a.cc:19:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 19 | if(ans == 1)...
s951882312
p00218
C++
#include<cstdio> using namespace std; int main(){ int n, a, b, c, i , ans[10000]; while(1){ scanf("%d", &n); if(n == 0) break; for(i = 0; i < n; i++){ ans[i] = 0; scanf("%d %d %d", &a, &b, &c); if((a == 100 || b == 100 || c == 100) || (a + b) / 2 >= ...
a.cc: In function 'int main()': a.cc:14:117: error: expected ';' before 'ans' 14 | if((a + b + c) / 3 >= 70 || ((a + b + c) / 3 >= 50 && a >= 80) || ((a + b + c) / 3 >= 50 && b >= 80) ans[i]++; | ...
s329304511
p00218
C++
#include<cstdio> using namespace std; int main(){ int n, a, b, c, i , ans[10000]; while(1){ scanf("%d", &n); if(n == 0) break; for(i = 0; i < n; i++){ ans[i] = 0; scanf("%d %d %d", &a, &b, &c); if((a == 100 || b == 100 || c == 100) || (a + b) / 2 >= ...
a.cc: In function 'int main()': a.cc:18:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 18 | if(ans > 1) printf("A\n"); | ~~~~^~~ a.cc:19:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 19 | if(ans == 1)...
s907661651
p00218
C++
#include<stdio.h> int main(void){ int i,k; int h1,m1,s1,h2,m2,s2; int sum1,sum2; while(scanf("%d",&k)==0){ for(i=0;i<k;i++){ scanf("%d %d %d",&h1,&m1,&s1); sum1=h1+m1; sum2=h1+m1+s1; if((h1==100||m1==100||s1==100)||sum1=>180||sum2==270) printf("A\n"); els...
a.cc: In function 'int main()': a.cc:13:45: error: expected primary-expression before '>' token 13 | if((h1==100||m1==100||s1==100)||sum1=>180||sum2==270) printf("A\n"); | ^ a.cc:14:21: error: expected primary-expression before '>' token 14 | else if...
s249219403
p00218
C++
#include<stdio.h> int main(void){ int i,k; int h1,m1,s1,h2,m2,s2; int sum1,sum2; while(scanf("%d",&k)==0){ for(i=0;i<k;i++){ scanf("%d %d %d",&h1,&m1,&s1); sum1=h1+m1; sum2=h1+m1+s1; if((h1==100||m1==100||s1==100)||sum1=>180||sum2==270) printf("A\n"); els...
a.cc: In function 'int main()': a.cc:13:45: error: expected primary-expression before '>' token 13 | if((h1==100||m1==100||s1==100)||sum1=>180||sum2==270) printf("A\n"); | ^ a.cc:14:21: error: expected primary-expression before '>' token 14 | else if...
s985332071
p00218
C++
#include<stdio.h> int main(void){ int i,n,t1,t2,j,m,e; while(0==0) { scanf("%d",&n); if(n==0)break; for(i=0;i<n;i++){ scanf("%d %d %d",&m,&e,&j); t1=m+e; t2=m+e+j; if((m==100 || e==100 || j==100) || (t1>=180) || (t2>=240)) printf("A\n"); else if((t2>=210) || (t2>=150 && ( m>=80 || e>=80))) ...
a.cc: In function 'int main()': a.cc:20:2: error: expected '}' at end of input 20 | } | ^ a.cc:3:15: note: to match this '{' 3 | int main(void){ | ^
s047690924
p00219
Java
#include <stdio.h> int main(void) { int n,i,j,k[10],buy; while (1) { scanf("%d",&n); if (n==0) break; for (i=0;i<10;i++) k[i] = 0; for (i=0;i<n;i++) { scanf("%d",&buy); k[buy]++; } for (i=0;i<10;i++) { if (k[i]==0) puts("-"); else { for (j=0;j<k[i];j++) { putchar('*'); } put...
Main.java:1: error: illegal character: '#' #include <stdio.h> ^ Main.java:1: error: class, interface, enum, or record expected #include <stdio.h> ^ Main.java:5: error: class, interface, enum, or record expected while (1) { ^ Main.java:7: error: class, interface, enum, or record expected if (n==0) break; ...
s561910804
p00219
Java
import java.io.*; class Main { public static void main(String[] args)throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int[] iceCount = new int[10]; int total; while (total != 0) { total = Integer.parseInt(br.readLin...
Main.java:9: error: variable total might not have been initialized while (total != 0) { ^ 1 error
s883692227
p00219
C
include<stdio.h> int main(void) { int n,i,j,temp; int ice[10]; while(scanf("%d",&n)!=0) { if(n==0) { printf("\n"); break; } else { for(i=0;i<10;i++) { ice[i]=0; } for(i=0;i<n;i++) { scanf("%d",&temp); ice[temp]++; } for(i=0;i<10;i++) { if(ice[i]==0) pr...
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^
s355949439
p00219
C
\include<stdio.h> #define NUM 10 void hist(int); int main() { int ice[NUM]; int i; for(i=0;i<NUM;i++) ice[i]=0; scanf("%d",&n); for(;n>0;n--) { scanf("%d",&i); ice[i]++; } for(i=0;i<NUM;i++) hist(ice[i]); return 0; } void hist(int x) { if(x) { for(;x>0;x--) printf("*"); } else printf("-"); printf("\n"); }
main.c:1:1: error: stray '\' in program 1 | \include<stdio.h> | ^ main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | \include<stdio.h> | ^ main.c: In function 'main': main.c:9:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declar...
s179848607
p00219
C
\include<stdio.h> #define NUM 10 void hist(int); int main() { int ice[NUM]; int i,n; for(i=0;i<NUM;i++) ice[i]=0; scanf("%d",&n); for(;n>0;n--) { scanf("%d",&i); ice[i]++; } for(i=0;i<NUM;i++) hist(ice[i]); return 0; } void hist(int x) { if(x) { for(;x>0;x--) printf("*"); } else printf("-"); printf("\n"); }
main.c:1:1: error: stray '\' in program 1 | \include<stdio.h> | ^ main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | \include<stdio.h> | ^ main.c: In function 'main': main.c:9:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declar...
s998473111
p00219
C
b[10][2500],t;main(n){for(;scanf("%d",&n)*n;){for(;n--;strcat(b[t],"*"))scanf("%d",&t);for(;++n<10;b[n]=0)puts(*b[n]?b[n]:"-");}}
main.c:1:1: warning: data definition has no type or storage class 1 | b[10][2500],t;main(n){for(;scanf("%d",&n)*n;){for(;n--;strcat(b[t],"*"))scanf("%d",&t);for(;++n<10;b[n]=0)puts(*b[n]?b[n]:"-");}} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:13: error: type ...
s039810783
p00219
C++
#include<iostream> using namespace std; int main() { while(cin>>n){ int x,m,n; int a[10000]; for(int i =0;i<n;i++){ cin >> m; a[m] += 1; } for(int j =0;j<10;j++){ if(a[j]==0){ cout << "-"; }else{ for(int k =0;k<a[j];k++){ cout << "*"; } } cout << endl; } } r...
a.cc: In function 'int main()': a.cc:6:14: error: 'n' was not declared in this scope 6 | while(cin>>n){ | ^
s269516691
p00219
C++
#include<iostream> using namespace std; int main(){ int n; cin >> n; string t[]{0}; for (int i=0;i<n;++i){ cin >> t[i] } for (int i=0;i<1000000000;++i){ for (int j=0;j<t.find(i);++j){ cout << '*'; } cout << endl; } }
a.cc: In function 'int main()': a.cc:8:20: error: expected ';' before '}' token 8 | cin >> t[i] | ^ | ; 9 | } | ~ a.cc:11:26: error: request for member 'find' in 't', which is of non-class type 'std::string [1]' {aka 'std::__...
s801411614
p00219
C++
case 0: n[0]++;break; #include<stdio.h> int main(){ int n[11]={}; int N,x; while(1){ scanf("%d",&N); for(int i=0;i<N;i++) { scanf("%d",&x); n[x]++; } for(int i=0;i<10;i++) { if(n[i]>0){ for(int j=0;j<n[i];j++) printf("*");} else if(n[i]==0)printf("-"); } printf("\n"); } return 0; }
a.cc:1:1: error: expected unqualified-id before 'case' 1 | case 0: | ^~~~ a.cc:2:8: error: expected unqualified-id before 'break' 2 | n[0]++;break; | ^~~~~
s943176828
p00219
C++
q
a.cc:1:1: error: 'q' does not name a type 1 | q | ^
s920760544
p00219
C++
#include <iostream> #include <string> int ice[10]; int main(){ int n; whlie(std::cin>>n,n){ for(int i=0;i<10;++i)ice[i]=0; for(int i=0;i<n;++i){ int a; std::cin>>a; ice[a]++; } for(int i=0;i<10;i++){ if(ice[i]==0)std::cout<<'-'<<std::endl; else { std::string s(ice[i],'*'); std::cout<<s<...
a.cc: In function 'int main()': a.cc:6:9: error: 'whlie' was not declared in this scope 6 | whlie(std::cin>>n,n){ | ^~~~~
s636879679
p00219
C++
#include<iostream> #include<cstring> using namespace std; int n, a[10], x, n; int main() { while (true) { cin >> n; if (n == 0) { break; } memset(a, 0, sizeof(a)); for (int i = 0; i < n; i++) { cin >> x; a[x]++; } for (int i = 0; i < 10; i++) { if (a[i] == 0) { cout << '-' << endl; } else { ...
a.cc:4:18: error: redefinition of 'int n' 4 | int n, a[10], x, n; | ^ a.cc:4:5: note: 'int n' previously declared here 4 | int n, a[10], x, n; | ^
s710262431
p00219
C++
import java.util.Scanner import scala.collection.Searching._ import scala.annotation.tailrec import scala.collection.immutable.{NumericRange, Queue} import scala.collection.mutable import scala.io.StdIn.readLine class IUnionFind(val size: Int) { private case class Node(var parent: Option[Int], var treeSize: Int) ...
a.cc:37:3: error: stray '@' in program 37 | @tailrec | ^ 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:6:1: error: 'import' does not name a type 6 | import scala.collection.mutable ...
s231414978
p00219
C++
/* 1 行目に一日に販売されるアイスクリームの総数 n (1 ≤ n ≤ 10000) が与えられます。 * 続く n 行に第 i のアイスクリームの種類 ci (0 ≤ ci≤ 9) が与えられます。 * データセットの数は 20 を超えません。*/ #include<iostream> using namespace std; int main(){ while(true){ int n; cin>>n; if(n==0)break; int sum[10]={}; for(int i=0;i<n;i++){ int b; cin>>b; sum[b]+=1; } for(i...
a.cc: In function 'int main()': a.cc:18:19: error: 'j' was not declared in this scope 18 | if(sum[j]==0){ | ^ a.cc:25:8: error: expected '}' at end of input 25 | } | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s367346527
p00219
C++
#include<cstdio> #include<algoritm> #include<iostream> using namespace std; int main() { int n,c[10]={0},m; while(1) { for(int i=0;i<10;i++) { c[i]=0; } cin>>n; if(n==0) { break; } for(int i=1;i<=n;i++) { cin>>m; c[m]+=1; } for(int i=0;i<10;i++) { if(c[i]==0) { cout<<"_...
a.cc:2:9: fatal error: algoritm: No such file or directory 2 | #include<algoritm> | ^~~~~~~~~~ compilation terminated.
s518872640
p00219
C++
#include<cstdio> #include<cstring> int main(){ int a,j,b[10]; while(1){ scanf("%d",&a); if(a==0) return 0; memset(b,0,sizeof(int)*10); for(int i=0;i<a;i++){ scanf("%d",&j); b[j]++; } for(int i=0;i<10;i++){ if(s==0){ printf("-\n"); continue; } for(int s=0;s<b[j];s++){ printf("*"); } printf(...
a.cc: In function 'int main()': a.cc:14:6: error: 's' was not declared in this scope 14 | if(s==0){ | ^
s994925041
p00219
C++
#include <iostream> using namespace std; int main() { int n, t; while(cin >> n && n) { int hist[10]; memset(hist, 0, sizeof(hist)); for(int i = 0; i < n; i++) { cin >> t; hist[t]++; } for(int i = 0; i < 10; i++) { if(hist[i] == 0) { ...
a.cc: In function 'int main()': a.cc:9:9: error: 'memset' was not declared in this scope 9 | memset(hist, 0, sizeof(hist)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <...
s289147939
p00219
C++
#include<cstdio> int main(){ int i,j; for(int n;scanf("%d",&n),n;){ int p[10]={}; for(i=n;i;--i){ scanf("%d",&j),++p[j]; for(i=0;i<10;++i,puts("")){ for(j=0;j<p[i];++j) printf("*"); if(!p[i])printf("-"); } } }
a.cc: In function 'int main()': a.cc:15:2: error: expected '}' at end of input 15 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s793523066
p00220
Java
import java.util.Scanner; public class A { public static void main(String[] args) { Scanner sc = new Scanner(System.in); for (;;) { double n = sc.nextDouble()*16; if (n < 0) break; if (n >= 4096 || n != (int) n) System.out.println(...
Main.java:3: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error
s042552669
p00220
C
#include<stdio.h> #define limit ( 1 << 8 ) - 1 void seisuu( int over_zero ) { int len = 0 ; char out[] = { "00000000" } ; while( over_zero > 1 ) { out[ len ] = ( over_zero % 2 ) + '0' ; over_zero /= 2 ; ++len ; } out[ len++ ] = over_zero + '0' ; while( len-- ) { printf( "%c" ,out[ len ] ...
main.c:42:1: error: unknown type name 'bool' 42 | bool shousuu( char *out ,double under_zero ) | ^~~~ main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' 1 | #include<stdio.h> +++ |+#include <stdbool.h> 2 | main.c: In function 'shous...
s292902495
p00220
C
n;char s[14];main(float d){for(s[8]=46;~scanf("%f",&d);d<0||puts(d-n/16.?"NA":s))for(n=d*16,i=12;i--;n/=2)s[i+i/8]=48+n%2;}
main.c:1:1: warning: data definition has no type or storage class 1 | n;char s[14];main(float d){for(s[8]=46;~scanf("%f",&d);d<0||puts(d-n/16.?"NA":s))for(n=d*16,i=12;i--;n/=2)s[i+i/8]=48+n%2;} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int] main.c:1:14: error: return type...
s478348746
p00220
C
b,i,j;main(n){float a,x;char t[9],l[9];for(;;){for(i=0;i<9;i++)t[i]=l[i]='0';scanf("%f",&a);if(a<0)break;b=a;for(i=0;b;)t[i++]='0'+b%2,b/=2;b=a;a-=b;x=0.5;for(j=0;a>0 && j<5;j++){a-x>=0&&l[j]='1',a-=x;x/=2;}if(j>4)puts("NA");else{for(b=0;b++<8-i;)printf("0");for(;i;)printf("%c",t[--i]);printf(".");for(;j>i;)printf("%c"...
main.c:1:1: warning: data definition has no type or storage class 1 | b,i,j;main(n){float a,x;char t[9],l[9];for(;;){for(i=0;i<9;i++)t[i]=l[i]='0';scanf("%f",&a);if(a<0)break;b=a;for(i=0;b;)t[i++]='0'+b%2,b/=2;b=a;a-=b;x=0.5;for(j=0;a>0 && j<5;j++){a-x>=0&&l[j]='1',a-=x;x/=2;}if(j>4)puts("NA");else{for(b=0;b++<8-i;...
s624258548
p00220
C
/*PCK2010-5 ”ŽŽm‚̈¤‚µ‚½“ñi” 2011.8.6*/ #include <stdio.h> #include <string.h> float Seisuu(float m); /*®”•”•ª”²‚«o‚µŠÖ”‚̊֐”ƒvƒƒgƒ^ƒCƒvéŒ¾*/ int main(void) /*mainŠÖ”*/ { /*•ϐ”éŒ¾*/ float num; /*“ü—Í‚·‚é\i”*/ float seisuu; /*SeisuuŠÖ”‚̉¼ˆø”‘ã“ü—p•ϐ”(num‚̐®”•”Ši”[•ϐ”)*/ float syousuu; /...
main.c: In function 'main': main.c:51:42: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 51 | printf("%s.%s\n",strrev(bin),bind); | ^~~~~~ | ...
s752081902
p00220
C
b,i,j,q;main(n){float a,x;char t[9],l[9],g[20];for(;;){for(i=0;i<9;i++)t[i]=l[i]='0';scanf("%f",&a);if(a<0)break;b=a;for(i=0;b;)t[i++]='0'+b%2,b/=2;b=a;a-=b;x=0.5;for(j=0;a>0&&j<5;j++){a-x>=0&&l[j]='1',a-=x;x/=2;}if(j>4)puts("NA");else{for(q=b=0;b++<8-i;)g[q++]='0';for(;i;)g[q++]=t[--i];g[q++]='.';for(;j>i;)g[q++]=l[i+...
main.c:1:1: warning: data definition has no type or storage class 1 | b,i,j,q;main(n){float a,x;char t[9],l[9],g[20];for(;;){for(i=0;i<9;i++)t[i]=l[i]='0';scanf("%f",&a);if(a<0)break;b=a;for(i=0;b;)t[i++]='0'+b%2,b/=2;b=a;a-=b;x=0.5;for(j=0;a>0&&j<5;j++){a-x>=0&&l[j]='1',a-=x;x/=2;}if(j>4)puts("NA");else{for(q=b=0;...
s547448133
p00220
C++
#include<iostream> #include<vector> int de[8] = {128,62,32,16,8,4,2,1}; double dou[4] = {0.5,0.25,0.125,0.0625}; int main(void){ while(cin>>in,in){ vector<int> ans(12,0); bool used = false; for(int i = 0 ; i < 8 ; i ++){ if(in>de[i]){ ans[i] = 1; in -= de[i]; used = tr...
a.cc: In function 'int main()': a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | while(cin>>in,in){ | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ...
s910072461
p00220
C++
// AOJ 0220 #include <iostream> #include <string> #include <map> using namespace std; int main() { double n; while (cin >> n, n >= 0){ string ret; int a = (int)n; while (a != 0){ if (a == 1){ ret += '1'; break; } if (a % 2 == 0){ a /= 2; ret += '0'; } else { a /= 2; ret ...
a.cc: In function 'int main()': a.cc:31:17: error: 'reverse' was not declared in this scope 31 | reverse(ret.begin(), ret.end()); | ^~~~~~~
s874660073
p00220
C++
while(cin>>n,n>=0){ vector<bool>ans(0); queue< vector<bool> >bfs; bfs.push(ans); while(!bfs.empty()){ vector<bool>tmp=bfs.front(); bfs.pop(); if(tmp.size()>12){ cout<<"NA"<<endl; break; } double sum=0; for(int i=0;i<min(8,(int)tmp.size());i++)if(tmp[i])sum+=pow(2,7-i); for(int i=0;i<min(4,(int)tm...
a.cc:1:9: error: expected unqualified-id before 'while' 1 | while(cin>>n,n>=0){ | ^~~~~ a.cc:37:1: error: expected declaration before '}' token 37 | } | ^
s689615646
p00220
C++
#include<iostream> #include<algorithm> #include<cmath> #include<vector> #include<queue> using namespace std; int main(){ double n; ios::sync_with_stdio(false); //for(int i=0;i<ans.size();i++)cout<<ans[i]<<" ";cout<<endl; while(cin>>n){ if(n<0)break; vector<bool>ans(0); queue< vector<bool> >bfs; bfs.push(ans); ...
a.cc: In function 'int main()': a.cc:47:10: error: expected '}' at end of input 47 | } | ^ a.cc:7:11: note: to match this '{' 7 | int main(){ | ^
s654212852
p00220
C++
#include<iostream> #include<algorithm> #include<cmath> #include<vector> #include<queue> using namespace std; ios::sync_with_stdio(false); int main(){ double n; //for(int i=0;i<ans.size();i++)cout<<ans[i]<<" ";cout<<endl; while(cin>>n){ if(n<0)break; vector<bool>ans(0); queue< vector<bool> >bfs; bfs.push(ans);...
a.cc:7:9: error: specializing member 'std::basic_ios<char>::sync_with_stdio' requires 'template<>' syntax 7 | ios::sync_with_stdio(false); | ^~~
s868124327
p00220
C++
#include <iostream> #define rep2(x,from,to) for(int x=(from);(x)<(to);(x)++) #define rep(x,to) rep2(x,0,to) using namespace std; const double EPS = 1e-10; int main(){ double d; while(cin >> d) { if(d == -1) break; int ret[13] = {}; for(int i = 7; i >= -4; --i) { if(d>=pow(2,i)) { d-=pow(2,i); ret[7-i...
a.cc: In function 'int main()': a.cc:12:31: error: 'pow' was not declared in this scope 12 | if(d>=pow(2,i)) { | ^~~
s693161350
p00220
C++
#include <iostream> #include <stdio.h> #include <sstream> #include <string> #include <vector> #include <map> #include <queue> #include <algorithm> #include <set> #include <math.h> #include <utility> #include <stack> #include <string.h> #include <complex> using namespace std; const int INF = 1<<29; const double EPS = 1...
a.cc: In function 'int main()': a.cc:29:28: error: expected primary-expression before '<' token 29 | if(a>=(1<<12) || a=<(n*16)){ | ^
s492990984
p00220
C++
#include<vector> #include<list> #include<algorithm> #include<iostream> #include<string> #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> using namespace std; int main(){ int i; int n; string s,t,u; while(cin>>s&&s[0]!='-'){ n=atoi(s.substr(0,s.find(".")).c_str()); if(n>255){ co...
a.cc: In function 'int main()': a.cc:35:9: error: unable to find numeric literal operator 'operator""x' 35 | u[1x]++; | ^~
s704075353
p00220
C++
import java.util.*; class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); while (true) { double n = sc.nextDouble(); if (n == -1) break; int left = (int)n; String lhs = Integer.toString(left, 2); if (lhs.length() > 8) { ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:9: error: expected ':' before 'static' 4 | public static void main(String args[]) { | ^~~~~~~ | : a.cc:4:27: error: 'String...
s866549677
p00220
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; #define EPS (1e-10) #define EQ(a,b) (abs((-(b))+((a)))<EPS) int main(){ double d; while(cin>>d&&!EQ(d,-1)){ int r = (int)d; double im=d-r; if(r>=256){ cout<<"NA"<<endl; continue; } else{ vector<int> v; while(r>0)...
a.cc: In function 'int main()': a.cc:33:52: error: 'pow' was not declared in this scope 33 | d+=pow(0.5,j+1); | ^~~
s115524442
p00220
C++
#include <iostream> using namespace std; void solve() { double a[16]; for(int i = 0; i < 16; ++i) { a[i] = i / 16.0; } double n; while(cin >> n, n >= 0) { char c[13]; bool flag =true; for(int i = 0; i < 16; ++i) { if(n - (int)n == a[i]) { flag = false; for(int j = 12; j >= 9; --j) ...
a.cc: In function 'void solve()': a.cc:48:1: error: jump to label 'NEXT' 48 | NEXT: | ^~~~ a.cc:34:30: note: from here 34 | goto NEXT; | ^~~~ a.cc:37:21: note: crosses initialization of 'int num' 37 | int num = (int)n; |...
s460995730
p00220
C++
#include <cstdio> #include <cmath> using namespace std; int main() { for(char buf[80];gets(buf),buf[0]!='-';){ double x; sscanf(buf,"%lf",&x); if(x>=256){ puts("NA"); continue; } if(fmod(x*16,1)>0){ puts("NA"); continue; } int a=x,b=fmod(x,1)*16; for(int i=0;i<8;i++) putchar('0'+(a>>7...
a.cc: In function 'int main()': a.cc:8:26: error: 'gets' was not declared in this scope; did you mean 'getw'? 8 | for(char buf[80];gets(buf),buf[0]!='-';){ | ^~~~ | getw
s666917864
p00221
C
import java.util.*; class Main{ public static void main(String[] args){ Scanner scn = new Scanner(System.in); int m,n; boolean[] players = new boolean[1000]; for(m=scn.nextInt(), n=scn.nextInt(); n!=0 || m != 0; m=scn.nextInt(), n=scn.nextInt()){ int num = m; for(int i=...
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:3:1: error: unknown type name 'class' 3 | class Main{ | ^~~~~ main.c:3:11: erro...
s335946045
p00221
C
#include<stdio.h> #include<string.h> #include<stdlib.h> int main(void) { int m,n; int i,j=0,k,ans = 1,num,c = 0; bool player[1001] = { 0 },flag = 0,fl2 = 0; char str[10],coll[10]; for(;;){ scanf("%d %d", &m, &n); if(m==0)break; for(i=0;i<m;i++){ player[i]=1; } for(i=0;i<n;i++){ scanf("%s",str); ...
main.c: In function 'main': main.c:9:9: error: unknown type name 'bool' 9 | bool player[1001] = { 0 },flag = 0,fl2 = 0; | ^~~~ main.c:4:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' 3 | #include<stdlib.h> +++ |+#include <std...
s376741839
p00221
C
n,m,b,q[1024];char s[9],c[9]; main(i,t){for(;scanf("%d%d",&m,&n)*m;){ p=m; for(t=i=1;i<=n;i++){ scanf("%s",s,*c=0); i%3||strcat(c,"Fizz"); i%5||strcat(c,"Buzz"); *c||sprintf(c,"%d",i); for(strcmp(s,c)&&p>1&&(q[t]=p--);q[t=t%m+1];); } for(t=i=1;i<=m;i++)q[i]||(q[i]=t=!printf(" %d"+t,i)); puts(""...
main.c:1:1: warning: data definition has no type or storage class 1 | n,m,b,q[1024];char s[9],c[9]; | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int] 1 | n,m,b,q[1024];char s[9],c[9]; ...
s379531608
p00221
C
s[9],c[9],i,t;main(n,m,b){for(;scanf("%d%d",&m,&n)*m;puts("")){for(t=i=1;i<=n;i++){int q[1024],p=m;scanf("%s",s,*c=0);i%3||strcat(c,"Fizz");i%5||strcat(c,"Buzz");for(!*c?atoi(s)-i:strcmp(s,c)&p>1&&(q[t]=p--);q[t=t%m+1];);}for(t=i=1;i<=m;i++)q[i]||(t=!printf(" %d"+t,i));}}
main.c:1:1: warning: data definition has no type or storage class 1 | s[9],c[9],i,t;main(n,m,b){for(;scanf("%d%d",&m,&n)*m;puts("")){for(t=i=1;i<=n;i++){int q[1024],p=m;scanf("%s",s,*c=0);i%3||strcat(c,"Fizz");i%5||strcat(c,"Buzz");for(!*c?atoi(s)-i:strcmp(s,c)&p>1&&(q[t]=p--);q[t=t%m+1];);}for(t=i=1;i<=m;i++)q[i]|...
s461265603
p00221
C++
#include <stdio.h> int main() { int n, m; char str[16]; int x; int i, j; scanf("%d %d", &m, &n); while (n != 0 && m != 0) { int p = 1, q = m; int players[1005] = {}; int print[1005]; int size = 0; for (i = 1; i <= n; i++) { ...
a.cc: In function 'int main()': a.cc:24:25: error: 'strcmp' was not declared in this scope 24 | if (strcmp(str, "FizzBuzz") != 0) { | ^~~~~~ a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #in...
s951550083
p00221
C++
#include <iostream> #include <algorithm> #include <vector> #include <cctype> using namespace std; inline int prev(int idx, int size) { idx--; if(idx < 0) idx = size-1; return idx; } inline void advance(int& idx, int size) { idx++; if(idx == size) idx = 0; } inline bool isNumber(const string& s, int& ret) { ret = ...
In file included from /usr/include/c++/14/string:47, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/includ...
s125386545
p00221
C++
#include <bits/stc++.h> using namespace std; inline int prev(int idx, int size) { idx--; if(idx < 0) idx = size-1; return idx; } inline void advance(int& idx, int size) { idx++; if(idx == size) idx = 0; } inline bool isNumber(const string& s, int& ret) { ret = -1; int tmp = 0; int const size=s.size(); for(i...
a.cc:1:10: fatal error: bits/stc++.h: No such file or directory 1 | #include <bits/stc++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s700386942
p00221
C++
#include <bits/stdc++.h> using namespace std; inline int prev(int idx, int size) { idx--; if(idx < 0) idx = size-1; return idx; } inline void advance(int& idx, int size) { idx++; if(idx == size) idx = 0; } inline bool isNumber(const string& s, int& ret) { ret = -1; int tmp = 0; int const size=s.size(); for(...
In file included from /usr/include/c++/14/bits/stl_algobase.h:66, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_iterator_base_funcs.h: In instantiation of 'constexpr void std...
s516118450
p00221
C++
var input = require('fs').readFileSync('/dev/stdin', 'utf8'); var Arr=(input.trim()).split("\n"); while(true){ var mn=(Arr.shift()).split(" ").map(Number); if(mn[0]==0 && mn[1]==0)break; var player=[]; for(var i=0;i<mn[0];i++)player[i]=i+1; var arr=[]; for(var i=0;i<mn[1];i++){ var v=Arr.shift()...
a.cc:1:21: warning: multi-character character constant [-Wmultichar] 1 | var input = require('fs').readFileSync('/dev/stdin', 'utf8'); | ^~~~ a.cc:1:40: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes 1 | var input = require('fs').readFileSync('/dev/st...
s133718634
p00221
C++
#include<iostream> #include<string> #include<sstream> #include<vector> #define INF (1 << 18); using namespace std; void rist_hen(int hu); vector<int> batu; int rist[1111]; int n; int main(){ string str[3] = {"Fizz" , "Buzz" , "FizzBuzz" }; int m; string s; while(cin >> n >> m && n && m){ for(int i=0;i<n;i...
a.cc: In function 'int main()': a.cc:51:16: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)' 51 | it = find(batu.begin(),batu.end(),i); | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/bits/locale_facets.h:4...
s056123763
p00221
C++
#include<iostream> #include<string> #include<sstream> #include<vector> #include<algorithm> using namespace std; void rist_hen(int hu); vector<int> batu; int rist[1111]; int n,flag; int main(){ string str[3] = {"Fizz" , "Buzz" , "FizzBuzz" }; int m; string s; while(cin >> n >> m && n && m){ flag = n; f...
/usr/bin/ld: /tmp/cck51WqP.o: in function `main': a.cc:(.text+0x1d1): undefined reference to `rist_hen(int)' /usr/bin/ld: a.cc:(.text+0x22a): undefined reference to `rist_hen(int)' /usr/bin/ld: a.cc:(.text+0x289): undefined reference to `rist_hen(int)' /usr/bin/ld: a.cc:(.text+0x2f5): undefined reference to `rist_hen(i...
s870723006
p00221
C++
#include<bits/stdc++.h> using namespace std; int m,n; void solve(){ int x=m; int cur=0; bool no[10000]={0}; for(int i=1;i<=n;i++){ while(no[cur])cur=(cur+1)%m; string s; cin>>s; if(x<=1)continue; bool ok=true; if(i%3==0&&i%5==0){ if(s!="Fizz...
a.cc:55:5: error: redefinition of 'int m' 55 | int m,n; | ^ a.cc:3:5: note: 'int m' previously declared here 3 | int m,n; | ^ a.cc:55:7: error: redefinition of 'int n' 55 | int m,n; | ^ a.cc:3:7: note: 'int n' previously declared here 3 | int m,n; | ^ a.cc:57:6:...
s107999379
p00221
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define MP make_pair #define PB push_back #define FOR(i,a,b) for (int i=(a);i<(b);i++) #define REP(i,n) for (int i=0;i<(n);i++) using namespace std; int main(){ int m, n; char s[9]; while(scanf("%d%d", &m, &n) && m && n){ vector<bool>mem(m)...
a.cc: In function 'int main()': a.cc:14:11: error: 'i' was not declared in this scope 14 | rep(i, m) mem[i] = false; | ^ a.cc:14:7: error: 'rep' was not declared in this scope 14 | rep(i, m) mem[i] = false; | ^~~
s753620505
p00221
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define MP make_pair #define PB push_back #define FOR(i,a,b) for (int i=(a);i<(b);i++) #define REP(i,n) for (int i=0;i<(n);i++) using namespace std; int main(){ int m, n; char s[9]; while(scanf("%d%d", &m, &n) && m && n){ vector<bool>mem(m)...
a.cc: In function 'int main()': a.cc:14:11: error: 'i' was not declared in this scope 14 | rep(i, m) mem[i] = false; | ^ a.cc:14:7: error: 'rep' was not declared in this scope 14 | rep(i, m) mem[i] = false; | ^~~
s237148713
p00221
C++
#include<bits/stdc++.h> using namespace std; bool isCorrect(int n, string s) { string solution; if (n % 3 == 0 && n % 5 == 0) solution = "FizzBuzz"; else if (n % 3 == 0) solution = "Fizz"; else if (n % 5 == 0) solution = "Buzz"; else solution = to_stirng(n); return solution == s; } int main()...
a.cc: In function 'bool isCorrect(int, std::string)': a.cc:11:21: error: 'to_stirng' was not declared in this scope 11 | else solution = to_stirng(n); | ^~~~~~~~~
s044790491
p00221
C++
#include<bits/stdc++.h> using namespace std; string to_string(int N){ stringstream ss; ss<<N; string ret; ss>>ret; return ret; } bool isCorrect(int n, string s) { string solution; if (n % 3 == 0 && n % 5 == 0) solution = "FizzBuzz"; else if (n % 3 == 0) solution = "Fizz"; else if ...
a.cc: In function 'bool isCorrect(int, std::string)': a.cc:19:30: error: call of overloaded 'to_string(int&)' is ambiguous 19 | else solution = to_string(n); | ~~~~~~~~~^~~ a.cc:5:8: note: candidate: 'std::string to_string(int)' 5 | string to_string(int N){ | ^~~~~~~~~ ...
s532703530
p00221
C++
#include<iostream> #include<vector> #include<string> #include<cstring> using namespace std; #define rep(i,a) for(int i = 0 ; i < a ; i++) #define loop(i,a,b) for(int i = a ; i < b ; i++) void move(){ cout<<"move"<<endl; } int stoi(string s){ int r = 0; rep(i,s.size())r = r * 10 + s[i] - '0'; return r; } int mai...
a.cc: In function 'int main()': a.cc:47:16: error: expected type-specifier before ';' token 47 | n = new; | ^ a.cc:56:16: error: expected type-specifier before ';' token 56 | n = new; | ^ a.cc:65:16: error: expected type-specifier before ';' token 65 | ...
s610529873
p00221
C++
#include<iostream> #include<queue> #include<string> #include<algorithm> #include<vector> using namespace std; int main(){ int m, n, s, i; while(cin >> m >> n, m != 0 || n != 0) { queue<int> q; for(int j = 0; j < m; j++) q.push(j+1); i = 1; while(n--) { if(q.size() != 1) { string no; cin >>...
a.cc: In function 'int main()': a.cc:28:19: error: 'no' was not declared in this scope; did you mean 'n'? 28 | else cin >> no; | ^~ | n
s710664685
p00221
C++
#include <iostream> #include <sstream> #include<string> using namespace std; string IntToString(int number) { stringstream ss; ss << number; return ss.str(); } int main(){ int NumPlayer,NumRepeats; while(cin >> NumPlayer >> NumRepeats && (NumPlayer|NumRepeats) ){ int alive = NumPlayer; ...
a.cc: In function 'int main()': a.cc:27:37: error: expected ';' before '}' token 27 | correct = "FizzBuzz" | ^ | ; 28 | }else if((i+1)%3==0){ | ~
s668167033
p00221
C++
#include<iostream> #include<string> using namespace std; bool l[1000]; int main(){ ??int n,m; ??string s; ??while(true){ ??cin>>m>>n; ??if(n+m==0) ??break; ??for(int i=0;i<m;i++) ??l[i]=true; ??int h=0; ??int ans=m,keep=0; ??for(int i=1;i<=n;i++){ ??????????cin>>s; ??????????while(true){ ????????????if(l[h]==true){ ???...
a.cc: In function 'int main()': a.cc:6:1: error: expected primary-expression before '?' token 6 | ??int n,m; | ^ a.cc:6:2: error: expected primary-expression before '?' token 6 | ??int n,m; | ^ a.cc:6:3: error: expected primary-expression before 'int' 6 | ??int n,m; | ^~~ a.cc:6:3: erro...
s019004161
p00221
C++
#include<iostream> #include<string> using namespace std; bool l[1000]; int main(){ int n,m; string s; while(true){ cin>>m>>n; if(n+m==0) break; for(int i=0;i<m;i++) l[i]=true; int h=0; int ans=m,keep=0; for(int i=1;i<=n;i++){ cin>>s; while(true){ if(l[h]==true){if(i%15==0&&s!="FizzBuzz"){ l[h]=false; ans--; } if((i%15!...
a.cc:1:20: warning: extra tokens at end of #include directive 1 | #include<iostream> #include<string> using namespace std; bool l[1000]; int main(){ int n,m; string s; while(true){ cin>>m>>n; if(n+m==0) break; for(int i=0;i<m;i++) l[i]=true; int h=0; int ans=m,keep=0; for(int i=1;i<=n;i++){ cin>>s; while(true){ if(...
s098452045
p00221
C++
#include<string> using namespace std; int main(){ int flag[1002] = { 0 }; int n, m; int count=1;// ????¨???? char s[10]; cin >> m >> n;//????????°??¨?????° while (n != 0 || m != 0){ // ?¶??¶??????¶ for (int i = 1; i<=n; i++){//????¨??????°??°????????? while (flag[count] != 0){//????¨??????????????????? c...
a.cc: In function 'int main()': a.cc:8:9: error: 'cin' was not declared in this scope 8 | cin >> m >> n;//????????°??¨?????° | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include<string> +++ |+#include <i...
s138768908
p00221
C++
#include<iostream> #include<string> using namespace std; int main(){ int flag[1002] = { 0 }; int n, m, a[1002] = { 0 }; int count=1;// ????¨???? char s[10]; cin >> m >> n;//????????°??¨?????° while (n != 0 || m != 0){ // ?¶??¶??????¶ for (int i = 1; i<=n; i++){//????¨??????°??°????????? while (flag[count] !=...
a.cc: In function 'int main()': a.cc:17:37: error: 'strcmp' was not declared in this scope 17 | if (strcmp(s, "FizzBuzz") != 0) flag[count] = 1; | ^~~~~~ a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by ad...
s787565732
p00221
C++
#include<iostream> #include<string> using namespace std; int main(){ int flag[1002] = { 0 }; int n, m, a[1002] = { 0 }; int count=1;// ????¨???? char s[10]; cin >> m >> n;//????????°??¨?????° while (n != 0 && m != 0){ // ?¶??¶??????¶ for (int i = 1; i<=n; i++){//????¨??????°??°????????? while (flag[count] !=...
a.cc: In function 'int main()': a.cc:17:37: error: 'strcmp' was not declared in this scope 17 | if (strcmp(s, "FizzBuzz") != 0) flag[count] = 1; | ^~~~~~ a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by ad...
s974130046
p00221
C++
#include<iostream> using namespace std; #include<queue> #include<vector> #include<string> #include<string.h> #include<algorithm> #include <conio.h> bool b[2003]; #define REP(a) for(int i=0;i<a;i++) int main() { bool f=0; int x,m,n,j; int prev[2001],next[2001],p,v=1; string c,d; cin>>m>>n; while(m!=0||n!=0){ x...
a.cc:8:10: fatal error: conio.h: No such file or directory 8 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s949942380
p00221
C++
#include<iostream> using namespace std; #include<queue> #include<vector> #include<string> #include<string.h> #include<algorithm> #include <conio.h> bool b[2003]; #define REP(a) for(int i=0;i<a;i++) int main() { bool f=0; int x,m,n,j; int prev[2001],next[2001],p,v=1; string c,d; cin>>m>>n; while(m!=0||n!=0){ x...
a.cc:8:10: fatal error: conio.h: No such file or directory 8 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s922928353
p00221
C++
#define _USE_MATH_DEFINES #include "bits/stdc++.h" using namespace std; //#define int long long #define DBG 0 #define dump(o) if(DBG){cerr<<#o<<" "<<o<<endl;} #define dumpc(o) if(DBG){cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;} #define rep(i,a,b) for(int i=(a);i<(b);i++) #define rrep(i,a,b) for(int i=(b)-1;i>=...
a.cc: In function 'int main()': a.cc:8:50: error: cannot bind non-const lvalue reference of type 'std::_Bit_reference&' to an rvalue of type 'std::_Bit_iterator::reference' 8 | #define dumpc(o) if(DBG){cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;} | ^ a.c...
s051593052
p00221
C++
#include"bits/stdc++.h" #define N 10000 using namespace std; int main() { int a[N] , b[N], m, n, j = 1,hideo=1; char str[10]; char str1[10] = { "Fizz" }, str2[10] = { "Buzz" }, str3[10] = { "FizzBuzz" }; memset(a, 1, sizeof(a)); while (1) { cin >> m >> n; if (m == 0 && n == 0)return 0; for (int i = 0; i <= ...
a.cc:56:26: error: stray '#' in program 56 | }#include"bits/stdc++.h" | ^ a.cc: In function 'int main()': a.cc:18:45: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null] 18 | ...
s263741308
p00221
C++
#include"bits/stdc++.h" using namespace std; int main() { int a[1001], b[1001], m, n, j = 1, j2, hideo = 0; char str[30], str1[10] = { "Fizz" }, str2[10] = { "Buzz" }, str3[10] = { "FizzBuzz" }; while (1) { cin >> m >> n; if (m == 0 && n == 0)return 0; for (int i = 1; i <= m; i++)a[i] = 1; for (int i = 1; i ...
a.cc: In function 'int main()': a.cc:25:37: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null] 25 | memset(str, NULL, sizeof(str)); | ^~~~ In file included from /usr/include/c++/14/cstring:43, ...
s975500566
p00221
C++
#include"bits/stdc++.h" using namespace std; int main() { int a[1001], b[1001], m, n, j = 1, j2, hideo = 0; char str[30], str1[10] = { "Fizz" }, str2[10] = { "Buzz" }, str3[10] = { "FizzBuzz" }; while (1) { cin >> m >> n; if (m == 0 && n == 0)return 0; for (int i = 1; i <= m; i++)a[i] = 1; for (int i = 1; i ...
a.cc: In function 'int main()': a.cc:23:37: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null] 23 | memset(str, NULL, sizeof(str)); | ^~~~ In file included from /usr/include/c++/14/cstring:43, ...
s708534848
p00221
C++
#include<cstdio> #include<iostream> #include<string> using namespace std; int main(void){ int m,n,flg[1001],i,cnt,h,list[1000],ff,j; char s[9],f[]="Fizz",b[]="Buzz",fb[]="FizzBuzz"; while(1){ cin>>m>>n; if(m==0) break; for(i=1;i<=m;i++) flg[i]=1; cnt=0; for(i=1;i<=n;i++){ cin>>s; if(i%3==0&&i%5==0){ ...
a.cc: In function 'int main()': a.cc:77:9: error: 'r' was not declared in this scope 77 | r | ^ a.cc:77:10: error: expected '}' at end of input 77 | r | ^ a.cc:5:15: note: to match this '{' 5 | int main(void){ | ^
s983736985
p00221
C++
#include<cstdio> #include<iostream> #include<string> using namespace std; int main(void){ int m,n,flg[1001],i,cnt,h,list[1000],ff,j; char s[9],f[]="Fizz",b[]="Buzz",fb[]="FizzBuzz"; while(1){ cin>>m>>n; if(m==0) break; for(i=1;i<=m;i++) flg[i]=1; cnt=0; for(i=1;i<=n;i++){ cin>>s; if(i%3==0&&i%5==0){ ...
a.cc: In function 'int main()': a.cc:44:45: error: expected primary-expression before '%' token 44 | h=i+%m; | ^
s607306826
p00221
C++
#include <iostream> #include <vector> #include <queue> using namespace std; int main(){ int n, m; while(cin >> n >> m, n||m){ int k = 0, a = n; queue<int> players; for(int i = 0; i < n; ++i) players.push(i+1); for(int i = 1; i <= m; ++i){ string s, t; cin >> s; if(i%3 == 0) t += "F...
a.cc: In function 'int main()': a.cc:32:5: error: 'sort' was not declared in this scope; did you mean 'short'? 32 | sort(ans.begin(), ans.end()); | ^~~~ | short
s814440973
p00221
C++
#include <bits/stdc++.h> using namespace std; int main() { int m, n; while (cin >> m >> n, m) { bool live[1010]; int idx = 1, cnt = m; memset(live, true, sizeof live); for (int i = 1; i <= n; ++i) { string s; cin >> s; if (cnt != 1) { string str = to_string(i); i...
a.cc: In function 'int main()': a.cc:20:11: error: 'srt' was not declared in this scope; did you mean 'str'? 20 | srt = "Fizz"; | ^~~ | str a.cc:22:11: error: 'srt' was not declared in this scope; did you mean 'str'? 22 | srt = "Buzz"; | ^~~ ...
s486945707
p00221
C++
#include<bits/stdc++.h> using namespace std; int main(){ int m,n; while(1){ cin>>m>>n; if(m==0 && n==0)break; int a[10000]; string b[10000]; int c[10000]; int k[10000]; for(int i=0;i<n;i++){ cin>>b[i]; if((i+1)%15==0 ){ if(b[i]=="FizzBuzz"){a[i]=1;}else{...
a.cc: In function 'int main()': a.cc:44:19: error: expected ';' before 'for' 44 | cout<<endl | ^ | ; 45 | for(int j=0;j<m;j++){ | ~~~ a.cc:45:21: error: 'j' was not declared in this scope 45 | for(int j=0;j<m;j++){ ...
s012990031
p00221
C++
#include<bits/stdc++.h> using namespace std; int main(){ int m,n; while(1){ cin>>m>>n; if(m==0 && n==0)break; int a[10000]; string b[10000]; int c[10000]; int k[10000]; for(int i=0;i<n;i++){ cin>>b[i]; if((i+1)%15==0 ){ if(b[i]=="FizzBuzz"){a[i]=1;}else{...
a.cc: In function 'int main()': a.cc:67:17: error: expected ';' before 'for' 67 | cout<<endl | ^ | ; 68 | for(int i=0;i<m;i++){ | ~~~ a.cc:68:19: error: 'i' was not declared in this scope 68 | for(int i=0;i<m;i++){ | ...
s300378763
p00221
C++
#include<bits/stdc++.h> using namespace std; int main(){ int m,n; while(1){ cin>>m>>n; if(m==0 && n==0)break; int a[10000]; string b[10000]; int c[10000]; int k[10000]; for(int i=0;i<n;i++){ cin>>b[i]; if((i+1)%15==0 ){ if(b[i]=="FizzBuzz"){a[i]=1;}else{...
a.cc: In function 'int main()': a.cc:68:27: error: expected primary-expression before '<' token 68 | if(k[i]==1){cout<<<i+1<<" ";} | ^ a.cc:68:31: error: invalid operands of types 'int' and 'const char [2]' to binary 'operator<<' 68 | if(k[i]==1){cout<<<i+1<<" ";} ...
s398411045
p00221
C++
#include<iostream> #include<string> #include<cstdlib> #include<vector> using namespace std; class Player{ int id; } int main() { while(true){ int m,n; cin >> m >> n; if( m == 0 && n == 0 ) break; vector< Player > p; for(int i = 0; i < m; ++i){ Player tp; tp.id = i; p.push_ba...
a.cc:10:2: error: expected ';' after class definition 10 | } | ^ | ; a.cc: In function 'int main()': a.cc:21:10: error: 'int Player::id' is private within this context 21 | tp.id = i; | ^~ a.cc:9:7: note: declared private here 9 | int id; | ^~ a.cc:63:17: warni...
s460772790
p00221
C++
#include<iostream> #include<set> #include<queue> #include<vector> #include<sstream> #include<algorithm> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) #define pb push_back void solve(int n,int m,bool *isok){ vector<int> a; rep(i,n){ a.pb(i); } int p=0;...
a.cc: In function 'void solve(int, int, bool*)': a.cc:19:36: error: expected primary-expression before ';' token 19 | for(int i=1;i<m+1 && a.size() != ;i++){ | ^ a.cc: At global scope: a.cc:39:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] ...
s335425909
p00221
C++
#include <iostream> #include <sstream> #include <string> #include <vector> using namespace std; int main( void ) { int m, n; string s; while ( cin >> m >> n && m && n ) { vector <int> R( m, 0 ); int curIndex = 0; int curNumber = 1; for ( int i = 0; i < n; i++ ) ...
a.cc: In function 'int main()': a.cc:66:9: error: 'sort' was not declared in this scope; did you mean 'short'? 66 | sort( L.begin(), L.end() ); | ^~~~ | short
s535805172
p00221
C++
//cout<<"O"<<endl; }else{ count++; exist[member]=false; //cout<<"X"<<endl; } do{ member=(member+1)%m; }while(!exist[member]); } bool first=true; for(int i=0; i<m; i++){ if(exist[i]){ if(first){ printf("%d",i+1); ...
a.cc:2:7: error: expected declaration before '}' token 2 | }else{ | ^ a.cc:2:8: error: expected unqualified-id before 'else' 2 | }else{ | ^~~~ a.cc:7:7: error: expected unqualified-id before 'do' 7 | do{ | ^~ a.cc:9:8: error: expected unqualified-id bef...
s404475102
p00221
C++
#include <iostream> #include <algorithm> #include <sstream> #include <cstdio> #include <vector> using namespace std; bool fizzbuzz(int n,string s){ if(n%15==0)return (s != "FizzBuzz"); if(n%3==0)return (s != "Fizz"); if(n%5==0)return (s != "Buzz"); for(int i=0;i<s.length();i++){ if(s[i]<'0'||s[i]>'9')return ...
a.cc: In function 'int main()': a.cc:54:30: error: a function-definition is not allowed here before '{' token 54 | bool fizzbuzz(int n,string s){ | ^ a.cc:75:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 75 | int main(){ | ...