submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s577419157
p00741
Java
import java.util.Scanner; public class HowManyIslands { public static void main(String args[]) { Scanner scr = new Scanner(System.in); while (true) { String[] ss = scr.nextLine().split(" ", 0); stage_size = new int[2]; stage_size[0] = Integer.parseInt(ss[0]); stage_size[1] = Integer.parseInt(ss[1]); ...
Main.java:3: error: class HowManyIslands is public, should be declared in a file named HowManyIslands.java public class HowManyIslands { ^ 1 error
s930722096
p00741
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; class Main{ public static void main(String[] args)throws IOException{ int w,h;//size of map int x=0,y=0;//temp int c=0; int map[][]=new int[50][50];//map[???][?¨?] System.out.println("tett"); while(tru...
Main.java:47: error: incompatible types: unexpected return value return 0; ^ 1 error
s799592976
p00741
Java
import java.util.Scanner; import java.util.ArrayList; public class HMIs{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); ArrayList<Integer> N_island = new ArrayList<Integer>(); int[][] mesh = new int[52][52]; int w,h; for(int i=0;i<52;i++){ for(int j=0;j<52;j++){ mesh[i][j]=...
Main.java:4: error: class HMIs is public, should be declared in a file named HMIs.java public class HMIs{ ^ 1 error
s849586212
p00741
Java
import java.util.*; public class Aoj1160 { static int before, w, h; static int[][] dir = {{-1,0}, {-1,-1}, {0,-1}, {1,-1}, {1,0}, {1,1}, {0, 1}, {-1,1}}; public static void main(String[] args){ Scanner sc = new Scanner(System.in); while(true){ w = sc.nextInt(); h = sc.nextInt(); if(w == 0){ br...
Main.java:3: error: class Aoj1160 is public, should be declared in a file named Aoj1160.java public class Aoj1160 { ^ 1 error
s614125993
p00741
Java
import java.util.*; public class main { static int before, w, h; static int[][] dir = {{-1,0}, {-1,-1}, {0,-1}, {1,-1}, {1,0}, {1,1}, {0, 1}, {-1,1}}; public static void main(String[] args){ Scanner sc = new Scanner(System.in); while(true){ w = sc.nextInt(); h = sc.nextInt(); if(w == 0){ break...
Main.java:3: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s457255137
p00741
Java
import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main { static int w,h; public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(true){ w=sc.nextInt(); h=sc.nextInt(); if(w==0&&h==0) break; int[][] map = new int[h][w]; for(int j...
Main.java:20: error: cannot find symbol Queue<Node> queue = new LinkedList<Node>(); ^ symbol: class Node location: class Main Main.java:20: error: cannot find symbol Queue<Node> queue = new LinkedList<Node>(); ^ symbol: class Node location: class Main Mai...
s808553738
p00741
Java
import java.util.Scanner; import java.util.Stack; import java.util.ArrayDeque; public class j3{ public static void main(String[] aaa){ Scanner s = new Scanner(System.in); Stack<Integer> x =new Stack <Integer>(); Stack<Integer> y =new Stack <Integer>(); int h,w,i,j,k,l,count=0,xx,yy,...
Main.java:56: error: <identifier> expected System.out.println(); ^ 1 error
s599769475
p00741
Java
import java.util.Scanner; import java.util.Stack; import java.util.ArrayDeque; public class Main{ public static void main(String[] aaa){ Scanner s = new Scanner(System.in); Stack<Integer> x =new Stack <Integer>(); Stack<Integer> y =new Stack <Integer>(); int h,w,i,j,k,l,count=0,xx,y...
Main.java:56: error: <identifier> expected System.out.println(); ^ 1 error
s926788691
p00741
Java
import java.util.Scanner; import java.util.Stack; import java.util.ArrayDeque; public class Main{ public static void main(String[] aaa){ Scanner s = new Scanner(System.in); Stack<Integer> x =new Stack <Integer>(); Stack<Integer> y =new Stack <Integer>(); int h,w,i,j,k,l,count=0,xx,y...
Main.java:56: error: <identifier> expected System.out.println(); ^ Main.java:58: error: class, interface, enum, or record expected } ^ 2 errors
s829995123
p00741
Java
import java.util.Scanner; public class Main { private static int[][]daoyu; private static int count; public static void main(String[] args) { Scanner input = new Scanner(System.in); while (true) { int x = input.nextInt(); int y = input.nextInt(); if (x == 0 && y ...
Main.java:59: error: reached end of file while parsing } ^ 1 error
s444839450
p00741
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { new A(); } int w, h; int[][] c; Main() { Scanner sc = new Scanner(System.in); while (true) { w = sc.nextInt(); h = sc.nextInt(); if (w == 0 && h == 0) break; c = new int[h][w]; for (int i = 0; i < h...
Main.java:5: error: cannot find symbol new A(); ^ symbol: class A location: class Main 1 error
s514570241
p00741
Java
import java.util.*; public class MainThree { static int w; static int h; static int[][] fi; public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (true) { w = sc.nextInt(); h = sc.nextInt(); if (w == 0 && h == 0) break; fi = new int[h][w]; for (int i = 0; i < h...
Main.java:3: error: class MainThree is public, should be declared in a file named MainThree.java public class MainThree { ^ 1 error
s314382089
p00741
C
#include<iostream> using namespace std; int w,h,i,j; int map[52][52]; void rec(int i,int j){ if(map[i][j]==0)return; map[i][j]=0; rec(i+1,j); rec(i-1,j); rec(i,j-1); rec(i,j+1); rec(i-1,j-1); rec(i-1,j+1); rec(i+1,j-1); rec(i+1,j+1); } int main(){ while(1){ cin >> w >> h; if(w==0 ...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s995248126
p00741
C
#include<stdio.h> #include<stdlib.h> int main() { int w,h; int i,j,**map,count; int pos_x,pos_y; for(;;) { scanf("%d %d",&w,&h); if(!w&&!h) break; map=malloc(h*sizeof(int)); for(i=0;i<h;i++) { map[i]=(int *)malloc(w*sizeof(int)); } for(i=0;i<h;i++) for(j=0;j<w;j++) scanf("%d",&map[i][j]);...
main.c: In function 'main': main.c:28:41: error: implicit declaration of function 'Search'; did you mean 'bsearch'? [-Wimplicit-function-declaration] 28 | Search(map,pos_x,pos_y,h,w); | ^~~~~~ | ...
s041181372
p00741
C
#include <stdio.h> int a, b; scanf("%d", &a, &b); int G[a][b] int i, j; for(i=0;i<a;i++){ for(j=0;j<b;j++){ scanf("%d", &G[i][j]); } } void visit(int i, int j){ int di[8] = { 0, -1, -1, -1, 0, 1, 1, 1}; int dj[8] = { 1, 1, 0, -1, -1, -1, 0, 1}; int r; int ni, nj; G[i][j]=0; for( r=0; r<8...
main.c:3:7: error: expected declaration specifiers or '...' before string constant 3 | scanf("%d", &a, &b); | ^~~~ main.c:3:13: error: expected declaration specifiers or '...' before '&' token 3 | scanf("%d", &a, &b); | ^ main.c:3:17: error: expected declaration specifiers or '...'...
s982127888
p00741
C
#include <stdio.h> void visit(int i, int j){ int di[8] = { 0, -1, -1, -1, 0, 1, 1, 1}; int dj[8] = { 1, 1, 0, -1, -1, -1, 0, 1}; int r; int ni, nj; G[i][j]=0; for( r=0; r<8; r++){ ni = i+di[r]; nj = j+dj[r]; if(0<=ni<=a-1 && 0<=nj<=b-1 && G[ni][nj]==1) visit(ni, nj); } } main(void){ int...
main.c: In function 'visit': main.c:9:3: error: 'G' undeclared (first use in this function) 9 | G[i][j]=0; | ^ main.c:9:3: note: each undeclared identifier is reported only once for each function it appears in main.c:15:13: error: 'a' undeclared (first use in this function) 15 | if(0<=ni<=a-1 && 0<=n...
s884765124
p00741
C
#include <stdio.h> #include <string.h> int w, h; int island[50][50]; void dfs(int a, int b) { int dx, dy; island[a][b] = 0; for (dy = -1; dy < 2; dy++){ for (dx = -1; dx < 2; dx++){ if (dx == 0 && dy == 0){ continue; } if (0 <= a + dy && a + dy < h && 0 <= b + dx && b + dx < w && island[a + dy][...
main.c:65:6: error: redefinition of 'dfs' 65 | void dfs(int a, int b) | ^~~ main.c:7:6: note: previous definition of 'dfs' with type 'void(int, int)' 7 | void dfs(int a, int b) | ^~~ main.c:84:5: error: redefinition of 'main' 84 | int main(void) | ^~~~ main.c:26:5: note: previ...
s116833498
p00741
C
short t[3600];w,h,c,z;f(x,i){for(t[x]=0;i;t[z=x+"<>xyz\1\2"[--i]-61]&1&&f(z,8));}main(i){for(;scanf("%d%d",&w,&h)*h;printf("%d\n",c)){for(i=h;c=i;)scanf(" %[^\n]",i--*60+1+t);for(;!i?i=w,--h:1)t[z=h*60+i--]&1&&++c-f(z,8);}}
main.c:1:15: warning: data definition has no type or storage class 1 | short t[3600];w,h,c,z;f(x,i){for(t[x]=0;i;t[z=x+"<>xyz\1\2"[--i]-61]&1&&f(z,8));}main(i){for(;scanf("%d%d",&w,&h)*h;printf("%d\n",c)){for(i=h;c=i;)scanf(" %[^\n]",i--*60+1+t);for(;!i?i=w,--h:1)t[z=h*60+i--]&1&&++c-f(z,8);}} | ...
s626640111
p00741
C
#include <cstdio> #include <stack> #include <utility> using namespace std; typedef pair<int, int> point; int w, h; int c[50][50]; const int d[8][2] = {{1, 0}, {1, 1}, {0, 1}, {-1, 1}, {-1, 0}, {-1, -1}, {0, -1}, {1, -1}}; int count() { stack<point> s; bool v[50][50] = {}; int n = 0; for (int y = 0;...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s599016653
p00741
C++
#include<iostream> #include<cstring> #include<string> #include<algorithm> #include<cmath> #include<vector> using namespace std; typedef long long ll; #define rep(i,s,n) for(int i = s;i<n;i++) #define repe(i,s,n) for(int i = s;i<=n;i++) static const ll maxLL = (ll)1 << 62; //dfs(bool型) int dy[]={-1,0,1,0,1,-1,-1,1}; in...
a.cc:40:11: error: stray '\' in program 40 | if(w==\0 && h==\0)break; | ^ a.cc:40:20: error: stray '\' in program 40 | if(w==\0 && h==\0)break; | ^
s761296173
p00741
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; typedef pair<int,int> P; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } int w,h; int nx,ny; void dfs(vector<vector<...
a.cc: In function 'void dfs(std::vector<std::vector<int> >&, int, int)': a.cc:13:27: error: 'l' was not declared in this scope 13 | for(int s=-1;s<=1;l++){ | ^
s537534169
p00741
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; typedef pair<int,int> P; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } int w,h; int nx,ny; void dfs(vector<vector<...
a.cc: In function 'void dfs(std::vector<std::vector<int> >&, int, int)': a.cc:13:27: error: 'l' was not declared in this scope 13 | for(int s=-1;s<=1;l++){ | ^
s448795034
p00741
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; typedef pair<int,int> P; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } int w,h; int nx,ny; void dfs(vector<vector<...
a.cc: In function 'void dfs(std::vector<std::vector<int> >&, int, int)': a.cc:13:27: error: 'l' was not declared in this scope 13 | for(int s=-1;s<=1;l++){ | ^
s952212619
p00741
C++
#include<iostream> //#include<> using namespace std; struct Node{ Node(); int aLandType; }; Node::Node(){ aLandType = 0; } bool check(const int x, const int y, const int LandNum, const int aNodeCol[50][50], const int aXMax, const int aYMax){ if ((x<0 || x >= aXMax) || (y<0 || y >= aYMax) || (aNodeCol[x][y] !...
/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
s179072977
p00741
C++
#include <cstdio> #include <cstdlib> #include <vector> #include <iostream> using namespace std; #define FOR(i,a,b) for (int i=(a);i<(b);i++) #define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--) #define REP(i,n) for (int i=0;i<(n);i++) #define RREP(i,n) for (int i=(n)-1;i>=0;i--) int h,w; int c[52][52]; int cnt; int d...
a.cc: In function 'int main()': a.cc:31:29: error: expected primary-expression before ';' token 31 | cin >> w >> ; | ^
s542907636
p00741
C++
#include <cstdio> #define f(i,n)for(int i=0;i<n;i++) #define s (scanf("%d",&e),e) int main(){int a=0,w,n,m,b,e,d[99];f(i,99)d[i]=0;n=s;m=s;if(n==0)return 0;f(i,m){w=b=0;f(j,n){s;if(e)f(k,3){e=d[j+k];if(e&&e-w){if(w){f(l,n+2)d[l]=d[l]==e?w:d[l];a--;}else w=e;}}if(w==0)a++,w=i*n+j+1;}else w=0;d[j]=b;b=w;}d[n]=b;w=0;}prin...
a.cc: In function 'int main()': a.cc:4:202: error: 'else' without a previous 'if' 4 | int main(){int a=0,w,n,m,b,e,d[99];f(i,99)d[i]=0;n=s;m=s;if(n==0)return 0;f(i,m){w=b=0;f(j,n){s;if(e)f(k,3){e=d[j+k];if(e&&e-w){if(w){f(l,n+2)d[l]=d[l]==e?w:d[l];a--;}else w=e;}}if(w==0)a++,w=i*n+j+1;}else w=0;d[j]=b;b=w;}d[n]=b;w...
s821947146
p00741
C++
#include <cstdio> #define f(n)for(int i=0;i<n;i++) #define s(w)scanf("%d",&w) int a,n,m,d[99][99]; int u[16]={-1,-1,-1,0,0,1,1,1,-1,0,1,-1,1,-1,0,1}; void k(int x,int y){ if(d[x+1][y+1]){f(8)k(x+u[i],y+u[i+8]);d[x+1][y+1]=0;} } int main(){ a=0; s(n);s(m); f(10000)d[i]=0; f(n*m)s(d[i/n][i%n]); f(n*m)if(d[i/n][i%n]...
a.cc: In function 'int main()': a.cc:12:21: error: incompatible types in assignment of 'int' to 'int [99]' 12 | f(10000)d[i]=0; | ~~~~^~
s582916475
p00741
C++
#include <cstdio> #include <iostream> #include <algorithm> #include <cstdlib> #include <cmath> #include <vector> #include <ctime> #include <string> #include <map> #include <stack> #include <queue> using namespace std; int w, h; const int MAX = 50; int c[MAX][MAX]; void check(int x, int y){ c[x][y] = 0; for(in...
a.cc: In function 'void check(int, int)': a.cc:26:23: error: 'i' was not declared in this scope 26 | check(i + dx, j + dy); | ^ a.cc:26:31: error: 'j' was not declared in this scope 26 | check(i + dx, j + dy); | ^ a.cc...
s156944956
p00741
C++
#include<iostream> using namespace std; void b(int ,int ); int a[100][100]={}; int main(){ while(1){ int count=0,w,h; cin>>w>>h; if(w+h==0)break; for(int i=1;i<=h;i++) for(int j=1;j<=w;j++) cin>>a[i][j]; for(int i=1;i<=h;i++) for(int j=1;j<=w;j++) if(a[i][j]==1){ ...
a.cc: In function 'int main()': a.cc:19:7: error: 'dfs' was not declared in this scope 19 | dfs(j,i); | ^~~ a.cc: In function 'void b(int, int)': a.cc:36:7: error: 'dfs' was not declared in this scope 36 | dfs(x1,y1); | ^~~
s947245189
p00741
C++
#include <iostream> using namespace std; void kazoeruyo(int p,int P,int box[50][50]){ box[p][P]=0; if(box[p][P+1]==1) { box[p][P+1]=0; P=P+1; kazoeruyo(p,P,box); } if(box[p][P-1]==1){ box[p][P-1]=0; P=P-1; kazoeruyo(p,P,box); } if(box[p+1][P]==1){ box[p+...
a.cc: In function 'int main()': a.cc:67:25: error: cannot convert 'int (*)[10]' to 'int (*)[50]' 67 | kazoeruyo(p,P,box); | ^~~ | | | int (*)[10] a.cc:3:32: note: initializing argument 3 of 'void kazoeruyo(int, int,...
s088167861
p00741
C++
#include<iostream> using namespace std; int box[51][51]; int main(){ int w,h,i,I,a; while(1){ a=0; cin>>w>>h; if(w==0&&h==0) break; for(i=0;i<=h+1;i++){ for(I=0;I<=w+1;I++){ box[i][I]==0; } } for(i=1;i<=h;i++){ for(I=1;I<=w;I++){ cin>>box[i][I]; } } for(i=1;...
a.cc: In function 'int main()': a.cc:23:11: error: 'kazu' was not declared in this scope 23 | kazu(i,I); | ^~~~
s587132228
p00741
C++
#include<iostream> using namespace std; int w,h; int filed[51][51]; void dfs(int x,int y){ filexd[x][y]=0; for(int dx=-1;dx<=1;dx++){ for(int dy=-1;dy<=1;dy++){ int nx=x+dx,ny=y+dy; if(0<=nx&&nx<h&&0<=ny&&ny<w&&filed[nx][ny]==1)dfs(nx,ny); } } } void solve(){ int res=0; for(int i=0;i<h;...
a.cc: In function 'void dfs(int, int)': a.cc:8:3: error: 'filexd' was not declared in this scope; did you mean 'filed'? 8 | filexd[x][y]=0; | ^~~~~~ | filed
s025578563
p00741
C++
#include<iostream> using namespace std; int w,h; int filed[51][51]; void dfs(int x,int y){ filexd[x][y]=0; for(int dx=-1;dx<=1;dx++){ for(int dy=-1;dy<=1;dy++){ int nx=x+dx,ny=y+dy; if(0<=nx&&nx<h&&0<=ny&&ny<w&&filed[nx][ny]==1)dfs(nx,ny); } } } void solve(){ int res=0; for(int i=0;i<h;...
a.cc: In function 'void dfs(int, int)': a.cc:8:3: error: 'filexd' was not declared in this scope; did you mean 'filed'? 8 | filexd[x][y]=0; | ^~~~~~ | filed
s721501648
p00741
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <cmath> #include <cstdio> #include <functional> #include <numeric> #include <stack> #include <queue> #include <map> #include <set> #include <utility> #include <sstream> #include <complex> #include <fstream> #include <bitset> using na...
a.cc: In function 'int main()': a.cc:64:41: error: 'solve' was not declared in this scope 64 | solve(i, j);//???????????£???????????¶????????¶??? | ^~~~~ a.cc: At global scope: a.cc:72:1: error: expected declaration before '}' toke...
s396193264
p00741
C++
#include <bits/stdc++.h> using namespace std; ??? using ll=long long; #define int ll ??? #define FOR(i,a,b) for(int i=int(a);i<int(b);i++) #define REP(i,b) FOR(i,0,b) ??? int read(){ int i; scanf("%lld",&i); return i; } ??? int land[100][100]={0}; int dy[]={-1,-1,-1,0,0,1,1,1}; int dx[]={-1,0,1,-1,1,-1,0,1}; int cnt...
a.cc:3:1: error: expected unqualified-id before '?' token 3 | ??? | ^ a.cc:6:1: error: expected unqualified-id before '?' token 6 | ??? | ^ a.cc:15:1: error: expected unqualified-id before '?' token 15 | ??? | ^ a.cc:5:13: error: 'll' does not name a type 5 | #define int ll | ...
s722706341
p00741
C++
#include <bits/stdc++.h> using namespace std; ??? using ll=long long; #define int ll ??? #define FOR(i,a,b) for(int i=int(a);i<int(b);i++) #define REP(i,b) FOR(i,0,b) ??? int read(){ int i; scanf("%lld",&i); return i; } ??? int land[100][100]={0}; int dy[]={-1,-1,-1,0,0,1,1,1}; int dx[]={-1,0,1,-1,1,-1,0,1}; int cnt...
a.cc:3:1: error: expected unqualified-id before '?' token 3 | ??? | ^ a.cc:6:1: error: expected unqualified-id before '?' token 6 | ??? | ^ a.cc:15:1: error: expected unqualified-id before '?' token 15 | ??? | ^ a.cc:5:13: error: 'll' does not name a type 5 | #define int ll | ...
s083667276
p00741
C++
/************************************ * ???????????¢?´¢??§??¶?????°?????°??????????????°?????? * ************************************/ #include <iostream> #include <queue> #include <map> #define LAND '1' //??? char??? #define SEA '0' //??? char??? using namespace std; /* ????????? int dx[] = {1,-1,0,0}; int d...
a.cc: In function 'void output(std::vector<std::vector<char> >)': a.cc:82:42: error: expected ')' before '{' token 82 | for(int x = 0; x < m[y].size()-1; x++{ | ~ ^ | )
s151649331
p00741
C++
#include <iostream> #include <queue> using namespace std; int main(){ bool map[52][52]; int w,h; while(cin >> w >> h && w>0 && h>0){ for(int i=0;i<52;i++){ for(int j=0;j<52;j++) map[i][j]=false; } int land=0; for(int i=1;i<=h;i++){ for(int j=1;j<=w;j++){ int c; ...
a.cc: In function 'int main()': a.cc:30:5: error: expected ',' or ';' before 'while' 30 | while(visited<land){ | ^~~~~
s661570855
p00741
C++
#include<iostream> using namespace std; int map[114][514]; int h, w; bool dfs(int i, int j) { map[i][j] = 0; if (i > 0) { if (j > 0) { if (map[i - 1][j - 1] == 1)dfs(i - 1, j - 1); } if(map[i - 1][j] = 1)dfs(i - 1, j); if (j < w) { if (map[i - 1][j + 1] == 1)dfs(i - 1, j + 1); } } if (j > 0) { if ...
a.cc: In function 'bool dfs(int, int)': a.cc:31:9: error: return-statement with no value, in function returning 'bool' [-fpermissive] 31 | return; | ^~~~~~
s852324757
p00741
C++
#include <algorithm> #include <cstdio> #include <iostream> #include <map> #include <cmath> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #include <stdlib.h> #include <stdio.h> #include <bitset> using namespace std; #define FOR(I,A,B) for(int I = (A); I < (B); ++...
a.cc: In function 'int main()': a.cc:17:18: error: 'memset' was not declared in this scope 17 | #define CLR(mat) memset(mat, 0, sizeof(mat)) | ^~~~~~ a.cc:34:5: note: in expansion of macro 'CLR' 34 | CLR(visited); | ^~~ a.cc:15:1: note: 'memset' is defined in header '<cstring>...
s045939747
p00741
C++
#include <algorithm> #include <cstdio> #include <iostream> #include <map> #include <cmath> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #include <stdlib.h> #include <stdio.h> #include <bitset> #include <limits> using namespace std; #define FOR(I,A,B) for(int I ...
a.cc: In function 'int main()': a.cc:18:18: error: 'memset' was not declared in this scope 18 | #define CLR(mat) memset(mat, 0, sizeof(mat)) | ^~~~~~ a.cc:35:5: note: in expansion of macro 'CLR' 35 | CLR(visited); | ^~~ a.cc:15:1: note: 'memset' is defined in header '<cstring>...
s611567938
p00741
C++
#include <algorithm> #include <cstdio> #include <iostream> #include <map> #include <cmath> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #include <stdlib.h> #include <stdio.h> #include <cstring> using namespace std; #define FOR(I,A,B) for(int I = (A); I < (B); +...
a.cc: In function 'void calc(int, int)': a.cc:26:3: error: 'visited' was not declared in this scope 26 | visited[y][x] = 0; | ^~~~~~~ a.cc: In function 'int main()': a.cc:33:9: error: 'visited' was not declared in this scope 33 | CLR(visited); | ^~~~~~~ a.cc:17:25: note: in definition ...
s767779334
p00741
C++
#include <bits/stdc++.h> using namespace std; #define llong long long int w,h; int sum; int area[50][50]; int nw[8] = {0, 1, 1, 1, 0, -1, -1, -1}; int nh[8] = {1, 1, 0, -1, -1, -1, 0, 1}; void solve(int h, int w){ if(area[h][w] == 0)return; area[h][w] == 0; for(int i = 0; i < 8; i++){ int sh = h + nh[i]; int...
a.cc: In function 'int main()': a.cc:46:2: error: expected '}' at end of input 46 | } | ^ a.cc:24:11: note: to match this '{' 24 | int main(){ | ^
s737734729
p00741
C++
#include <iostream> #include <cstdio> #include <queue> using namespace std; typedef pair<int, int> p; int t_x[] = {1, 1, 1, 0, -1, -1, -1, 0}; int t_y[] = {1, 0, -1, -1, -1, 0, 1, 1}; int field[52][52]; int main() { while (true) { memset(field, 0, sizeof field); int width, height; scanf("%d %d", &w...
a.cc: In function 'int main()': a.cc:17:5: error: 'memset' was not declared in this scope 17 | 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 <queue> +++ |+#include <cstring> ...
s440239517
p00741
C++
#include<cstring> #define foreach(t,p) for(t::iterator it=p.begin();it!=p.end();p++) #define REP(i,n) for(int i=0;i<n;i++) using namespace std; #define MAX_W 50 bool island[MAX_W+3][MAX_W+3]; int solve(int x,int y) { if(!island[x][y]) {return 0;} island[x][y]= false; solve(x-1,y-1); solve(x-1,y); solve(x-1,y+1)...
a.cc: In function 'int main()': a.cc:30:15: error: 'cin' was not declared in this scope 30 | while(cin >> w >> h &&w && h) | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include<cstring> +++ |+#includ...
s680081753
p00741
C++
#include <iostream> #include <map> // #include <cstdio> #include <stacK> using namespace std; int main() { while(1) { int w, h, data[52][52]={{0}}; cin >> w >> h; if (w == 0 && h ==0) break; // memset(data, 0, sizeof(data)); for (int i=1; i<=h; i++) { for (int j=1; j<=w; j++) { cin >> data[i][j]; } } /...
a.cc:4:10: fatal error: stacK: No such file or directory 4 | #include <stacK> | ^~~~~~~ compilation terminated.
s181540246
p00741
C++
#include <iostream> #include <map> // #include <cstdio> #include <stacK> using namespace std; int main() { while(1) { int w, h, data[52][52]={{0}}; cin >> w >> h; if (w == 0 && h ==0) break; // memset(data, 0, sizeof(data)); for (int i=1; i<=h; i++) { for (int j=1; j<=w; j++) { cin >> data[i][j]; } } /...
a.cc:4:10: fatal error: stacK: No such file or directory 4 | #include <stacK> | ^~~~~~~ compilation terminated.
s147523900
p00741
C++
#include <iostream> #include <vector> #include <queue> #include <utility> using namespace std; inline bool inRange(int a, int x, int b) { return a <= x && x < b; } void fill(vector<vector<int> > &v, int r, int c) { queue<pair<int,int> > q; q.push(make_pair(r, c)); v[r][c] = 0; while(!q.empty()) {...
a.cc: In function 'void fill(std::vector<std::vector<int> >&, int, int)': a.cc:27:23: error: 'class std::queue<std::pair<int, int> >' has no member named 'push_back' 27 | q.push_back(make_pair(nr, nc)) | ^~~~~~~~~
s925694584
p00741
C++
#include <iostream> #include <vector> #include <queue> #include <utility> using namespace std; inline bool inRange(int a, int x, int b) { return a <= x && x < b; } void fill(vector<vector<int> > &v, int r, int c) { queue<pair<int,int> > q; q.push(make_pair(r, c)); v[r][c] = 0; while(!q.empty()) {...
a.cc: In function 'void fill(std::vector<std::vector<int> >&, int, int)': a.cc:28:46: error: expected ';' before '}' token 28 | q.push(make_pair(nr, nc)) | ^ | ; 29 | } |...
s683187858
p00741
C++
#include<iostream> #include<queue> typedef std::pair<int, int> P; int vx[] = { 0, 1, 0, -1, 1, 1, -1, -1 }, vy[] = { 1, 0, -1, 0, 1, -1, 1, -1 }; int w, h; int map[51][51]; void bfs(int x, int y){ map[y][x] = 0; std::queue<P>que; que.push(P(x, y)); while (!que.empty()){ P p = que.front(); que.pop(); fo...
a.cc: In function 'int main()': a.cc:40:17: error: 'memset' was not declared in this scope 40 | memset(map, 0, sizeof(map)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<queue> +++ ...
s302066149
p00741
C++
#include <cstdio> #include <cstring> #include <cmath> #include <iostream> #include <sstream> #include <algorithm> #include <numeric> #include <functional> #include <vector> #include <queue> #include <string> #include <complex> #define REP(i,n) for (int i = 0; i < (n); i++) #define FOR(i,s,n) for (int i = (s); i < (n);...
a.cc: In function 'void solve()': a.cc:75:40: error: '_countof' was not declared in this scope; did you mean 'count'? 75 | REP(i, _countof(d)) | ^~~~~~~~ a.cc:14:39: note: in definition of macro 'REP' 14 | #define REP(i,n) for (int i = 0...
s611994147
p00742
Java
import java.util.*; public class C { public static int getFigure(int[] chars) { int figure = 0; for (int i = 0; i < chars.length; i++) { if (chars[i] != 0) figure++; } return figure; } public static int convert(char[] word, int[] comb, int[] char2digit) { int n = 0; int len = word.length; for ...
Main.java:4: error: class C is public, should be declared in a file named C.java public class C { ^ 1 error
s655036362
p00742
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; #define rep(i, n) for(int i=0; i<(n); ++i) #define all(c) (c).begin(), (c).end() const int inf = 1 << 28; int N; vector<string> in; vector<pair<int, bool> > var; int dfs(int used, int sum){ int k = __builtin_popcou...
a.cc: In function 'int solve()': a.cc:28:20: error: 'mp' was not declared in this scope 28 | var.assign(26, mp(inf, false)); | ^~
s226291719
p00742
C++
#include<bits/stdc++.h> int main(){ int n; while(cin>>n&&n){ m=0,an=0; memset(D,0,sizeof(D)); string s; map<char,int> c; vector<char> v; for(int i=0;i<n;i++){ cin>>s; int l=1; if(i==n-1)l=-1; for(int j=s.size()-1,k=1;j>=0;j--,k*=10){ if(j==0&&s.size()!=1)v.push_back(...
a.cc: In function 'int main()': a.cc:4:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 4 | while(cin>>n&&n){ | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostrea...
s178356982
p00742
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n; while(cin>>n&&n){ m=0,an=0; memset(D,0,sizeof(D)); string s; map<char,int> c; vector<char> v; for(int i=0;i<n;i++){ cin>>s; int l=1; if(i==n-1)l=-1; for(int j=s.size()-1,k=1;j>=0;j--,k*=10){ if(j==0&&s.s...
a.cc: In function 'int main()': a.cc:6:5: error: 'm' was not declared in this scope 6 | m=0,an=0; | ^ a.cc:6:9: error: 'an' was not declared in this scope; did you mean 'n'? 6 | m=0,an=0; | ^~ | n a.cc:7:12: error: 'D' was not declared in this scope 7 | mems...
s293698491
p00742
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; string P[20], Q[20]; int N; int c[26], F[20], r[20]; char d[26]; int cnt1 = 0; int fact(int n) { int sum1 = 1; for (int i = 1; i <= n; i++)sum1 *= i; return sum1; } int main() { while (true) { for (int i = 0; i <= 10; i++) { F[i] = fact(...
a.cc: In function 'int main()': a.cc:59:17: error: jump to label 'E' 59 | E:; | ^ a.cc:45:68: note: from here 45 | if (a[i] == 0 && r[i] == 1) { goto E; } | ^ a.cc:47:29...
s031059940
p00742
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; string P[20], Q[20]; int N; int c[26], F[20], r[20]; char d[26]; int cnt1 = 0; int fact(int n) { int sum1 = 1; for (int i = 1; i <= n; i++)sum1 *= i; return sum1; } int main() { while (true) { for (int i = 0; i <= 10; i++) { F[i] = fact(...
a.cc: In function 'int main()': a.cc:59:17: error: jump to label 'E' 59 | E:; | ^ a.cc:45:68: note: from here 45 | if (a[i] == 0 && r[i] == 1) { goto E; } | ^ a.cc:47:29...
s838939680
p00742
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; string P[20], Q[20]; int N; int c[26], F[20], r[20]; char d[26]; int cnt1 = 0; int fact(int n) { int sum1 = 1; for (int i = 1; i <= n; i++)sum1 *= i; return sum1; } int main() { while (true) { for (int i = 0; i <= 10; i++) { F[i] = fact(...
a.cc: In function 'int main()': a.cc:59:17: error: jump to label 'E' 59 | E:; | ^ a.cc:45:68: note: from here 45 | if (a[i] == 0 && r[i] == 1) { goto E; } | ^ a.cc:47:29...
s387991850
p00742
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; string P[20]; int N, c[26], F[20], r[20]; char d[26]; int cnt1 = 0; int fact(int n) { int sum1 = 1; for (int i = 1; i <= n; i++)sum1 *= i; return sum1; } int main() { while (true) { for (int i = 0; i <= 10; i++) { F[i] = fact(i); r[i] = ...
a.cc: In function 'int main()': a.cc:15:59: error: 'Q' was not declared in this scope 15 | for (int i = 0; i < 20; i++) { P[i] = ""; Q[i] = ""; } | ^
s647903311
p00742
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; string P[20]; int N, c[26], F[20], r[20]; char d[26]; int cnt1 = 0; int fact(int n) { int sum1 = 1; for (int i = 1; i <= n; i++)sum1 *= i; return sum1; } int main() { while (true) { for (int i = 0; i <= 10; i++) { F[i] = fact(i); r[i] = ...
a.cc: In function 'int main()': a.cc:15:59: error: 'Q' was not declared in this scope 15 | for (int i = 0; i < 20; i++) { P[i] = ""; Q[i] = ""; } | ^
s468320698
p00742
C++
#include <string> #include <iostream> #include <algorithm> using namespace std; int n, cnt, a[13][9], l[13], p[11], used[11]; char c[11]; int solve(int depth) { if (depth == cnt) { int b[13][9], ret = 0; memset(b, 0, 468); for (int i = 0; i < n; i++) { int res = 0; for (int j = l[i] - 1; j >= 0; j--) res =...
a.cc: In function 'int solve(int)': a.cc:9:17: error: 'memset' was not declared in this scope 9 | memset(b, 0, 468); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <algorithm> +++ |+...
s440752681
p00742
C++
#include<bits/stdc++.h> using namespace std; int h[100]; vector<char> s; vector<string> vs; bool used[10]; bool calc(){ int n = vs.size(); int left = 0, item; for (int i = 0; i < n; i++) { if(h[vs[i][0]] == 0 and vs[i].size() != 1)return false; } for (int i = 0; i < n; i++) { item = 0; for (int j...
a.cc: In function 'int main()': a.cc:43:7: error: request for member 'clear' in 'h', which is of non-class type 'int [100]' 43 | h.clear(); | ^~~~~
s142418615
p00742
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <iomanip> #include <cmath> #define MAX_N 12 using namespace std; char form[MAX_N][8]; int N; char alpha[10]; int na; int fac[10]; int ans[100000][10]; int counter; bool calc_form(){ int sum = 0, s1; for (int i = 0; i < N; i++) { s1 = 0; for ...
a.cc: In function 'bool calc_form()': a.cc:24:37: error: 'strlen' was not declared in this scope 24 | for (int j = 0; j < strlen(form[i]); j++) | ^~~~~~ a.cc:6:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <c...
s965558013
p00742
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <iomanip> #include <cmath> #include <strlen.h> #define MAX_N 12 using namespace std; char form[MAX_N][8]; int N; char alpha[10]; int na; int fac[10]; int ans[100000][10]; int counter; bool calc_form(){ int sum = 0, s1; for (int i = 0; i < N; i++)...
a.cc:6:10: fatal error: strlen.h: No such file or directory 6 | #include <strlen.h> | ^~~~~~~~~~ compilation terminated.
s455319616
p00742
C++
#include <iostream> #define REP(i, a, n) for(int i = (a); i < (n); i++) using namespace std; int main(void) { int fact[11]; fact[0] = 1; REP(i, 1, 11) fact[i] = fact[i - 1] * i; for(int N; cin >> N, N > 0;) { string S[12]; int a[256]; REP(i, 0, N) { cin >> S[i]; REP(j, 0, S[i].length(...
a.cc: In function 'int main()': a.cc:28:11: error: 'next_permutation' was not declared in this scope 28 | while(next_permutation(v, v + 10)) { | ^~~~~~~~~~~~~~~~
s595736603
p00742
C++
#include <iostream> #include <vector> #include <string> #include <map> using namespace std; int N, M; vector< char > list; vector< string > s; map< char, int > conv; int dp[12][1 << 11]; int check() { int left = 0, right = 0; for(int i = 0; i < N; i++) { string num; for(int j = 0; j < s[i].si...
a.cc: In function 'int main()': a.cc:63:9: error: 'sort' was not declared in this scope; did you mean 'short'? 63 | sort(list.begin(), list.end()); | ^~~~ | short a.cc:64:20: error: 'unique' was not declared in this scope 64 | list.erase(unique(list.begin(), list.end())...
s306423073
p00742
C++
#include <iostream> #include <vector> #include <string> #include <map> using namespace std; int N, M; vector< char > list; vector< string > s; map< char, int > conv; map< string, int > dp; map< string, bool > dp1; int check() { int left = 0, right = 0; for(int i = 0; i < N; i++) { string num; ...
a.cc: In function 'int main()': a.cc:64:9: error: 'sort' was not declared in this scope; did you mean 'short'? 64 | sort(list.begin(), list.end()); | ^~~~ | short a.cc:65:20: error: 'unique' was not declared in this scope 65 | list.erase(unique(list.begin(), list.end())...
s317390459
p00742
C++
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define repl(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++) #define repr(i,n) for(ll i=(ll)(n-1);i>=0;i--) #define rep(i,n) repl(i,0,n) #define each(itr,v) for(auto itr:v) #define pb(s) push_back(s) #define all(x) (x).begin(),(x).end() #define db...
a.cc:58:3: error: expected unqualified-id before 'return' 58 | return false; | ^~~~~~ a.cc:59:1: error: expected declaration before '}' token 59 | } | ^
s513369680
p00742
C++
#include <cstdio> #include <cstring> #include <algorithm> #include <map> using namespace std; int N; char s[12][8]; int sl[12]; char t[8]; int tl; int cnt, m; int perm[] = {0,1,2,3,4,5,6,7,8,9}; bool check() { int sum1 = 0; for (int i = 0; i < N-1; ++i) { int d = 1; if (sl[i] > 1 && perm[s[i][0] - 'A'] ==...
a.cc: In function 'int main()': a.cc:70:7: error: 'gets' was not declared in this scope; did you mean 'getw'? 70 | gets(s[i]); | ^~~~ | getw a.cc:73:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 73 | gets(t); | ^~~~ | getw
s928468640
p00742
C++
#include <iostream> #include <vector> #include <map> #include <set> #include <algorithm> using namespace std; #define vec vector #define pb push_back #define ins insert int N; vec<string> S; set<char> T; vec<int> dSet; bool solve2() { map<char,int> m; int i=0; for(set<char>::iterator it = T.begin(); it!=T.end();...
a.cc:59:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 59 | main() { | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s286651287
p00742
C++
#include <iostream> #include <vector> #include <map> #include <set> #include <algorithm> using namespace std; #define vec vector #define pb push_back #define ins insert int N; vec<string> S; set<char> T; vec<int> dSet; bool solve2() { map<char,int> m; int i=0; for(set<char>::iterator it = T.begin(); it!=T.end();...
a.cc:59:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 59 | main() { | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s521260975
p00742
C++
#include <iostream> #include <vector> #include <map> #include <set> #include <cstring> #include <cstdlib> #define N 12 #define L 9 using namespace std; int n; int cnum; char m[N][L]; char f[128]; char vc[11]; bool used[10]; int mlen[N]; bool non_zero[128]; //set<char> non_zero; int dfs(int depth){ int ret = 0; i...
a.cc: In function 'int main()': a.cc:102:16: error: no matching function for call to 'find(char [11], char*, char&)' 102 | if(find(vc,vc+cnum,m[i][j])==vc+cnum)vc[cnum++]=m[i][j]; | ~~~~^~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/bits/locale_facets.h:48, fr...
s862604608
p00742
C++
#include <iostream> #include <vector> #include <string> using namespace std; const int g_keta[8] = {1, 10, 100, 1000, 10000, 100000, 1000000, 10000000}; struct Alphabet { int keisu; char mozi; bool sento; }; typedef struct Alphabet alphabet; void create(string str, vector<alphabet>& alp, int sign) { int len = s...
a.cc:64:1: error: 'timer' does not name a type; did you mean 'timex'? 64 | timer mytimer; | ^~~~~ | timex
s053528709
p00742
C++
#include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; const int g_keta[8] = {1, 10, 100, 1000, 10000, 100000, 1000000, 10000000}; struct Alphabet { int keisu; char mozi; bool sento; }; typedef struct Alphabet alphabet; void create(string str, vector<alphabet>& alp, int ...
a.cc: In function 'int main()': a.cc:123:45: error: no matching function for call to 'max(int&, std::__cxx11::basic_string<char>::size_type)' 123 | maxlen = max(maxlen, str.size()); | ~~~^~~~~~~~~~~~~~~~~~~~ In file included from /usr/incl...
s243615983
p00742
C++
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <set> using namespace std; typedef long long ll; int N; string nums[101]; string sum; //map<char,int> applyNum; int varNum; int applyNums[1001]; char charSets[101]; int cnt=0; bool used[11]; bool noZero[1000]; void dfs(int pos){ ...
a.cc: In function 'int main()': a.cc:55:9: error: 'memset' was not declared in this scope 55 | memset(noZero,0,sizeof(noZero)); | ^~~~~~ a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include <set> +++ |+#include <cs...
s864979314
p00742
C++
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <set> #include <cstring> #include <map> using namespace std; typedef long long ll; typedef pair<int,int> pii; int N; string strs[101]; char charSets[101]; int charKinds; int charIds[1001]; int perm[101]; int nums[101]; int cnt; ...
a.cc: In function 'void dfs(int, int)': a.cc:41:54: error: 'ch' was not declared in this scope 41 | if(i!=N-1)lSum+=mul*perm[charIds[ch]]; | ^~ a.cc:42:49: error: 'ch' was not declared in this scope 42 | else rSum+=...
s199450742
p00742
C++
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <set> #include <cstring> #include <map> using namespace std; typedef long long ll; typedef pair<int,int> pii; int N; string strs[101]; char charSets[101]; int charKinds; int charIds[1001]; int perm[101]; int nums[101]; int cnt; ...
a.cc: In function 'void dfs(int, int)': a.cc:41:54: error: 'ch' was not declared in this scope 41 | if(i!=N-1)lSum+=mul*perm[charIds[ch]]; | ^~ a.cc:42:49: error: 'ch' was not declared in this scope 42 | else rSum+=...
s933623125
p00742
C++
#include <cstdio> #include <string> #include <algorithm> #include <map> using namespace std; int getmin(int bit) { return __builtin_ctz(~bit); } int getmax(int bit) { return 31-__builtin_clz(~bit&1023); } int solve(int* c,int* z,int M,int sum,int bit) { int depth=__builtin_popcount(bit); if(depth==M) return su...
a.cc: In function 'int main()': a.cc:63:30: error: 'gets' was not declared in this scope; did you mean 'getw'? 63 | n[i]=gets(buf); | ^~~~ | getw
s268322081
p00742
C++
#include<iostream> #include<vector> #include<map> #define pb push_back #define uni(c) c.erase(unique(all(c)),c.end()) #define all(c) c.begin(),c.end() using namespace std; int ans,cs,n; vector<string> v; vector<char> c; bool flag; map<int,int> mp; map<char,int> c_t_n; map<char,bool> nz; int coun,a; void calc(vector<int...
a.cc: In function 'void calc(std::vector<int>)': a.cc:31:16: error: 'next_permutation' was not declared in this scope 31 | }while(next_permutation(all(now))); | ^~~~~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:60:31: error: 'strlen' was not declared in this scope 60 | ...
s885548013
p00742
C++
#include <iostream> #include <vector> #include <string> using namespace std; #define INF 1e9 int Eq[27], Zero[27]; vector<int> TC, hash, zr; int check(){ int sum=0; int i; for(i=0;i<int(hash.size());i++){ sum += hash[i] * TC[i]; } return sum ? 0 : 1; } int solve(){ int i, j, sum = 0; if(hash.size() == TC.siz...
a.cc: In function 'int check()': a.cc:12:19: error: expected primary-expression before 'int' 12 | for(i=0;i<int(hash.size());i++){ | ^~~ a.cc:12:19: error: expected ';' before 'int' 12 | for(i=0;i<int(hash.size());i++){ | ^~~ | ...
s899622589
p00742
C++
#include <iostream> #include <vector> #include <cstring> #include <cstdlib> #include <cmath> using namespace std; #define INF 1e9 int Eq[27], Zero[27]; vector<int> TC, hash, zr; int check(){ int sum=0; int i; for(i=0;i<int(hash.size());i++){ sum += hash[i] * TC[i]; } return sum ? 0 : 1; } int solve(){ int i,...
a.cc: In function 'int check()': a.cc:15:19: error: expected primary-expression before 'int' 15 | for(i=0;i<int(hash.size());i++){ | ^~~ a.cc:15:19: error: expected ';' before 'int' 15 | for(i=0;i<int(hash.size());i++){ | ^~~ | ...
s677312127
p00742
C++
#include <iostream> #include <vector> #include <string.h> #include <cstdlib> #include <cmath> using namespace std; #define INF 1e9 int Eq[27], Zero[27]; vector<int> TC, hash, zr; int check(){ int sum=0; int i; for(i=0;i<int(hash.size());i++){ sum += hash[i] * TC[i]; } return sum ? 0 : 1; } int solve(){ int i...
a.cc: In function 'int check()': a.cc:15:19: error: expected primary-expression before 'int' 15 | for(i=0;i<int(hash.size());i++){ | ^~~ a.cc:15:19: error: expected ';' before 'int' 15 | for(i=0;i<int(hash.size());i++){ | ^~~ | ...
s767888160
p00742
C++
// Sample : 0m2.437s import java.util.*; public class Main{ public static void main(String[] args){ new Main().run(); } Scanner sc = new Scanner(System.in); int n; char[][] x; boolean[] usedArphabet; boolean[] noZero; boolean flag; int[] number; long ans; void run...
a.cc:3:1: error: 'import' does not name a type 3 | import java.util.*; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: expected unqualified-id before 'public' 4 | public class Main{ | ^~~~~~
s942232429
p00742
C++
#include <iostream> #include <algorithm> #include <string> #include <cmath> using namespace std; int fact(int n){ if (n == 0) return 1; else return n * fact(n - 1); } int main() { int len[13], data[13]; int * np[150]; char alphabet[150]; int n; int num[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; //入力 while...
a.cc: In function 'int main()': a.cc:78:17: error: jump to label 'endfor' 78 | endfor: | ^~~~~~ a.cc:62:54: note: from here 62 | goto endfor; | ^~~~~~ a.cc:70:29: note...
s034596382
p00742
C++
#include <iostream> #include <algorithm> #include <string> #include <cmath> using namespace std; int fact(int n){ if (n == 0) return 1; else return n * fact(n - 1); } int main() { int len[13], data[13]; int * np[150]; char alphabet[150]; int n; int num[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; //入力 while...
a.cc: In function 'int main()': a.cc:71:33: error: expected unqualified-id before 'int' 71 | int right; | ^~~ a.cc:75:31: error: assignment of function 'std::ios_base& std::right(ios_base&)' 75 | right = data[n - 1]; ...
s629633335
p00742
C++
#include <iostream> #include <algorithm> #include <string> #include <cmath> using namespace std; int fact(int n){ if (n == 0) return 1; else return n * fact(n - 1); } int main() { int len[13], data[13]; int * np[150]; char alphabet[150]; int n; int num[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; //入力 while...
a.cc: In function 'int main()': a.cc:79:17: error: jump to label 'endfor' 79 | endfor: | ^~~~~~ a.cc:62:54: note: from here 62 | goto endfor; | ^~~~~~ a.cc:70:29: note...
s061106147
p00742
C++
#include "stdafx.h" #include <iostream> #include <algorithm> #include <string> #include <cmath> using namespace std; int fact(int n){ if (n == 0) return 1; else return n * fact(n - 1); } int _tmain(int argc, _TCHAR* argv[]) { int len[13], data[13]; int * np[150]; char alphabet[150]; int n; int num[10] = {...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s396794392
p00742
C++
#include <iostream> #include <algorithm> #include <string> #include <cmath> using namespace std; int fact(int n){ if (n == 0) return 1; else return n * fact(n - 1); } int main() { int len[13], data[13]; int * np[150]; char alphabet[150]; int n; int num[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; //入力 whil...
a.cc: In function 'int main()': a.cc:79:17: error: jump to label 'endfor' 79 | endfor: | ^~~~~~ a.cc:63:54: note: from here 63 | goto endfor; | ^~~~~~ a.cc:71:29: note...
s288341978
p00742
C++
#include <iostream> #include <algorithm> #include <string> #include <cmath> using namespace std; int fact(int n){ if (n == 0) return 1; else return n * fact(n - 1); } int main() { int len[13], data[13]; int * np[150]; char alphabet[150]; int n; int num[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; //入力 while...
a.cc: In function 'int main()': a.cc:79:17: error: jump to label 'endfor' 79 | endfor: | ^~~~~~ a.cc:62:54: note: from here 62 | goto endfor; | ^~~~~~ a.cc:70:29: note...
s610540935
p00742
C++
#include <iostream> #include <algorithm> #include <string> #include <cmath> using namespace std; int fact(int n){ if (n == 0) return 1; else return n * fact(n - 1); } int _tmain(int argc, _TCHAR* argv[]) { int len[13], data[13]; int * np[150]; char alphabet[150]; int n; int num[10] = { 0, 1, 2, 3, 4, 5, 6...
a.cc:15:22: error: '_TCHAR' has not been declared 15 | int _tmain(int argc, _TCHAR* argv[]) | ^~~~~~
s516580106
p00742
C++
#include <iostream> #include <algorithm> #include <string> #include <cmath> using namespace std; int fact(int n){ if (n == 0) return 1; else return n * fact(n - 1); } int main() { int len[13]; int * np[150]; char alphabet[150]; int n; int num[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; //入力 while (cin >> ...
a.cc: In function 'int main()': a.cc:101:25: error: jump to label 'exit' 101 | exit:; | ^~~~ a.cc:79:54: note: from here 79 | goto exit; | ^~~~ a.cc:89:...
s636479923
p00742
C++
#include <iostream> #include <algorithm> #include <string> #include <cmath> using namespace std; int fact(int n){ if (n == 0) return 1; else return n * fact(n - 1); } int main() { int len[13]; int * np[150]; char alphabet[150]; int n; int num[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; //入力 while (cin >> ...
a.cc: In function 'int main()': a.cc:102:17: error: jump to label 'exit' 102 | exit:; | ^~~~ a.cc:79:54: note: from here 79 | goto exit; | ^~~~ a.cc:89:30: note: cros...
s338099339
p00742
C++
#include <iostream> #include <algorithm> #include <string> #include <cmath> using namespace std; int fact(int n){ if (n == 0) return 1; else return n * fact(n - 1); } int main() { int len[13]; int * np[150]; char alphabet[150]; int n; int num[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; //入力 while (cin >> ...
a.cc: In function 'int main()': a.cc:58:17: error: 'DWORD' was not declared in this scope 58 | DWORD time1 = GetTickCount(); | ^~~~~ a.cc:110:22: error: expected ';' before 'time2' 110 | DWORD time2 = GetTickCount(); | ^~~~~~ | ...
s117875557
p00742
C++
#include <iostream> #include <algorithm> #include <string> #include <cmath> using namespace std; int fact(int n){ if (n == 0) return 1; else return n * fact(n - 1); } int main() { int len[13]; int * np[150]; char alphabet[150]; int n; int num[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; //入力 while (cin >> ...
a.cc: In function 'int main()': a.cc:58:17: error: 'DWORD' was not declared in this scope 58 | DWORD time1 = GetTickCount(); | ^~~~~ a.cc:110:22: error: expected ';' before 'time2' 110 | DWORD time2 = GetTickCount(); | ^~~~~~ | ...
s280285694
p00743
Java
import java.util.Arrays; import java.util.PriorityQueue; import java.util.Scanner; public class Main { Scanner in = new Scanner(System.in); int n, m; int[][] edge; double[][] minCost; int[][] maxSpeed; double INF = 100000000; class State implements Comparable<State> { int n, speed, prev; State(in...
Main.java:82: error: array required, but double found res = Math.min(minCost[g][i][1], res); ^ 1 error
s185404936
p00743
C++
#include <bits/stdc++.h> #define chmin(a, b) ((a)=min((a), (b))) #define chmax(a, b) ((a)=max((a), (b))) #define fs first #define sc second #define eb emplace_back using namespace std; typedef long long ll; typedef pair<int, int> P; typedef tuple<double, int, int, int> T; const ll MOD=1e9+7; //const ll INF=1e18; c...
a.cc: In function 'int main()': a.cc:59:35: error: 'class std::priority_queue<std::tuple<double, int, int, int>, std::vector<std::tuple<double, int, int, int> >, std::greater<std::tuple<double, int, int, int> > >' has no member named 'front' 59 | T t = que.front(); que.pop(); | ...
s820179136
p00743
C++
#include <bits/stdc++.h> #define chmin(a, b) ((a)=min((a), (b))) #define chmax(a, b) ((a)=max((a), (b))) #define fs first #define sc second #define eb emplace_back using namespace std; typedef long long ll; typedef pair<int, int> P; typedef tuple<double, int, int, int> T; const ll MOD=1e9+7; //const ll INF=1e18; c...
a.cc: In function 'int main()': a.cc:69:45: error: 'v' was not declared in this scope 69 | d[a4][e.to][v] = tmp; | ^
s807088199
p00743
C++
D (AOJ 1162) by iga_xx Contest: 2189 RunID: 1002065 Status: Wrong Answer Date: Sun Jun 29 18:37:44 JST 2014 ? 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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70...
a.cc:1:4: error: expected constructor, destructor, or type conversion before '(' token 1 | D (AOJ 1162) by iga_xx | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/bits/stl_tree.h:63, from /usr/include/c++/14/map:62, ...
s782753954
p00743
C++
#include <iostream> #include <vector> #include <string> #include <cstdio> #include <queue> using namespace std; #define N 30 #define INF 100000 struct road{int to,cost,lim;}; struct situ{int v,now,from;double d;}; bool operator < (const situ &a,const situ &b){ return a.d > b.d; } int main(){ while(1){ int n,m,s,g...
a.cc: In function 'int main()': a.cc:40:17: error: 'memset' was not declared in this scope 40 | memset(used,0,sizeof(used)); | ^~~~~~ a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include <queue> +++...
s599018754
p00743
C++
#include <iostream> #include <vector> #include <queue> #include <tuple> #include <iomanip> using namespace std; template<typename T> using VT = vector<T> template<typename T> using VVT = vector<VT<T> > template<typename T> using VVVT = vector<VVT<T> > #define rep(i, n) for(int i=0; i<(n); ++i) const double eps = 1e-8...
a.cc:9:42: error: expected ';' before 'template' 9 | template<typename T> using VT = vector<T> | ^ | ; 10 | template<typename T> using VVT = vector<VT<T> > | ~~~~~~~~ a.cc: In fun...