文件名称:tlmaze
介绍说明--下载内容均来自于网络,请自行研究使用
小鼠迷宫问题« 问题描述:小鼠a 与小鼠b身处一个m×m的迷宫中,如图所示。每一个方格表示迷宫中的一个房间。这m×n个房间中有一些房间是封闭的,不允许任何人进入。在迷宫中任何位置均可沿上,下,左,右4个方向进入未封闭的房间。小鼠a位于迷宫的(p,q)方格中,它必须找出一条通向小鼠b 所在的(r,s)方格的路。请帮助小鼠a找出一条通向小鼠b的道路。« 编程任务:对于给定的小鼠的迷宫,编程计算小鼠a 通向小鼠b的道路。« 数据输入:由文件input.txt 给出输入数据。第一行有2 个正整数m,k,分别表示迷宫的行数和封闭的房间数。接下来的k行中,每行2 个正整数,表示被封闭的房间所在的行号和列号。最后的2 行,每行也有2 个正整数,分别表示小鼠a 所处的方格(p,q)和小鼠b 所处的方格(r,s)。« 结果输出:将计算出的小鼠a 通向小鼠b 的道路输出到文件output.txt。输出文件的每行2 个正整数,表示道路行号和列号,从终点向起点方向列出。如果小鼠a 无法通向小鼠b 则输出“No Solution!”-mice problem laquo maze; Problem descr iption : mouse with a live mouse b m 1 m maze of dummies. Each expressed a box maze of a room. This m n rooms there were some rooms are closed, did not allow anyone to enter. The maze can be any location along the upper and lower, right and left four entered no closed rooms. Mice in a maze of (p, q) box, it must find a leading mice where the b (r, s) box at the road. Please help find a mouse a mouse b leading to the road. Laquo; Programming tasks : to the mice in a maze of programming leading to a calculation mice mice b roads. Laquo; Data input : from the document input.txt given input data. The first trip had two positive integers m, k, respectively, said the number of rows maze and closed several rooms. Next k OK, OK every two positive integers, h
(系统自动生成,下载前可以参看下载内容)
下载文件列表
压缩包 : 645247tlmaze.zip 列表 030300816maze.cpp