submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s515457108
p00197
Java
#include<iostream> #include<climits> #include<math.h> #include<vector> #include<algorithm> #include<cstdio> #include <string> #include <complex> #include <functional> using namespace std; typedef pair<int,int> P; double dat[100][100]; double dp[200][100];//動的計画法 int main(){ int a,b,cnt,tmp; while(cin>>a>>b,a){ ...
Main.java:1: error: illegal character: '#' #include<iostream> ^ Main.java:2: error: illegal character: '#' #include<climits> ^ Main.java:3: error: illegal character: '#' #include<math.h> ^ Main.java:4: error: illegal character: '#' #include<vector> ^ Main.java:5: error: illegal character: '#' #include<algorithm> ^ Main...
s708387648
p00197
C
a,b;c(int x,int y){if(!y){a=x;b=0;return;}c(y,x%y);b++;}main(){for(;;){intx,y;scanf("%d%d",&x,&y);if(!x)return 0;if(x<y){a=y;y=x;x=a;}c(x,y);printf("%d %d\n",a,b);}}
main.c:1:1: warning: data definition has no type or storage class 1 | a,b;c(int x,int y){if(!y){a=x;b=0;return;}c(y,x%y);b++;}main(){for(;;){intx,y;scanf("%d%d",&x,&y);if(!x)return 0;if(x<y){a=y;y=x;x=a;}c(x,y);printf("%d %d\n",a,b);}} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimp...
s350643163
p00197
C
#include <bits/stdc++.h> using namespace std; // pp basics #define in , #define esc_paren(...) __VA_ARGS__ #define pp_empty(...) #define pp_cat_i(x, y) x ## y #define pp_cat(x, y) pp_cat_i(x, y) #define pp_inc0 1 #define pp_inc1 2 #define pp_inc2 3 #define pp_inc3 4 #define pp_inc4 5 #define pp_inc5 6 #define pp_inc...
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s823622416
p00197
C
#include <stdio.h> int main(void) { int a1, a2, x, y; int amari,i=0; scanf("%d %d", &a1, &a2); //1. 2number if(a1==0 && a2==0)break; if(a1<a2){ x = a2; y = a1; } for(i=0;amari =! 0;i++){ amari = x % y; x = y; y = amari; } printf("%d %d\n", x, i); return 0; }
main.c: In function 'main': main.c:6:27: error: break statement not within loop or switch 6 | if(a1==0 && a2==0)break; | ^~~~~
s552245701
p00197
C
#include <stdio.h> int main(void) { int a1, a2, x, y; int amari,i=0; scanf("%d %d", &a1, &a2); //1. 2number if(a1==0 && a2==0) break; if(a1<a2){ x = a2; y = a1; } for(i=0;amari =! 0;i++){ amari = x % y; x = y; y = amari; } printf("%d %d\n", x, i); return 0; }
main.c: In function 'main': main.c:6:28: error: break statement not within loop or switch 6 | if(a1==0 && a2==0) break; | ^~~~~
s967329535
p00197
C
#include <stdio.h> int main(void) { int x,y,i=0,a,amari; while (scanf("%d%d",&x,&y)!=EOF&&(x!=0||y!=0)) { if (x<y) { a=x; x=y; y=a; } while (y!=0) { x%=y; amari=x; x=y; y=amari; count++; ...
main.c: In function 'main': main.c:15:13: error: 'count' undeclared (first use in this function) 15 | count++; | ^~~~~ main.c:15:13: note: each undeclared identifier is reported only once for each function it appears in
s782701936
p00197
C
#include <stdio.h> int main(void) { int x,y,a,amari; while (scanf("%d%d",&x,&y)!=EOF&&(x!=0||y!=0)) { if (x<y) { a=x; x=y; y=a; } i = 0; while (y!=0) { x%=y; amari=x; x=y; y=amari; i++; ...
main.c: In function 'main': main.c:10:9: error: 'i' undeclared (first use in this function) 10 | i = 0; | ^ main.c:10:9: note: each undeclared identifier is reported only once for each function it appears in
s952876974
p00197
C
#include <stdio.h> int main(void) { int x,y,a,amari; while (scanf("%d%d",&x,&y)!=EOF&&(x!=0||y!=0)) { if (x<y) { a=x; x=y; y=a; } i = 0; while (y!=0) { x%=y; amari=x; x=y; y=amari; i++; ...
main.c: In function 'main': main.c:10:9: error: 'i' undeclared (first use in this function) 10 | i = 0; | ^ main.c:10:9: note: each undeclared identifier is reported only once for each function it appears in
s635433180
p00197
C
#include <stdio.h> int main(void) { int x,y,a,amari; while (scanf("%d%d",&x,&y)!=EOF&&(x!=0||y!=0)) { if (x<y) { a=x; x=y; y=a; } i = 0; while (y!=0) { amari = x % y; x = y; y = amari; i++; } printf("%d %d\n",x,i)...
main.c: In function 'main': main.c:10:9: error: 'i' undeclared (first use in this function) 10 | i = 0; | ^ main.c:10:9: note: each undeclared identifier is reported only once for each function it appears in
s593017091
p00197
C
#include <stdio.h> int main(void){ int i,l,a,x,b,amari,num; for(i = 0; i <1000; i++){ scanf("%d %d", &a, &b); if(a == 0 && b == 0) break; if(a < b){ //chage a = y; y = x; x = a; } num = 0; for(l = 0; b != 0; l++){ //keisan amari = a%b; a = b; b = ama...
main.c: In function 'main': main.c:8:11: error: 'y' undeclared (first use in this function) 8 | a = y; | ^ main.c:8:11: note: each undeclared identifier is reported only once for each function it appears in
s020100465
p00197
C
#include <stdio.h> int main(void){ int i,j,a,x,b,amari,num; for(i = 0; i <1000; i++){ scanf("%d %d", &a, &b); if(a == 0 && b == 0) break; if(a < b){ //chage a = y; y = x; x = a; } num = 0; for(j = 0; y != 0; j++){ //keisan amari = a%b; x = y; y = ama...
main.c: In function 'main': main.c:8:11: error: 'y' undeclared (first use in this function) 8 | a = y; | ^ main.c:8:11: note: each undeclared identifier is reported only once for each function it appears in
s760380775
p00197
C
#include <stdio.h> int main(void){ int i,j,a,x,b,amari,num; for(i = 0; i <1000; i++){ scanf("%d %d", &a, &b); if(a == 0 && b == 0) break; if(a < b){ a = y; y = x; x = a; } num = 0; for(j = 0; y != 0; j++){ amari = a%b; x = y; y = amari; j++; ...
main.c: In function 'main': main.c:8:11: error: 'y' undeclared (first use in this function) 8 | a = y; | ^ main.c:8:11: note: each undeclared identifier is reported only once for each function it appears in
s214696183
p00197
C
#include <stdio.h> int main(void){ int i,j,a,x,b,amari,num; for(i = 0; i <1000; i++){ scanf("%d %d", &a, &b); if(x == 0 && y == 0) break; if(a < b){ a = y; y = x; x = a; } num = 0; for(j = 0; y != 0; j++){ amari = a%b; x = y; y = amari; j++; ...
main.c: In function 'main': main.c:6:20: error: 'y' undeclared (first use in this function) 6 | if(x == 0 && y == 0) break; | ^ main.c:6:20: note: each undeclared identifier is reported only once for each function it appears in
s864617016
p00197
C
#include <stdio.h> int main(void){ int i,j,a,x,b,amari,num; for(i = 0; i <1000; i++){ scanf("%d %d", &x, &y); if(x == 0 && y == 0) break; if(a < b){ a = y; y = x; x = a; } num = 0; for(j = 0; y != 0; j++){ amari = a%b; x = y; y = amari; j++; ...
main.c: In function 'main': main.c:5:27: error: 'y' undeclared (first use in this function) 5 | scanf("%d %d", &x, &y); | ^ main.c:5:27: note: each undeclared identifier is reported only once for each function it appears in
s254779756
p00197
C
#include <stdio.h> int main(void){ int i,j,a,x,y,amari,num; for(i = 0; i <1000; i++){ scanf("%d %d", &x, &y); if(x == 0 && y == 0) break; if(a < b){ a = y; y = x; x = a; } num = 0; for(j = 0; y != 0; j++){ amari = a%b; x = y; y = amari; j++; ...
main.c: In function 'main': main.c:7:14: error: 'b' undeclared (first use in this function) 7 | if(a < b){ | ^ main.c:7:14: note: each undeclared identifier is reported only once for each function it appears in
s309946238
p00197
C
#include <stdio.h> int main(void){ int i,j,a,x,y,amari,num; for(i = 0; i <1000; i++){ scanf("%d %d", &x, &y); if(x == 0 && y == 0) break; if(x < y){ a = y; y = x; x = a; } num = 0; for(j = 0; y != 0; j++){ amari = a%b; x = y; y = amari; j++; ...
main.c: In function 'main': main.c:14:17: error: 'b' undeclared (first use in this function) 14 | amari = a%b; | ^ main.c:14:17: note: each undeclared identifier is reported only once for each function it appears in
s498534679
p00197
C
#include<stdio.h> int main(void) { int a,b,r,tmp; scanf("%d",&a); scanf("%d",%b); if(a<b){ tmp = a; a = b; b = tmp; } r = a % b; while(r!=0){ a = b; b = r; r = a % b; } printf("最大公約数 = %d\n", b); return 0; }
main.c: In function 'main': main.c:6:13: error: expected expression before '%' token 6 | scanf("%d",%b); | ^
s823203514
p00197
C
#include<stdio.h> int main(void) { int a,b,r,tmp; scanf("%d",&a); scanf("%d",%b); if(a<b){ tmp = a; a = b; b = tmp; } r = a % b; while(r!=0){ a = b; b = r; r = a % b; } printf("最大公約数 = %d\n", b); return 0; }
main.c: In function 'main': main.c:6:13: error: expected expression before '%' token 6 | scanf("%d",%b); | ^
s974385115
p00197
C
#include<stdio.h> int main(void) { int a,b,r,tmp; printf("1つ目の自然数 = \n"); scanf("%d",&a); printf("2つ目の自然数 = \n"); scanf("%d",%b); if(a<b){ tmp = a; a = b; b = tmp; } r = a % b; while(r!=0){ a = b; b = r; r = a % b; } printf("最大公約数 = %d\n", b); return 0; }
main.c: In function 'main': main.c:8:13: error: expected expression before '%' token 8 | scanf("%d",%b); | ^
s450349447
p00197
C
#include<stdio.h> int main(void) { int a,b,r,tmp; printf("1つ目の自然数 = \n"); scanf("%d",&a); printf("2つ目の自然数 = \n"); scanf("%d",%b); if(a<b){ tmp = a; a = b; b = tmp; } r = a % b; while(r!=0){ a = b; b = r; r = a % b; } printf("最大公約数 = %d\n", b); return 0; }
main.c: In function 'main': main.c:8:13: error: expected expression before '%' token 8 | scanf("%d",%b); | ^
s417885940
p00197
C
#include<stdio.h> int main() { int a,b,r,tmp; printf("1つ目の自然数 = \n"); scanf("%d",&a); printf("2つ目の自然数 = \n"); scanf("%d",%b); if(a<b){ tmp = a; a = b; b = tmp; } r = a % b; while(r!=0){ a = b; b = r; r = a % b; } printf("最大公約数 = %d\n", b); return 0; }
main.c: In function 'main': main.c:8:13: error: expected expression before '%' token 8 | scanf("%d",%b); | ^
s795019319
p00197
C
#include<stdio.h> int main(void) { int a,b,r,tmp; scanf("%d",&a); scanf("%d",%b); printf("%d %d\n",a,b) if(a<b){ tmp = a; a = b; b = tmp; } r = a % b; while(r!=0){ a = b; b = r; r = a % b; } printf("%d\n", b); return 0; }
main.c: In function 'main': main.c:6:13: error: expected expression before '%' token 6 | scanf("%d",%b); | ^ main.c:7:23: error: expected ';' before 'if' 7 | printf("%d %d\n",a,b) | ^ | ; 8 | if(a<b){ | ~~ ...
s765629894
p00197
C
#include<stdio.h> int main(void) { int a,b,r,tmp; scanf("%d",&a); scanf("%d",&b); printf("%d %d\n",a,b) if(a<b){ tmp = a; a = b; b = tmp; } r = a % b; while(r!=0){ a = b; b = r; r = a % b; } printf("%d\n", b); return 0; }
main.c: In function 'main': main.c:7:23: error: expected ';' before 'if' 7 | printf("%d %d\n",a,b) | ^ | ; 8 | if(a<b){ | ~~
s460879754
p00197
C
#include <stdio.h> int main(void) { int=a,b,c,r,tmp; scanf("%d %d",&a,&b); c=a*b; if(a<b){ tmp = a; a = b; b = tmp; } r=a%b; while(r!=0) { a=b; b=r; r=a%b; } printf("%d %d",b,a); return 0; }
main.c: In function 'main': main.c:4:4: error: expected identifier or '(' before '=' token 4 | int=a,b,c,r,tmp; | ^ main.c:5:16: error: 'a' undeclared (first use in this function) 5 | scanf("%d %d",&a,&b); | ^ main.c:5:16: note: each undeclared identifier is reported only once for ...
s715806356
p00197
C
#include <stdio.h> #include <stdlib.h> // ユークリッドの互除法を利用した、最大公約数を求める関数 int gcd(int a, int b) { int c; if (a < b) { a+=b; b=a-b; a-=b; } while (b != 0) { c = a % b; a = b; b = c;   count++; } return a; } int main(void) { int a, b; sca...
main.c: In function 'gcd': main.c:17:1: error: stray '\343' in program 17 | <U+3000><U+3000>count++; | ^~~~~~~~ main.c:17:3: error: stray '\343' in program 17 | <U+3000><U+3000>count++; | ^~~~~~~~ main.c:17:5: error: 'count' undeclared (first use in this function) 17 |   count++; | ...
s485934642
p00197
C
#include <stdio.h> #include <stdlib.h> // ユークリッドの互除法を利用した、最大公約数を求める関数 int gcd(int a, int b) { int c,count; if (a < b) { a+=b; b=a-b; a-=b; } while (b != 0) { c = a % b; a = b; b = c;   count++; } return a; } int main(void) { int a, b; ...
main.c: In function 'gcd': main.c:17:1: error: stray '\343' in program 17 | <U+3000><U+3000>count++; | ^~~~~~~~ main.c:17:3: error: stray '\343' in program 17 | <U+3000><U+3000>count++; | ^~~~~~~~ main.c: In function 'main': main.c:33:34: error: 'count' undeclared (first use in this function) ...
s117363772
p00197
C
#include <stdio.h> #include <stdlib.h> // ユークリッドの互除法を利用した、最大公約数を求める関数 int gcd(int a, int b) { int c,count; if (a < b) { a+=b; b=a-b; a-=b; } while (b != 0) { c = a % b; a = b; b = c;   count+=; } return a; } int main(void) { int a, b; ...
main.c: In function 'gcd': main.c:17:1: error: stray '\343' in program 17 | <U+3000><U+3000>count+=; | ^~~~~~~~ main.c:17:3: error: stray '\343' in program 17 | <U+3000><U+3000>count+=; | ^~~~~~~~ main.c:17:12: error: expected expression before ';' token 17 |   count+=; | ^...
s124633138
p00197
C
#include<stdio.h> int main(void) { int a,b,r,tmp; scanf("%d",&a); scanf("%d",&b); printf("%d %d\n",a,b) if(a<b){ tmp = a; a = b; b = tmp; } r = a % b; while(r!=0){ a = b; b = r; r = a % b; } printf("%d\n", b); return 0; }
main.c: In function 'main': main.c:7:23: error: expected ';' before 'if' 7 | printf("%d %d\n",a,b) | ^ | ; 8 | if(a<b){ | ~~
s389632302
p00197
C
#include <iostream> #include <cstdio> using namespace std; int gcd(int a, int b) { int r; while((r = a % b) != 0) { a = b; b = r; } return b; } int main(void){ int a, b, tmp; if (a < b){ tmp = b; b = a; a = tmp; } while(cin >> a >> b) { int lcm = a * ...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s814956197
p00197
C
#include <iostream> #include <cstdio> using namespace std; int gcd(float a, float b) { float r; while((r = a % b) != 0) { a = b; b = r; } return b; } int main(void){ float a, b, tmp; if (a < b){ tmp = b; b = a; a = tmp; } while(cin >> a >> b) { int lc...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s294775792
p00197
C
#include <iostream> #include <cstdio> using namespace std; int counter; int gcd(int a, int b){ if (b == 0) return a; counter++; return gcd(b, a%b); } int main(void){ int a, b; while(cin>>a>>b){ if(a == 0 && b == 0) return 0; counter = 0; cout<<gcd(a,b)<<...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s146548035
p00197
C
#include<stdio.h> #define SWAP(type,a,b)do{ type temp=a; a=b;b=temp; } while(0) int main(){ int a,b,i,cnt; while(1){ scanf("%d %d",&a,&b); if(a==0&&b==0) return 0; if(a<b)SWAP(int,a,b); cnt=0; while(b!=0){ a%=b; SWAP(int,a,b); cnt++; } printf("%d %d\n",a,cnt); } }
main.c:4:8: error: no macro name given in #define directive 4 | #define | ^ main.c:5:2: error: return type defaults to 'int' [-Wimplicit-int] 5 | SWAP(type,a,b)do{ | ^~~~ main.c: In function 'SWAP': main.c:5:16: error: expected declaration specifiers before 'do' 5 | SWAP(type,a,b)do{ ...
s791154629
p00197
C
#include<stdio.h> #define SWAP(type,a,b)do{type temp=a;a=b;b=temp;}while(0) int main(){ int a,b,i,cnt; while(1){ scanf("%d %d",&a,&b); if(a==0&&b==0) return 0; if(a<b)SWAP(int,a,b); cnt=0; while(b!=0){ a%=b; SWAP(int,a,b); cnt++; } printf("%d %d\n",a,cnt); } }
main.c:1:19: warning: extra tokens at end of #include directive 1 | #include<stdio.h> #define SWAP(type,a,b)do{type temp=a;a=b;b=temp;}while(0) int main(){ int a,b,i,cnt; while(1){ scanf("%d %d",&a,&b); if(a==0&&b==0) return 0; if(a<b)SWAP(int,a,b); cnt=0; while(b!=0){ a%=b; SWAP(int,a,b); cnt++; } printf("%d %d\n"...
s009740924
p00197
C
#include <stdio.h> int main(void) { int a, b, c, i; while(1){ scanf("%d %d", &a, &b); if(a == 0 && b == 0) break; if(a < b){ c = b; b = a; a = c; } for(i = 0; i++){ a = a % b; c = a; a ...
main.c: In function 'main': main.c:16:23: error: expected ';' before ')' token 16 | for(i = 0; i++){ | ^ | ;
s153035196
p00197
C
R(x,y,c){y?R(y,x%y,c-1):x&&printf("%d %d\n",x,-c);}main(x,y){for(;~scanf("%d%d",&x,&y);)R(x,y,x<y);
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | R(x,y,c){y?R(y,x%y,c-1):x&&printf("%d %d\n",x,-c);}main(x,y){for(;~scanf("%d%d",&x,&y);)R(x,y,x<y); | ^ main.c: In function 'R': main.c:1:1: error: type of 'x' defaults to 'int' [-Wimplicit-int] main.c:1:1: error: type of 'y' defaults to 'i...
s230210469
p00197
C
#include<stdio.h> int main(void){ int i,tmp,x,y,step=0; for(j=0;;j++){ scanf("%d %d",&x,&y); if(x==0&&y==0){ break; } for(i=0;;i++){ x=x%y; tmp=x; x=y; y=tmp; step++; if(y==0){ break; } } } printf("%d %d\n",x,step); return 0; }
main.c: In function 'main': main.c:6:13: error: 'j' undeclared (first use in this function) 6 | for(j=0;;j++){ | ^ main.c:6:13: note: each undeclared identifier is reported only once for each function it appears in
s257787453
p00197
C++
#include<iostream> using namespace std; int main() { int a, b,r, kouyaku[1001], kazu[1001],kaisuu,s; kaisuu = 0; while (1) { cin >> a >> b; if (a == 0&&b == 0) { goto a; } kaisuu = kaisuu + 1; s = 0; a:; for (int i = 1; i <= kaisuu; i++) { cout << kouyaku[i]<<" " << kazu[i] << endl; } }
a.cc: In function 'int main()': a.cc:18:2: error: expected '}' at end of input 18 | } | ^ a.cc:3:12: note: to match this '{' 3 | int main() { | ^
s047085431
p00197
C++
include<iostream> using namespace std; int main() { int a, b, r, kouyaku[1001], kazu[1001], kaisuu, s; kaisuu = 0; while (1) { cin >> a >> b; if (a == 0 && b == 0) { goto a; } kaisuu = kaisuu + 1; s = 0; } a:; for (int i = 1; i <= kaisuu; i++) { cout << kouyaku[i] << " " << kazu[i] << endl; } ...
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:7:17: error: 'cin' was not declared in this scope 7 | cin >> a >> b; | ^~~ a.cc:16:25: error: 'cout' was not declared in this scope 16 | ...
s834385064
p00197
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<(n);i++) int gcd(int a,int b){ if(b==0)return a; return gcd(b,a%b); } int main(){ int a,b; while(1){ cin>>a>>b; if(a==0&&b==0)break; cout<<gdc(a,b)<<endl; } }
a.cc: In function 'int main()': a.cc:13:23: error: 'gdc' was not declared in this scope; did you mean 'gcd'? 13 | cout<<gdc(a,b)<<endl; | ^~~ | gcd
s149319807
p00197
C++
#include<iostream> using namespace std; typedef long long int; int ct=0; int gcd(int a,int b){ ct++; if(a%b==0)return b; return gcd(b,a%b); } int main(){ int x,y; while(cin>>x>>y,x==0&&y==0){ if(x<y){ int tmp=x; x=y; y=tmp; } cout<<gcd(x,y)<<" "<<ct<<endl; ct=0; } return 0; }
a.cc:5:19: error: declaration does not declare anything [-fpermissive] 5 | typedef long long int; | ^~~
s048435295
p00197
C++
#include <cstdio> int ans = 0; int GCD(int a, int b){ if(b==0)return a; ans++; return GCD(b, a%b); } int main(){ int x,y; while(scanf("%d %d",&x, &y), x+y){ ans=0; if(x<y)std::swap(x,y); int gcd = GCD(x,y); printf("%d %d\n",gcd, ans); } }
a.cc: In function 'int main()': a.cc:13:29: error: 'swap' is not a member of 'std' 13 | if(x<y)std::swap(x,y); | ^~~~
s357830233
p00197
C++
#include <cstdio> int ans = 0; int GCD(int a, int b){ if(b==0)return a; ans++; return GCD(b, a%b); } int main(){ int x,y; while(scanf("%d %d",&x, &y), x+y){ ans=0; if(x<y)swap(x,y); int gcd = GCD(x,y); printf("%d %d\n",gcd, ans); } }
a.cc: In function 'int main()': a.cc:13:24: error: 'swap' was not declared in this scope 13 | if(x<y)swap(x,y); | ^~~~
s489499238
p00197
C++
#include <iostream> using namespace std; int gcd(int a, int b, int step); int main() { int a, b; while (cin >> a >> b, a){ gcd(a, b, 0); } return (0); } void gcd(int a, int b, int step) { if (b == 0){ cout << a << " " << step << endl; } else if (a < b){ retu...
a.cc:17:6: error: ambiguating new declaration of 'void gcd(int, int, int)' 17 | void gcd(int a, int b, int step) | ^~~ a.cc:4:5: note: old declaration 'int gcd(int, int, int)' 4 | int gcd(int a, int b, int step); | ^~~ a.cc: In function 'void gcd(int, int, int)': a.cc:23:20: error: return-st...
s909401141
p00197
C++
#include<stdio.h> int main(void) { int n,m,i,a; while(1){ scanf("%d %d",&n,&m); if(n==0&&m==0) break; a=0; if(n<m){ i=n; n=m; m=i; while(1){ i=n%m; n=m; m=i; a++; if(m==0) break; } printf("%d %d\n",n,a); } return 0; }
a.cc: In function 'int main()': a.cc:23:2: error: expected '}' at end of input 23 | } | ^ a.cc:3:1: note: to match this '{' 3 | { | ^
s730337074
p00197
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ int x,y; while(cin>>x){ cin>>y; if(x==0&&y==0)break; int cnt=0; while(true){ if(y==0)break; x=x%y; swap(x,y); cnt++; } cout<<x<<" "<<cnt<<endl; } return 0; } }
a.cc:20:1: error: expected declaration before '}' token 20 | } | ^
s825822498
p00197
C++
#include <stdio.h> int main(void) { long a1, a2, x, y; int amari,i=0; scanf("%ld %ld", &a1, &a2); //1. 2number if(a1<a2){ x = a2; y = a1; } for(amari =! 0){ amari = x % y; x = y; y = amari; i++; } printf("%ld %ld\n", x, i); return 0; }
a.cc: In function 'int main()': a.cc:13:23: error: expected ';' before ')' token 13 | for(amari =! 0){ | ^ | ; a.cc:23:9: error: expected primary-expression before 'return' 23 | return 0; | ^~~~~~ a.cc:21:35: error: expected ')'...
s115997066
p00197
C++
#include <stdio.h> int main(void) { long a1, a2, x, y; int amari,i=0; scanf("%ld %ld", &a1, &a2); //1. 2number if(m==0 && n==0)break; if(a1<a2){ x = a2; y = a1; } for(amari =! 0){ amari = x % y; x = y; y = amari; i++; } printf("%ld %ld\n", x, i); return 0; }
a.cc: In function 'int main()': a.cc:6:12: error: 'm' was not declared in this scope 6 | if(m==0 && n==0)break; | ^ a.cc:6:20: error: 'n' was not declared in this scope 6 | if(m==0 && n==0)break; | ^ a.cc:6:25: error: break statement not within loop or s...
s813153544
p00197
C++
#include <stdio.h> int main(void) { long a1, a2, x, y; int amari,i=0; scanf("%ld %ld", &a1, &a2); //1. 2number if(m==0 && n==0)break; if(a1<a2){ x = a2; y = a1; } while(amari =! 0){ amari = x % y; x = y; y = amari; i++; } printf("%ld %ld\n", x, i); return 0; }
a.cc: In function 'int main()': a.cc:6:12: error: 'm' was not declared in this scope 6 | if(m==0 && n==0)break; | ^ a.cc:6:20: error: 'n' was not declared in this scope 6 | if(m==0 && n==0)break; | ^ a.cc:6:25: error: break statement not within loop or s...
s694552357
p00197
C++
#include <stdio.h> int main(void) { long a1, a2, x, y; int amari,i=0; scanf("%ld %ld", &a1, &a2); //1. 2number if(a1==0 && a2==0)break; if(a1<a2){ x = a2; y = a1; } while(amari =! 0){ amari = x % y; x = y; y = amari; i++; } printf("%ld %ld\n", x, i); return 0; }
a.cc: In function 'int main()': a.cc:6:27: error: break statement not within loop or switch 6 | if(a1==0 && a2==0)break; | ^~~~~
s562898343
p00197
C++
#include<bits/stdc++.h> using namespace std; int main() {  int x,y,num;  while(cin>>x>>y,x&&y){   if(x<y)swap(x,y);   for(int i=1;;i++){    num=x%y;    x=y;    y=num;    if(!num){     cout<<x<<" "<<i<<endl;     break;    }   }  } }
a.cc:5:1: error: extended character   is not valid in an identifier 5 |  int x,y,num; | ^ a.cc:6:1: error: extended character   is not valid in an identifier 6 |  while(cin>>x>>y,x&&y){ | ^ a.cc:7:1: error: extended character   is not valid in an identifier 7 |   if(x<y)swap(x,y); | ^ a.cc...
s371727058
p00197
C++
#include <iostream> using namespace std; int counter; int gcd(int a, int b){ if (b == 0) return a; counter++; else return gcd(b, a%b); } int main(void){ int a, b; while(cin>>a>>b){ if(a == 0 && b == 0) return 0; counter = 0; cout<<gcd(a,b)<<" "<<counter<<endl; ...
a.cc: In function 'int gcd(int, int)': a.cc:10:8: error: 'else' without a previous 'if' 10 | else return gcd(b, a%b); | ^~~~
s844315383
p00197
C++
#include <iostream> #include <cstdio> using namespace std; int gcd(int a, int b){ if (b == 0) return a; else return gcd(b, a%b) counter++; } int main(void){ int counter; int a, b; while(cin>>a>>b){ if(a == 0 && b == 0) return 0; counter = 0; cout<<gcd(a,b)<<" ...
a.cc: In function 'int gcd(int, int)': a.cc:7:31: error: expected ';' before 'counter' 7 | else return gcd(b, a%b) | ^ | ; 8 | counter++; | ~~~~~~~ a.cc:8:8: error: 'counter' was not declared in t...
s565926888
p00197
C++
#include <iostream> #include <cstdio> using namespace std; int gcd(int a, int b){ if (b == 0) return a; else return gcd(b, a%b); counter++; } int main(void){ int counter; int a, b; while(cin>>a>>b){ if(a == 0 && b == 0) return 0; counter = 0; cout<<gcd(a,b)<<"...
a.cc: In function 'int gcd(int, int)': a.cc:8:8: error: 'counter' was not declared in this scope 8 | counter++; | ^~~~~~~
s235105078
p00197
C++
#include <iostream> #include <cstdio> using namespace std; int counter; int gcd(int a, int b){ if (b == 0) return a; else return gcd(b, a%b); counter++; } int main(void){ int a, b; while(cin>>a>>b){ if(a < b){ x = a; a = b; b = x; } if...
a.cc: In function 'int main()': a.cc:17:12: error: 'x' was not declared in this scope 17 | x = a; | ^
s914250255
p00197
C++
#include <iostream> #include <cstdio> using namespace std; int gcd(int a, int b){ if (b == 0) return a; else return gcd(b, a%b); counter++; } int main(void){ int a, b, counter; while(cin>>a>>b){ if(a < b){ x = a; a = b; b = x; } if(a == ...
a.cc: In function 'int gcd(int, int)': a.cc:7:8: error: 'counter' was not declared in this scope 7 | counter++; | ^~~~~~~ a.cc: In function 'int main()': a.cc:14:12: error: 'x' was not declared in this scope 14 | x = a; | ^
s777967109
p00197
C++
#include <iostream> using namespace std; int gcd(int a, int b){ if (b == 0) return a; else return gcd(b, a%b); counter++; } int main(void){ int a, b, counter; while(cin>>a>>b){ if(a < b){ x = a; a = b; b = x; } if(a == 0 && b == 0) re...
a.cc: In function 'int gcd(int, int)': a.cc:6:8: error: 'counter' was not declared in this scope 6 | counter++; | ^~~~~~~ a.cc: In function 'int main()': a.cc:13:12: error: 'x' was not declared in this scope 13 | x = a; | ^
s240001301
p00197
C++
#include <iostream> using namespace std; int gcd(int a, int b){ if (b == 0) return a; else return gcd(b, a%b); counter++; } int main(void){ int a, b, counter; while(cin>>a>>b){ if(a < b){ x = a; a = b; b = x; } if(a == 0 && b == 0) ...
a.cc: In function 'int gcd(int, int)': a.cc:6:8: error: 'counter' was not declared in this scope 6 | counter++; | ^~~~~~~ a.cc: In function 'int main()': a.cc:13:12: error: 'x' was not declared in this scope 13 | x = a; | ^
s839422706
p00197
C++
#include <iostream> using namespace std; int counter; int gcd(int a, int b){ if (b == 0) return a; else return gcd(b, a%b); counter++; } int main(void){ int a, b, counter; while(cin>>a>>b){ if(a < b){ x = a; a = b; b = x; } if(a == 0 ...
a.cc: In function 'int main()': a.cc:14:12: error: 'x' was not declared in this scope 14 | x = a; | ^
s272341875
p00197
C++
#include <iostream> #include <cstdio>using namespace std; int counter; int gcd(int a, int b) { if (b == 0) return a; counter++; return gcd(b, a%b); } int main(void){ int a, b, x; while(cin>>a>>b){ if(a < b){ x = a; a = b; b = x; } ...
a.cc:2:24: warning: extra tokens at end of #include directive 2 | #include <cstdio>using namespace std; | ^~~~~~~~~ a.cc:2:10: fatal error: cstdio>usin: No such file or directory 2 | #include <cstdio>using namespace std; | ^~~~~~~~~~~~~ compilation terminated.
s585850342
p00197
C++
#include <iostream> #include <cstdio>using namespace std; int counter; int gcd(int a, int b) { if (b == 0) return a; counter++; return gcd(b, a%b); } int main(void){ int a, b, x; while(cin>>a>>b){ if(a < b){ x = a; a = b; b = x; } ...
a.cc:2:24: warning: extra tokens at end of #include directive 2 | #include <cstdio>using namespace std; | ^~~~~~~~~ a.cc:2:10: fatal error: cstdio>usin: No such file or directory 2 | #include <cstdio>using namespace std; | ^~~~~~~~~~~~~ compilation terminated.
s630586034
p00197
C++
#include <bits/stdc++.h> using namespace std; int count = 0; int gcd(int x,int y){ count++; if(y == 0)return x; gcd(y,x%y); } int main(){ while(1){ int x,y; cin >> x >> y; if(x == 0 && y == 0)break; cout << gcd(x,y) << " " << count << endl; } return 0; }
a.cc: In function 'int gcd(int, int)': a.cc:8:3: error: reference to 'count' is ambiguous 8 | count++; | ^~~~~ In file included from /usr/include/c++/14/algorithm:86, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/pstl/glue_al...
s694323932
p00197
C++
#include<bits/stdc++.h> using namespace std; int main(){ while(1){ int a,b,c; cin>>a>>b; if(a==0 && b==0){break;} c=0; t=0; int count=0; while(b!=0){ c=a%b; a=c; swap(a,b); count++; } cout<<a<<" "<<count<<endl; } }
a.cc: In function 'int main()': a.cc:10:9: error: 't' was not declared in this scope 10 | t=0; | ^
s501752267
p00197
C++
#include<bits/stdc++.h> using namespace std; int main(){ int x,y,x1,y1; int cnt=0; while(1) { cin >> x >> y; if(x==0 && y==0) { break; } /* x = max(x,y); y = min(x,y);*/ while(1) { if(x!=y) { y1 = x%y; x1 = y; cnt++; x = x1; y = ...
a.cc: In function 'int main()': a.cc:39:6: error: expected '}' at end of input 39 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s386695962
p00197
C++
#include<vector> #include<algorithm> #include<cstdio> #include <string> #include <complex> #include <functional> using namespace std; typedef pair<int,int> P; double dat[100][100]; double dp[200][100];//動的計画法 int main(){ long long a,b,cnt,tmp; while(cin>>a>>b,a){ cnt=0; if(a<b){ tmp=...
a.cc: In function 'int main()': a.cc:13:11: error: 'cin' was not declared in this scope 13 | while(cin>>a>>b,a){ | ^~~ a.cc:7:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 6 | #include <functional> +++ |+#include <iostream> ...
s501378687
p00197
C++
(){ int a[2]; while(cin>>a[0]>>a[1]){ if ( a[0]==0&&a[1]==0)break; if ( a[0]<a[1])swap(a[0],a[1]); solve(a); } }
a.cc:1:2: error: expected unqualified-id before ')' token 1 | (){ | ^
s876177236
p00198
C
#include <stdio.h> #include <string.h> ?? int main() { ????????int i0, i1, i2, i3, n, m, d[30][6], s[30], sw; ????????char c[8]; ????????char color[6][8] = {"Cyan", "Yellow", "Red", "Magenta", "Green", "Blue"}; ?? ????????scanf("%d", &n); ????????while (n > 0) { ????????????????for (i0 = 0; i0 < n; i0++) { ????????????...
main.c:3:1: error: expected identifier or '(' before '?' token 3 | ?? | ^
s862464704
p00198
C
#include<stdio.h> int main(void){ int i,j,n; char color[8]; while(scanf("%d",&n),n!=0){ int uesita[6]={"0"},yokomen[6]={"0"},del=0,k=-1; for(i=0;i<=n;i++){ if(i<n){ for(j=0;j<6;j++){ scanf("%s",&color); if(j==0 || j==5)uesita[i]+=color[0]; else yokomen[i]+=color[0]; } } if(k>=0){ ...
main.c: In function 'main': main.c:6:31: error: cannot initialize array of 'int' from a string literal with type array of 'char' 6 | int uesita[6]={"0"},yokomen[6]={"0"},del=0,k=-1; | ^ main.c:6:48: error: cannot initialize array of 'int' from a string literal wit...
s540864602
p00198
C
#include<stdio.h> int main(void) { int n,i,j,z; char c1[1001],c2[1001],c3[1001],c4[1001],c5[1001],c6[1001]; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%s %s %s %s %s %s",&c1[i],&c2[i],&c3[i],&c4[i],&c5[i],&c6[i]); } for(i=0;i<n;i++){ z=0; for(j=0;j<n;j++){ if(c1[i]==c1[j] && c2[i]==c2[j] && c3[i]==c3[j] && ...
main.c:60:9: error: expected identifier or '(' before 'return' 60 | return 0; | ^~~~~~ main.c:61:1: error: expected identifier or '(' before '}' token 61 | } | ^
s285414790
p00198
C++
#define sc second typedef vector<int> vi; typedef pair<int,int> pii; typedef pair<int,pii> pip; const int INF = (1<<25); const int dx[]={1,0,-1,0},dy[]={0,-1,0,1}; int main(){ int n; int ans=0; int box[30][6]; bool b[30][30]; int samenum; while(cin>> n,n){ ans=0; for(int i=0;i<n;i++){ for(in...
a.cc:2:9: error: 'vector' does not name a type 2 | typedef vector<int> vi; | ^~~~~~ a.cc:3:9: error: 'pair' does not name a type 3 | typedef pair<int,int> pii; | ^~~~ a.cc:4:9: error: 'pair' does not name a type 4 | typedef pair<int,pii> pip; | ^~~~ a.cc: In functio...
s161886588
p00198
C++
#include <stdio.h> #include <string.h> ?? int main() { ????????int i0, i1, i2, i3, n, m, d[30][6], s[30], sw; ????????char c[8]; ????????char color[6][8] = {"Cyan", "Yellow", "Red", "Magenta", "Green", "Blue"}; ?? ????????scanf("%d", &n); ????????while (n > 0) { ????????????????for (i0 = 0; i0 < n; i0++) { ????????????...
a.cc:3:1: error: expected unqualified-id before '?' token 3 | ?? | ^
s107372284
p00198
C++
#include <stdio.h> #include <string.h> ?? int main() { ????????int i0, i1, i2, i3, n, m, d[30][6], s[30], sw; ????????char c[8]; ????????char color[6][8] = {"Cyan", "Yellow", "Red", "Magenta", "Green", "Blue"}; ?? ????????scanf("%d", &n); ????????while (n > 0) { ????????????????for (i0 = 0; i0 < n; i0++) { ????????????...
a.cc:3:1: error: expected unqualified-id before '?' token 3 | ?? | ^
s099943334
p00198
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<n;i++) //#define int long long using namespace std; struct Dice { int c[6]; //?????????????????? Dice() {} //c0:???, c1:??????, c2:???, c3:?\\, c4:???, c5:??? Dice(int c0, int c1, int c2, int c3, int c4, int c5) { c[0] = c0; c[1] = c1; c[2] = c2; c[3] = ...
a.cc: In function 'int main()': a.cc:160:50: error: lvalue required as left operand of assignment 160 | if (d[i] == d[j] && used[j] = false;) | ~~~~~~~~~~~~~^~~~~~~~~~ a.cc:160:69: error: expected primary-expression before ')' token 160 | ...
s957150617
p00198
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<n;i++) //#define int long long using namespace std; struct Dice { int c[6]; //?????????????????? Dice() {} //c0:???, c1:??????, c2:???, c3:?\\, c4:???, c5:??? Dice(int c0, int c1, int c2, int c3, int c4, int c5) { c[0] = c0; c[1] = c1; c[2] = c2; c[3] = ...
a.cc: In function 'int main()': a.cc:160:70: error: expected primary-expression before ')' token 160 | if (d[i] == d[j] && used[j] == false;) | ^
s786199918
p00198
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; enum FACE { TOP, BOTTOM, FRONT, BACK, LEFT, RIGHT }; class UnionFind { public: vector<int> data; UnionFind(int size):data(size, -1){} bool unionSet(int x, int y) { x = root(x); y=root(y); if(x != y) { if(d...
a.cc: In function 'bool isequal(std::vector<Dice>&, std::vector<Dice>&)': a.cc:82:40: error: invalid conversion from 'int' to 'FACE' [-fpermissive] 82 | if(a[k].GetVal(i)!=b[j].GetVal(i)) | ^ | | |...
s737034426
p00198
C++
// Trouble in Shinagawa's Artifacts // URL: http://rose.u-aizu.ac.jp/onlinejudge/ProblemSet/description.jsp?id=0198&lang=jp #include <cstdio> #include <cstring> #include <vector> #include <set> // ŠÖ” std::vector <int> rotate_x( std::vector <int> box ); std::vector <int> rotate_y( std::vector <int> box ); std::vec...
/usr/bin/ld: /tmp/ccMa4QUi.o: in function `main': a.cc:(.text+0x644): undefined reference to `rotate_y(std::vector<int, std::allocator<int> >)' collect2: error: ld returned 1 exit status
s235511971
p00198
C++
main(){char* l="RYBMGC";int i,j,n,a,c[6],f,s,t[4],r[][4]={{1,2,4,3},{5,2,0,3},{0,1,5,4},{0,4,5,1},{0,2,5,3},{2,1,3,4}};while(scanf("%d",&n),n){a=0;int u[9999]={0};while(n--){char b[16];for(i=0;i<6;++i){scanf("%s",b);for(j=0;l[j]!=*b;++j);c[i]=j;if(j==0)f=i;}for(i=0;i<4;++i)t[i]=c[r[f][i]];for(i=0;i<3;++i){s=0;for(j=0;j...
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | main(){char* l="RYBMGC";int i,j,n,a,c[6],f,s,t[4],r[][4]={{1,2,4,3},{5,2,0,3},{0,1,5,4},{0,4,5,1},{0,2,5,3},{2,1,3,4}};while(scanf("%d",&n),n){a=0;int u[9999]={0};while(n--){char b[16];for(i=0;i<6;++i){scanf("%s",b);for(j=0;l[...
s681136308
p00198
C++
#include<iostream> using namespace std; int main(){ int n,q; int i; con int s[n]; for(i=0;i<n;i++) printf("%d",&s[i]); printf("%d",&q); int t[q]; for(i=0;i<q;i++) printf("%d",&t[i]); int count=0; int h[10000000]; for(i=0;i<n;i++) h[s[i]] = 1; for(i=0;i<q;i++){ if(h[t[q]]==1){ count++;...
a.cc: In function 'int main()': a.cc:6:3: error: 'con' was not declared in this scope 6 | con | ^~~ a.cc:8:33: error: 's' was not declared in this scope 8 | for(i=0;i<n;i++) printf("%d",&s[i]); | ^ a.cc:14:22: error: 's' was not declared in this scope 14 | ...
s606427114
p00199
Java
import java.util.Scanner; public class main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n, m; int a[]; while (true) { n = sc.nextInt(); m = sc.nextInt(); if ((n | m) == 0) { break; } a = new int[n]; while (m-- != 0) { String k = sc.next(); ...
Main.java:3: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s189349564
p00199
Java
import java.util.Scanner; public class A0199 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n, m; int a[]; while (true) { n = sc.nextInt(); m = sc.nextInt(); if ((n | m) == 0) { break; } a = new int[n]; while (m-- != 0) { String k = sc.next(); ...
Main.java:3: error: class A0199 is public, should be declared in a file named A0199.java public class A0199 { ^ 1 error
s693021379
p00199
C
#include<stdio.h> #include<string.h> #include<stdlib.h> int main(){ int i,j,k,n,m,x,y; char s[105],t[5]; while(1){ scanf("%d%d",&n,&m); if(n==0)break; memset(s,0,sizeof(s)); for(i=0;i<n;i++)s[i]='#'; while(m--){ scanf("%s",t); if(t[0]=='A'){ for(i=0;i<n;i++)if(s[i]=='#'){s[i]='A';break;} } ...
main.c: In function 'main': main.c:22:94: error: expected ';' before '}' token 22 | else if(i==n-1 && s[i-1]!='A'){s[i]='B';break} | ^ | ...
s248212942
p00199
C++
include<bits/stdc++.h> using namespace std; int main(){ int n,m; while(cin>>n>>m,n){ string s; for(int i=0;i<n;i++)s+='#'; while(m--){ string p; cin>>p; if(p=="A"){ for(int i=0;i<n;i++) if(s[i]=='#'){ s[i]='A'; break; } } ...
a.cc:1:1: error: 'include' does not name a type 1 | include<bits/stdc++.h> | ^~~~~~~ a.cc: In function 'int main()': a.cc:5:9: error: 'cin' was not declared in this scope 5 | while(cin>>n>>m,n){ | ^~~ a.cc:6:5: error: 'string' was not declared in this scope 6 | string s; | ...
s258912993
p00199
C++
#include<iostream> using namespace std; #define rep(i,s,e) for ( int i = s; i <= e; i++ ) #define MAX 10000 char C[MAX+2]; int n, m; void setLeft(char ch){ for ( int i = 1; ; i++ ){ if ( C[i] == '#' ) { C[i] = ch; return; } } } void setB(){ for ( int i = n; i >= 1; i-- ){ if ( C[i] == '#' && C[i-1] != '...
a.cc:58:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 58 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:61:7: error: 'assert' was not declared in this scope 61 | assert( n <= 100 ); | ^~~~~~ a.cc:2:1: note: 'assert' is defined in header '<cassert>'; ...
s906848219
p00199
C++
#include<iostream> using namespace std; int main(){ long n,m,i,j,d[101],e[101],k,dd; char c,a[101]; while(cin>>n){ cin>>m; if(n==0)break; for(i=0;i<n;i++)a[i]='#'; for(j=0;j<m;j++){ cin>>c; if(c=='A'){ for(i=0;i<n;i++)if(a[i]=='#'){a[i]='A';break;} }else if(c=='B'){ for(i=n-1;i>=0;i--){ if(0<i&&a[i-1]!='A'&&i<n-1&&a[i+...
a.cc: In function 'int main()': a.cc:20:52: error: expected ';' before '}' token 20 | if(i<0){for(i=0;i<n;i++)if(a[i]=='#')a[i]='B';break} | ^ | ;
s479628707
p00199
C++
#include<iostream> using namespace std; int main(){ long n,m,i,j,d[101],e[101],k,dd; char c,a[101]; while(cin>>n){ cin>>m; if(n==0)break; for(i=0;i<n;i++)a[i]='#'; for(j=0;j<m;j++){ cin>>c; if(c=='A'){ for(i=0;i<n;i++)if(a[i]=='#'){a[i]='A';break;} }else if(c=='B'){ for(i=n-1;i>=0;i--){ if(0<i&&a[i-1]!='A'&&i<n-1&&a[i+...
a.cc: In function 'int main()': a.cc:20:53: error: expected ';' before '}' token 20 | if(i<0){for(i=0;i<n;i++)if(a[i]=='#'){a[i]='B';break} | ^ | ; a.cc:47:2: error: expected '}' at end of input 47 ...
s105814737
p00200
Java
import java.util.*; public class GameOfStones { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); while(true) { int n = stdIn.nextInt(); int m = stdIn.nextInt(); if(n == 0 && m == 0) { break; } int[][] cost = new int[m+1][m+1]; int[][] time = new int[m+1][m...
Main.java:2: error: class GameOfStones is public, should be declared in a file named GameOfStones.java public class GameOfStones { ^ 1 error
s047217984
p00200
Java
import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.PriorityQueue; import java.util.Scanner; import lombok.Data; public class Main { public static void main(String[] args) throws IOException { new Main().run(); } private void run() throws IO...
Main.java:9: error: package lombok does not exist import lombok.Data; ^ Main.java:84: error: cannot find symbol @Data ^ symbol: class Data location: class Main 2 errors
s525921546
p00200
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.LinkedList; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line; line = br.readLine();...
Main.java:39: error: variable p is already defined in method main(String[]) int p = Integer.valueOf(nums[0]); ^ 1 error
s958351272
p00200
Java
import java.io.IOException; import java.util.LinkedList; import java.util.Scanner; public class Main2 { public static void main(String[] args) throws IOException { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); LinkedList<Rail> railList = new LinkedList<>(); for(in...
Main.java:6: error: class Main2 is public, should be declared in a file named Main2.java public class Main2 { ^ 1 error
s754293148
p00200
Java
import java.util.*; import java.lang.*; import static java.lang.Math.*; import static java.util.Arrays.*; public class P0200 { Scanner sc; long[][] time; long[][] cost; int n,m; int INF=1<<28; void run() { sc = new Scanner(System.in); while (true) { n = sc.nextInt(); m = sc.nextInt(); if (n == 0 &...
Main.java:5: error: class P0200 is public, should be declared in a file named P0200.java public class P0200 { ^ 1 error
s299512184
p00200
Java
import java.util.*; import static java.lang.Math.*; import static java.util.Arrays.*; public class P0200 { Scanner sc; long[][] time; long[][] cost; int n,m; int INF=1<<28; void run() { sc = new Scanner(System.in); while (true) { n = sc.nextInt(); m = sc.nextInt(); if (n == 0 && m == 0)break; t...
Main.java:4: error: class P0200 is public, should be declared in a file named P0200.java public class P0200 { ^ 1 error
s002443373
p00200
Java
import java.util.*; import static java.lang.Math.*; import static java.util.Arrays.*; public class P0200 { Scanner sc; long[][] time; long[][] cost; int n,m; int INF=1<<28; void run() { sc = new Scanner(System.in); while (true) { n = sc.nextInt(); m = sc.nextInt(); if (n == 0 && m == 0)break; t...
Main.java:4: error: class P0200 is public, should be declared in a file named P0200.java public class P0200 { ^ 1 error
s965477633
p00200
Java
import java.util.Arrays; import java.util.Comparator; import java.util.PriorityQueue; import java.util.Scanner; //Traveling Alone: One-way Ticket of Youth public class AOJ0200 { public static int n; public static int m; public static int[][] cost; public static int[][] time; public static int[] dist; public ...
Main.java:7: error: class AOJ0200 is public, should be declared in a file named AOJ0200.java public class AOJ0200 { ^ 1 error
s490434652
p00200
Java
import java.util.Comparator; import java.util.PriorityQueue; import java.util.Scanner; public class Main{ int num1; int state1; int price1; public TravelingAlone(int num, int state, int price){ num1 = num; state1 = state; price1 = price; } public void changecost(int cost){ num1 = cost; } publi...
Main.java:12: error: invalid method declaration; return type required public TravelingAlone(int num, int state, int price){ ^ 1 error
s958047409
p00200
Java
import java.util.Comparator; import java.util.PriorityQueue; import java.util.Scanner; public class Main{ int num1; int state1; int price1; public TravelingAlone(int num, int state, int price){ num1 = num; state1 = state; price1 = price; } public void changecost(int cost){ num1 = cost; } publi...
Main.java:12: error: invalid method declaration; return type required public TravelingAlone(int num, int state, int price){ ^ 1 error
s684044902
p00200
Java
import java.util.Comparator; import java.util.PriorityQueue; import java.util.Scanner; public class TravelingAlone{ int num1; int state1; int price1; public TravelingAlone(int num, int state, int price){ num1 = num; state1 = state; price1 = price; } public void changecost(int cost){ num1 = cost; ...
Main.java:6: error: class TravelingAlone is public, should be declared in a file named TravelingAlone.java public class TravelingAlone{ ^ 1 error
s996032553
p00200
Java
import java.util.Comparator; import java.util.PriorityQueue; import java.util.Scanner; public class Main{ int num1; int state1; int price1; public Main(int num, int state, int price){ num1 = num; state1 = state; price1 = price; } public void changecost(int cost){ num1 = cost; } public void cha...
Main.java:42: error: cannot find symbol TravelingAlone[] stationcost = new TravelingAlone[stationNum + 1]; ^ symbol: class TravelingAlone location: class Main Main.java:42: error: cannot find symbol TravelingAlone[] stationcost = new TravelingAlone[stationNum + 1]; ^...
s718454424
p00200
Java
import java.util.LinkedList; import java.util.Scanner; public class TravelingAlone { class Main { int from, to, cost, time; public Edge(int from, int to, int cost, int time) { // TODO 自動生成されたコンストラクター・スタブ this.from = from; this.to = to; this.cost = cost; this.time = time; } } int n, m; Linked...
Main.java:8: error: invalid method declaration; return type required public Edge(int from, int to, int cost, int time) { ^ 1 error
s819672969
p00200
Java
import java.util.*; public class Traveling_Alone { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (true) { int n = sc.nextInt(); int m = sc.nextInt(); if ((n | m) == 0) break; int[][] costTable = new int[m][m]; int[][] timeTable = new int[m][m]; for (int ...
Main.java:3: error: class Traveling_Alone is public, should be declared in a file named Traveling_Alone.java public class Traveling_Alone { ^ Main.java:85: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal return new Integer(this.cost).compareTo(new Integer(o.cost)); ...
s658956289
p00200
Java
import java.util.*; public class Traveling_Alone { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (true) { int n = sc.nextInt(); int m = sc.nextInt(); if ((n | m) == 0) break; int[][] costTable = new int[m][m]; int[][] timeTable = new int[m][m]; for (int ...
Main.java:3: error: class Traveling_Alone is public, should be declared in a file named Traveling_Alone.java public class Traveling_Alone { ^ Main.java:85: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal return new Integer(this.cost).compareTo(new Integer(o.cost)); ...
s377541866
p00200
C
for(k=0; k<m; i++){ for(i=0; i<m; i++){ for(j=0; j<m; j++){ cost[i][j]=(cost[i][j]>cost[i][k]+cost[k][j])?(cost[i][k]+cost[k][j]):cost[i][j]; cost[j][i]=cost[i][j]; time[i][j]=(time[i][j]>time[i][k]+time[k][j])?(time[i][k]+time[k][j]):time[i][j]; time[j][i]=time[i][j]; } } }
main.c:2:17: error: expected identifier or '(' before 'for' 2 | for(k=0; k<m; i++){ | ^~~ main.c:2:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 2 | for(k=0; k<m; i++){ | ^ main.c:2:32: error: ex...