摘要:
任务:可以输入一个任意大小的迷宫数据,用非递归的方法求出一条走出迷宫的路径,并将路径输出;#include #include using namespace std;#define N 100typedef struct vex{ int x; int y;}vex;int n, m;stack s;int visited[N+1][N+1];int map[N+1][N+1];vex a, b, c, d;int dir[4][2] = {1,0,0,1,-1,0,0,-1};int main(){ int i, j; int x, y; stack Q; whil... 阅读全文