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

Maze-code

于 2014-01-20 发布 文件大小:3KB
0 265
下载积分: 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 个回复

  • test
    某公司收到若干报价,然后报价由低到高进行排序。设最低报价为F,最高报价为G。n=0.2*(G-F) 设A,B,C,D,E五个等距区间并取: A=[F,F+n) B=[F+n,F+2n) C=[F+2n,F+3n) D=[F+3n,F+4n) E=[F+4n,G) 所有的报价都按各自的大小,分别列入上面五个区间。各自区间内的最小报价为该区间的代表报价。如果某区间内没有报价 则以小于该区间的且与该区间相邻的区间内的最高报价代表该区间报价,如果该区间与与之相邻的较小区间内都没有报价则该区间不参加最后计算。取各区间的代表值, 求出其平均值 做为评标基准报价 (A company received a number of quotations, and quotations from low to high order. Minimum price for the F, the highest offer for the G. n = 0.2* (GF) Let A, B, C, D, E, and five equidistant intervals obtained: A = [F, F+ n) B = [F+ n, F+2 n) C = [F+ 2n, F+3 n) D = [F+3 n, F+4 n) E = [F+4 n, G) All quotes are by their size, five were included in the above range. The minimum offer their own range representative of the range quoted. If a range does not offer less than the range of places and range of adjacent intervals with the highest offer within the offer on behalf of the interval, if the interval and the adjacent smaller range do not offer the range not to participate the final calculation. Take the representative value of each interval, calculate the average price as a benchmark evaluation)
    2011-11-10 22:44:43下载
    积分:1
  • 哈夫曼树算法 根给定的n个权值{w1,w2,……wn},造n棵只有根点的二叉树,令起权值为wj 在森林中选取两棵根点权值最小的树作左右子树,造...
    哈夫曼树算法 根据给定的n个权值{w1,w2,……wn},构造n棵只有根结点的二叉树,令起权值为wj 在森林中选取两棵根结点权值最小的树作左右子树,构造一棵新的二叉树,置新二叉树根结点权值为其左右子树根结点权值之和 在森林中删除这两棵树,同时将新得到的二叉树加入森林中 重复上述两步,直到只含一棵树为止,这棵树即哈夫曼树 -Huffman tree algorithm based on a given n-weights (w1, w2, ... ... wn), construct n trees only a root node of the tree, so that from the right value of wj in the forest root node to select two the right tree for the value of the smallest subtree around, a new binary tree structure, the right to buy a new tree root node value of its subtree root node around the right value in the forest and delete these two trees, At the same time, the new binary tree obtained by adding the forest to repeat the above two steps until a tree containing only the date, that is, Huffman tree tree
    2023-05-05 13:05:03下载
    积分:1
  • 关于用nlogn的最长子序列算法,在网上摘录的
    关于用nlogn的最长子序列算法,在网上摘录的-discusses the use of the longest sequences algorithm, in the extract from the Internet
    2023-08-08 23:35:03下载
    积分:1
  • ACESS库使用时间长了之后,库文件后变得越来越庞大,本程序里的函可以实现对ACESS进行压缩 另外,当机器突然断电,可能对DB造成损坏,该函...
    ACESS数据库使用时间长了之后,数据库文件后变得越来越庞大,本程序里的函数可以实现对ACESS进行压缩 另外,当机器突然断电,可能对DB造成损坏,该函数也可实现修复-Acess database to use a long time after the database file after becoming increasingly large, the program can realize the function of Acess to compress the other hand, when a sudden power failure the machine may cause damage to DB, this function can also realize Repair
    2022-05-14 17:27:34下载
    积分:1
  • 算法设计于分析中的多段图问题,用VC编写应用动态规划的算法设计方法,利用最优性原理以及所获得的递推关系式求取最优决策序列,通过多段图的定义,找到由源点s到汇点t...
    算法设计于分析中的多段图问题,用VC编写应用动态规划的算法设计方法,利用最优性原理以及所获得的递推关系式求取最优决策序列,通过多段图的定义,找到由源点s到汇点t的最小成本路径,进而可以灵活解决可以用多段图描述的许多实际问题.-algorithm design in the analysis of many of the map, prepared with VC dynamic programming algorithm design, the optimum principle as well as the recursive relation to strike the optimal sequence of decision-making through more of the map defined by the source to find s t point to the Department of the minimum cost paths and further a flexible solution could spend more of the map describes the many practical problems.
    2022-02-04 19:58:15下载
    积分:1
  • 算法图解.pdf
    说明:  本书示例丰富,图文并茂,以简明易懂的方式阐释了算法,旨在帮助程序员在日常项目中更好地利用 算法为软件开发助力。前三章介绍算法基础,包括二分查找、大 O 表示法、两种基本的数据结构以及递归 等。余下的篇幅将主要介绍应用广泛的算法,具体内容包括 :面对具体问题时的解决技巧,比如何时采用 贪婪算法或动态规划 ;散列表的应用 ;图算法 ;K 最近邻算法。 本书适合所有程序员、计算机专业相关师生以及对算法感兴趣的读者。(This book is rich in examples, illustrated and illustrated. It explains the algorithm in a concise and easy to understand way. It aims to help programmers make better use of algorithms to help software development in daily projects. The first three chapters introduce the basic algorithm, including binary search, big O representation, two basic data structures and recursion. The remaining space will mainly introduce the widely used algorithms, including: when facing specific problems, how to use greedy algorithm or dynamic programming; hash table application; graph algorithm; k-nearest neighbor algorithm. This book is suitable for all programmers, computer related teachers and students as well as interested in algorithm readers.)
    2020-11-19 16:10:19下载
    积分:1
  • 1.通过鼠标拖拽和弹出对话框完成实体、属性、联系的绘制以及各参设定 2.对绘制的实体、属性、联系提供合法性检查 3.对绘制的图形进行拖动、重设大小、删...
    1.通过鼠标拖拽和弹出对话框完成实体、属性、联系的绘制以及各参数设定 2.对绘制的实体、属性、联系提供合法性检查 3.对绘制的图形进行拖动、重设大小、删除 4.通过属性对话框对实体、属性、联系的各种参数进行重新设置 5.数据的串行化 6.将绘制完成的E-R图转换成数据库脚本-1. Through mouse drag and drop and pop-up dialog box to complete entities, attributes, links, as well as drawing parameter setting 2. Drawing entities, attributes, links provided to check the legality of 3. The graphics on the drawing drag, reset size, delete 4. through the Properties dialog box on the entities, attributes, linked to various parameters re-set 5. serialization of data 6. will be drawn to complete the ER diagram into a database script
    2022-01-25 17:40:07下载
    积分:1
  • 石头剪子布的游戏,六个文件组成适合初学者
    石头剪子布的游戏,六个文件组成适合初学者-rock scissors cloth games, six files for beginners
    2022-01-25 18:19:36下载
    积分:1
  • 1) 新药品的入库。 2) 过期药品的出库登记、处理记录。 3) 药品库存检索。 4) 供货商信息检索。 5) 药品采购记录管理。 6) 药...
    1) 新药品的入库。 2) 过期药品的出库登记、处理记录。 3) 药品库存检索。 4) 供货商信息检索。 5) 药品采购记录管理。 6) 药品用药说明信息管理。 7) 输出相应的数据报表。 8) 具有数据备份和数据恢复功能。-1) The amount of new drugs. 2) expired drugs out of the registration, processing records. 3) medicine inventory retrieval. 4) Availability to information retrieval. 5) drugs procurement records management. 6) Note pharmaceutical drug information management. 7) corresponding to the output data statements. 8) with data backup and data recovery functions.
    2023-07-14 15:10:04下载
    积分:1
  • linearlist线性表的源代码需要的
    linearlist线性表的源代码数据结构需要的-Linear List linearlist source code data structure needed
    2022-01-28 13:11:49下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载