[백준] 7569 토마토 c++


[백준] 7569 토마토 c++

#include #include #include #include #include using namespace std; //1익은토마토, 0익지않은토마토, -1비어있는칸 //저장될때부터 익어있으면 0 출력, 모두 익지못하는 상황이면 -1 출력 typedef struct { int x; int y; int z; }node; int n, m, h;//세로,가로,높이 칸수 int map[101][101][101]; bool visited[101][101][101]; int dx[6] = { 0,0,0,0,1,-1 }; int dy[6] = { 0,1,0,-1,0,0 }; int dz[6] = { 1,0,-1,0,0,0 }; int answer = 0; int num = 0; int num2 = 0; vector..


원문링크 : [백준] 7569 토마토 c++