文件名称:migong
介绍说明--下载内容均来自于网络,请自行研究使用
以一个Maze(m, n)的长方阵表示迷宫, 迷宫的入口是Maze(1,1), 出口是Maze(m, n), Maze(i,j)等于0表示通路, Maze(i,j)等于1表示障碍。设计一个程序,对任意设定的迷宫,求出一条从入口到出口的通路,或得出没有通路的结论。各个命令以及相关数据的输入格式如下:
输入迷宫:C,接下来一行是m n,其中m是迷宫矩阵行数,n是迷宫矩阵列数,接下来的m行数据是迷宫矩阵,每行n个值,表示一个m*n的迷宫矩阵
求迷宫的一条通路:Q
当输入的命令为E时,程序结束-With a Maze (m, n), said the long square maze, the maze entrance is a Maze (1,1), exports is the Maze (m, n), Maze (i, j) is equal to 0, said channel, Maze (i, j) is equal to 1, said barrier. Designing a program, for any set of the maze, find a path from the entrance to the export, or come to the conclusion there is no path. The various commands and data input format is as follows: Enter the Labyrinth: C, followed by his party mn, where m is the maze of matrix rows, n is a maze of matrix columns, the next line of data is a maze m matrix, each row n- value, indicating an m* n matrix of the labyrinth a maze of pathways: Q when the input command for the E, the end of the process
输入迷宫:C,接下来一行是m n,其中m是迷宫矩阵行数,n是迷宫矩阵列数,接下来的m行数据是迷宫矩阵,每行n个值,表示一个m*n的迷宫矩阵
求迷宫的一条通路:Q
当输入的命令为E时,程序结束-With a Maze (m, n), said the long square maze, the maze entrance is a Maze (1,1), exports is the Maze (m, n), Maze (i, j) is equal to 0, said channel, Maze (i, j) is equal to 1, said barrier. Designing a program, for any set of the maze, find a path from the entrance to the export, or come to the conclusion there is no path. The various commands and data input format is as follows: Enter the Labyrinth: C, followed by his party mn, where m is the maze of matrix rows, n is a maze of matrix columns, the next line of data is a maze m matrix, each row n- value, indicating an m* n matrix of the labyrinth a maze of pathways: Q when the input command for the E, the end of the process
(系统自动生成,下载前可以参看下载内容)
下载文件列表
migong.txt