https://www.acmicpc.net/problem/6593코드#include #include #include using namespace std; #define MAX 31 #define FASTIO ios::sync_with_stdio(false); cin.tie(NULL); typedef pair pii; int dx[6] = { 0, 0, 1, -1, 0, 0 }; int dy[6] = { 1, -1, 0, 0, 0, 0 }; int dz[6] = { 0, 0, 0, 0, 1, -1 }; int l, r, c; char arr[MAX][MAX][MAX]; bool visit[MAX][MAX][MAX]; queue q; void init() { memset(arr, '#', sizeof(arr..