文件名称:56789
介绍说明--下载内容均来自于网络,请自行研究使用
在一个标准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