文件名称:maze
-
所属分类:
- 标签属性:
- 上传时间:2014-12-30
-
文件大小:1.33kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
编写一个程序求解迷宫问题,迷宫是一个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
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.