submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s093694134
p00067
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class Main { public static void main(String[] args){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String tes = null; int g=0; int d = 0; ArrayList<In...
Main.java:71: error: cannot find symbol System.out.print(al2.get(i).get(trans(j,k))); ^ symbol: method get(int) location: class Object Main.java:83: error: incompatible types: Object cannot be converted to ArrayList<Integer> al = al2.get(r); ^ Note: Main.java...
s674540437
p00067
Java
package aoj; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class aoj06 { public static void main(String[] args){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String tes = null; int g=0; int d = 0; ...
Main.java:8: error: class aoj06 is public, should be declared in a file named aoj06.java public class aoj06 { ^ 1 error
s228167710
p00067
Java
package aoj; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class aoj06 { public static void main(String[] args){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String tes = null; int g=0; int d = 0; ...
Main.java:8: error: class aoj06 is public, should be declared in a file named aoj06.java public class aoj06 { ^ 1 error
s934631605
p00067
Java
package aoj; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class aoj06 { public static void main(String[] args){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String tes = null; int g=0; int d = 0; ...
Main.java:8: error: class aoj06 is public, should be declared in a file named aoj06.java public class aoj06 { ^ 1 error
s669657734
p00067
Java
package aoj; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class aoj06 { public static void main(String[] args){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String tes = null; int g=0; int d=0; ...
Main.java:8: error: class aoj06 is public, should be declared in a file named aoj06.java public class aoj06 { ^ 1 error
s341653086
p00067
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class Main { public static void main(String[] args){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String tes = null; int g=0; int d = 0; ArrayList<In...
Main.java:67: error: reached end of file while parsing } ^ 1 error
s330785851
p00067
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class Main { public static void main(String[] args){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String tes = null; int g=0; int d = 0; ArrayList<In...
Main.java:71: error: cannot find symbol System.out.print(al2.get(i).get(trans(j,k))); ^ symbol: method trans(int,int) location: class Main 1 error
s938743803
p00067
Java
package aoj; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class aoj06 { public static void main(String[] args){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String tes = null; int g=0; int d = 0; ...
Main.java:8: error: class aoj06 is public, should be declared in a file named aoj06.java public class aoj06 { ^ Note: Main.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error
s739311635
p00067
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class Main { public static void main(String[] args){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String tes = null; int g=0; int d = 0; ArrayList<In...
Main.java:80: error: unnamed classes are a preview feature and are disabled by default. public static int trans(int h,int w){ ^ (use --enable-preview to enable unnamed classes) Main.java:90: error: class, interface, enum, or record expected } ^ 2 errors
s067037164
p00067
Java
package aoj; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class aoj06 { public static void main(String[] args){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String tes = null; int g=0; int d = 0; ...
Main.java:8: error: class aoj06 is public, should be declared in a file named aoj06.java public class aoj06 { ^ 1 error
s437961772
p00067
Java
package aoj; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class aoj06 { public static void main(String[] args){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String tes = null; int g=0; int d = 0; ...
Main.java:8: error: class aoj06 is public, should be declared in a file named aoj06.java public class aoj06 { ^ 1 error
s797213937
p00067
Java
package aoj; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class aoj06 { public static void main(String[] args){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String tes = null; int g=0; int d = 0; ...
Main.java:8: error: class aoj06 is public, should be declared in a file named aoj06.java public class aoj06 { ^ 1 error
s016999301
p00067
Java
package aoj; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class aoj06 { public static void main(String[] args){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String tes = null; int g=0; int d = 0; ...
Main.java:8: error: class aoj06 is public, should be declared in a file named aoj06.java public class aoj06 { ^ 1 error
s850462953
p00067
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class Main { public static void main(String[] args){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String tes = null; int g=0; int d = 0; ArrayList<In...
Main.java:135: error: class, interface, enum, or record expected } ^ Main.java:139: error: class, interface, enum, or record expected } ^ Main.java:142: error: unnamed classes are a preview feature and are disabled by default. public static int trans(int h,int w){ ^ (use --enable-preview to ...
s078239048
p00067
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class Main { public static void main(String[] args){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String tes = null; int g=0; int d = 0; ArrayList<In...
Main.java:82: error: cannot find symbol al = al2.get(r).t; ^ symbol: variable r location: class Main 1 error
s743968502
p00067
Java
import java.io.*; ckass Main{ public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line=""; int count; char[][] map=new char[12][12]; while(true){ count=0; for(int i=0;i<12;i++){ line=br.readLine(); for(int j=0;j<12;j++){ map[i][j]=li...
Main.java:3: error: class, interface, enum, or record expected ckass Main{ ^ Main.java:4: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] args) throws IOException{ ^ (use --enable-preview to enable unnamed classes) Main.java:46: error: class, in...
s744300437
p00067
Java
import java.util.Scanner; public class Main { static Scanner scan = new Scanner(System.in); static boolean[][] map = new boolean[12][12]; static boolean[][] check = new boolean[12][12]; static int island = 0; public static void main(String[] args) { while(scan.hasNext()) { for(int i = 0; i < 12; i++) { ...
Main.java:66: error: reached end of file while parsing } ^ 1 error
s114602585
p00067
Java
#include<iostream> #include<vector> #include<string> using namespace std; char tisei[12][12]; void shima(int a, int b) { tisei[a][b] = 0; if (tisei[a - 1][b] && a - 1>0 )shima(a - 1, b); if (tisei[a + 1][b] && a + 1<13)shima(a + 1, b); if (tisei[a][b - 1] && b - 1>0 )shima(a, b - 1); if (tisei[a][b + 1] && b ...
Main.java:1: error: illegal character: '#' #include<iostream> ^ Main.java:2: error: illegal character: '#' #include<vector> ^ Main.java:3: error: illegal character: '#' #include<string> ^ Main.java:6: error: class, interface, enum, or record expected char tisei[12][12]; ^ Main.java:7: error: unnamed classes are a previ...
s934201465
p00067
Java
package NumberOfIsland; import java.io.IOException; import java.util.Scanner; /** * <pre> * NumberOfIsland * * ??¶?????°??????????????? * </pre> * * @author ?????????????????§??? * */ public class NumberofIsland { static boolean[][] map; static boolean[][] check; static int island ; public sta...
Main.java:16: error: class NumberofIsland is public, should be declared in a file named NumberofIsland.java public class NumberofIsland { ^ 1 error
s692373519
p00067
Java
111100001111 111000001111 110000001111 100000001111 000100010000 000000111000 000001111100 100011111110 110001111100 111000111000 111100010000 000000000000 010001111100 110010000010 010010000001 010000000001 010000000110 010000111000 010000000100 010000000010 010000000001 010010000001 010010000010 111001111100 000000...
Main.java:1: error: class, interface, enum, or record expected 111100001111 ^ 1 error
s168638480
p00067
Java
import java.util.ArrayList; import java.util.Scanner; public class Main { public static void main(String[] args) { // ?????????????????????(??????????????????) PackMan packman = new PackMan(); // ?????????????????¨?¨????????????°?????¨??? final int VERTICALLIMIT = 12; final int SIDELIMIT = 12; Scann...
Main.java:66: error: illegal start of type for(int result: packmanCount) { ^ Main.java:66: error: ';' expected for(int result: packmanCount) { ^ Main.java:66: error: <identifier> expected for(int result: packmanCount) { ^ Main.java:72: error: class, interface, enum,...
s132873774
p00067
Java
import java.util.ArrayList; import java.util.Scanner; public class Main { public static void main(String[] args) { // ?????????????????????(??????????????????) PackMan packman = new PackMan(); // ?????????????????¨?¨????????????°?????¨??? final int VERTICALLIMIT = 12; final int SIDELIMIT = 12; Scann...
Main.java:66: error: illegal start of type for(int result: packmanCount) { ^ Main.java:66: error: ';' expected for(int result: packmanCount) { ^ Main.java:66: error: <identifier> expected for(int result: packmanCount) { ^ Main.java:72: error: class, interface, enum,...
s760432335
p00067
Java
import java.util.Scanner; public class Main { class Island { int[][] map = new int[14][14]; int num = 2; public Island(int[][] map) { this.map = map; } private void label(int row, int column) { map[row][column] = num; for(int i=0; i<4; i++) { if(i==0) { if(map[row][column-1] == 1) labe...
Main.java:74: error: reached end of file while parsing } ^ 1 error
s321916104
p00067
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader( new InputStreamReader(System.in)); boolean hasNext = true; while (hasNext) { int[][] before = ne...
Main.java:52: error: reached end of file while parsing } ^ 1 error
s738863790
p00067
C
#include <stdio.h> char m[14][14]; int w[4][2]={{-1,0},{1,0},{0,-1},{0,1}}; void sol(int i,int j) { int ni,nj; m[i][j]=='0'; for(int k=0;k<4;++k) { ni=i+w[k][0]; nj=j+w[k][1]; if(m[ni][nj]=='1') sol(ni,nj); } } int main(){ int ans; for (;;) { ans=0; me...
main.c: In function 'main': main.c:21:9: error: implicit declaration of function 'memset' [-Wimplicit-function-declaration] 21 | memset(m,'0',sizeof(m)); | ^~~~~~ main.c:2:1: note: include '<string.h>' or provide a declaration of 'memset' 1 | #include <stdio.h> +++ |+#include <string.h> ...
s467883976
p00067
C
#include <stdio.h> bool setMap(); void search(int x,int y); int map[12][12]; int w=12; int h=12; int main(void) { while(setMap()){ } } bool setMap(){ char t; int count=0; int r; for(int i=0;i<h;i++){ for(int j=0;j<w;j++){ r=scanf(" %c",&t); if(r<1){ return false; } map[i][j]=t-'0'; ...
main.c:2:1: error: unknown type name 'bool' 2 | bool setMap(); | ^~~~ 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 | bool setMap(); main.c:15:1: error: unknown type name 'boo...
s700241330
p00067
C
#include<iostream> #include<string> using namespace std; #define N 12 int map[N][N], ans = 0; int toInt(string str, int n); int search(); int loop(int x, int y); int main(){ string str; while(cin >>str){ toInt(str, 0); for(int i = 1; i < N; i++){ ans = 0; cin >>str; ...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s336846386
p00067
C++
#include <iostream> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <map> #include <cmath> #include <string> #include <sstream> #include <iomanip> #include <complex> using namespace std; #define ll long long #define vvi vector< vector<int> > #define All(X) X.begin(),X.end() #define FO...
a.cc: In function 'void search(int, int)': a.cc:37:20: error: reference to 'data' is ambiguous 37 | if(data[nx][ny]==1) { | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr...
s742436408
p00067
C++
#include <iostream> #include <cstdio> using namespace std; char island[12][12]; void wn(int i, int j){ island[i][j] = '0'; for(int k = -1; k <= 1; k+=2){ if(i + k < 0 || j + k < 0) continue; if(island[i+k][j] == '1'){ wn(i+k, j); } if(island[i][j+k] == '1'){ wn(i, j+k); } } return; } int main()...
a.cc:41:1: error: extended character   is not valid in an identifier 41 |          cout << endl; | ^ a.cc:41:1: error: extended character   is not valid in an identifier a.cc:41:1: error: extended character   is not valid in an identifier a.cc:41:1: error: extended character   is not valid in an identifier a.c...
s579934393
p00067
C++
#include <iostream> #include <cstdio> #include <cstdlib> #include <time.h> #include <math.h> #include <vector> #include <queue> #include <map> #include <set> #include <algorithm> #include <iterator> #include <sstream> #include <string> #include <bitset> using namespace std; #define rep(I,N) for(int I = 0; I < (int)(N);...
a.cc: In function 'int main()': a.cc:62:23: error: a function-definition is not allowed here before '{' token 62 | int StrToInt(string s){ | ^ a.cc:69:23: error: a function-definition is not allowed here before '{' token 69 | string IntToStr(int i){ | ^ a.cc...
s780719798
p00067
C++
#include <iostream> #include <cstdio> #include <cstdlib> #include <time.h> #include <math.h> #include <vector> #include <queue> #include <map> #include <set> #include <algorithm> #include <iterator> #include <sstream> #include <string> #include <bitset> using namespace std; #define rep(I,N) for(int I = 0; I < (int)(N);...
a.cc: In function 'int main()': a.cc:62:23: error: a function-definition is not allowed here before '{' token 62 | int StrToInt(string s){ | ^ a.cc:69:23: error: a function-definition is not allowed here before '{' token 69 | string IntToStr(int i){ | ^ a.cc...
s831637664
p00067
C++
#include<iostream> #include<vector> #include<string> using namespace std; char ma[12][12]; bool vi[12][12]; int mv[4][2]={{0,1},{0,-1},{1,0},{-1,0}}; void dfs(int x, int y){ vi[y][x]=1; for(int i=0;i<4;i++){ int nx=x+mv[i][0],ny=y+mv[i][1]; if(ny>=0&&nx>=0&&ny<12&&nx<12&&(!vi[ny][nx])&&(ma[ny]...
a.cc: In function 'int main()': a.cc:29:9: error: 'memset' was not declared in this scope 29 | memset(vi, 0, sizeof(vi)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<vector> +++ |+#include <cstrin...
s340841584
p00067
C++
#include<iostream> using namespace std; int field[12][12]; int came[12][12]; int islands; void checker(int X,int Y) { if(field[Y][X] == 1 && came[Y][X] == 0) { came[Y][X] = 1; if(X!=0) { checker(X-1,Y); } if(Y!=0) { checker(X,Y-1); } if(X!=11) { checker(X+1,Y); } if(Y!=11) { che...
a.cc: In function 'int main()': a.cc:35:16: error: expected primary-expression before 'for' 35 | while (for(int a = 0;a<12;a++) | ^~~ a.cc:35:16: error: expected ')' before 'for' 35 | while (for(int a = 0;a<12;a++) | ~^~~ | ) a.cc:37:21...
s956253994
p00067
C++
#include<stdio.h> #include<iostream> #include<string> #include<vector> #include<math.h> #define CI cin >> #define CO cout << #define E << endl; #define F(i,max) (for(int i = 0;i < max;++i)) using namespace std; char board[14][14]; int vvv = 0; int JudgeSurround(int x, int y) { if (board[x][y] == '0') { return v...
a.cc: In function 'int main()': a.cc:70:30: error: expected ';' before '}' token 70 | break | ^ | ; 71 | } | ~ a.cc: In function 'int JudgeSurround(int, int)': a.cc:32:1...
s071232254
p00067
C++
/*#include<map> #include<list> #include<cmath> #include<stack> #include<string> #include<vector> #include<iostream> #include<algorithm> using namespace std; int A[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; int cunt = 0; void depth(int n, int s, int i){ if (n == 0 && s == 0){ cunt++; return; } else if (n == 0) r...
a.cc: In function 'int main()': a.cc:73:33: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 73 | scanf_s("%1d", &tmap[i][l]); | ^~~~~~~ | scanf
s474233844
p00067
C++
#include<map> #include<list> #include<stack> #include<queue> #include<cmath> #include<string> #include<stdio.h> #include<iostream> #include<algorithm> using namespace std; int tmap[12][12]; void Terrain(int i,int l){ if (i<0 || i>11 || l<0 || i>11 || tmap[i][l] == 0){ return; } tmap[i][l] = 0; Terrain(i + 1, ...
a.cc: In function 'int main()': a.cc:33:33: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 33 | scanf_s("%1d", &tmap[i][l]); | ^~~~~~~ | scanf
s938471633
p00067
C++
#include<map> #include<list> #include<stack> #include<queue> #include<cmath> #include<string> #include<stdio.h> #include<iostream> #include<algorithm> using namespace std; int tmap[12][12]; void Terrain(int i,int l){ if (i<0 || i>11 || l<0 || i>11 || tmap[i][l] == 0){ return; } tmap[i][l] = 0; Terrain(i + 1, ...
a.cc: In function 'int main()': a.cc:33:37: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 33 | if (scanf_s("%1d", &tmap[i][l]) == EOF) return 0; | ^~~~~~~ | scanf
s076890504
p00067
C++
#include<map> #include<list> #include<stack> #include<queue> #include<cmath> #include<string> #include<stdio.h> #include<iostream> #include<algorithm> #include<conio.h> using namespace std; int tmap[12][12]; void Terrain(int i,int l){ if (i<0 || i>11 || l<0 || i>11 || tmap[i][l] == 0){ return; } tmap[i][l] = 0;...
a.cc:10:9: fatal error: conio.h: No such file or directory 10 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s803827414
p00067
C++
#include<map> #include<list> #include<stack> #include<queue> #include<cmath> #include<string> #include<stdio.h> #include<iostream> #include<algorithm> #include<conio.h> using namespace std; int tmap[12][12]; void Terrain(int i,int l){ if (i<0 || i>11 || l<0 || i>11 || tmap[i][l] == 0){ return; } tmap[i][l] = 0;...
a.cc:10:9: fatal error: conio.h: No such file or directory 10 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s294076259
p00067
C++
#include<map> #include<list> #include<stack> #include<queue> #include<cmath> #include<string> #include<stdio.h> #include<iostream> #include<algorithm> using namespace std; int tmap[12][12]; void Terrain(int i,int l){ if (i<0 || i>11 || l<0 || i>11 || tmap[i][l] == 0){ return; } tmap[i][l] = 0; Terrain(i + 1, ...
a.cc: In function 'int main()': a.cc:33:58: error: expected ';' before '}' token 33 | scanf("%1d", &tmap[i][l]) | ^ | ; 34 | } ...
s513769945
p00067
C++
#include<map> #include<list> #include<stack> #include<queue> #include<cmath> #include<string> #include<stdio.h> #include<iostream> #include<algorithm> #include<conio.h> using namespace std; int tmap[12][12]; void Terrain(int i,int l){ if (i<0 || i>11 || l<0 || i>11 || tmap[i][l] == 0){ return; } tmap[i][l] = 0;...
a.cc:10:9: fatal error: conio.h: No such file or directory 10 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s481668722
p00067
C++
#include<map> #include<list> #include<stack> #include<queue> #include<cmath> #include<string> #include<stdio.h> #include<iostream> #include<algorithm> #include<conio.h> using namespace std; char tmap[12][12]; void Terrain(int i,int l){ if (i<0 || i>11 || l<0 || i>11 || tmap[i][l] == '0'){ return; } tmap[i][l] =...
a.cc:10:9: fatal error: conio.h: No such file or directory 10 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s350423054
p00067
C++
#include<map> #include<list> #include<stack> #include<queue> #include<cmath> #include<string> #include<stdio.h> #include<iostream> #include<algorithm> #include<conio.h> using namespace std; char tmap[12][12]; void Terrain(int i,int l){ if (i<0 || i>11 || l<0 || i>11 || tmap[i][l] == '0'){ return; } tmap[i][l] ...
a.cc:10:9: fatal error: conio.h: No such file or directory 10 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s078896175
p00067
C++
#include<map> #include<list> #include<stack> #include<queue> #include<cmath> #include<string> #include<stdio.h> #include<iostream> #include<algorithm> #include<conio.h> using namespace std; char tmap[12][12]; int c; void Terrain(int i,int l){ tmap[i][l] = '0'; if (tmap[i + 1][l] == '1'){ Terrain(i + 1, l); } i...
a.cc:10:9: fatal error: conio.h: No such file or directory 10 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s040724647
p00067
C++
#include<map> #include<list> #include<stack> #include<queue> #include<cmath> #include<string> #include<stdio.h> #include<iostream> #include<algorithm> #include<conio.h> using namespace std; char tmap[12][12]; int c; void Terrain(int i,int l){ if (tmap[i][l] == '0'||i < 0 || i > 11 || l < 0 || l > 11) return; tmap...
a.cc:10:9: fatal error: conio.h: No such file or directory 10 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s451415472
p00067
C++
#include<stdio.h> char Island[12][12]; void CC(int,int); //void show(void); int main(void) { int c=0; while(1){ for(int i=0;i<12;i++){ if(scanf("%s",Island[i])==EOF) break; } for(int i=0;i<12;i++){ for(int j=0;j<12;j++){ if(Island[i][j] == '1'){ //printf("x:%d y:%d @\n",j,i); CC(i,j); c++; ...
a.cc: In function 'int main()': a.cc:28:1: error: a function-definition is not allowed here before '{' token 28 | { | ^ a.cc:37:2: error: expected '}' at end of input 37 | } | ^ a.cc:6:1: note: to match this '{' 6 | { | ^
s076953770
p00067
C++
#include<iostream> #include<algorithm> #include<string> using namespace std; int maze[12][12]; static const int dx[4] = { 1,0,-1,0 }, dy[4] = { 0,1,0,-1 }; void printTable(int a[12][12]) { for (int i = 0; i < 12; i++) { for (int j = 0; j < 12; j++) { cout << a[i][j]; } cout << endl; } } void dfs(int y, in...
a.cc: In function 'int main()': a.cc:32:17: error: 'memset' was not declared in this scope 32 | memset(maze, 0, sizeof(maze)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<algorithm> ...
s972784947
p00067
C++
#include<iostream> #include<algorithm> #include<string> using namespace std; int maze[12][12]; static const int dx[4] = { 1,0,-1,0 }, dy[4] = { 0,1,0,-1 }; void printTable(int a[12][12]) { for (int i = 0; i < 12; i++) { for (int j = 0; j < 12; j++) { cout << a[i][j]; } cout << endl; } } void dfs(int y, in...
a.cc: In function 'int main()': a.cc:32:17: error: 'memset' was not declared in this scope 32 | memset(maze, 0, sizeof(maze)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<algorithm> ...
s402521377
p00067
C++
#include <iostream> #include <queue> #include <vector> #include <map> #define COL 12 #define ROW 12 using namespace std; int dx[] = {1,-1,0,0}; int dy[] = {0,0,1,-1}; bool input(vector< vector<char> > &m); void delete_island(vector< vector< char > > &m, int x, int y); int main(){ vector< vector< char > > m(COL+2...
a.cc: In function 'int main()': a.cc:31:13: error: 'island' was not declared in this scope; did you mean 'srand'? 31 | cout << island << endl; | ^~~~~~ | srand a.cc: At global scope: a.cc:33:1: error: expected declaration before '}' token 33 | } | ^
s199151051
p00067
C++
#include <iostream> using namespace std; const int N=12; int dx[4]={1,0,-1,0}; int dy[4]={0,1,0,-1}; char grid[12][12]; void dfs(char x,char y); int main(){ while(1){ int count=0; for(int y=0;y<N;y++){{ for(int x=0;x<N;x++){ cin>>grid[y]; } ...
/usr/bin/ld: /tmp/ccJ6Ue54.o: in function `main': a.cc:(.text+0xb9): undefined reference to `dfs(char, char)' collect2: error: ld returned 1 exit status
s512777845
p00067
C++
#include<iostream> #include<vector> #include<cstdio> #include<algorithm> #include<queue> #define REP(i,n) for(int i=0;i<(n);i++) typedef vector<int> vec; typedef vector<vec> mat; typedef long long int ll; int dy[4] = { 1,0,-1,0 }, dx[4] = { 0,1,0,-1 }; static const int INF = 1 << 21; using namespace std; int N, M; char...
a.cc:7:9: error: 'vector' does not name a type 7 | typedef vector<int> vec; | ^~~~~~ a.cc:8:9: error: 'vector' does not name a type 8 | typedef vector<vec> mat; | ^~~~~~
s535325978
p00067
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s137704981
p00067
C++
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 #include<iostream> using namespace std; int island[14][14]; void field(int x,int y){ if(island[x][y] == 0) return; island[x][y] = 0; field(x+1,y); field(x-1,y); field(x,y+1); ...
a.cc:2:1: error: expected unqualified-id before numeric constant 2 | 1 | ^ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a...
s385030666
p00067
C++
#include <iostream> using namespace std; int dy[] = {1, 0, -1, 0}; int dx[] = {0, 1, 0, -1}; char field[12][12]; int W = 12; int H = 12; void DFS(int y, int x) { field[y][x] = '0'; for(int i = 0; i < 4; ++i) { int X = x + dx[i]; int Y = y + dy[i]; if((0 <= X && X < W && 0 <= Y && Y < H) && field[Y][X] == '1'...
a.cc: In function 'void solve()': a.cc:30:17: error: 'memset' was not declared in this scope 30 | memset(field, 0, sizeof(field)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostre...
s439922083
p00067
C++
std::string m[12]; void d(int x,int y){ if(x>0&&m[y][x-1]-48)m[y][x-1]=48,d(x-1,y); if(x<11&&m[y][x+1]-48)m[y][x+1]=48,d(x+1,y); if(y>0&&m[y-1][x]-48)m[y-1][x]=48,d(x,y-1); if(y<11&&m[y+1][x]-48)m[y+1][x]=48,d(x,y+1); } main(){ while(1){ int y=12; for(;y;y--)std::cin>>m[y-1]; if(std::cin.eof())return 0; in...
a.cc:1:6: error: 'string' in namespace 'std' does not name a type 1 | std::string m[12]; | ^~~~~~ a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>' +++ |+#include <string> 1 | std::string m[12]; a.cc: In function 'void d(int, int)'...
s886462580
p00067
C++
#include <stdio.h> void dfs(int* data,int* label,int index) { int new[4][2]={{1,0},{0,1},{-1,0},{0,-1}}; int x,y; int nx,ny; int i; label[index]=1; x=index%12; y=index/12; for(i=0;i<4;i++) { nx=x+new[i][0]; ny=y+new[i][1]; if(nx<0 || nx>11 || ny<0 || ny>11) continue; if(label[n...
a.cc: In function 'void dfs(int*, int*, int)': a.cc:5:7: error: expected unqualified-id before 'new' 5 | int new[4][2]={{1,0},{0,1},{-1,0},{0,-1}}; | ^~~ a.cc:19:13: error: expected type-specifier before '[' token 19 | nx=x+new[i][0]; | ^ a.cc:20:13: error: expected type-speci...
s720419073
p00067
C++
#include <cstdio> void dfs(int x, int y); char data[16][16]; int main(void) { char c; while (1){ for (int i = 0; i < 12; i++){ cin >> data[i]; } if (cin.eof()) return (0); int res = 0; for (int i = 0; i < 12; i++){ for (int j = 0; j < 12; j++){ if (data[i][j] == '1'){ dfs(i, j); ...
a.cc: In function 'int main()': a.cc:13:25: error: 'cin' was not declared in this scope 13 | cin >> data[i]; | ^~~ a.cc:15:21: error: 'cin' was not declared in this scope 15 | if (cin.eof()) return (0); | ^~~
s470237156
p00067
C++
#include<iostream> #include<string> #include<cstring> using namespace std; int dx[4]={1,0,-1,0}, dy[4]={0,1,0,-1}, ret=0; bool checked[12][12], f[12][12]; void bfs(int x, int y){ checked[x][y] = true; for(int i=0;i<4;i++){ if((0<=x+dx[i]&&x+dx[i]<=11&&0<=y+dy[i]&&y+dy[i]<=11){ if(chked[x+dx[i]][y+dy[i]] == fals...
a.cc: In function 'void bfs(int, int)': a.cc:10:58: error: expected ')' before '{' token 10 | if((0<=x+dx[i]&&x+dx[i]<=11&&0<=y+dy[i]&&y+dy[i]<=11){ | ~ ^ | ) a.cc:15:1: error: expected pri...
s630117806
p00067
C++
#include<iostream> #include<string> #include<cstring> using namespace std; int dx[4]={1,0,-1,0}, dy[4]={0,1,0,-1}, ret=0; bool checked[12][12], f[12][12]; void bfs(int x, int y){ checked[x][y] = true; for(int i=0;i<4;i++){ if((0<=x+dx[i]&&x+dx[i]<=11&&0<=y+dy[i]&&y+dy[i]<=11){ if(chked[x+dx[i]][y+dy[i]] == fals...
a.cc: In function 'void bfs(int, int)': a.cc:10:58: error: expected ')' before '{' token 10 | if((0<=x+dx[i]&&x+dx[i]<=11&&0<=y+dy[i]&&y+dy[i]<=11){ | ~ ^ | ) a.cc:15:1: error: expected pri...
s787218952
p00067
C++
#include <iostream> #include <cstdlib> #include <algorithm> using namespace std; int field[12+2][12+2] ={0}; void island(int x,int y) { int dx[4] = {1,0,-1,0}; int dy[4] = {0,-1,0,1}; field[x][y] = 0; for(int i=0;i<4;i++) { if(field[x+dx[i]][y+dy[i]] == 1) { island(x+dx[i],y+dy[i]); } } } in...
a.cc: In function 'int main()': a.cc:42:5: error: 'memset' was not declared in this scope 42 | memset(field,0,sizeof(field)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <algorithm> +++ |+#include <cstrin...
s927288700
p00067
C++
#include <iostream> #include <cstdlib> #include <algorithm> #include <stdio.h> using namespace std; int field[12+2][12+2] ={0}; void island(int x,int y) { int dx[4] = {1,0,-1,0}; int dy[4] = {0,-1,0,1}; field[x][y] = 0; for(int i=0;i<4;i++) { if(field[x+dx[i]][y+dy[i]] == 1) { island(x+dx[i],y+dy[i...
a.cc: In function 'int main()': a.cc:43:5: error: 'memset' was not declared in this scope 43 | memset(field,0,sizeof(field)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <algorithm> +++ |+#include <cstrin...
s129359830
p00067
C++
#include <cstdio> #include <queue> #include <algorithm> using namespace std; typedef pair<int,int> P; queue<P>que; #define mp make_pair #define f first #define s second char field[105][105]; int dx[4]={-1,0,1,0},dy[4]={0,-1,0,1}; int n,m,ans=0; bool in(int c,int d){ if(c>=1 && c<=n){ if(d>=1 && d<=m){ return true...
a.cc: In function 'int main()': a.cc:36:17: error: 'gets' was not declared in this scope; did you mean 'getw'? 36 | gets(field[i]); | ^~~~ | getw a.cc:42:15: error: 'strlen' was not declared in this scope 42 | int m=strlen(field[1]); | ...
s585540009
p00067
C++
#include <cstdio> #include <string> using namespace std; int ild[12][12]; void erase_island(int i, int j, int (&ild)[12][12]) { ild[i][j] = -1; if(i - 1 >= 0){ if(ild[i - 1][j] == 1) erase_island(i - 1, j, ild); } if(i + 1 < 12){ if(ild[i + 1][j] == 1) erase_island(i + 1, j, ild); } if(j - 1 >= 0){...
a.cc: In function 'int main()': a.cc:41:25: error: 'cin' was not declared in this scope 41 | cin >> str; | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include <string> +++ |...
s791269618
p00068
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.awt.geom.Point2D; import java.util.Arrays; import java.util.ArrayList; import java.util.Comparator; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new In...
Main.java:14: error: ')' expected while((line=br.readLine()!=null){ ^ 1 error
s754087450
p00068
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.awt.geom.Point2D; import java.util.Arrays; import java.util.ArrayList; import java.util.Comparator; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new I...
Main.java:14: error: ')' expected while((line=br.readLine()!=null){ ^ 1 error
s336061812
p00068
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.awt.geom.Point2D; import java.util.Arrays; import java.util.ArrayList; import java.util.Comparator; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new I...
Main.java:29: error: cannot find symbol array.add(now); ^ symbol: variable now location: class Main Main.java:60: error: cannot find symbol System.out.println(points.length()-array.size()); ^ symbol: method length() location: variable points of type Point2D[] 2 errors
s968834208
p00068
Java
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; public class Main{ static PrintWriter out...
Main.java:53: error: invalid method declaration; return type required public static accurateTotal(double a,double b){ ^ 1 error
s629583829
p00068
Java
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; public class Main{ static PrintWriter out...
Main.java:71: error: cannot find symbol return this.Y; ^ symbol: variable Y 1 error
s459733479
p00068
Java
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; public class Main{ static PrintWriter out...
Main.java:53: error: invalid method declaration; return type required public static accurateTotal(double a,double b){ ^ 1 error
s972475266
p00068
C
typedef struct{doublex,y,key;}w;w p[101],bs;i,m,v[100],n;z(w*c,w*d){return c->key>d->key?-1:c->key<d->key;}doubleouter(q,r,s){return p[q].x*(p[r].y-p[s].y)+p[r].x*(p[s].y-p[q].y)+p[s].x*(p[q].y-p[r].y);}main(){doublek,t;for(;~scanf("%d",&n),n;){for(m=i=0;i<n;i++)scanf("%lf,%lf",&p[i].x,&p[i].y),p[m].y>p[i].y?m=i:0;bs=p...
main.c:1:16: error: expected specifier-qualifier-list before 'doublex' 1 | typedef struct{doublex,y,key;}w;w p[101],bs;i,m,v[100],n;z(w*c,w*d){return c->key>d->key?-1:c->key<d->key;}doubleouter(q,r,s){return p[q].x*(p[r].y-p[s].y)+p[r].x*(p[s].y-p[q].y)+p[s].x*(p[q].y-p[r].y);}main(){doublek,t;for(;~scanf("%d",&n),...
s629961828
p00068
C
typedef struct{double x,y,key;}w;w p[101],bs;i,m,v[100],n;z(w*c,w*d){return c->key>d->key?-1:c->key<d->key;}double outer(q,r,s){return p[q].x*(p[r].y-p[s].y)+p[r].x*(p[s].y-p[q].y)+p[s].x*(p[q].y-p[r].y);}main(){double k,t;for(;~scanf("%d",&n),n;){for(m=i=0;i<n;i++)scanf("%lf,%lf",&p[i].x,&p[i].y),p[m].y>p[i].y?m=i:0;b...
main.c:1:46: warning: data definition has no type or storage class 1 | typedef struct{double x,y,key;}w;w p[101],bs;i,m,v[100],n;z(w*c,w*d){return c->key>d->key?-1:c->key<d->key;}double outer(q,r,s){return p[q].x*(p[r].y-p[s].y)+p[r].x*(p[s].y-p[q].y)+p[s].x*(p[q].y-p[r].y);}main(){double k,t;for(;~scanf("%d",&n),n...
s582603204
p00068
C
typedef struct{double x,y,k;}w;w p[100],b;m,v[100],n,j,r;z(w*c,w*d){r=c->k>d->k?-1:1;}double o(w q,w r,w s){return q.x*(r.y-s.y)+r.x*(s.y-q.y)+s.x*(q.y-r.y);}main(i){for(;j=scanf("%d",&n)+~n;){for(m=i=0;i<n;i++)scanf("%lf,%lf",&p[i].x,&p[i].y),p[m].y>p[i].y?m=i:0;b=p[m];p[m]=*p;for(i=1;i<n;i++)p[i].k=(p[i].x-b.x)/hypot...
main.c:1:43: warning: data definition has no type or storage class 1 | typedef struct{double x,y,k;}w;w p[100],b;m,v[100],n,j,r;z(w*c,w*d){r=c->k>d->k?-1:1;}double o(w q,w r,w s){return q.x*(r.y-s.y)+r.x*(s.y-q.y)+s.x*(q.y-r.y);}main(i){for(;j=scanf("%d",&n)+~n;){for(m=i=0;i<n;i++)scanf("%lf,%lf",&p[i].x,&p[i].y),p...
s196643979
p00068
C
#include <stdio.h> #include <string.h> #include <math.h> struct POINT{ double x,y; }; double area(double a,double b,double c){ double s; s = (a+b+c)/2.0; return sqrt(s*(s-a)*(s-b)*(s-c)); } int main(){ int h,i,j,k,l,n,cnt; int flag[100]; double len[6],s[4]; POINT p[4]; POINT pin[100]; while(1){ scanf(...
main.c: In function 'main': main.c:21:9: error: unknown type name 'POINT'; use 'struct' keyword to refer to the type 21 | POINT p[4]; | ^~~~~ | struct main.c:22:9: error: unknown type name 'POINT'; use 'struct' keyword to refer to the type 22 | POINT pin[100]; | ...
s527200284
p00068
C++
#include<cstdio> #include<algorithm> #include<vector> #include<string> #include<iostream> #include<queue> #include<map> #include<set> #include<complex> #include<stack> #include<cmath> using namespace std; #define reps(i,f,n) for(int i=f;i<int(n);i++) #define rep(i,n) reps(i,0,n) #define X real() #define Y imag() typ...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/algorithm:60, from a.cc:2: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_less_iter::operator()(_Iterator1, _Iterator2) const [with _Iterat...
s881597423
p00068
C++
#include <iostream> #include <string> #include <sstream> #include <algorithm> #include <vector> #include <utility> #include <cstdio> #include <cstring> #include <cmath> #include <map> #include <set> #include <stack> #include <queue> using namespace std; #define pb(n) push_back(n) #define mp(n,m) make_pair(n,m) #def...
a.cc:100:6: error: size of array 'ps' is not an integral constant-expression 100 | P ps[MAX_N]; | ^~~~~
s928900775
p00068
C++
#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); ++i ) #define EACH( v, c ) for ( auto &v : c ) #define ALL( c ) (c).begin(), (c).end() struct Point { double x, y; Point() : x( 0 ), y( 0 ) { return; } Point( double x, double y ) : x( x ), y( y ) { return; } Point operator + ( const Poin...
a.cc:53:1: error: 'vector' does not name a type 53 | vector< Point > getConvex( vector< Point > ps ) | ^~~~~~ a.cc: In function 'int main()': a.cc:89:9: error: 'cin' was not declared in this scope 89 | cin.tie( 0 ); | ^~~ a.cc:90:9: error: 'ios' has not been declared 90 | io...
s467611006
p00068
C++
#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); ++i ) #define EACH( v, c ) for ( auto &v : c ) #define ALL( c ) (c).begin(), (c).end() struct Point { double x, y; Point() : x( 0 ), y( 0 ) { return; } Point( double x, double y ) : x( x ), y( y ) { return; } Point operator + ( const Poin...
a.cc:53:1: error: 'vector' does not name a type 53 | vector< Point > getConvex( vector< Point > ps ) | ^~~~~~ a.cc: In function 'int main()': a.cc:89:9: error: 'cin' was not declared in this scope 89 | cin.tie( 0 ); | ^~~ a.cc:90:9: error: 'ios' has not been declared 90 | io...
s698968220
p00068
C++
#include<iostream> #include<fstream> #include<sstream> #include<string> #include<cstdio> #include<cstdlib> #include<cstring> #include<ctime> #include<stack> #include<queue> #include<set> #include<map> #include<vector> #include<list> #include<algorithm> #include<utility> #include<complex> #define REP( i, m, n ) for ( in...
a.cc:70:1: error: 'vector' does not name a type 70 | vector< Point > getConvex( vector< Point > ps ) | ^~~~~~ a.cc: In function 'int main()': a.cc:106:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 106 | cin.tie( 0 ); | ^~~ | std::cin In file incl...
s288266111
p00068
C++
#include <iostream> #include <stdio.h> #include <string> #include <sstream> #include <fstream> #include <iterator> #include <stdlib.h> #include <map> #include <queue> #include <vector> #include <functional> #include <set> #include <list> using namespace std; // vector cout template<typename _Ty> ostream& operator << ...
a.cc: In function 'int convexhull(std::vector<Point>&)': a.cc:135:9: error: 'sort' was not declared in this scope; did you mean 'short'? 135 | sort(vPoints.begin(), vPoints.end()); | ^~~~ | short
s341952023
p00068
C++
#include <iostream> #include <vector> #include <cmath> using namespace std; const double PI = 3.14159; int main() { while (true) { int n; cin >> n; if (n==0) break; vector<double> x; x.reserve(100); vector<double> y; y.reserve(100); double tmp_x, tmp_y; char dummy; for (int i=0; i<n; i++) { ci...
a.cc: In function 'int main()': a.cc:42:41: error: no match for 'operator+=' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and 'double') 41 | tmp_deg -= curr_deg;cout << min_deg_index << " " << | ...
s131310661
p00068
C++
#include <iostream> #include <vector> #include <cmath> using namespace std; const double PI = 3.14159; int main() { while (true) { int n; cin >> n; if (n==0) break; vector<double> x; x.reserve(100); vector<double> y; y.reserve(100); double tmp_x, tmp_y; char dummy; for (int i=0; i<n; i++) { ci...
a.cc: In function 'int main()': a.cc:42:33: error: expected primary-expression before 'if' 42 | if (tmp_deg < 0) tmp_deg += 2*PI; | ^~
s690099590
p00068
C++
#include <iostream> #include <vector> #include <cmath> using namespace std; const double PI = 3.14159; int main() { while (true) { int n; cin >> n; if (n==0) break; vector<double> x; x.reserve(100); vector<double> y; y.reserve(100); double tmp_x, tmp_y; char dummy; for (int i=0; i<n; i++) { ci...
a.cc: In function 'int main()': a.cc:41:84: error: expected primary-expression before ';' token 41 | tmp_deg -= curr_deg;cout << min_deg_index << " " <<; | ^
s392250980
p00068
C++
#define _USE_MATH_DEFINES #include <algorithm> #include <array> #include <climits> #include <cmath> #include <cstdint> #include <cstdio> #include <cstdlib> #include <ctime> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <type_traits> ...
a.cc: In function 'int main()': a.cc:151:25: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 151 | scanf_s("%lf,%lf", &p[i].x, &p[i].y); | ^~~~~~~ | scanf
s946303691
p00068
C++
#include<iostream> #include<cfloat> #include<cassert> #include<cmath> #include<vector> using namespace std; #define EPS (1e-8) #define equals(a, b) (fabs((a) - (b)) < EPS ) #define dle(a, b) (equals(a, b) || a < b ) static const double PI = acos(-1); class Point{ public: double x, y; Point ( double...
a.cc: In function 'Polygon andrewScan(Polygon)': a.cc:91:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 91 | sort(s.begin(), s.end()); | ^~~~ | sqrt a.cc:110:5: error: 'reverse' was not declared in this scope 110 | reverse(l.begin(), l.end()); | ^~~~~~~ ...
s441897769
p00068
C++
typedef struct{double x,y,k;}w;w p[101],b;m,v[100],n,j;z(w*c,w*d){return c->k>d->k?-1:c->k<d->k;}double o(q,r,s){return p[q].x*(p[r].y-p[s].y)+p[r].x*(p[s].y-p[q].y)+p[s].x*(p[q].y-p[r].y);}main(i){double k,t;for(;~scanf("%d",&n),j=n;){for(m=i=0;i<n;i++)scanf("%lf,%lf",&p[i].x,&p[i].y),p[m].y>p[i].y?m=i:0;b=p[m];p[m]=*...
a.cc:1:43: error: 'm' does not name a type 1 | typedef struct{double x,y,k;}w;w p[101],b;m,v[100],n,j;z(w*c,w*d){return c->k>d->k?-1:c->k<d->k;}double o(q,r,s){return p[q].x*(p[r].y-p[s].y)+p[r].x*(p[s].y-p[q].y)+p[s].x*(p[q].y-p[r].y);}main(i){double k,t;for(;~scanf("%d",&n),j=n;){for(m=i=0;i<n;i++)scanf("%lf,%lf"...
s167252386
p00068
C++
typedef struct{double x,y,k;}w;double k,t;w p[101],b;m,v[100],n,j;z(w*c,w*d){return c->k>d->k?-1:c->k<d->k;}double o(q,r,s){return p[q].x*(p[r].y-p[s].y)+p[r].x*(p[s].y-p[q].y)+p[s].x*(p[q].y-p[r].y);}main(i){for(;j=scanf("%d",&n)+~n;){for(m=i=0;i<n;i++)scanf("%lf,%lf",&p[i].x,&p[i].y),p[m].y>p[i].y?m=i:0;b=p[m];p[m]=*...
a.cc:1:54: error: 'm' does not name a type 1 | typedef struct{double x,y,k;}w;double k,t;w p[101],b;m,v[100],n,j;z(w*c,w*d){return c->k>d->k?-1:c->k<d->k;}double o(q,r,s){return p[q].x*(p[r].y-p[s].y)+p[r].x*(p[s].y-p[q].y)+p[s].x*(p[q].y-p[r].y);}main(i){for(;j=scanf("%d",&n)+~n;){for(m=i=0;i<n;i++)scanf("%lf,%lf"...
s321053304
p00068
C++
#include <iostream> #include <cstdio> #include <cmath> #include <vector> using namespace std; const double EPS = 1e-10; class Point{ public: double x,y; Point (double x = 0,double y = 0): x(x),y(y){} Point operator + (Point &p){ return Point(x+p.x,y+p.y);} Point operator - (Point &p){ return Point(x-p.x,y-p.y...
a.cc: In function 'int Convex_Hull(std::vector<Point>)': a.cc:28:3: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 28 | sort(v.begin(),v.end()); | ^~~~ | sqrt
s923036861
p00068
C++
#include<iostream> #include<cmath> #include<cstdio> #include<vector> using namespace std; double EPS = 1e-10; double add(double a,double b){ if(abs(a+b)<EPS*(abs(a)+abs(b)))return 0; return a+b; } struct P{ double x,y; P() {} P(double x,double y):x(x),y(y){ } P operator + (P p){ return P(add(x,p.x...
a.cc: In function 'std::vector<P> convex_hull(P*, int)': a.cc:43:3: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 43 | sort(ps,ps+n,cmp_x); | ^~~~ | sqrt
s628607011
p00068
C++
#include <vector> #include <algorithm> #include <cmath> using namespace std; main(){ int n,i,start,M; double x,y,dX,dY,dx,dy,dot,n1,n2,co,m; for(;scanf("%d",&n),n;){ vector<pair<pair<double,double>,int> >v; for(i=0;i<n;i++)scanf("%lf,%lf",&x,&y),v.push_back(make_pair(make_pair(x,y),i)); pair<pair<double,double...
a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:8:14: error: 'scanf' was not declared in this scope 8 | for(;scanf("%d",&n),n;){ | ^~~~~ a.cc:32:17: error: 'printf' was not declared in ...
s502181602
p00068
C++
#include <vector> #include <algorithm> #include <cstdio> #include <cmath> using namespace std; main(){ int n,i,start,M; double x,y,dX,dY,dx,dy,dot,n1,n2,co,m; for(;scanf("%d",&n),n;){ vector<pair<pair<double,double>,int> >v; for(i=0;i<n;i++)scanf("%lf,%lf",&x,&y),v.push_back(make_pair(make_pair(x,y),i)); pair<...
a.cc:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 6 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:17:45: error: expected ';' before 'for' 17 | m=-1,n1=hypot(dX,dY) | ^ | ...
s725795456
p00068
C++
#include <iostream> #include <iomanip> #include <sstream> #include <cstdio> #include <cstdlib> #include <cmath> #include <cstring> #include <climits> #include <cfloat> #include <string> #include <vector> #include <stack> #include <queue> #include <set> #include <map> #include <bitset> #include <algorithm> #include <fun...
a.cc: In function 'std::vector<Point> getConvex(std::vector<Point>)': a.cc:87:106: error: 'EPS' was not declared in this scope 87 | while ( 2 <= k && cross( convex[ k - 1 ] - convex[ k - 2 ], ps[i] - convex[ k - 1 ] ) <= EPS ) | ...
s438668029
p00068
C++
#include<iostream> #include<complex> #include<cstdio> using namespace std; typedef complex<double> p; double det(p a,p b) { return a.real()*b.imag()-a.imag()*b.real(); } bool comp(p a,p b) { if(a.real()!=b.real()) return a.real()<b.real(); return a.imag()<b.imag(); } int main() { int n; while(cin>>n,n) { p p...
a.cc: In function 'int main()': a.cc:26:52: error: lvalue required as unary '&' operand 26 | scanf("%lf,%lf",&ps[i].real(),&ps[i].imag()); | ~~~~~~~~~~^~ a.cc:26:66: error: lvalue required as unary '&' operand 26 | scan...
s409017715
p00068
C++
#include<iostream> #include<algorithm> #include<queue> #include<map> #include<string.h> #include<math.h> #include<functional> using namespace std; int main(){ int count = 0; pair<double, double> xy[100]; while(cin>>count){ if(count==0)break; for(int i=0; i<count; i++)s...
a.cc: In function 'int main()': a.cc:26:26: error: 'INTMAX_MIN' was not declared in this scope 26 | double max = INTMAX_MIN; | ^~~~~~~~~~ a.cc:33:33: error: 'INTMAX_MAX' was not declared in this scope; did you mean 'TMP_MAX'? 33 | if(y>0)temp=INTMAX_M...
s483237941
p00068
C++
#include <map> #include <set> #include <list> #include <cmath> #include <queue> #include <stack> #include <cstdio> #include <string> #include <vector> #include <complex> #include <cstring> #include <numeric> #include <sstream> #include <iostream> #include <algorithm> #include <functional> #define mp make_pair #d...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/bits/stl_tree.h:63, from /usr/include/c++/14/map:62, from a.cc:1: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_less_iter...
s187447306
p00069
Java
import java.io.*; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line=""; char[][] map; while(!(line=br.readLine()).equals("0")){ if(line.isEmpty()){ continue; } int n=Integer.parseInt(line); int m=Integer.parseInt(b...
Main.java:13: error: ';' expected int m=Integer.parseInt(br.readLine()): ^ Main.java:14: error: ';' expected int g=Integer.parseInt(br.readLine()): ^ Main.java:15: error: ';' expected int d=Integer.parseInt(br.readLine()): ...
s056038467
p00069
C++
#define _USE_MATH_DEFINES #include <iostream> #include <iomanip> #include <utility> #include <algorithm> #include <vector> #include <cmath> #define int long long #define rep(i,n) for(int i=0;i<n;i++) #define Rep(i,a,b) for(int i=a;i<b;i++) #define REP(i,a,b) for(int i=a;i<=b;i++) #define rev(i,n) for(int i=n-1;i>=0;i--...
a.cc: In function 'void run()': a.cc:22:19: error: 'memset' was not declared in this scope 22 | #define MEMSET(a) memset(a,0,sizeof(a)) | ^~~~~~ a.cc:61:5: note: in expansion of macro 'MEMSET' 61 | MEMSET(a); | ^~~~~~ a.cc:8:1: note: 'memset' is defined in header '<cstring>';...
s682866850
p00069
C++
#include<iostream> #include<vector> #include<cmath> using namespace std; vector<vector<int> >vec; vector<int>v; int n,m,l,d,cur,dep,mi,de; char b; void go(){ cur=m,dep=0; while(dep<d){ for(int i=0;i<vec[dep].size();i++){ if(vec[dep][i]==cur){ cur=vec[dep][i]+1; ...
a.cc: In function 'int main()': a.cc:48:24: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int)' 48 | if(find(vec[j].begin(),vec[j].end(),i-1)!=vec[j].end())continue; | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file includ...
s261360836
p00069
C++
loop do n = gets.to_i break if n==0 m = gets.to_i g = gets.to_i d = gets.to_i b = d.times.map{gets.chomp.chars.map(&:to_i)} map = Array.new(d+1){Array.new(n,0)} n.times do |i| map[0][i] = i+1 end d.times do |j| n.times do |i| if i<n && b[j][i] == 1 map[j+1][i] = map[j][i+1] ...
a.cc:1:1: error: 'loop' does not name a type 1 | loop do | ^~~~ a.cc:9:3: error: 'map' does not name a type 9 | map = Array.new(d+1){Array.new(n,0)} | ^~~ a.cc:10:3: error: 'n' does not name a type 10 | n.times do |i| | ^ a.cc:26:27: error: expected unqualified-id before string cons...
s647145773
p00069
C++
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main{ static boolean node[][]; static int root[][]; public static void main(String[] args)throws IOException{ InputStreamReader isr = new InputStreamReader(System.in); BufferedReader reader = new BufferedRe...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.BufferedReader; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.IOException; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fm...
s330900708
p00069
C++
#include<iostream> using namespace std;int n,m,g,d,l[10],f,i,j,y,x;string p[30];int c(){for(y=n;y-->0;)l[y]=y+1;for(;++y<d;)for(x=n-1;x-->0;)if(p[y][x]^48)swap(l[x],l[x+1]);return l[g-1]==m;}Main(){for(;cin>>n>>m>>g>>d;f-1?puts(f?"0":"1"):printf("%d %d\n",i,j)){for(i=0;i<d;)cin>>p[i++];f=c()*2;for(i=0;!f & i<d;i++)for(...
a.cc:2:173: error: ISO C++ forbids declaration of 'Main' with no type [-fpermissive] 2 | using namespace std;int n,m,g,d,l[10],f,i,j,y,x;string p[30];int c(){for(y=n;y-->0;)l[y]=y+1;for(;++y<d;)for(x=n-1;x-->0;)if(p[y][x]^48)swap(l[x],l[x+1]);return l[g-1]==m;}Main(){for(;cin>>n>>m>>g>>d;f-1?puts(f?"0":"1"):printf(...