submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s765002465
p00481
C++
#include<cstdio> #include<cstring> #include<queue> #include<vector> #include<algorithm> #include<cmath> using namespace std; int n,m,l,cnt,mx,my; char a[1019][1019]; int vis[1019][1019]; pair<int,int> p[10],st; int mov[4][2] = {1,0,0,-1,-1,0,0,1}; struct status { int x,y; int ord; int fx; status(int a,...
a.cc:28:6: error: no matching function for call to 'status::status()' 28 | }tt[4]; | ^ a.cc:19:5: note: candidate: 'status::status(int, int, int, int)' 19 | status(int a,int b,int c,int s) | ^~~~~~ a.cc:19:5: note: candidate expects 4 arguments, 0 provided a.cc:14:8: note: candidate: 'c...
s185373450
p00481
C++
#include<iostream> #include<cstdio> #include<string> #include<map> #include<algorithm> using namespace std; typedef pair<int,int> P; int bfs(); int INF=1000000000; int h,w,n; int dx[4] = {1,0,-1,0}; int dy[4] = {0,1,0,-1}; int sx,sy; int good[1111][1111]; int ans=0; char life="0"; char map[1111][1111]; int main(){ ...
a.cc:17:11: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 17 | char life="0"; | ^~~ | | | const char* a.cc: In function 'int main()': a.cc:24:14: error: reference to 'map' is ambiguous 24 | cin >> map[i][j]; | ^~~ In ...
s152261278
p00481
C++
for( k = 0 ; k < h ; k++ ){ for( l = 0 ; l < w ; l++){ if(s[k][l] == 'S'){ x[0] = l; y[0] = k; } if('1' <= s[k][l] && s[k][l] <= '9'){ v = s[k][l]-'1'+1; x[v] = l; y[v] = k; } } } for (k = 1 ; k <= n ; k++){ result += bfs(x[k-1],y[k-1],x[k],y[k]); } printf("%d\n", re...
a.cc:1:3: error: expected unqualified-id before 'for' 1 | for( k = 0 ; k < h ; k++ ){ | ^~~ a.cc:1:16: error: 'k' does not name a type 1 | for( k = 0 ; k < h ; k++ ){ | ^ a.cc:1:24: error: 'k' does not name a type 1 | for( k = 0 ; k < h ; k++ ){ | ...
s286187852
p00481
C++
#include <stdio.h> #include <queue> using namespace std; int d[1000][1000], sx, sy; char s[1000][1000]; int h,w,n; int k, l; int bfs(int,int,int,int); int main(){ int result = 0; int x[10], y[10], v; scanf("%d %d %d", &h, &w, &n); for(k = 0 ; k < h ; k++){ scanf("%s",s[k]);javascript:void(0) } for...
a.cc: In function 'int main()': a.cc:16:42: error: expected ';' before '}' token 16 | scanf("%s",s[k]);javascript:void(0) | ^ | ; 17 | } | ~
s950070907
p00481
C++
#include <iostream> #include <cstdio> #include <queue> using namespace std; int sx,sy; typedef struct place { int x; int y; }P; char map[1005][1005]; int d[1005][1005]; int dd[4][2]={{1,0},{0,1},{-1,0},{0,-1}}; int ans; int h,w,n; int tempx,tempy; void bfs(int i,int j,int n) { queue<P> q; P p1={i,j}; q.push(p...
a.cc: In function 'int main()': a.cc:75:25: error: 'memset' was not declared in this scope 75 | memset(d,-1,sizeof(d)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <q...
s847398694
p00481
C++
#include <iostream> #include <cstdio> #include <queue> #include <cstring> using namespace std; const int maxn = 1010; typedef struct Point { int x, y, t, n; Point(int _x, int _y, int _t) { x = _x, y =_y, t = _t; } }; char a[maxn][maxn]; bool vis[maxn][maxn]; int W, H, N; int dx[4] = {1, 0, -1,...
a.cc:8:1: warning: 'typedef' was ignored in this declaration 8 | typedef struct Point | ^~~~~~~ a.cc: In function 'int main()': a.cc:61:32: error: expected ';' before 'int' 61 | scanf("%d%d%d", &H, &W, &N) | ^ | ; 62 | 63 ...
s469698110
p00481
C++
#include <iostream> #include <queue> #include <algorithm> #define N 1005 #define INFINITY 2000000000 using namespace std; void bfs(); int h,w,n,num[N][N],d[N*N],M[N*N][N*N],u,m; string color[N*N],in[N*N]; int main(){ int i,j,k; cin >> h >> w >> n; for(i=0;i<h+2;i++) for(j=0;j<w+2;j++) num[i][j]=-1; fo...
/tmp/ccgxHeUm.o: in function `main': a.cc:(.text+0xc7): relocation truncated to fit: R_X86_64_PC32 against symbol `in[abi:cxx11]' defined in .bss section in /tmp/ccgxHeUm.o a.cc:(.text+0xef): relocation truncated to fit: R_X86_64_PC32 against symbol `in[abi:cxx11]' defined in .bss section in /tmp/ccgxHeUm.o a.cc:(.text...
s150248232
p00481
C++
#include <iostream> #include <queue> #include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> using namespace std; int main() { queue < pair<int, int> > q; pair<int, int> p; char **m; char c[10] = { "123456789" }; int **f; bool flg = false; int n, k, i, i1, c1, i2,...
a.cc:113:5: error: 'cout' does not name a type 113 | cout << sum << endl; | ^~~~ a.cc:115:5: error: expected unqualified-id before 'return' 115 | return 0; | ^~~~~~ a.cc:116:1: error: expected declaration before '}' token 116 | } | ^
s947655493
p00481
C++
#include <iostream> #include <queue> #include <algorithm> using namespace std; int m,n,t; int cnt; char c; char map[1010][1010]; bool vis[1010][1010]; struct node { int x,y; int step; }start; int way[4][2] = {{-1,0},{0,1},{1,0},{0,-1}}; void bfs() { queue <node> abc; abc.push(start); while(!abc.empty()) { node ...
a.cc: In function 'void bfs()': a.cc:28:25: error: 'memset' was not declared in this scope 28 | memset(vis,0,sizeof(vis)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include...
s658290635
p00481
C++
#include <memory> #include <cstring> #include <string> #include <memory.h> using namespace std; int m,n,t; int cnt; char c; char map[1010][1010]; bool vis[1010][1010]; struct node { int x,y; int step; }start; int way[4][2] = {{-1,0},{0,1},{1,0},{0,-1}}; void bfs() { queue <node> abc; abc.push(start); while(!abc.em...
a.cc: In function 'void bfs()': a.cc:19:9: error: 'queue' was not declared in this scope 19 | queue <node> abc; | ^~~~~ a.cc:5:1: note: 'std::queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>' 4 | #include <memory.h> +++ |+#include <queue> 5 |...
s421948462
p00481
C++
#include <cstdio> #include <iostream> #include <queue> #include <map> #include <string> using namespace std; typedef struct P{ int x; int y; }; int h,w; const int INF = 100000000; char feld[101][101]; P ch[11]; int d[101][101]; int dx[4]={1,0,-1,0}; int dy[4]={0,1,0,-1}; int sx,sy; int gx,gy; int n; int a...
a.cc:9:1: warning: 'typedef' was ignored in this declaration 9 | typedef struct P{ | ^~~~~~~ a.cc: In function 'int bfs()': a.cc:66:1: error: expected primary-expression before '}' token 66 | } | ^ a.cc:65:15: error: expected ';' before '}' token 65 | return | ^ |...
s457738157
p00481
C++
#include<iostream> #include<cstdio> #include<queue> #define REP(i,n) for(int i=0;i<(n);i++) #define FOR(i,a,b) for(int i=(a);i<(b);i++) using namespace std; struct P{ int x; int y; }; int w,h,n; const int INF = 1e+8; char feld[1010][1010]; int d[1010][1010]; int sx,sy,gx,gy; int dx[4]={0,0,1,-1}; int dy[4]=...
a.cc:46:32: error: macro "REP" requires 2 arguments, but only 1 given 46 | REP(int i=0;i<4;i++){ | ^ a.cc:4:9: note: macro "REP" defined here 4 | #define REP(i,n) for(int i=0;i<(n);i++) | ^~~ a.cc:65:24: error: macro "REP" requires 2 arguments, but o...
s923412277
p00481
C++
#include<iostream> #include<queue> #include<cstring> using namespace std; int m,n; int maxe=0; int che=0; int k; struct node{ int x,y; }; char mape[1111][1111]; int d[1111][1111]; queue<node> q; int da[]={0,0,1,-1}; int db[]={1,-1,0,0}; void bfs(){ while(!q.empty()&&che<k){ node nn; int x=q.front().x; i...
a.cc: In function 'void bfs()': a.cc:35:23: error: expected ';' before 'q' 35 | mape[w][e]='X' | ^ | ; 36 | q.push(nn); | ~
s692925014
p00481
C++
#include<iostream> #include<queue> #include<stdlib.h> #include<pair.h> using namespace std; int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0}; const int INF=-1; char plat[1005][1005]; int d[1005][1005]; typedef pair<int,int> p; int H,W,N; queue<p> cheese; int bfs(int& sx,int& sy,char energy) { d[sx][sy]=0; cheese.push(p(sx...
a.cc:4:9: fatal error: pair.h: No such file or directory 4 | #include<pair.h> | ^~~~~~~~ compilation terminated.
s498905363
p00481
C++
#include<iostream> #include<queue> #include<stdlib.h> #include<utility> using namespace std; int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0}; const int INF=-1; char plat[1005][1005]; int d[1005][1005]; typedef pair<int,int> p; int H,W,N; queue<p> cheese; int bfs(int& sx,int& sy,char energy) { d[sx][sy]=0; cheese.push(p(s...
a.cc: In function 'int main()': a.cc:53:9: error: 'memset' was not declared in this scope 53 | memset(d,-1,sizeof(d)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<utility> +++ |+#include <cstring>...
s764420514
p00481
C++
#include<iostream> #include<queue> #include<stdlib.h> #include<utility> #include<memory> using namespace std; int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0}; const int INF=-1; char plat[1005][1005]; int d[1005][1005]; typedef pair<int,int> p; int H,W,N; queue<p> cheese; int bfs(int& sx,int& sy,char energy) { d[sx][sy]=0; ...
a.cc: In function 'int main()': a.cc:54:9: error: 'memset' was not declared in this scope 54 | memset(d,-1,sizeof(d)); | ^~~~~~ a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include<memory> +++ |+#include <cstring> ...
s059567392
p00481
C++
#include<iostream> #include<queue> #include<stdlib.h> #include<utility> #include<memory> #include<string> using namespace std; int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0}; const int INF=-1; char plat[1005][1005]; int d[1005][1005]; typedef pair<int,int> p; int H,W,N; queue<p> cheese; int bfs(int& sx,int& sy,char energy) { ...
a.cc: In function 'int main()': a.cc:55:9: error: 'memset' was not declared in this scope 55 | memset(d,-1,sizeof(d)); | ^~~~~~ a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include<memory> +++ |+#include <cstring> ...
s719822502
p00481
C++
#include<iostream> #include<algorithm> #include<queue> using namespace std; int h, w, n; char map[1001][1001]; int vis[1001][1001]; const int v[2][4] = { {1,0,-1,0},{0,-1,0,1} }; queue<pair<int ,int>> Pos; queue <pair<int, pair< int, int > >> que;//?????°?????§?¨? int main() { cin >> h >> w >> n; for (int i =...
a.cc: In function 'int main()': a.cc:37:17: error: 'hPos' was not declared in this scope; did you mean 'Pos'? 37 | hPos.pop(); | ^~~~ | Pos
s281556232
p00481
C++
#include<stdio.h> #include<stdlib.h> #include<queue> #include<algorithm> #define INF 1000000 using namespace std; typedef pair<int,int> P; int dx[4]={-1,0,1,0}; int dy[4]={0,1,0,-1}; bool map[1000][1000]; int x[10],y[10]; int ans=0; int h,w,n; int search(int n){ int d[1000][1000]; std::fill(d,d+sizeof(d),INF);...
In file included from /usr/include/c++/14/deque:62, from /usr/include/c++/14/queue:62, from a.cc:3: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'typename __gnu_cxx::__enable_if<std::__is_scalar<_Tp>::__value, void>::__type std::__fill_a1(_ForwardIterator, _ForwardItera...
s365823777
p00481
C++
#include <cstdio> #include <queue> #define min(x,y) ((x)<(y)?(x):(y)) #define INFI 65535 using namespace std; typedef pair<int, int> P; int Strength = 1; int Maps[1010][1010]; int dist[1010][1010]; int H, W, N; int hor[] = {1,0,-1,0}; int ver[] = {0,-1,0,1}; int ans; void clear(); void show(); P bfs(int cheese,P n)...
a.cc: In function 'P bfs(int, P)': a.cc:62:43: error: 'isdigit' was not declared in this scope 62 | if (Maps[nx][ny]=='.' || (isdigit(Maps[nx][ny]) && cheese!=Maps[nx][ny]-'0')) { | ^~~~~~~
s614966602
p00481
C++
#include <iostream> #include <cmath> #include <queue> #include <cstdio> #include <cstring> #include <algorithm> #define INF 0x7f7f7f7f #define PI acos(-1.0) #define L(x) (x) << 1 #define R(x) (x) << 1 | 1 #define lowbit(x) (x)&(-x) #define Mid(l, r) (l + r) >> 1 #define Min(x, y) (x) < (y) ? (x) : (y) #de...
a.cc: In function 'void bfs(node)': a.cc:47:29: error: 'now' was not declared in this scope; did you mean 'pow'? 47 | next.step = now.step + 1; | ^~~ | pow
s573882712
p00481
C++
#include <cstdio> #include <iostream> using namespace std; int ans = 0; int gh=0, gw=0; const int max = INT_MAX / 2; char c[1000][1000]; int d[1000][1000]; int mh[4] = { 1,0,-1,0 }; int mw[4] = { 0,1,0,-1 }; char hijou[9] = { '1','2','3','4','5','6','7','8','9' }; int judge(int h, int w,int g) { if (c[h][w] ==hijou[g...
a.cc:6:17: error: 'INT_MAX' was not declared in this scope 6 | const int max = INT_MAX / 2; | ^~~~~~~ a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 2 | #include <iostream> +++ |+#include <climits> 3 | using namespa...
s686729634
p00481
C++
#include <cstdio> #include <iostream> using namespace std; int ans = 0; int gh=0, gw=0; const int max = 500000; char c[1000][1000]; int d[1000][1000]; int mh[4] = { 1,0,-1,0 }; int mw[4] = { 0,1,0,-1 }; char hijou[9] = { '1','2','3','4','5','6','7','8','9' }; int judge(int h, int w,int g) { if (c[h][w] ==hijou[g]) {...
a.cc: In function 'int judge(int, int, int)': a.cc:21:80: error: reference to 'max' is ambiguous 21 | if (nh >= 0 && nh < 1000 && nw>=0 && nh < 1000 && d[nh][nw] == max&&c[nh][nw] != 'X') { | ^~~ In file included fro...
s943998866
p00481
C++
#include <stdio.h> #include <queue> using namespace std; char map[1000][1000]; bool visited[1000][1000]; int W, H, N; int startR, startC; int targetR[10]; int targetC[10]; int dr[4] = {-1, 1, 0, 0}; int dc[4] = {0, 0, -1, 1}; int getMinTime() { int time = 0; int curR = startR; int curC = startC; for (int i...
a.cc: In function 'int getMinTime()': a.cc:22:5: error: 'memset' was not declared in this scope 22 | memset(visited, false, sizeof(visited)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <queue> +++ |+#inc...
s670537275
p00481
C++
#include <iostream> #include <vector> std::vector<std::pair<int, int>> next_list(const int &x, const int &y) { return { std::make_pair(x + 1, y), std::make_pair(x - 1, y), std::make_pair(x, y + 1), std::make_pair(x, y - 1) }; } template<typename T> class Queue { public: Queue(const int &n) :vector(n), f(0), b(0) {}; ...
a.cc: In function 'int main()': a.cc:84:39: error: cannot bind non-const lvalue reference of type 'std::vector<std::vector<int> >&' to an rvalue of type 'std::vector<std::vector<int> >' 84 | std::cout << wfs(vector, std::vector<std::vector<int>>(h + 2, std::vector<int>(w + 2, -1)), Queue<Route>(h * w * 4), s...
s953977135
p00481
C++
#include <iostream> #include <vector> std::vector<std::pair<int, int>> next_list(const int &x, const int &y) { return { std::make_pair(x + 1, y), std::make_pair(x - 1, y), std::make_pair(x, y + 1), std::make_pair(x, y - 1) }; } template<typename T> class Queue { public: Queue(const int &n) :vector(n), f(0), b(0) {}; ...
a.cc: In function 'int main()': a.cc:85:40: error: cannot bind non-const lvalue reference of type 'Queue<Route>&' to an rvalue of type 'Queue<Route>' 85 | std::cout << wfs(vector, memo, Queue<Route>(h * w * 4), start, n); | ^~~~~~~~~~~~~~~~~~~~~~~ a.cc:38:105: not...
s786246493
p00481
C++
#include<cstdio> #include<algorithm> #include<queue> #include <iostream> #define inf 1000000 using namespace std; int H,W,N,x0,y0; char map[1005][1005];int d[1005][1005]; int dx[4]={-1,0,1,0}; int dy[4]={0,-1,0,1};int d[1005][1005]; typedef pair<int,int>P; struct position { int rx,ry,e; }xy[9]; bool comp(const positio...
a.cc:7:14: warning: built-in function 'y0' declared as non-function [-Wbuiltin-declaration-mismatch] 7 | int H,W,N,x0,y0; | ^~ a.cc:10:26: error: redefinition of 'int d [1005][1005]' 10 | int dy[4]={0,-1,0,1};int d[1005][1005]; | ^ a.cc:8:26: note: 'int d [1005][...
s333046330
p00481
C++
#include <iostream> #include <cstdio> #include <queue> using namespace std; struct node { int i; int j; char val; }; int H, W, N;//H(1 <= H <= 1000)、W(1 <= W <=1000)、N(1 <= N <= 9) char m[1001][1001]; queue<node> q; bool flag = 0; int t1 = 0; char flag_m[1001][1001]; void search(int i, int j, char val) { if (fla...
a.cc: In function 'void search(int, int, char)': a.cc:40:50: warning: narrowing conversion of '(((int)val) + 1)' from 'int' to 'char' [-Wnarrowing] 40 | q.push({ i,j,val + 1 }); | ~~~~^~~ a.cc: In function 'int main()': a.cc:70:9: err...
s551347416
p00481
C++
// 111.cpp : 定?控制台?用程序的入口点。 // #include "stdafx.h" #include<stdio.h> #include <queue> using namespace std; #define N 1001 int cols,rows,n; char a[N][N]; bool visited[N][N] = {0}; int minTime; int direction[4][2] = {{-1,0},{1,0},{0,-1},{0,1}}; struct Point{ int x; int y; }; bool isInMap(Point p){ if(p.x < 0 || p....
a.cc:4:10: fatal error: stdafx.h: No such file or directory 4 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s236384761
p00481
C++
#include<iostream> #include<cstdio> #include<queue> using namespace std; int H, W,N; int time = 0; int flag = 0; // ?志是否?束 int flagt = 0; // ??一个?点有几个相??点 char SearchMap[1001][1001]; int SearchFlag[1001][1001] = {0}; struct node { int IndexX; int IndexY; int value; }; queue<node> q; ...
a.cc:7:5: error: 'int time' redeclared as different kind of entity 7 | int time = 0; | ^~~~ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157, ...
s192241818
p00481
C++
#include<iostream> #include<cstdio> #include<queue> using namespace std; int H, W,N; int flag = 0; // ?志是否?束 int flagt = 0; // ??一个?点有几个相??点 char SearchMap[1001][1001]; int SearchFlag[1001][1001] = {0}; struct node { int IndexX; int IndexY; int value; }; queue<node> q; ...
a.cc: In function 'int main()': a.cc:50:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 50 | scanf_s("%d %d %d",&H,&W,&N); | ^~~~~~~ | scanf a.cc:100:17: error: 'printf_s' was not declared in this scope; did you mean 'printf'? 100 | prin...
s373136420
p00481
C++
#include <iostream> #include <stdio.h> #include <cstring> #include <queue> using namespace std; char ma[1005][1005];int vis[1005][1005]; int w,h,n; int dx[]={1,0,-1,0}; int dy[]={0,1,0,-1}; struct node { int x,y,time; }; node start; void bfs(char ed) { queue<node> que; que.push(start); vis[start.x][...
a.cc: In function 'int main()': a.cc:56:13: error: 'gets' was not declared in this scope; did you mean 'getw'? 56 | gets(ma[i]); | ^~~~ | getw
s963229227
p00481
C++
#include<iostream> #include<deque> using namespace std; int H, W, N; char mapT[1000][1000]; int vis[1000][1000]; int temp_x = 0, temp_y; char temp; int final_min_route = 0; int dir[4][2] = { {-1,0},{0,1},{1,0},{0,-1} }; struct location { int x, y, route; }; location findSmallRouteBFS(int x, int y, char factory) { ...
a.cc: In function 'location findSmallRouteBFS(int, int, char)': a.cc:19:9: error: 'memset' was not declared in this scope 19 | memset(vis, 0, sizeof(vis)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #includ...
s537688096
p00481
C++
#include<iostream> #include<deque> using namespace std; int H, W, N; char mapT[1000][1000]; int vis[1000][1000]; int temp_x = 0, temp_y; char temp; int final_min_route = 0; int dir[4][2] = { {-1,0},{0,1},{1,0},{0,-1} }; struct location { int x, y, route; }; location findSmallRouteBFS(int x, int y, char factory) { ...
a.cc: In function 'location findSmallRouteBFS(int, int, char)': a.cc:19:9: error: 'memset' was not declared in this scope 19 | memset(vis, 0, sizeof(vis)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #includ...
s402272898
p00481
C++
#include <iostream> #include <queue> const int MAX_H = 1000; const int MAX_W = 1000; const int a = 100000000; using namespace std; typedef pair<int, int> P; int H = 0, W = 0, N = 0; int food[11][2]; char cheese[MAX_H][MAX_W] = {0}; int r[MAX_H][MAX_W]; int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1}; in...
a.cc: In function 'int main()': a.cc:79:14: error: 'factor' was not declared in this scope 79 | factor[num][0] = i; | ^~~~~~
s820264822
p00481
C++
#include<stack> #include<queue> #include "StdAfx.h" const int MAX_H = 1000; const int MAX_W = 1000; const int a = 100000000; using namespace std; typedef pair<int, int> P; int H = 0, W = 0, N = 0; int food[11][2]; char cheese[MAX_H][MAX_W] = {0}; int r[MAX_H][MAX_W]; int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1,...
a.cc:3:10: fatal error: StdAfx.h: No such file or directory 3 | #include "StdAfx.h" | ^~~~~~~~~~ compilation terminated.
s574594769
p00481
C++
#include "StdAfx.h" #include <iostream> #include<stack> #include<queue> #include<string> #include <math.h> using namespace std; const int MAX_H = 1000; const int MAX_W = 1000; const int a = 100000000; typedef pair<int, int> P; int H = 0, W = 0, N = 0; int food[11][2]; char cheese[MAX_H][MAX_W] = {0}; int r...
a.cc:1:10: fatal error: StdAfx.h: No such file or directory 1 | #include "StdAfx.h" | ^~~~~~~~~~ compilation terminated.
s837791464
p00481
C++
#include<iostream> #include<vector> using namespace std; char ma[1001][1001]; bool visited[1001][1001]; int h,w,n; int dx[4]={-1,0,1,0}; int dy[4]={0,-1,0,1}; int sx,sy; vector<pair<int,int> >vec(10); int bfs(int x,int y,int d){ if(ma[y][x]-'0'==d){ return 0; } visited[y][x]=1; int ret=1000000...
a.cc: In function 'int main()': a.cc:31:5: error: 'memset' was not declared in this scope 31 | memset(visited,0,sizeof(visited)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<vector> +++ |+#include <cstrin...
s203398177
p00481
C++
from : http://judge.u-aizu.ac.jp/onlinejudge/review.jsp?rid=1811250#1 #include<iostream> #include<vector> #include<queue> using namespace std; #define DEBUG(x) cout<<(#x)<<": "<<(x)<<endl int nowS = 0; int x, y, n; int mp[1000][1000] = {}; int k[4] = {1, -1, 0, 0}; int h[4] = {0, 0, 1, -1}; int cx[9] = {}; int cy...
a.cc:1:6: error: found ':' in nested-name-specifier, expected '::' 1 | from : http://judge.u-aizu.ac.jp/onlinejudge/review.jsp?rid=1811250#1 | ^ | :: a.cc:1:1: error: 'from' does not name a type 1 | from : http://judge.u-aizu.ac.jp/onlinejudge/review.jsp?rid=1811250#1 | ^~~~ In file ...
s709035975
p00481
C++
#include <iostream> #include <cstdio> #include <limits> #include <queue> using namespace std; const int MAX_W = 1000; const int MAX_H = 1000; const int MAX_N = 9; typedef pair<int, int> P; int H,W,N; char field[MAX_H][MAX_W]; int dist[MAX_H][MAX_W]; queue<P> que; //using limits = std::numeric_limits<int>; int li...
a.cc: In function 'int bfs(int)': a.cc:62:37: error: 'limits' is not a class, namespace, or enumeration 62 | && dist[ny][nx] == limits::infinity() ){ | ^~~~~~ a.cc: In function 'void init_dist()': a.cc:79:26: error: 'limits' is not a class, namespace, or enu...
s912874962
p00481
C++
#include <iostream> #include <vector> #include <queue> #include <algorithm> #define rep(i,a,b) for(int i=(a);i<(b);i++) #define pb push_back #define mp(a,b) make_pair(a,b) #define all(a) a.begin(),a.end() #define pii pair<int, int> #define ll long long using namespace std; #define MAX 10 #define SIZE 1000 #define IN...
a.cc:20:5: error: 'int time' redeclared as different kind of entity 20 | int time = INF; | ^~~~ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157, ...
s692178457
p00481
C++
#include<stdio.h> #include<iostream> #include<string.h> #include<queue> using namespace std; struct OZAWA { int x; int y; int c; }; int Flag[1000][1000]; char MAP[1000][1000]; queue<OZAWA> Q; int main(void) { int H,W,N,Nc=0,X[10],Y[10]; OZAWA ba,v; int mv[4][2]={{0,-1},{1,0},{0,1},{-1,0}}; char Cheese[10] ={'1'...
a.cc: In function 'int main()': a.cc:77:26: error: expected ';' before 'return' 77 | cout <<ba.c<<endl | ^ | ; 78 | return 0; | ~~~~~~
s944784619
p00481
C++
#include<cstdio.h> #include<iostream> #include<queue> #include<string.h> using namespace std; struct PP{ int x; int int Z; int c; }; char s[1002][1002],C[11]={"0123456789"}; int D[1002][1002]; int A[1002][1002],d; int main(){ PP S; queue<PP> P; int w,h; int d=0,i=0,j=0,l=-1; int x[4]={ 1, 0,-1,0}; int y[4]=...
a.cc:1:9: fatal error: cstdio.h: No such file or directory 1 | #include<cstdio.h> | ^~~~~~~~~~ compilation terminated.
s680723118
p00481
C++
#include<iostream> #include<cctype> #include<algorithm> #include<cstdio> #include<cstdlib> #include<vector> #include<map> #include<queue> #include<set> #include<stack> #include<cassert> #include<cctype> #include<cstring> #include<utility> #include<cmath> const int inf=0x7fffffff; typedef long long int ll; using namespa...
a.cc:118:1: error: expected unqualified-id before '/' token 118 | / | ^ a.cc: In function 'int search(int)': a.cc:91:1: warning: control reaches end of non-void function [-Wreturn-type] 91 | } | ^
s723729208
p00481
C++
#include <algorithm> #include <cmath> #include <climits> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <map> //pair is also included in this library #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <vector> #define REP(i, s, n) f...
a.cc: In function 'int main()': a.cc:69:5: error: 'memset' was not declared in this scope 69 | memset(cost, -1, sizeof(cost)); | ^~~~~~ a.cc:14:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 13 | #include <unordered_map> +++ |+#include <...
s188063155
p00481
C++
#include <algorithm> #include <cmath> #include <climits> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <map> //pair is also included in this library #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <vector> #define REP(i, s, n) f...
a.cc: In function 'int main()': a.cc:69:5: error: 'memset' was not declared in this scope 69 | memset(cost, -1, sizeof(cost)); | ^~~~~~ a.cc:14:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 13 | #include <unordered_map> +++ |+#include <...
s351899591
p00481
C++
22:42 ? 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 # include <iostream> # include <queue> # include <cctype> typedef std::pair<int, int> P; テつ? const int INF = 100000; const...
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 22:42 | ^~ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, f...
s444125414
p00481
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <queue> using namespace std; const int INF = 1<<30; const int maxn = 1000+10; int w,h,n; char mp[maxn][maxn]; int d[maxn][maxn]; int dir[4][2] = { {-1,0}, {1,0}, {0,1}, {0,-1}, }; int fac[10][2]; int bfs(int sx,int sy,int gx,int gy){ memset(d...
a.cc: In function 'int bfs(int, int, int, int)': a.cc:24:9: error: 'memset' was not declared in this scope 24 | memset(d,-1,sizeof(d)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <queue> +++ |+#i...
s274747503
p00481
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <queue> using namespace std; const int INF = 1<<30; const int maxn = 1000+10; int w,h,n; char mp[maxn][maxn]; int d[maxn][maxn]; int dir[4][2] = { {-1,0}, {1,0}, {0,1}, {0,-1}, }; int fac[10][2]; int bfs(int sx,int sy,int gx,int gy){ memset(d...
a.cc: In function 'int bfs(int, int, int, int)': a.cc:24:9: error: 'memset' was not declared in this scope 24 | memset(d,-1,sizeof(d)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <queue> +++ |+#i...
s150355146
p00481
C++
#pragma once #include <stdio.h> #include <string> #include <iostream> #include <queue> using namespace std; string S[1001]; long result=0; int H,W,N; long mintime[1000][1000]; queue<int> qx,qy,time; int sx,sy,gx,gy; int step = 0; FILE *fp; int main(){ fp = fopen("answer.txt","w"); scanf("%d%d%d",&H,&W,&N); for(in...
a.cc:1:9: warning: #pragma once in main file 1 | #pragma once | ^~~~ a.cc:12:18: error: 'std::queue<int> time' redeclared as different kind of entity 12 | queue<int> qx,qy,time; | ^~~~ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-...
s395851990
p00481
C++
#pragma once #include <stdio.h> #include <string> #include <iostream> #include <queue> using namespace std; string S[1001]; long result=0; int H,W,N; long mintime[1000][1000]; queue<int> qx,qy,time; int sx,sy,gx,gy; int step = 0; int main(){ scanf("%d%d%d",&H,&W,&N); for(int i=0;i<H;i++){ cin>>S[i]; for(int j=...
a.cc:1:9: warning: #pragma once in main file 1 | #pragma once | ^~~~ a.cc:12:18: error: 'std::queue<int> time' redeclared as different kind of entity 12 | queue<int> qx,qy,time; | ^~~~ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-...
s544604699
p00481
C++
#include<iostream> #include<queue> #include<algorithm> using namespace std; typedef pair<int,int> P; int h,w,n; char m[1000][1000]; int visited[1000][1000]; int main(){ cin>>h>>w>>n; int pos; for(int y=0;y<h;y++){ for(int x=0;x<w;x++){ cin>>m[x][y]; if(m[x][y]=='S') pos=x+y*1000; } } memset(visited,...
a.cc: In function 'int main()': a.cc:23:9: error: 'memset' was not declared in this scope 23 | memset(visited,0,sizeof(visited)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<algorithm> +++ |+#incl...
s611874898
p00481
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <queue> #include <map> #include <utility> #include <functional> using namespace std; typedef pair<int, int> P; int h, w, n; char f[1000][1000]; int dx[] = { 0, 1, 0, -1 }; int dy[] = { -1, 0, 1, 0 }; struct Ele { Ele(int a, doub...
a.cc: In function 'double euclidean(P, P)': a.cc:33:16: error: 'sqrt' was not declared in this scope 33 | return sqrt(x*x + y*y); | ^~~~
s651941194
p00481
C++
#include <iostream> #include <stdlib.h> #include <queue> #define MAX_NUM 1010 using namespace std; int H, W, N; bool flag[MAX_NUM][MAX_NUM] = {false}; class Node { public: Node(); Node(int x, int y, int step); ~Node(); int x; int y; int step; }; Node::Node() { } Node::Node(int x, int y, int step) { this->x = ...
a.cc: In function 'int main()': a.cc:89:17: error: 'memset' was not declared in this scope 89 | memset(flag, false, sizeof(flag)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <queue>...
s561200092
p00481
C++
#include <iostream> #include <stdlib.h> #include <queue> #define MAX_NUM 1010 using namespace std; int H, W, N; bool flag[MAX_NUM][MAX_NUM] = {false}; class Node { public: Node(); Node(int x, int y, int step); ~Node(); int x; int y; int step; }; Node::Node() { } Node::Node(int x, int y, int step) { this->x = ...
a.cc: In function 'int main()': a.cc:96:25: error: 'memset' was not declared in this scope 96 | memset(flag, false, sizeof(flag)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | ...
s113261638
p00481
C++
/* * AOJ 0558: Cheese * ?¢???????m*n???????????????????????????1???N??¨???N?????\??????????¢??????????????±????????????????1???N??????????????? * ?±???????BFS???Queue??????Dijkstra??? * ????????????S????????????1???N????????????????????\??¨BFS?±?N?¬???????????????´?????????????????? */ #include <cstdio> #include ...
a.cc: In function 'int bfs(int, int, int, int)': a.cc:25:3: error: 'memset' was not declared in this scope 25 | memset(d, -1, sizeof(d)); | ^~~~~~ a.cc:11:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 10 | #include <queue> +++ |+#include <c...
s471593898
p00481
C++
#include <cstdio> #include <vector> const int MAX_SIZE = 1000; char field[MAX_SIZE + 1][MAX_SIZE + 1]; const int STEP_NUM = 4; const int STEP[STEP_NUM][STEP_NUM] = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}}; using Position = std::pair<int,int>; const int MAXN = 10; Position locations[MAXN]; int H, W, N; int get_shortest...
a.cc: In function 'int main()': a.cc:67:28: error: 'isdigit' was not declared in this scope 67 | if(isdigit(field[i][j])) | ^~~~~~~
s705551805
p00481
C++
#include <cstdio> #include <vector> const int MAX_SIZE = 1000; char field[MAX_SIZE + 1][MAX_SIZE + 1]; const int STEP_NUM = 4; const int STEP[STEP_NUM][STEP_NUM] = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}}; using Position = std::pair<int,int>; const int MAXN = 10; Position locations[MAXN]; int H, W, N; int get_shortest...
a.cc: In function 'int main()': a.cc:68:28: error: 'isdigit' was not declared in this scope 68 | if(isdigit(field[i][j])) | ^~~~~~~
s615816977
p00481
C++
#include <iostream> #include <algorithm> #include <queue> #include <vector> #define p(x) cout << "(" << x.first << "," << x.second << ")" << endl; using namespace std; const int MAX_H = 1005; const int MAX_W = 1005; char D[MAX_H][MAX_W]; bool visited[MAX_H][MAX_W]; int H, W, N; int dx[] = { -1, 0, 1, 0 }; int dy[]...
a.cc: In function 'int bfs(PII, PII)': a.cc:26:3: error: 'memset' was not declared in this scope 26 | memset(visited, false, sizeof(visited[0][0]) * MAX_H * MAX_W); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <...
s601556899
p00481
C++
import sys sys.setrecursionlimit(100000000) def getStart(field): search_field = field[1:] # cut the first [H,W,N] for min_path matrix for y in range(len(search_field)): for x in range(len(search_field[0])): if search_field[y][x] == "S": return x,y+1 def bfs(field,star...
a.cc:6:34: error: stray '#' in program 6 | search_field = field[1:] # cut the first [H,W,N] for min_path matrix | ^ a.cc:28:49: error: stray '#' in program 28 | if field[ny][nx] == current[2]: # at the same cheese-power number | ...
s087114440
p00481
C++
#include<queue> #include<cctype> #include<cstdio> #define mp make_pair #define rep(i,n) for(int i = 0;i<n;i++) using namespace std; typedef pair<int , int > pii; const int dx[]={1,-1,0,0},dy[]={0,0,1,-1}; int h,w; char grid[1010][1010]; int sortestDestance(int sx,int sy,int gx,int gy) { static boo...
a.cc: In function 'int main()': a.cc:60:23: error: 'shortestDistance' was not declared in this scope; did you mean 'sortestDestance'? 60 | rep(i,n) cost+=shortestDistance(cx[i],cy[i],cx[i+1],cy[i+1]); | ^~~~~~~~~~~~~~~~ | sortestDestance
s452438257
p00481
C++
#include <iostream> #include <queue> #include <tuple> #include <string.h> #define BLOCK -1 #define ROAD 0 #define GONE -2 void clear(std::queue<std::tuple<int, int, int, int*>> &q) { while (!q.empty()) { auto& item = q.front(); auto& map = std::get<int*>(item); delete[] map; q.pop(); } } int* copy(int* bas...
a.cc: In function 'int* copy(int*, int)': a.cc:21:14: error: 'memcpy' is not a member of 'std'; did you mean 'wmemcpy'? 21 | std::memcpy(copied, base, size); | ^~~~~~ | wmemcpy a.cc: In function 'int main()': a.cc:51:14: error: 'memcpy' is not a member of 'std'; did you ...
s698000109
p00481
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) #define shosu(n) setprecision(n) #define INF 999999999 using namespace std; int h, w, n; string data[1100]; int main() { while (cin >> h >> w >> n) { rep(i, h) cin >> data[i]; pair<int, int> ce[10]; rep(i, h) rep(j, w) { if (d...
a.cc: In function 'int main()': a.cc:10:22: error: reference to 'data' is ambiguous 10 | rep(i, h) cin >> data[i]; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14...
s976607912
p00481
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) #define shosu(n) setprecision(n) #define INF 999999999 using namespace std; int h, w, n; string data[1100]; int main() { while (cin >> h >> w >> n) { rep(i, h) cin >> data[i]; pair<int, int> ce[10]; rep(i, h) rep(j, w) { if (d...
a.cc: In function 'int main()': a.cc:10:22: error: reference to 'data' is ambiguous 10 | rep(i, h) cin >> data[i]; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14...
s151060240
p00481
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) #define shosu(n) setprecision(n) #define INF 999999999 using namespace std; int h, w, n; string data[1100]; int main() { while (cin >> h >> w >> n) { rep(i, h) cin >> data[i]; pair<int, int> ce[10]; rep(i, h) rep(j, w) { if (da...
a.cc: In function 'int main()': a.cc:10:22: error: reference to 'data' is ambiguous 10 | rep(i, h) cin >> data[i]; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14...
s848011203
p00481
C++
#include<bits/stdc++.h> #define x first #define y second #define rep(i,a,b) for(int i=a;i<b;i++) using namespace std;pair<int,int> p[12];bool t[1010][1010],v[1010][1010];queue<pair<int,pair<int,int> > >Q;int main(){int h,w,k,a=0,dx[]={0,1,0,-1},dy[]={1,0,-1,0};cin>>h>>w>>k;rep(i,0,h)rep(j,0,w){t[i][j]=true;char z;cin>>...
a.cc: In function 'int main()': a.cc:5:577: error: 'vis' was not declared in this scope 5 | using namespace std;pair<int,int> p[12];bool t[1010][1010],v[1010][1010];queue<pair<int,pair<int,int> > >Q;int main(){int h,w,k,a=0,dx[]={0,1,0,-1},dy[]={1,0,-1,0};cin>>h>>w>>k;rep(i,0,h)rep(j,0,w){t[i][j]=true;char z;cin>>z...
s845856684
p00481
C++
#include <iostream> #include <cstdio> #include <queue> using namespace std; struct Node{ int x,y; }; const int max_n=1000+10; int h,w,n,sx,sy,dx[]={0,0,-1,1},dy[]={-1,1,0,0},d[max_n][max_n],ans; Node sN; char c[max_n][max_n]; void bfs(int m){ if(m>n)return; queue<Node> q; memset(d,0,sizeof(d)); q.push(sN); d[s...
a.cc: In function 'void bfs(int)': a.cc:18:9: error: 'memset' was not declared in this scope 18 | memset(d,0,sizeof(d)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <queue> +++ |+#include <cstring...
s069635076
p00481
C++
#include <iostream> #include <queue> #include <vector> #include <cmath> #include <algorithm> #include <map> using namespace std; using ll = long long; const ll INF = 1e9; ll H, W, N; vector<vector<ll>> F(10); string M[1001]; ll dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1}; ll bfs(ll sx, ll sy, ll gx, ll gy) { ll ...
a.cc:42:1: error: '::main' must return 'int' 42 | ll main() { | ^~
s085884935
p00481
C++
#include<iostream> #include<queue> using namespace std; typedef struct{ int x; int y; }P; char graph[1000][1000]; P aim[10]; P s,g;//s?????????g?????? int N,W,H; int vis[1000][1000]; int dx[]={1,0,-1,0},dy[]={0,1,0,-1}; int bfs(P s,P g); int main(){ int i,j,t,step=0; cin>>H>>W>>N; for(i=0;i<H;i+...
a.cc: In function 'int main()': a.cc:49:17: error: a function-definition is not allowed here before '{' token 49 | int bfs(P s,P g){ | ^ a.cc:77:2: error: expected '}' at end of input 77 | } | ^ a.cc:19:11: note: to match this '{' 19 | int main(){ | ^
s439019501
p00481
C++
#include <bits/stdc++.h> #include <ctype.h> using namespace std; typedef pair<int, int> P; const int INF = 1<<10; int H, W, N; char field[1010][1010]; int dx[4] = {0,0,1,-1}, dy[4] = {1,-1,0,0}; int tim[1010][1010]; int sx, sy; int cnt; int hp = 1; int bfs() { for (int i = 1; i <= N; i++) { bool flag = false;...
a.cc: In function 'int bfs()': a.cc:46:1: warning: no return statement in function returning non-void [-Wreturn-type] 46 | } | ^ a.cc: In function 'int main()': a.cc:58:4: error: expected '}' at end of input 58 | } | ^ a.cc:48:12: note: to match this '{' 48 | int main() { | ^
s705128241
p00481
C++
#include<iostream> #include<stdio.h> #include<queue> #include<string.h> using namespace std; int mp[1002][1002],mp2[1002][1002]; int main() { ????????char a; ????????int t, j, h, w, k, i; ????????pair<int, int> s, m[10]; ????????queue<pair<int, int> > u; ????????queue<int> e; ????????cin >> h >> w >> k; ????????for (i ...
a.cc: In function 'int main()': a.cc:9:1: error: expected primary-expression before '?' token 9 | ????????char a; | ^ a.cc:9:2: error: expected primary-expression before '?' token 9 | ????????char a; | ^ a.cc:9:3: error: expected primary-expression before '?' token 9 | ????????char a; | ...
s222640862
p00481
C++
// // 0558.cpp // // // Created by Yoshida Satoshi on 2017/11/16. // // #include <iostream> #include <queue> #include <utility> #include <stdlib.h> #define MAX 1000 #define INF 100000000 #define FOR(index,max) for(index=0;index<max;index++) using namespace std; typedef pair<int, int> P; int main(){ int dx[...
a.cc: In function 'int main()': a.cc:38:9: error: 'i' was not declared in this scope; did you mean 'in'? 38 | FOR(i,H){ | ^ a.cc:16:28: note: in definition of macro 'FOR' 16 | #define FOR(index,max) for(index=0;index<max;index++) | ^~~~~ a.cc:39:13: error: 'j' wa...
s917838533
p00481
C++
// // 0558.cpp // // // Created by Yoshida Satoshi on 2017/11/16. // // #include <iostream> #include <queue> #include <utility> #include <stdlib.h> #define MAX 1000 #define INF 100000000 #define FOR(index,max) for(int index=0;index<max;index++) using namespace std; typedef pair<int, int> P; int main(){ int...
a.cc: In function 'int main()': a.cc:50:28: error: invalid conversion from 'char' to 'const char*' [-fpermissive] 50 | start[atoi(in)].first=i; | ^~ | | | char In file included from /usr/include/c++/14/...
s044766364
p00481
C++
// // 0558.cpp // // // Created by Yoshida Satoshi on 2017/11/16. // // #include <iostream> #include <queue> #include <utility> #include <stdlib.h> #define MAX 1000 #define INF 100000000 #define FOR(index,max) for(int index=0;index<max;index++) using namespace std; typedef pair<int, int> P; int main(){ int...
a.cc: In function 'int main()': a.cc:51:25: error: invalid conversion from 'char' to 'const char*' [-fpermissive] 51 | sx[atoi(in)]=i; | ^~ | | | char In file included from /usr/include/c++/14/cstdlib:79, ...
s364234976
p00481
C++
// // 0558.cpp // // // Created by Yoshida Satoshi on 2017/11/16. // // #include <iostream> #include <queue> #include <utility> #include <stdlib.h> #define MAX 1000 #define INF 100000000 #define FOR(index,max) for(int index=0;index<max;index++) using namespace std; typedef pair<int, int> P; int main(){ int...
a.cc: In function 'int main()': a.cc:75:22: error: 'P' {aka 'struct std::pair<int, int>'} has no member named 'seond'; did you mean 'second'? 75 | ny=p.seond+dy[i]; | ^~~~~ | second a.cc:75:31: error: 'i' was not declared in this scope 75 | ...
s664660681
p00481
C++
// // 0558.cpp // // // Created by Yoshida Satoshi on 2017/11/16. // // #include <iostream> #include <queue> #include <utility> #include <stdlib.h> #define MAX 1000 #define INF 100000000 #define FOR(index,max) for(int index=0;index<max;index++) using namespace std; typedef pair<int, int> P; int main(){ int...
a.cc: In function 'int main()': a.cc:84:18: error: 'start' was not declared in this scope 84 | ans += d[start[k+1].first][start[k+1].second]; | ^~~~~
s041408842
p00481
C++
// // 0558.cpp // // // Created by Yoshida Satoshi on 2017/11/16. // // #include <iostream> #include <queue> #include <utility> #include <stdlib.h> #define MAX 1000 #define INF 100000000 #define FOR(index,max) for(int index=0;index<max;index++) using namespace std; typedef pair<int, int> P; int ctoi(char c){ ...
a.cc: In function 'int main()': a.cc:76:17: error: 'isVisited' was not declared in this scope 76 | isVisited[i][j]=false; | ^~~~~~~~~
s377636804
p00481
C++
#include<iostream> #include<iomanip> #include<map> #include<set> #include<string> #include<algorithm> #include<cmath> #include<vector> #include<queue> #include<stack> using namespace std; #define P(p) cout<<(p)<<endl #define rep(i,m,n) for(int i = (m); i < (int)(n); i++) #define rrep(i,m,n) for(int i=(int)(m); i>=(...
a.cc:125:22: error: stray '#' in program 125 | struct S #include<iostream> | ^ a.cc: In function 'int main()': a.cc:125:30: error: expected initializer before '<' token 125 | struct S #include<iostream> | ^ a.cc:162:9: warning: em...
s287415089
p00481
C++
#include <iostream> #include <queue> using namespace std; int h,w,n; int en;//energy indicates which cheese to eat next const int MAX_N=1000; char map[MAX_N][MAX_N]; struct point{ int x,y; int step; point(int xx, int yy, int ss){ x=xx; y=yy; step=ss; } }; struct point p[10]; int...
a.cc:18:18: error: no matching function for call to 'point::point()' 18 | struct point p[10]; | ^ a.cc:12:5: note: candidate: 'point::point(int, int, int)' 12 | point(int xx, int yy, int ss){ | ^~~~~ a.cc:12:5: note: candidate expects 3 arguments, 0 provided a.cc:9:8: note: ...
s746003386
p00481
C++
#include <cstdio> #include <queue> using namespace std; int h, w, n; const int MAX_N = 1000; char map[MAX_N][MAX_N]; struct point{ int x, y; int step; point(){ x = 0; y = 0; step = 0; } point(int xx, int yy, int ss){ x = xx; y = yy; step = ss; } }; struct point p[10]; int dx[4] = { -1, 0, 1, 0 }, dy[4] =...
a.cc: In function 'void solve()': a.cc:57:25: error: 'cin' was not declared in this scope 57 | cin >> ch; map[i][j] = ch; | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include...
s705560840
p00481
C++
#include <iostream> #include <cstdio> #include <queue> using namespace std; int h,w,n; int en;//energy indicates which cheese to eat next const int MAX_N=1000; char map[MAX_N][MAX_N]; struct point{ int x,y; int step; point(int xx, int yy, int ss){ x=xx; y=yy; step=ss; } }; struc...
a.cc:19:18: error: no matching function for call to 'point::point()' 19 | struct point p[10]; | ^ a.cc:13:5: note: candidate: 'point::point(int, int, int)' 13 | point(int xx, int yy, int ss){ | ^~~~~ a.cc:13:5: note: candidate expects 3 arguments, 0 provided a.cc:10:8: note:...
s873460133
p00481
C++
#include <iostream> #include <cstdio> #include <queue> using namespace std; int h,w,n; const int MAX_N=1005; char map[MAX_N][MAX_N]; struct point{ int x,y; int step; point(){ x=0; y=0; step=0; } point(int xx, int yy, int ss){ x=xx; y=yy; step=ss; } }; struct poin...
a.cc: In function 'void solve()': a.cc:57:27: error: expected ';' before '}' token 57 | cin>>map[i][j] | ^ | ; 58 | } | ~ a.cc: In function 'int bfs(int)': a.cc:51:1: warning: control reaches end of...
s672446017
p00481
C++
#include <iostream> #include <cstdio> #include <queue> using namespace std; int h,w,n; const int MAX_N=1005; char map[MAX_N][MAX_N]; int visit[MAX_N][MAX_N]; struct point{ int x,y; int step; point(){ x=0; y=0; step=0; } point(int xx, int yy, int ss){ x=xx; y=yy; step...
a.cc: In function 'int bfs(int)': a.cc:33:24: error: 'MAX_N\U0000ff1bj' was not declared in this scope 33 | for(int j=0; j<MAX_N;j++){ | ^~~~~~~~ a.cc:33:34: error: expected ';' before ')' token 33 | for(int j=0; j<MAX_N;j++){ | ^...
s258542736
p00481
C++
if(temp.x==p[i].x && temp.y==p[i].y) { step=use[temp.x][temp.y]; result=result+step; flag=1; break; }
a.cc:1:25: error: expected unqualified-id before 'if' 1 | if(temp.x==p[i].x && temp.y==p[i].y) | ^~
s716079935
p00481
C++
#include<cstdio> #include<iostream> #include<queue> using namespace std; #define INF 1000 int H, W, N; char map[1001][1001]; int dx[4] = { 0, 0, 1, -1 }; int dy[4] = { 1, -1, 0, 0 }; int d[1001][1001]; int sx, sy; int gx, gy; typedef pair<int, int> P; int sum = 0; void bfs() { queue<...
a.cc: In function 'int main()': a.cc:46:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 46 | gets(map[i]); | ^~~~ | getw
s158448055
p00481
C++
#include<cstdio> #include<cstring> #include<cstdlib> #include<cmath> #include<iostream> #include<queue> #include<algorithm> using namespace std; #define INF 1000 int H, W, N; char map[1001][1001]; int dx[4] = { 0, 0, 1, -1 }; int dy[4] = { 1, -1, 0, 0 }; int d[1001][1001]; int sx, sy; int gx, gy; ...
a.cc: In function 'int main()': a.cc:50:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 50 | gets(map[i]); | ^~~~ | getw
s386409786
p00481
C++
#define _CRT_SECURE_NO_WARNINGS #include "bits/stdc++.h" #include <random> using namespace std; //呪文 #define DUMPOUT cerr #define dump(...) DUMPOUT<<" ";DUMPOUT<<#__VA_ARGS__<<" :["<<__LINE__<<":"<<__FUNCTION__<<"]"<<endl;DUMPOUT<<" ";dump_func(__VA_ARGS__) typedef unsigned uint; typedef long long ll; typedef un...
a.cc:119:1: error: '\U0000ff56' does not name a type 119 | v | ^~
s837822148
p00481
C++
#include<iostream> #include<cstdio> #include<cstring> #include<queue> #include<algorithm> using namespace std; struct node { int x,y; int d; node(int a,int b,int c) :x(a),y(b),d(c){} }; int m,n,p; char w[1005][1005]; int res; int dx[]={0,0,1,-1},dy[]={1,-1,0,0}; void bfs(int x,int y) { queue<node> que; que.push(n...
a.cc: In function 'int main()': a.cc:52:33: error: expected ';' before 'res' 52 | scanf("%d%d%d",&m,&n,&p) | ^ | ; 53 | 54 | res=0; | ~~~
s130327193
p00481
C++
#include <cstdio> #include <iostream> #include <queue> using namespace std; int W, H, N; typedef pair<int, int> P; queue<P> que; char maze[1003][1003]; int timer[1003][1003]; int pos_x, pos_y; int sh_x[4] = {0, 0, -1, 1}; int sh_y[4] = {1, -1, 0, 0}; int res = 0; int strength = 1; void solve() { que.push(P(pos_x, ...
a.cc: In function 'int main()': a.cc:86:5: error: 'memset' was not declared in this scope 86 | memset(timer, 0, sizeof(timer[0][0]) * H * W); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <queue> +++ |+#inc...
s052580023
p00481
C++
#include <cstdio> #include <iostream> #include <queue> using namespace std; int W, H, N; typedef pair<int, int> P; queue<P> que; char maze[1003][1003]; int timer[1003][1003]; int pos_x, pos_y; int sh_x[4] = {0, 0, -1, 1}; int sh_y[4] = {1, -1, 0, 0}; int res = 0; int strength = 1; void solve() { que.push(P(pos_x, ...
a.cc: In function 'int main()': a.cc:86:5: error: 'memset' was not declared in this scope 86 | memset(timer, 0, sizeof(timer[0][0]) * H * W); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <queue> +++ |+#inc...
s369428969
p00481
C++
#include <cstdio> #include <iostream> #include <queue> #include <string.h> using namespace std; int W, H, N; typedef pair<int, int> P; queue<P> que; char maze[1003][1003]; int timer[1003][1003]; int pos_x, pos_y; int sh_x[4] = {0, 0, -1, 1}; int sh_y[4] = {1, -1, 0, 0}; int res = 0; int strength = 1; void solve() { ...
a.cc: In function 'int main()': a.cc:62:7: error: break statement not within loop or switch 62 | break; | ^~~~~
s552578080
p00481
C++
#include<iostream> #include<functional> #include<queue> #include<cctype> #define MAXN 1024 using namespace std; struct state{ int i,j; int cost; state(int i, int j, int cost):i(i),j(j),cost(cost){} }; const int di[] = {-1,0,1,0}; const int dj[] = {0,1,0,-1}; const int infty = 1<<28; int dist[10][10]; bool ...
a.cc: In function 'int compute_dist(int, int, int, char (*)[1024])': a.cc:55:1: warning: no return statement in function returning non-void [-Wreturn-type] 55 | } | ^ a.cc: In function 'int solve(int, int, int, char (*)[1024])': a.cc:81:10: error: 'next_permutation' was not declared in this scope 81 | }wh...
s711990017
p00481
C++
#include<queue> #include<cstdio> #define mp make_pair #define rep(i,n) for(int i=0;i<n;i++) using namespace std; typedef pair<int,int> pii; const int dx[]={1,0,-1,0},dy[]={0,-1,0,1}; int h,w; char grid[1000][1000]; int shortestDistance(int x1,int y1,int x2,int y2){ static bool visited[1000][1000]; rep(i,h)rep...
a.cc: In function 'int main()': a.cc:43:20: error: 'isdigit' was not declared in this scope 43 | if(isdigit(grid[i][j])) cx[grid[i][j]-'0']=j,cy[grid[i][j]-'0']=i; | ^~~~~~~
s062851283
p00481
C++
#include <cstdio> #include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include <functional> #include <sstream> #include <complex> #include <stack> #include...
a.cc:45:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 45 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:50:11: error: 'gets' was not declared in this scope; did you mean 'getw'? 50 | rep(i,h)gets(ku[i]); | ^~~~ | getw
s709023760
p00481
C++
#include <cstdio> #include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include <functional> #include <sstream> #include <complex> #include <stack> #include...
a.cc:46:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 46 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:51:11: error: 'read' was not declared in this scope; did you mean 'fread'? 51 | rep(i,h)read(ku[i],1,w+1,0); | ^~~~ | fread
s607977237
p00481
C++
#include <iostream> #include <vector> #include <queue> #include <string> using namespace std; vector<string> field; pair<int,int> start; pair<int,int> factory[10]; int h,w,n; const int INF = 100000000; // ‹——£‚Ì—×ÚƒŠƒXƒg int d[10][10]; // ˆÚ“®—Ê const int dy[] = {-1,0,0,1}; const int dx[] = {0,-1,1,0}; // ˆø‚«...
a.cc: In function 'int main()': a.cc:130:24: error: 'next_permutation' was not declared in this scope 130 | }while(next_permutation(s.begin(),s.end())); | ^~~~~~~~~~~~~~~~
s007535755
p00481
C++
#include <iostream> #include <vector> #include <queue> #include <string> using namespace std; vector<string> field; pair<int,int> start; pair<int,int> factory[10]; int h,w,n; const int INF = 100000000; // ‹——£‚Ì—×ÚƒŠƒXƒg int d[10][10]; // ˆÚ“®—Ê const int dy[] = {-1,0,0,1}; const int dx[] = {0,-1,1,0}; // ˆø‚«...
a.cc: In function 'int main()': a.cc:130:24: error: 'next_permutation' was not declared in this scope 130 | }while(next_permutation(s.begin(),s.end())); | ^~~~~~~~~~~~~~~~
s490435918
p00481
C++
#include<iostream> #include<cstdio> #include<queue> #include<map> using namespace std; typedef pair<unsigned short,unsigned short> P; typedef pair<unsigned char,int> T; typedef pair<T,P> PP; #define rep(i,n) for(i=0;i<n;i++) #define MAX 1000 char F[MAX][MAX]; char Dx[]={1,0,-1,0},Dy[]={0,1,0,-1}; unsigned short h,w,n,x...
a.cc: In function 'int main()': a.cc:63:12: error: expected '}' at end of input 63 | return 0; | ^ a.cc:50:1: note: to match this '{' 50 | { | ^
s680478146
p00481
C++
import java.util.*; import java.math.*; import java.io.*; import java.util.regex.*; import static java.lang.Math.*; import static java.util.Arrays.*; import static java.lang.System.*; public class Main { Scanner cin; class State{ int time,x,y; State(int time,int x,int y){ this.time=time; this.x=x; this....
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:2:1: error: 'import' does not name a type 2 | import java.math.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1...
s889613838
p00481
C++
#include<iostream> #include<vector> #include<map> #include<utility> #include<queue> using namespace std; char f[1001][1001]; int d[1001][1001]; int h , w , n , x , y , ans; typedef pair<int,int> P; int dx[] = {1,0,-1,0} , dy[] = {0,-1,0,1}; int bfs(int to){ for( int i = 0 ; i < h ; i++) for( int j = 0 ; j < w ;...
/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