submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s974737531
p00746
C
#include <stdio.h> #pragma warning(disable : 4996) typedef struct{ int x; int y; }DATA; int main(){ int n, x, d; int i; int hmin,hmax,wmin,wmax; DATA data[200]; data[0].x=0; data[0].y=0; hmin=0; hmax=0; wmin=0; wmax=0; scanf("%d", &n); while(true){ if(n!=0){ for(i=1; i<n; i++){ scanf("%d%d",&...
main.c: In function 'main': main.c:23:15: error: 'true' undeclared (first use in this function) 23 | while(true){ | ^~~~ main.c:2:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' 1 | #include <stdio.h> +++ |+#include <stdb...
s661377853
p00746
C
#include <stdio.h> int main(){ int i,j; int a,b,c,d; int date_a[200]; int date_b[200]; while(1){ date_a[0]=0; date_b[0]=0; for(i=1;i<200;i++){ date_a[i]=-1; date_b[i]=-1; } scanf("%d",&c); if(c==0){ break; } d=1; while(c!=d){ scanf("%d %d",&a,&b); if(b%2){ date_b[d]=date_b[a]; b==1?dat...
main.c: In function 'main': main.c:25:63: error: lvalue required as left operand of assignment 25 | b==1?date_a[d]=date_a[d-1]+1:date_a[d]=date_a[d-1]-1; | ^ main.c:28:63: error: lvalue required as left operand of assignment ...
s078830018
p00746
C
#include <stdio.h> int main(){ int i,j; int a,b,c,d; int date_a[200]; int date_b[200]; while(1){ date_a[0]=0; date_b[0]=0; for(i=1;i<200;i++){ date_a[i]=-1; date_b[i]=-1; } scanf("%d",&c); if(c==0){ break; } d=1; while(c!=d){ scanf("%d %d",&a,&b); if(b%2){ date_b[d]=date_b[...
main.c: In function 'main': main.c:25:71: error: lvalue required as left operand of assignment 25 | b==1?date_a[d]=date_a[d-1]+1:date_a[d]=date_a[d-1]-1; | ^ main.c:28:71: error: lvalue required as left operan...
s805607491
p00746
C++
//include //------------------------------------------ #include <vector> #include <list> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <f...
a.cc: In function 'int main()': a.cc:146:34: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator-' 146 | int width = maxx - min+1; | ~~~~~^~~~~
s957501696
p00746
C++
#include<iostream> using namespace std; int main() { int n; while(cin >> n && n) { int cellnum[500][500]; int x[300],y[300]; memset(cellnum,-1,500*500*sizeof(int)); memset(x,-1,300*sizeof(int)); memset(y,-1,300*sizeof(int)); cellnum[250][250] = 0; x[0] = 250; y[0] = 250; for(int i = 1;i ...
a.cc: In function 'int main()': a.cc:17:17: error: 'memset' was not declared in this scope 17 | memset(cellnum,-1,500*500*sizeof(int)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<io...
s352714617
p00746
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)n; ++i) #define REP(i, a, b) for (int i = (int)a; i < (int)b; ++i) #define rer(i, a, b) for (int i = (int)a; i <= (int)b; ++i) #define each(i,c) for(__typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i) #define all(v) v.begin(), v.end() #define mset...
a.cc:33:25: error: macro "REP" requires 3 arguments, but only 2 given 33 | REP(i, N) { | ^ a.cc:4:9: note: macro "REP" defined here 4 | #define REP(i, a, b) for (int i = (int)a; i < (int)b; ++i) | ^~~ a.cc: In function 'int main()': a.cc:33:17: error: '...
s062943415
p00746
C++
1 5 0 0 0 1 0 2 0 3 12 0 0 1 0 2 0 3 1 4 1 5 1 6 2 7 2 8 2 9 3 10 3 10 0 2 1 2 2 2 3 2 2 1 5 1 6 1 7 1 8 1 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 1 | ^
s383234656
p00746
C++
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.HashMap; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigDecimal; import java.math....
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.InputStream; | ^~~~~~ 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 '-fmodu...
s745670346
p00746
C++
#include<iostream> #include<string> using namespace std; int main(){ int n; int d,e int x[200],y[200]; while(true){ cin>>n; ig(n==0) break; cin>>d>>e; x[0]=0,y[0]; int dx=0,ux=0,yx=0,uy=0; for(int i=1;i<=n;i++){ cin>>d>>e; x[i]=x[d]; y[i]=y[d]; if(e==0) x[i]--; if(e==1) x[i]++; if(e==2) y[i]--; if(...
a.cc: In function 'int main()': a.cc:7:9: error: expected initializer before 'int' 7 | int x[200],y[200]; | ^~~ a.cc:10:9: error: 'ig' was not declared in this scope 10 | ig(n==0) | ^~ a.cc:12:17: error: 'e' was not declared in this scope 12 | cin>>d>>e; ...
s231920472
p00746
C++
#include <iostream> #include <vector> using namespace std; int dx[] = {-1, 0, 1, 0}, dy[] = {0, -1, 0, 1}; int main(int argc, char *argv[]) { int n, ni, di, w, h; while (cin >> n, n) { vector<int> x(n, 0); vector<int> y(n, 0); for (int i = 1; i < n; ++i) { cin >> ni >> di; ...
a.cc: In function 'int main(int, char**)': a.cc:18:14: error: 'max_element' was not declared in this scope 18 | w = *max_element(x.begin(), x.end()) - *min_element(x.begin(), x.end()); | ^~~~~~~~~~~ a.cc:18:49: error: 'min_element' was not declared in this scope 18 | w = *max_el...
s872694095
p00746
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,n,art[1000][2]={10,10};; while(cin>>n,n!=0){ art[0][2]={10,10}; for(int i=1;i<n;i++){ cin>>a>>b; if(b==0){art[i][0]=art[a][0];art[i][1]=art[a][1]-1;} else if(b==1){art[i][0]=art[a][0]-1;art[i][1]=art[a][1];} else if(b==...
a.cc: In function 'int main()': a.cc:6:21: error: cannot convert '<brace-enclosed initializer list>' to 'int' in assignment 6 | art[0][2]={10,10}; | ^
s352645307
p00746
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,n,art[1000][2]={10,10}; while(cin>>n,n!=0){ art[0][2]={10,10}; for(int i=1;i<n;i++){ cin>>a>>b; if(b==0){art[i][0]=art[a][0];art[i][1]=art[a][1]-1;} else if(b==1){art[i][0]=art[a][0]-1;art[i][1]=art[a][1];} else if(b==2...
a.cc: In function 'int main()': a.cc:6:21: error: cannot convert '<brace-enclosed initializer list>' to 'int' in assignment 6 | art[0][2]={10,10}; | ^
s738571433
p00746
C++
#include<iostream> #include<vector> #include<cmath> #define INF (1<<29) using namespace std; typedef pair<int,int>pii; typedef pair<pii,int>P; int main(void){ int N; while(cin >> N,N){ vector<P>v(N-1); for(int i=0;i<N-1;i++){ cin >> v[i].first.first >> v[i].first.second; v[i].second = i...
a.cc: In function 'int main()': a.cc:22:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 22 | sort(v.begin(),v.end()); | ^~~~ | sqrt
s527693897
p00746
C++
#include<iostream> #include<vector> #include<cmath> #define INF (1<<29) using namespace std; typedef pair<int,int>pii; typedef pair<pii,int>P; int main(void){ int N; while(cin >> N,N){ vector<P>v(N-1); for(int i=0;i<N-1;i++){ cin >> v[i].first.first >> v[i].first.second; v[i].second = i...
a.cc: In function 'int main()': a.cc:22:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 22 | sort(v.begin(),v.end()); | ^~~~ | sqrt
s176330977
p00746
C++
#include"bits/stdc++.h" #define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++) #define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--) #define REP(i,n) FOR(i,0,n) #define RREP(i,n) RFOR(i,0,n) #define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME #define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)...
a.cc:10:22: error: 'ostream' does not name a type 10 | template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) { | ^~~~~~~ a.cc:13:22: error: 'ostream' does not name a type 13 | template<typename T> ostream& operator<<(ostream& os, const vector<vector<T>>& v) { |...
s286577879
p00746
C++
#include"bits/stdc++.h" #define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++) #define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--) #define REP(i,n) FOR(i,0,n) #define RREP(i,n) RFOR(i,0,n) #define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME #define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)...
a.cc:10:22: error: 'ostream' does not name a type 10 | template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) { | ^~~~~~~ a.cc:13:22: error: 'ostream' does not name a type 13 | template<typename T> ostream& operator<<(ostream& os, const vector<vector<T>>& v) { |...
s200316092
p00746
C++
#include"bits/stdc++.h" #define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++) #define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--) #define REP(i,n) FOR(i,0,n) #define RREP(i,n) RFOR(i,0,n) #define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME #define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)...
a.cc:10:22: error: 'ostream' does not name a type 10 | template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) { | ^~~~~~~ a.cc:13:22: error: 'ostream' does not name a type 13 | template<typename T> ostream& operator<<(ostream& os, const vector<vector<T>>& v) { |...
s483872310
p00746
C++
#include"bits/stdc++.h" #define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++) #define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--) #define REP(i,n) FOR(i,0,n) #define RREP(i,n) RFOR(i,0,n) #define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME #define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)...
a.cc: In function 'void solve()': a.cc:3:25: error: 'll' was not declared in this scope 3 | #define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++) | ^~ a.cc:5:18: note: in expansion of macro 'FOR' 5 | #define REP(i,n) FOR(i,0,n) | ^~~ a.cc:35:17: n...
s433241090
p00746
C++
#include<bits/stdc++.h> #define loop(i,n) for(int i=0; i<n; i++) using namespace std; int main(){ int a[250]={},b[250]={}; //aは上下、bは左右 int n; while(1){ cin >> n; if(n==0) break; for(int i=1; i<n; i++){ int x,y; cin >> x >> y; if(y==0){ //左 a[i]=a[x]; b[i]=b[x]-1; ...
a.cc:17:16: error: extended character   is not valid in an identifier 17 | if(y==1){ //下 | ^ a.cc: In function 'int main()': a.cc:17:16: error: '\U00003000' was not declared in this scope 17 | if(y==1){ //下 | ^~
s742624585
p00746
C++
#include <iostream> #include <string> #include <vector> #include <math.h> #include <numeric> #include <algorithm> #include <stack> #include <map> using namespace std; int N; int main() { while(cin >> N, N){ pair<int, int> p; vector<p> vp; vp.push_back({0, 0}); for(int i=1; i<N; ++i)...
a.cc: In function 'int main()': a.cc:15:17: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector' 15 | vector<p> vp; | ^ a.cc:15:17: note: expected a type, got 'p' a.cc:15:17: error: template argument 2 is invalid...
s914091920
p00746
C++
#include<iostream> #include<cstdio> using namespace std; int a[512][512]; int main() { for(int N; scanf("%d", &N), N; ) { memset( a, -1, sizeof(a) ); a[256][256] = 0; const int dr[] = {0, 1, 0, -1}; const int dc[] = {-1, 0, 1, 0}; for(int i = 1; i < N; i++) { int v, dir; scanf("%d%d...
a.cc: In function 'int main()': a.cc:9:5: error: 'memset' was not declared in this scope 9 | memset( a, -1, sizeof(a) ); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<cstdio> +++ |+#include <cstring> 3...
s565797405
p00746
C++
#include <iostream> #include <vector> #include <algorithm> //ツ債計ツ行ツ青板づーツ偲ヲツ督セ int GetRowCount() { int count; std::cin >> count; return count; } typedef enum{LEFT,DOWN,RIGHT,UP} DIRECTION; typedef struct _BLOCK { int fundmention; DIRECTION direct; int x,y; static bool xPred(struct _BLOCK left,struct _BLOCK ...
a.cc: In function 'void GetBoxRect(int)': a.cc:39:9: error: 'memset' was not declared in this scope 39 | memset(&block,0,sizeof(BLOCK)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <algorithm> +++...
s693002639
p00746
C++
#include <stdlib.h> #include <iostream> #include <vector> #include <algorithm> //ツ債計ツ行ツ青板づーツ偲ヲツ督セ int GetRowCount() { int count; std::cin >> count; return count; } typedef enum{LEFT,DOWN,RIGHT,UP} DIRECTION; typedef struct _BLOCK { int fundmention; DIRECTION direct; int x,y; static bool xPred(struct _BLOCK ...
a.cc: In function 'void GetBoxRect(int)': a.cc:39:9: error: 'memset' was not declared in this scope 39 | memset(&block,0,sizeof(BLOCK)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <algorithm> +++...
s064234588
p00746
C++
#include <iostream> #include <vector> #include <algorithm> //ツ債計ツ行ツ青板づーツ偲ヲツ督セ int GetRowCount() { int count; std::cin >> count; return count; } typedef enum{LEFT,DOWN,RIGHT,UP} DIRECTION; typedef struct _BLOCK { int fundmention; DIRECTION direct; int x,y; static bool xPred(struct _BLOCK left,struct _BLOCK r...
a.cc: In function 'void GetBoxRect(int)': a.cc:38:9: error: 'memset' was not declared in this scope 38 | memset(&block,0,sizeof(BLOCK)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <algorithm> +++...
s095030348
p00746
C++
#include <iostream> #include <algorithm> #include <cmath> using namespace std; int dx[4] = {-1,0,1,0}; int dy[4] = {0,-1,0,1}; int main() { int N,d,n,left,right,top,bottom; int pos[200][2]; while(cin >> N) { if(N == 0) break; memset(pos,0,sizeof(pos)); left = 0;right = 0;top = 0;bottom = 0; for(...
a.cc: In function 'int main()': a.cc:14:5: error: 'memset' was not declared in this scope 14 | memset(pos,0,sizeof(pos)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <cmath> +++ |+#include <cstring> 4...
s815587631
p00746
C++
#include <iostream> using namespace std; int max_u; int max_d; int max_l; int max_r; struct square{ int ud; int lr; }; int main(void){ square s[210]; int a,b,n,i; while(cin >> n,n){ max_u = 0; max_d = 0; max_l = 0; max_r = 0; s[0].ud = 0; s[0].lr = 0; for(i=1;i < n;i++){ cin>>a>>b; memcpy(&...
a.cc: In function 'int main()': a.cc:27:25: error: 'memcpy' was not declared in this scope 27 | memcpy(&s[i],&s[a],sizeof(square)); | ^~~~~~ a.cc:2:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 |...
s769482319
p00746
C++
#include <iostream> using namespace std; int max_u,max_d,max_l,max_r; struct square{ int ud,lr; }; int main(){ square s[210]; int a,b,n,i; while(cin >> n,n){ max_u = 0; max_d = 0; max_l = 0; max_r = 0; s[0].ud = 0; s[0].lr = 0; for(i=1;i < n;i++){ cin>>a>>b; memcpy(&s[i],&s[a],sizeof(square)...
a.cc: In function 'int main()': a.cc:23:25: error: 'memcpy' was not declared in this scope 23 | memcpy(&s[i],&s[a],sizeof(square)); | ^~~~~~ a.cc:2:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 |...
s927774202
p00746
C++
// AOJ 1165 #include <iostream> using namespace std; int data[500][500]; int fx, fy; int lx, rx, maxy, miny; void search(int find, int x, int y, int from) { // cout << "+" << x << " " << y << endl; if (data[y][x] == -1){ return; } if (data[y][x] == find){ fx = x; fy = y; lx = min(lx, x); rx = max(rx, x...
a.cc: In function 'void search(int, int, int, int)': a.cc:13:13: error: reference to 'data' is ambiguous 13 | if (data[y][x] == -1){ | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/inc...
s293369223
p00746
C++
#include<cstdio> #include<algorithm> #include<iostream> #include<vector> #include<string> #include<queue> #include<map> using namespace std; #define reps(i,f,n) for(int i=f;i<int(n);i++) #define rep(i,n) reps(i,0,n) typedef __int64 ll; typedef vector<int> vi; typedef vector<vi> vii; typedef pair<int,int> pii; int m...
a.cc:14:9: error: '__int64' does not name a type; did you mean '__int64_t'? 14 | typedef __int64 ll; | ^~~~~~~ | __int64_t
s689095867
p00746
C++
#include <cstdlib> #include <iostream> #include <vector> using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); const int dx[4] = {-1, 0, 1, 0}; const int dy[4] = {0, -1, 0, 1}; for(int n; cin >> n, n;) { vector<int> x(n, 0), y(n, 0); for(int i = 1; i < n; ++i) { int idx, d; cin >...
a.cc: In function 'int main()': a.cc:23:36: error: 'max_element' was not declared in this scope 23 | const int width = *max_element(x.begin(), x.end()) - *min_element(x.begin(), x.end()) + 1; | ^~~~~~~~~~~ a.cc:23:71: error: 'min_element' was not declared in t...
s289412969
p00746
C++
if(dir==0){ if(x[0].find(tgt)!=x[0].end()){ set<int> ins; ins.insert(i); x.push_back(ins); y.push_back(ins); }else{ for(int j=1;j<x.size()-1;j++){ if(x[j].find(tgt)!=x[j].end){ x[j-1].insert(i); break; } } } }else if(dir==2){ if(x[x.size()-1]...
a.cc:1:25: error: expected unqualified-id before 'if' 1 | if(dir==0){ | ^~ a.cc:15:26: error: expected unqualified-id before 'else' 15 | }else if(dir==2){ | ^~~~ a.cc:28:26: error: expected unqualified-id...
s547429280
p00746
C++
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (true) { int n = sc.nextInt(); if (n == 0) break; int[] x = new int[n]; int[] y = new int[n]; x[0] = 0; y[0] = 0; for (int i = 1; i < n; i++) { int p = sc.nextIn...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s040297844
p00747
Java
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int x, y; int w, h; int[][] u; int[][] d; int[][] l; int[][] r; int[][] dist; int[][] flag; while(true){ w = sc.nextInt(); h = sc.nextInt(); if(w == 0 && h == 0) ...
Main.java:89: error: class Queue is public, should be declared in a file named Queue.java public class Queue{ ^ 1 error
s820214629
p00747
Java
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int x, y; int w, h; int[][] u; int[][] d; int[][] l; int[][] r; int[][] dist; int[][] flag; while(true){ w = sc.nextInt(); h = sc.nextInt(); if(w == 0 && h == 0) ...
Main.java:89: error: class Queue is public, should be declared in a file named Queue.java public class Queue{ ^ 1 error
s655189445
p00747
Java
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int x, y; int w, h; int[][] u; int[][] d; int[][] l; int[][] r; int[][] dist; int[][] flag; while(true){ w = sc.nextInt(); h = sc.nextInt(); if(w == 0 && h == 0) ...
Main.java:86: error: variable x might not have been initialized if(x != h-1 || y != w-1) ^ Main.java:86: error: variable y might not have been initialized if(x != h-1 || y != w-1) ^ 2 errors
s045618975
p00747
Java
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int x = 0; int y = 0; int w, h; int[][] u; int[][] d; int[][] l; int[][] r; int[][] dist; int[][] flag; while(true){ w = sc.nextInt(); h = sc.nextInt(); if(w == 0 &...
Main.java:92: error: class Queue is public, should be declared in a file named Queue.java public class Queue{ ^ 1 error
s376176328
p00747
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:17: error: illegal start of expression for(;;)[ ^ Main.java:151: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] args) throws Exception{ ^ (use --enable-preview to enable unnamed classes) Main.java:254: error: class, interface...
s420036735
p00747
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayDeque; import java.util.Deque; import java.util.StringTokenizer; import static java.lang.Integer.parseInt; /** * Amazing Mazes */ public class P1166 { static final int DIR[][] = { {0, -1}, {1, ...
Main.java:13: error: class P1166 is public, should be declared in a file named P1166.java public class P1166 { ^ 1 error
s430768418
p00747
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayDeque; import java.util.Arrays; import java.util.PriorityQueue; import sun.misc.Queue; public class Main { /** * @param args * @throws IOException * @throws InterruptedException */ public s...
Main.java:8: error: cannot find symbol import sun.misc.Queue; ^ symbol: class Queue location: package sun.misc 1 error
s346745797
p00747
Java
import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(true) { int w = sc.nextInt(); int h = sc.nextInt(); if(w==0 && h==0) break; int[][] s_wall = new int [h][w+1]; int[]...
Main.java:32: error: cannot find symbol Queue<Node> que = new LinkedList<Node>(); ^ symbol: class Node location: class Main Main.java:32: error: cannot find symbol Queue<Node> que = new LinkedList<Node>(); ^ symbol: class Node location: class Main Main.java...
s994169147
p00747
Java
import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(true) { int w = sc.nextInt(); int h = sc.nextInt(); if(w==0 && h==0) break; int[][] s_wall = new int [h][w+1]; int[]...
Main.java:5: error: illegal character: '\u3000' public class Main?{ ^ 1 error
s190361097
p00747
Java
import java.util.*; public class Main { int w, h, m, n; boolean[][] field; class Pos{ int x, y, cnt; Pos(int x, int y, int cnt){ this.x = x; this.y = y; this.cnt = cnt; } } void Search(){ Queue<Pos> Q = new LinkedList<Pos>(); Q.offer(new Pos(0,0,1)); while(!Q.isEmpty()){ Pos now = Q.pol...
Main.java:72: error: cannot find symbol new AOJ1166().run(); ^ symbol: class AOJ1166 location: class Main 1 error
s552161770
p00747
Java
import java.awt.Point; import java.io.InputStream; import java.util.ArrayList; import java.util.Deque; import java.util.Iterator; import java.util.LinkedList; import java.util.Scanner; /** * @author kumar1 * */ public class B { /** * @param args */ public static void main(String[] args) { // TODO 自動生成されたメソ...
Main.java:13: error: class B is public, should be declared in a file named B.java public class B { ^ 1 error
s302646879
p00747
C
#include <stdio.h> struct box { unsigned char up :1 ; unsigned char down :1 ; unsigned char left :1 ; unsigned char right :1 ; }; #define dprintf(arg1, ... ) printf( arg1, __VA_ARGS__) //#define dprintf(arg1, ... ) void nextpos( char** ppos ) { *ppos = strchr( *ppos, ' ' ); if ( *ppos == NULL ) { return; } ...
main.c: In function 'nextpos': main.c:15:17: error: implicit declaration of function 'strchr' [-Wimplicit-function-declaration] 15 | *ppos = strchr( *ppos, ' ' ); | ^~~~~~ main.c:2:1: note: include '<string.h>' or provide a declaration of 'strchr' 1 | #include <stdio.h> +++ |+#inc...
s978191447
p00747
C
#include<iostream> #include<queue> #include<utility> using namespace std; typedef pair<int,int> P; int main(){ int w,h; bool vw[50][50],pw[50][50]; int grid[50][50]; while(cin >> w >>h , w||h){ for(int i=0;i<h;i++){ for(int j=0;j<w-1;j++)cin >> vw[i][j]; if(i!=h-1)for(int j=0;j<w;j++)cin >> p...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s794591155
p00747
C
#include<stdio.h> #include<string.h> enum {WEST=1,NORTH=2,EAST=4,SOUTH=8}; int vx[]={-1,0,1,0}; int vy[]={0,-1,0,1}; int w,h; int map[30][30]; int cost[30][30]; struct Pos{ int y,x; }; Pos que[900]; int head,tail; int main(){ int tmp; struct Pos a,b; while(scanf("%d%d",&w,&h)==2&&(w|h)){ memset(cost,-1,sizeof(c...
main.c:13:1: error: unknown type name 'Pos'; use 'struct' keyword to refer to the type 13 | Pos que[900]; | ^~~ | struct main.c: In function 'main': main.c:46:29: error: incompatible types when assigning to type 'int' from type 'struct Pos' 46 | que[tail++]=a; | ...
s415535906
p00747
C
#include<stdio.h> #include<string.h> enum {WEST=1,NORTH=2,EAST=4,SOUTH=8}; int vx[]={-1,0,1,0}; int vy[]={0,-1,0,1}; int w,h; int map[30][30]; int cost[30][30]; struct Pos{ int y,x; }; Pos que[900]; int head,tail; int main(){ int tmp; int i,j; struct Pos a,b; while(scanf("%d%d",&w,&h)==2&&(w|h)){ memset(cost,-...
main.c:13:1: error: unknown type name 'Pos'; use 'struct' keyword to refer to the type 13 | Pos que[900]; | ^~~ | struct main.c: In function 'main': main.c:47:29: error: incompatible types when assigning to type 'int' from type 'struct Pos' 47 | que[tail++]=a; | ...
s889571507
p00747
C
#include <stdio.h> #define WIDTH_MAX 30 #define HEIGHT_MAX 30 #define next( i ) ( ( ( i ) + 1 ) % ( WIDTH_MAX * HEIGHT_MAX ) ) typedef struct { int type; int min; } FIELD; FIELD field[ WIDTH_MAX * 2 + 1 ][ HEIGHT_MAX * 2 + 1 ] = {}; const int dx[ 4 ] = { -1, 0, 1, 0 }, dy[ 4 ] = { 0, -1, 0, 1 }; int queue[ WIDTH...
main.c: In function 'bfs': main.c:77:55: error: 'INF' undeclared (first use in this function) 77 | return field[ w * 2 - 1 ][ h * 2 - 1 ].min != INF ? field[ w * 2 - 1 ][ h * 2 - 1 ].min : 0; | ^~~ main.c:77:55: note: each undeclared identifier is r...
s676317910
p00747
C++
// // main.cpp // AOJ1166 // // Created by aki33524 on 2014/07/06. // Copyright (c) 2014年 aki33524. All rights reserved. // #include <iostream> #include <queue> #include <vector> using namespace std; typedef pair<int, int> P; const int INF = 1e8; int dh[] = {1, 0, -1, 0}; int dw[] = {0, 1, 0, -1}; int W, H; int ...
a.cc: In function 'int main(int, const char**)': a.cc:48:9: error: 'memset' was not declared in this scope 48 | memset(maze, 0, sizeof(maze)); | ^~~~~~ a.cc:11:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 10 | #include <queue> ...
s760286100
p00747
C++
#include <cstdio> #include <iostream> #include <cmath> #include <ctype.h> #include <string> #include <sstream> #include <iostream> #include <algorithm> #include <cstdlib> #include <map> #include <queue> #include <utility> #include <vector> #include <set> using namespace std; // ??????x????????????y???????????? int...
a.cc: In function 'int main()': a.cc:48:60: error: expected ';' before '}' token 48 | meiro[j][i + 1][j][i] = meiro[j][i][j][i+1] | ^ | ; 49 | } | ...
s158494987
p00747
C++
#include<stdio.h> #include<iostream> #include<math.h> #include<algorithm> #include<string> #define pi 3.14159 #define Inf 9999 using namespace std; int w, h, a[59][59]; void dfs(int y, int x, int step); int main(){ while(1) { cin >> w >> h; if(w == 0 && h == 0) break; for(int i = 0; i < 2*h-1; i++) { for(i...
a.cc: In function 'void dfs(int, int, int)': a.cc:53:2: error: expected '}' at end of input 53 | } | ^ a.cc:34:34: note: to match this '{' 34 | void dfs(int y, int x, int step) { | ^
s615288208
p00747
C++
#include<stdio.h> #include<iostream> #include<math.h> #include<algorithm> #include<string> #include<utility> #include<queue> #define pi 3.14159 #define Inf 99999 using namespace std; typedef std::pair<int, int> mypair; int w, h, a[59][59]; queue<mypair> qu; void bfs(int y, int x, int step); int main(){ while(1) { ...
a.cc:36:9: error: expected unqualified-id before 'return' 36 | return 0; | ^~~~~~ a.cc:37:1: error: expected declaration before '}' token 37 | } | ^
s103828240
p00747
C++
#include <iostream> #include <algorithm> #include <stdlib.h> #include <string> #include <queue> #include <map> #include <stack> using namespace std; int dx[8]={1,-1,0,0,1,1,-1,-1}; int dy[8]={0,0,1,-1,-1,1,-1,1}; int main() { int tate,yoko; while(cin>>yoko>>tate && yoko){ int t[35][35]={0},y[35][35]={0}; for(in...
a.cc: In function 'int main()': a.cc:59:2: error: expected '}' at end of input 59 | } | ^ a.cc:16:12: note: to match this '{' 16 | int main() { | ^
s777667694
p00747
C++
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.PriorityQueue; public class Main{ static int array[][]; static int gi=0,gj=0; static int h,w; static int wall_yoko[][]; static int wall_tate[][]; public static void main(String[] args)throws Exception{ BufferedReader b...
a.cc:2:1: error: 'import' does not name a type 2 | import java.io.BufferedReader; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import java.io.InputStreamReader; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available wit...
s437467669
p00747
C++
import java.util.Scanner; import java.util.Queue; import java.util.ArrayDeque; class Maze { private static int n = 0; private int id; private int from_id; public Maze from; private int width; private int height; // TODO public int px; public int py; private int length; private Cell[][] cells; ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.util.Queue; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts...
s920335301
p00747
C++
import java.util.Scanner; import java.util.Queue; import java.util.ArrayDeque; class Maze { private int width; private int height; private int px; private int py; private int length; private Cell[][] cells; private boolean[][] is_passed_through; static Cell[][] getInitialCells(int width, int height) ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.util.Queue; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts...
s401114040
p00747
C++
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <sstream> #include <string> #include <unordered_map> #include <vector> #define FOR(i,k,n) for (int (i)=(k); (i)<(n); ++(i)) #define rep(i,n) FOR(i,0,n) #define pb p...
a.cc: In function 'int main()': a.cc:54:21: error: 'INT_MAX' was not declared in this scope 54 | vvi md(h, vi(w, INT_MAX)); // min_distance, INT_MAX: not reached | ^~~~~~~ a.cc:13:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>...
s204690244
p00747
C++
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <deque> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <sstream> #include <string> #include <unordered_map> #include <vector> #define FOR(i,k,n) for (int (i)=(k); (i)<(n); ++(i)) #define rep(i,n) FOR(i...
a.cc: In function 'int main()': a.cc:55:21: error: 'INT_MAX' was not declared in this scope 55 | vvi md(h, vi(w, INT_MAX)); // min_distance, INT_MAX: not reached | ^~~~~~~ a.cc:14:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>...
s059825763
p00747
C++
2 3 1 0 1 0 1 0 1 9 4 1 0 1 0 0 0 0 0 0 1 1 0 1 1 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 0 0 1 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 12 5 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 1 1 0 1 1 0 1 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 ...
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 2 3 | ^
s102518159
p00747
C++
#include<iostream> #include <stdio.h> #include <stdlib.h> #include<math.h> #include<vector> #include<map> #include<algorithm> using namespace std; #define MAX 30 #define INF 1000 int wn,hn; int d[MAX][MAX]; bool w[MAX][MAX]; //w,h ?¨??£? bool h[MAX][MAX]; //????£? vector< pair<int, int> > nextlist; //x,y void reset(...
a.cc: In function 'void maze(std::pair<int, int>)': a.cc:38:64: error: cannot call constructor 'std::pair<int, int>::pair' directly [-fpermissive] 38 | nextlist.push_back(pair<int, int>::pair(pos.first, pos.second - 1)); | ~~~~~~~~~~~~~~~~~~~~^...
s188709078
p00747
C++
#include<iostream> #include <stdio.h> #include <stdlib.h> #include<math.h> #include<vector> #include<map> #include<utility> #include<algorithm> using namespace std; #define MAX 30 #define INF 1000 int wn,hn; int d[MAX][MAX]; bool w[MAX][MAX]; //w,h ?¨??£? bool h[MAX][MAX]; //????£? vector< pair<int, int> > nextlist; /...
a.cc: In function 'void maze(std::pair<int, int>)': a.cc:39:64: error: cannot call constructor 'std::pair<int, int>::pair' directly [-fpermissive] 39 | nextlist.push_back(pair<int, int>::pair(pos.first, pos.second - 1)); | ~~~~~~~~~~~~~~~~~~~~^...
s394909335
p00747
C++
#define MYDEBUG #include <iostream> #include <fstream> #include <vector> #include <cstring> #include <string> #include <algorithm> #include <math.h> #include <queue> #include <set> #include <stack> ??? #ifdef MYDEBUG #define debug(x) cout<<#x<<": "<<x<<endl #else #define debug(x) #endif #define ll long long #define ul...
a.cc:12:1: error: expected unqualified-id before '?' token 12 | ??? | ^ a.cc:23:1: error: expected unqualified-id before '?' token 23 | ??? | ^ a.cc:36:1: error: expected unqualified-id before '?' token 36 | ??? | ^ a.cc:44:1: error: expected unqualified-id before '?' token 44 | ??? ...
s466974339
p00747
C++
#include<iostream> #include<queue> using namespace std; int main(){ int w,h; int map[30][30]; //?£???????,???,???,??????????????????????????????1,2,4,8???????????? while(cin >> w >> h && w>0 && h>0){ for(int i=0;i<h;i++) for(int j=0;j<w;j++) map[i][j]=0; for(int i=0;i<h;i++){ for(in...
a.cc: In function 'int main()': a.cc:45:23: error: conversion from 'int' to non-scalar type 'std::queue<int>' requested 45 | queue<int> cur=0*w+0; | ~~~^~
s999125732
p00747
C++
#include <iostream> #include <queue> using namespace std; #define all(x) x.begin(), x.end() const int dx[] = { 1, 0, -1, 0 }; const int dy[] = { 0, 1, 0, -1 }; struct state { int y, x, step; }; int main() { int w, h; while (cin >> w >> h && w) { int can[33][33][4]; b...
a.cc: In function 'int main()': a.cc:25:17: error: 'memset' was not declared in this scope 25 | memset(used, 0, sizeof used); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <queue> ++...
s626657186
p00747
C++
#include <iostream> #include <queue> using namespace std; #define all(x) x.begin(), x.end() const int dx[] = { 1, 0, -1, 0 }; const int dy[] = { 0, 1, 0, -1 }; struct state { int y, x, step; }; int main() { int w, h; while (cin >> w >> h && w) { int can[33][33][4]; b...
a.cc: In function 'int main()': a.cc:25:17: error: 'memset' was not declared in this scope 25 | memset(used, 0, sizeof(used)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <queue> +...
s716049685
p00747
C++
#include <iostream> #include <queue> using namespace std; char dx[] = {1, 0, -1, 0}; char dy[] = {0, 1, 0, -1}; int main(){ int w, h; string s[59]; int step[30][30]; while(cin >> w >> h, w){ getline(cin, s[0]); for(int i=0;i<2*h-1;i++) getline(cin, s[i]); for(int i=0;i<2*h-1;i...
a.cc: In function 'int main()': a.cc:17:9: error: 'memset' was not declared in this scope 17 | memset(step, -1, sizeof(step)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <queue> +++ |+#include <c...
s894034160
p00747
C++
#include<iostream> #include<vector> #include<queue> using namespace std; int memo[1024][1024]; int main() { for(;;) { int R, C; cin >> C >> R >> ws; if( C == 0 && R == 0 ) break; C = C * 2 - 1; R = R * 2 - 1; vector<string> vs; for(int i = 0; i < R; i++) { string line; getline(cin, line); ...
a.cc: In function 'int main()': a.cc:23:3: error: 'memset' was not declared in this scope 23 | memset(memo, -1, sizeof(memo)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<queue> +++ |+#include <cstring> 4...
s447174758
p00747
C++
// ACM-ICPC‘“à—\‘I2010 B. –À}‚Æ–½‚¸ #include <iostream> #include <queue> using namespace std; char dx[] = {1, 0, -1, 0}; char dy[] = {0, 1, 0, -1}; int main(){ int w, h; string s[59]; int step[30][30]; while(cin >> w >> h, w){ getline(cin, s[0]); for(int i=0;i<2*h-1;i++) getline(cin, s[i]); for(int i=0;...
a.cc: In function 'int main()': a.cc:19:17: error: 'memset' was not declared in this scope 19 | memset(step, -1, sizeof(step)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <queue> ...
s825356838
p00747
C++
#include <iostream> #include <queue> #include <algorithm> using namespace std; typedef pair<int, int> P; int dx[] = {1, 0, -1, 0}; int dy[] = {0, 1, 0, -1}; bool g[40][40][40][40]; int memo[40][40]; int main(){ int w, h; int can; while(cin >> w >> h && (w || h)){ memset(g, false, sizeof(g)); for(in...
a.cc: In function 'int main()': a.cc:17:5: error: 'memset' was not declared in this scope 17 | memset(g, false, sizeof(g)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <algorithm> +++ |+#include <cstring>...
s887490490
p00747
C++
#include<iostream> using namespace std; int a[40][40]; int b[40][40]; int m[40][40]; int w,h; int f(int x,int y,int d){ if(m[x][y]<=d)return 0; m[x][y]=d; x>0&&!a[x-1][y]&&f(x-1,y,d+1); x<w-1&&!a[x][y]&&f(x+1,y,d+1); y>0&&!b[x][y-1]&&f(x,y-1,d+1); y<h-1&&!b[x][y]&&f(x,y+1,d+1); return 0; } int main(){ for(;ci...
a.cc: In function 'int main()': a.cc:21:33: error: 'INT_MAX' was not declared in this scope 21 | m[i][j]=INT_MAX/3; | ^~~~~~~ a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 1 | #incl...
s178401041
p00747
C++
#include<iostream> using namespace std; int a[40][40]; int b[40][40]; int m[40][40]; int w,h; int f(int x,int y,int d){ if(m[x][y]<=d)return 0; m[x][y]=d; x>0&&!a[x-1][y]&&f(x-1,y,d+1); x<w-1&&!a[x][y]&&f(x+1,y,d+1); y>0&&!b[x][y-1]&&f(x,y-1,d+1); y<h-1&&!b[x][y]&&f(x,y+1,d+1); return 0; } int main(){ for(;ci...
a.cc: In function 'int main()': a.cc:21:33: error: 'INT_MAX' was not declared in this scope 21 | m[i][j]=INT_MAX/3; | ^~~~~~~ a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 1 | #incl...
s197450550
p00747
C++
#include <iostream> #include <vector> #include <iterator> #include <string> #include <sstream> using namespace std; string GetStr() { string str; getline(cin,str); return str; } vector<int> GetIntVector() { string str; getline(cin,str); istringstream line( str ); istream_iterator<int> iit(line); istream_it...
a.cc: In static member function 'static _Size _Size::GetSize()': a.cc:45:17: error: 'Size' was not declared in this scope; did you mean '_Size'? 45 | Size s; | ^~~~ | _Size a.cc:47:17: error: 's' was not declared in this scope 47 | s.w = ...
s384258384
p00747
C++
#include <iostream> #include <vector> #include <iterator> #include <string> #include <sstream> #include <limits.h> using namespace std; string GetStr() { string str; getline(cin,str); return str; } vector<int> GetIntVector() { string str; getline(cin,str); istringstream line( str ); istream_iterator<int> ii...
a.cc: In static member function 'static _Size _Size::GetSize()': a.cc:46:17: error: 'Size' was not declared in this scope; did you mean '_Size'? 46 | Size s; | ^~~~ | _Size a.cc:48:17: error: 's' was not declared in this scope 48 | s.w = ...
s705726969
p00747
C++
#include <iostream> #include <string> #include <queue> using namespace std; typedef struct{ int x; int y; int dis; } Point; int main(){ int w, h, i, j; int across[100][100], updown[100][100], visited[100][100]; queue<Point> que; Point start = {0, 0, 0}; Point now, next; while(1){ cin >> w >> h; if(w =...
a.cc: In function 'int main()': a.cc:25:71: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int [100]') 25 | if(i % 2 != 0) for(j = 0; j < w - 1; j++) cin >> across[i]; | ...
s812613110
p00747
C++
#include <stdio.h> #include <queue> #include <utility> int main(void){ int h, w, i, j; int gx, gy, nx, ny; const int dx[4] = {1,0,-1,0}, dy[4] = {0,1,0,-1}, INF = 0x7FFFFFFF; char maze[59][60]; int sl[59][59]; pair<int,int> p; queue<pair<int,int>> que; scanf("%d%d%*c",&w,&h); while(h != 0 || w != 0){ f...
a.cc: In function 'int main()': a.cc:13:9: error: 'pair' was not declared in this scope; did you mean 'std::pair'? 13 | pair<int,int> p; | ^~~~ | std::pair In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/deque:62, ...
s923077334
p00747
C++
#include <iostream> #include <algorithm> #include <queue> #include <map> #define L 2 #define U 3 #define R 0 #define D 1 using namespace std; const int dx[4] = {-1,0,1,0}; const int dy[4] = {0,-1,0,1}; int cost[30][30]; bool wall[4][30][30]; bool visited[30][30]; int w, h; int bfs(int sx, int sy, int gx, i...
a.cc: In function 'int bfs(int, int, int, int)': a.cc:37:9: error: expected ',' or ';' before 'int' 37 | int ny = st.second + dy[i]; | ^~~ a.cc:38:34: error: 'ny' was not declared in this scope; did you mean 'nx'? 38 | if(0<= nx && nx < w && 0<= ny && ny < h) { | ...
s674323544
p00747
C++
#include<iostream> using namesapce std; int main(){ cout << "Hello World" << endl; }
a.cc:2:7: error: expected nested-name-specifier before 'namesapce' 2 | using namesapce std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:5:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 5 | cout << "Hello World" << endl; | ^~~~ | std::cout In file included...
s433385930
p00747
C++
null
a.cc:1:1: error: 'null' does not name a type 1 | null | ^~~~
s413488249
p00747
C++
// Header {{{ // includes {{{ #include <algorithm> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <iterator> #include <limits> #include <list> #include <map> #include <numer...
a.cc: In function 'int main(int, char**)': a.cc:244:2: error: expected '}' at end of input 244 | } | ^ a.cc:149:39: note: to match this '{' 149 | while (cin >> w >> h, w || h) { | ^ a.cc:244:2: error: expected '}' at end of input 244 | } | ^ a.cc:1...
s395666222
p00748
Java
import java.util.ArrayList; import java.util.Arrays; import java.util.Scanner; public class AOJ_1167 { MyScanner sc = new MyScanner(); Scanner sc2 = new Scanner(System.in); final int MOD = 1000000007; int[] dx = { 1, 0, 0, -1 }; int[] dy = { 0, 1, -1, 0 }; void run() { ArrayList<Integer> list = new ArrayList...
Main.java:5: error: class AOJ_1167 is public, should be declared in a file named AOJ_1167.java public class AOJ_1167 { ^ 1 error
s204602894
p00748
Java
import java.util.ArrayList; import java.util.Scanner; public class Main2010C { public static void main(String[] args){ Scanner in = new Scanner(System.in); int[] pol = new int[1000000]; ArrayList<Integer> p1 = new ArrayList<>(); int[] pol_odd = new int[1000000]; ArrayList<Integer> p1_odd = new ArrayList<>()...
Main.java:4: error: class Main2010C is public, should be declared in a file named Main2010C.java public class Main2010C { ^ 1 error
s281058936
p00748
Java
import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.BitSet; import java.util.InputMismatchException; import java.util.NoSuchElementException; public class Main { static PrintWriter out; static InputReader ir; static final int INF=Integer.MAX...
Main.java:38: error: cannot find symbol out.println(count(n,tet)+" "+count_odd(i,tet)); ^ symbol: variable i location: class Main 1 error
s793429183
p00748
Java
#include <stdio.h> #include <stdlib.h> #define num 100000 #define true 1 #define false 0 void pollock(); int min(int f1,int f2); int *dp_ki; int *dp; int N; int main(){ dp_ki = (int *)malloc(num * sizeof(int)); dp = (int *)malloc(num * sizeof(int)); for(int i=0;i<num;i++){ dp[i]=i; dp_ki[i]=i; } pol...
Main.java:1: error: illegal character: '#' #include <stdio.h> ^ Main.java:1: error: class, interface, enum, or record expected #include <stdio.h> ^ Main.java:2: error: illegal character: '#' #include <stdlib.h> ^ Main.java:3: error: illegal character: '#' #define num 100000 ^ Main.java:4: error: illegal charac...
s156804923
p00748
Java
import java.util.Arrays; import java.util.Scanner; public class Main3 { static int N,min,cnt; static int[] a =new int[180]; static int[] b =new int[45]; static int[] alreadyA; static int[] alreadyB; static{ int cnt=0; for(int i = 1;tetrahedral(i)<=1000000;i++){ int t = tetrahedral(i); a[cnt++]=t; } ...
Main.java:4: error: class Main3 is public, should be declared in a file named Main3.java public class Main3 { ^ 1 error
s760905770
p00748
Java
import java.util.Arrays; import java.util.Scanner; public class PollockConjecture { Scanner in = new Scanner(System.in); int n; int[] pollock = new int[180]; int[] cnt = new int[1000001]; int[] cnt2 = new int[1000001]; void initPollock() { for (int i = 1; i <= pollock.length; i++) { pollock[i-1] = (i * (i...
Main.java:4: error: class PollockConjecture is public, should be declared in a file named PollockConjecture.java public class PollockConjecture { ^ 1 error
s233693145
p00748
C
#include<stdio.h> int min(int b,int c) { int M; if(b!=0 && c!=0) { M=b; if(M>c) M=c; } else { if(b==0) { return c; } else { return b; } } return M; } int main(void) { int i,j,k,l,z,n,a[1000],e[1000],dp[1000][1000001],dp2[1000][1000001]; while(1) { scanf("%d",&n); if(n==0) brea...
main.c: In function 'main': main.c:42:33: error: 'b' undeclared (first use in this function) 42 | b[j]=a[i]; | ^ main.c:42:33: note: each undeclared identifier is reported only once for each function it appears in
s081464541
p00748
C
#include <stdio.h> #define min(a,b) a<b?a:b int main(){ int n; int i; int c; int a[1000001]; int b[1000001]; for(i = 0;i < 1000001;i++){ a[i] = i; b[i] = i; } for(i = 3,c = 4;i < 1000001;i++){ for(j = a;j < 1000001;j++){ a[i] = min(a[i],a[i-c]+1); } if(a % 2){ for(j = a;j < 1000001;j++){ ...
main.c: In function 'main': main.c:17:21: error: 'j' undeclared (first use in this function) 17 | for(j = a;j < 1000001;j++){ | ^ main.c:17:21: note: each undeclared identifier is reported only once for each function it appears in main.c:20:22: error: invalid operands to bin...
s378831201
p00748
C
#include <stdio.h> #define min(a,b) a<b?a:b int main(){ int n; int i,j; int c; int a[1000001]; int b[1000001]; for(i = 0;i < 1000001;i++){ a[i] = i; b[i] = i; } for(i = 3,c = 4;i < 1000001;i++){ for(j = a;j < 1000001;j++){ a[i] = min(a[i],a[i-c]+1); } if(a % 2){ for(j = a;j < 1000001;j++){ ...
main.c: In function 'main': main.c:17:23: error: assignment to 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion] 17 | for(j = a;j < 1000001;j++){ | ^ main.c:20:22: error: invalid operands to binary % (have 'int *' and 'int') 20 | ...
s794096287
p00748
C
#include <stdio.h> #include <string.h> const int PMAX = 180; const int OMAX = 45; const int MAX = 1000000; int tp[MAX]; int to[MAX]; int main(void) { int i, j, n; int p[PMAX], o[OMAX]; for (i = j = 1; (n = i * (i + 1) * (i + 2) / 6) < MAX; ++i) { p[i] = n; if (n % 2 == 1) o[j...
main.c:8:5: error: variably modified 'tp' at file scope 8 | int tp[MAX]; | ^~ main.c:9:5: error: variably modified 'to' at file scope 9 | int to[MAX]; | ^~
s630237470
p00748
C++
// // main.cpp // AOJ1167 // // Created by aki33524 on 2014/07/09. // Copyright (c) 2014年 aki33524. All rights reserved. // #include <iostream> #include <vector> using namespace std; const int MAX_N = 1000000; const int MAX_T = 200; vector<int> tetras; vector<int> oddtetras; int dp1[MAX_T + 1][MAX_N]; int dp2[MA...
a.cc: In function 'void init()': a.cc:22:5: error: 'memset' was not declared in this scope 22 | memset(dp1, 0x3f, sizeof(dp1)); | ^~~~~~ a.cc:11:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 10 | #include <vector> +++ |+#include <cstrin...
s840430329
p00748
C++
aaaa
a.cc:1:1: error: 'aaaa' does not name a type 1 | aaaa | ^~~~
s876021431
p00748
C++
using namespace std; int main(){ int n,cpn,data[N],i,cnt,minv,cal,l; for(i=1;i<=N;i++) data[i]=(i*(i+1)*(i+2))/6; while(1){ cin >> n; if(n==0) break; cnt=n; cpn=n; minv=INFINITY; l=0; while(cnt){ n=cpn; cal=0; for(i=n-l;i>=1;i--){ cal+=n/data[i]; n%=data[i]; }...
a.cc: In function 'int main()': a.cc:3:18: error: 'N' was not declared in this scope 3 | int n,cpn,data[N],i,cnt,minv,cal,l; | ^ a.cc:4:21: error: 'data' was not declared in this scope 4 | for(i=1;i<=N;i++) data[i]=(i*(i+1)*(i+2))/6; | ^~~~ a.cc:6:5: error: '...
s316322984
p00748
C++
#include <iostream> #include <algorithm> #include <vector> #define N 105000 #define INFINITY 2000000000 using namespace std; int dp[N][N],data[N]; vector<int> data2; int DP(int); int DP2(int); int main(){ int i,out,out2,n; data2.push_back(0); for(i=1;i<N;i++){ data[i]=i*(i+1)*(i+2)/6; if(data[i]%2==1){ ...
a.cc: In function 'int main()': a.cc:15:5: error: reference to 'data' is ambiguous 15 | data[i]=i*(i+1)*(i+2)/6; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, ...
s357662942
p00748
C++
#include <cstdio> #include <iostream> #include <cmath> #include <ctype.h> #include <string> #include <sstream> #include <iostream> #include <algorithm> #include <cstdlib> #include <map> #include <queue> #include <utility> #include <vector> #include <set> #include <iomanip> #include <stack> using namespace std; #de...
a.cc: In function 'int main()': a.cc:49:41: error: expected ';' before 'odd_result' 49 | cout << result[n] << " " odd_result[n] << endl; | ^~~~~~~~~~~ | ;
s162878880
p00748
C++
#include<cstdio> #include<cstring> #include<cstdlib> #include<algorithm> using namespace std; int n; int dp[5000001]; int dp2[5000001]; int func(int v){ if(dp[v]!=INF)return dp[v]; if(v==0)return 0; int cnt=INF; int j=1; while(j*(j+1)*(j+2)/6<=v)j++; j--; for(int i=j;i>=1;i--){ cnt=min(cnt,func(v-i*(i+1)*(i+2...
a.cc: In function 'int func(int)': a.cc:11:19: error: 'INF' was not declared in this scope 11 | if(dp[v]!=INF)return dp[v]; | ^~~ a.cc:13:17: error: 'INF' was not declared in this scope 13 | int cnt=INF; | ^~~ a.cc: In function 'int func2(int)': a.cc:2...
s398771556
p00748
C++
#include<stdio.h> #include<stdlib.h> #include<iostream> #include<string> #include<string.h> #include<vector> #include<math.h> #include<queue> #include <algorithm> #include<functional> #include<cstdlib> #include<cmath> #define REP(i, n) for(int i = 0;i < n;i++) #define REPR(i, n) for(int i = n;i >= 0;i--) #define FOR(...
/tmp/cc4wm5GL.o: in function `input()': a.cc:(.text+0x7): relocation truncated to fit: R_X86_64_PC32 against symbol `N' defined in .bss section in /tmp/cc4wm5GL.o /tmp/cc4wm5GL.o: in function `main': a.cc:(.text+0x6d): relocation truncated to fit: R_X86_64_PC32 against symbol `C' defined in .bss section in /tmp/cc4wm5G...
s051566700
p00748
C++
#include<stdio.h> #include<stdlib.h> #include<iostream> #include<string> #include<string.h> #include<vector> #include<math.h> #include<queue> #include <algorithm> #include<functional> #include<cstdlib> #include<cmath> #define REP(i, n) for(int i = 0;i < n;i++) #define REPR(i, n) for(int i = n;i >= 0;i--) #define FOR(...
/tmp/ccPU8gNq.o: in function `input()': a.cc:(.text+0x7): relocation truncated to fit: R_X86_64_PC32 against symbol `N' defined in .bss section in /tmp/ccPU8gNq.o /tmp/ccPU8gNq.o: in function `main': a.cc:(.text+0x6d): relocation truncated to fit: R_X86_64_PC32 against symbol `C' defined in .bss section in /tmp/ccPU8gN...
s948899606
p00748
C++
#include<stdio.h> #include<stdlib.h> #include<iostream> #include<string> #include<string.h> #include<vector> #include<math.h> #include<queue> #include <algorithm> #include<functional> #include<cstdlib> #include<cmath> #define REP(i, n) for(int i = 0;i < n;i++) #define REPR(i, n) for(int i = n;i >= 0;i--) #define FOR(...
/tmp/cc5zTlo5.o: in function `input()': a.cc:(.text+0x7): relocation truncated to fit: R_X86_64_PC32 against symbol `N' defined in .bss section in /tmp/cc5zTlo5.o /tmp/cc5zTlo5.o: in function `main': a.cc:(.text+0x70): relocation truncated to fit: R_X86_64_PC32 against symbol `C' defined in .bss section in /tmp/cc5zTlo...
s146917776
p00748
C++
#include<stdio.h> #include<stdlib.h> #include<iostream> #include<string> #include<string.h> #include<vector> #include<math.h> #include<queue> #include <algorithm> #include<functional> #include<cstdlib> #include<cmath> #define REP(i, n) for(int i = 0;i < n;i++) #define REPR(i, n) for(int i = n;i >= 0;i--) #define FOR(...
/tmp/ccAQU5fy.o: in function `input()': a.cc:(.text+0x7): relocation truncated to fit: R_X86_64_PC32 against symbol `N' defined in .bss section in /tmp/ccAQU5fy.o /tmp/ccAQU5fy.o: in function `main': a.cc:(.text+0x70): relocation truncated to fit: R_X86_64_PC32 against symbol `C' defined in .bss section in /tmp/ccAQU5f...
s222561342
p00748
C++
#include<stdio.h> #include<stdlib.h> #include<iostream> #include<string> #include<string.h> #include<vector> #include<math.h> #include<queue> #include <algorithm> #include<functional> #include<cstdlib> #include<cmath> #define REP(i, n) for(int i = 0;i < n;i++) #define REPR(i, n) for(int i = n;i >= 0;i--) #define FOR(...
/tmp/ccAUnJQq.o: in function `input()': a.cc:(.text+0x7): relocation truncated to fit: R_X86_64_PC32 against symbol `N' defined in .bss section in /tmp/ccAUnJQq.o /tmp/ccAUnJQq.o: in function `main': a.cc:(.text+0x70): relocation truncated to fit: R_X86_64_PC32 against symbol `C' defined in .bss section in /tmp/ccAUnJQ...