广搜
#include<stdio.h>
#include<queue>
using namespace std;
#define N 55
struct node
{
int x,y,z,step;
};
int n,m,t,h,dir[6][3]={-1,0,0, 1,0,0, 0,-1,0, 0,1,0, 0,0,-1, 0,0,1};
char map[N][N][N];
int judge(int x,int y,int z)
{
if(x>=0 && x<n && y>=0&&y<m &&z>=0&&z<h &&map[x][y][z]==0)
return 1;
return 0;
}
int bfs()
{
queue<node>q;
node cur,next;
int x,y,z,k;
cur.x=cur.y=cu......
阅读全文