登录
首页 » C++ » Maze-code

Maze-code

于 2014-01-20 发布 文件大小:3KB
0 121
下载积分: 1 下载次数: 6

代码说明:

  以一个m×n的长方阵表示迷宫,0和1分别表示迷宫中的通路和障碍。设计一个程序,对任意设定的迷宫,求出一条从入口到出口的通路,或得出没有通路的结论。首先用二维数组存储迷宫数据,迷宫数据由用户输入。一个以链表作存储结构的栈类型,然后编写一个求解迷宫的递归或非递归程序。求得的通路以三元组(i,j,d)形式输出,其中:(i,j)指示迷宫中的一个坐标,d表示走到下一坐标的方向(东、南、西、北四个方向所用代表数字,自行定义) (With an m × n the long square maze, 0 and 1, respectively maze of pathways and obstacles. Design a program, for any set of the maze, find a path from the inlet to the outlet, or come to the conclusion there is no path. First of a two-dimensional array to store the data maze, maze data input by the user. A linked list storage structure for stack type, and then write a recursive or non-recursive solving the maze procedure. Obtained access to triples (i, j, d) in the form of output, of which: (i, j) indicates the maze of a coordinate, d represents the coordinates walked next direction (east, south, west, north four directions used on behalf of a digital, self-defined))

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 696518资源总数
  • 104273会员总数
  • 53今日下载