文件名称:maze
- 所属分类:
- 其他小程序
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2014-12-30
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- jiaoc******
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
编写一个程序求解迷宫问题,迷宫是一个m行n列的0-1矩阵,其中0表示无障碍,1表示有障碍,设入口为(1,1),出口为(m,n),每次移动只能从一个无障碍的单元移到其周围8个方向上任一无障碍的单元,编制程序给出一条通过迷宫的路径。
要求:(1)输入m*n的迷宫矩阵,如:
6 9
0 1 0 0 0 1 1 0 0
1 0 0 0 1 1 0 1 1
0 1 1 0 0 0 0 1 1
1 1 0 1 1 1 1 0 1
1 1 0 1 0 0 1 0 0
0 0 1 1 1 0 1 1 0
(2)输出通过迷宫的路径(路径过程反射显示),如果没有迷宫没有路,则输出:不存在路径。
-Write a program to solve the maze, a labyrinth is 0-1 m matrix of rows and n columns, where 0 is accessible, 1 there are obstacles, set entrance (1,1), export (m, n), each Mobile only moved around eight directions a barrier-free unit took an accessible unit, programmed to give a path through the maze. Requirements: (1) enter the maze m* n matrix, such as: 6 9 0 1 0 0 0 1 1 0 0 1 0 0 0 1 1,011,011,000,011,110,111 1 0,111,010,010,000,111,011 0 (2) output by the labyrinth path (path process the reflection display), if there is no maze no roads, the output: there is no path.
要求:(1)输入m*n的迷宫矩阵,如:
6 9
0 1 0 0 0 1 1 0 0
1 0 0 0 1 1 0 1 1
0 1 1 0 0 0 0 1 1
1 1 0 1 1 1 1 0 1
1 1 0 1 0 0 1 0 0
0 0 1 1 1 0 1 1 0
(2)输出通过迷宫的路径(路径过程反射显示),如果没有迷宫没有路,则输出:不存在路径。
-Write a program to solve the maze, a labyrinth is 0-1 m matrix of rows and n columns, where 0 is accessible, 1 there are obstacles, set entrance (1,1), export (m, n), each Mobile only moved around eight directions a barrier-free unit took an accessible unit, programmed to give a path through the maze. Requirements: (1) enter the maze m* n matrix, such as: 6 9 0 1 0 0 0 1 1 0 0 1 0 0 0 1 1,011,011,000,011,110,111 1 0,111,010,010,000,111,011 0 (2) output by the labyrinth path (path process the reflection display), if there is no maze no roads, the output: there is no path.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
maze.c