{"trustable":false,"sections":[{"title":"Description - 题目描述","value":{"format":"HTML","content":"\n\u003cp\u003e\n 荒陇一斗又困在了一个3D地牢中且继续寻找最短路径逃生!地牢由立方体单位构成,立方体中不定会充满岩石。向上下前后左右移动一个单位需要一分钟。你不能对角线移动并且迷宫四周坚石环绕。\n \u003cbr\u003e \n \u003cbr\u003e\n 是否存在逃出地牢的可能性?如果存在,则最少需要多少时间?\n \u003cbr\u003e\n\u003cp/\u003e"}},{"title":"Input - 输入","value":{"format":"HTML","content":" 输入第一行是一个数表示地牢的数量。\u003cbr\u003e\n 每个地牢的描述的第一行为L,R和C(皆不超过30)。\u003cbr\u003e\n L表示地牢的层数。\u003cbr\u003e\n R和C分别表示每层地牢的行与列的大小。\u003cbr\u003e\n\u003cbr\u003e\n 随后L层地牢,每层R行,每行C个字符。\u003cbr\u003e\n 每个字符表示地牢的一个单元。\u0027#\u0027表示岩石单元,\u0027.\u0027表示空白单元。你的起始位置在\u0027S\u0027,出口为\u0027E\u0027。\u003cbr\u003e\n 每层地牢后都有一个空行。L,R和C均为0时输入结束。"}},{"title":"Output - 输出","value":{"format":"HTML","content":" 每个迷宫对应一行输出。\u003cbr\u003e\n 如果可以逃生,则输出如下\u003cbr\u003e\nEscaped in x minute(s).\u003cbr\u003e\n x为最短脱离时间。\u003cbr\u003e\n\u003cbr\u003e\n 如果无法逃生,则输出如下\u003cbr\u003e\nTrapped!"}},{"title":"Sample Input - 输入样例","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003e3 4 5\nS....\n.###.\n.##..\n###.#\n\n#####\n#####\n##.##\n##...\n\n#####\n#####\n#.###\n####E\n\n1 3 3\nS##\n#E#\n###\n\n0 0 0\n\u003c/pre\u003e"}},{"title":"Sample Output - 输出样例","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003eEscaped in 11 minute(s).\nTrapped!\n\u003c/pre\u003e"}}]}