Advertisement

第3.3节迷宫求解

阅读量:
复制代码
    #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

全部评论 (0)

还没有任何评论哟~