7569 백준 토마토
https://www.acmicpc.net/problem/7569 7569번: 토마토 첫 줄에는 상자의 크기를 나타내는 두 정수 M,N과 쌓아올려지는 상자의 수를 나타내는 H가 주어진다. M은 상자의 가로 칸의 수, N은 상자의 세로 칸의 수를 나타낸다. 단, 2 ≤ M ≤ 100, 2 ≤ N ≤ 100, www.acmicpc.net #include #include #include using namespace std; int box[102][102][102]; int dist[102][102][102]; //위 아래 좌 우 앞 뒤 순 int ny[6]={0, 0, -1, 1, 0, 0}; int nx[6]={0, 0, 0, 0, 1, -1}; int nz[6]={-1, 1, 0, 0, 0, 0}; int..