没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
#include<iostream>
#include<stdio.h>
#include<stdlib.h>
#include<malloc.h>
#include<ctime>
static int a[25]={0};
static int b[25]={0};
static int num(0);
using namespace std;
typedef struct{ //当前坐标位置
int r,c; //迷宫中r行c列的位置
}PosType;
typedef struct MazeType{
int m,n;
char arr[25][25]; //各位置取值'1''@','*' 其中,'1'围墙'@'足迹,'*'路过
}MazeType;
MazeType ma;
typedef struct{
int step; // 当前位置在路经上的"序号"
PosType seat; //当前的坐标位置
int di; //往下一座标的方向
}ElemType; //栈的元素类型
typedef struct NodeType{
ElemType data;
struct NodeType *next;
}NodeType,*LinkType;//结点类型,指针类型
#include<stdio.h>
#include<stdlib.h>
#include<malloc.h>
#include<ctime>
static int a[25]={0};
static int b[25]={0};
static int num(0);
using namespace std;
typedef struct{ //当前坐标位置
int r,c; //迷宫中r行c列的位置
}PosType;
typedef struct MazeType{
int m,n;
char arr[25][25]; //各位置取值'1''@','*' 其中,'1'围墙'@'足迹,'*'路过
}MazeType;
MazeType ma;
typedef struct{
int step; // 当前位置在路经上的"序号"
PosType seat; //当前的坐标位置
int di; //往下一座标的方向
}ElemType; //栈的元素类型
typedef struct NodeType{
ElemType data;
struct NodeType *next;
}NodeType,*LinkType;//结点类型,指针类型
typedef struct{
LinkType top;
int size;
}Stack; //栈类型
Stack S;
void InitStack(Stack *S)
{
S->top=NULL;
S->size=0;
}
int StackEmpty(Stack S)
{
if(S.top==NULL||S.size==0)
return 1;
else
return 0;
}
int Push(Stack *S,ElemType e)
{
LinkType p;
p=(LinkType)malloc(sizeof(NodeType));
p->data=e;
if(S->top==NULL)
p->next=NULL;
else
剩余9页未读,继续阅读
lxyfengyun
- 粉丝: 16
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- C语言基础-C语言编程基础之Leetcode编程题解之第39题组合总和.zip
- C语言基础-C语言编程基础之Leetcode编程题解之第38题外观数列.zip
- C语言基础-C语言编程基础之Leetcode编程题解之第37题解数独.zip
- C语言基础-C语言编程基础之Leetcode编程题解之第36题有效的数独.zip
- C语言基础-C语言编程基础之Leetcode编程题解之第35题搜索插入位置.zip
- index.wxml
- C语言基础-C语言编程基础之Leetcode编程题解之第33题搜索旋转排序数组.zip
- 基于Python实现的手写数字识别系统源码.zip
- 从网页提取禁止转载的文字
- C语言基础-C语言编程基础之Leetcode编程题解之第32题最长有效括号.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页