文件名称:56789
-
所属分类:
- 标签属性:
- 上传时间:2013-05-19
-
文件大小:744byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
在一个标准8×8的国际象棋棋盘上,棋盘中有些格子是可能有障碍物的。已知骑士的初始位置和目标位置,你的任务是计算出骑士最少需要多少步可以从初始位置到达目标位置。有障碍物的格子当然不可能到达。
标准的8×8的国际象棋棋盘中每一个格子可以用唯一的编号确定。行用1~8这8个数字依次表示,列用“a”~“h”这8个字母依次表示。例如下图(a)的骑士所在位置(图中有n的格子)的编号为“d4”(注意“d”和“4”之间没有空格)。 -On a standard 88 chess board, board some of the grid may be an obstacle. Known to the initial position and the target position of the knight, your task is to calculate the Knight requires a minimum number of steps to reach the target position from the initial position. The obstacle lattice of course, impossible to reach. 88 chess board in each grid with a unique number to determine. Row 1 to 8 of these eight numbers sequentially said column with " a" to " h" in this eight letters sequentially showing. For example, the following figure (a) Knight location (n lattice) NO " d4" (Note that " d" and " 4" are no spaces between).
标准的8×8的国际象棋棋盘中每一个格子可以用唯一的编号确定。行用1~8这8个数字依次表示,列用“a”~“h”这8个字母依次表示。例如下图(a)的骑士所在位置(图中有n的格子)的编号为“d4”(注意“d”和“4”之间没有空格)。 -On a standard 88 chess board, board some of the grid may be an obstacle. Known to the initial position and the target position of the knight, your task is to calculate the Knight requires a minimum number of steps to reach the target position from the initial position. The obstacle lattice of course, impossible to reach. 88 chess board in each grid with a unique number to determine. Row 1 to 8 of these eight numbers sequentially said column with " a" to " h" in this eight letters sequentially showing. For example, the following figure (a) Knight location (n lattice) NO " d4" (Note that " d" and " 4" are no spaces between).
(系统自动生成,下载前可以参看下载内容)
下载文件列表
56789.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.