#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define TRUE 1
#define FALSE 0
#define OK 1
#define ERROR 0
#define INFEASIBLE -1
#define OVERFLOW -2
#define STACK_INIT_SIZE 100 //存储空间初始分配量
#define STACKINCREMENT 10 //存储空间分配增量
typedef int Status;
typedef struct
{
int row;
int col;
}PosType;
typedef struct
{
int ord; //通道块在路劲上的“序号”
PosType seat; //通道块在迷宫中的“坐标位置”
int di; //从此通道块走向下一通道块的“方向”
}SElemType;
typedef struct
{
SElemType *base; //在栈构造之前和销毁之后,base的值为NULL
SElemType *top; //栈顶指针
int stacksize; //当前已分配的存储空间,以元素为单位
}SqStack;
int MazeMap[10][10] = //迷宫地图为全局变量
{
//0,1,2,3,4,5,6,7,8,9
{
0,0,0,0,0,0,0,0,0,0}, //0
{
0,1,1,0,1,1,1,
【数据结构】算法3.3 迷宫求解
最新推荐文章于 2023-04-02 21:14:02 发布