文件名称:tmc
介绍说明--下载内容均来自于网络,请自行研究使用
在国际象棋中,马的走法与中车象棋类似,即俗话说的“马走日”,下图所示即国际象棋中马(K)在一步能到达的格子(其中黑色的格子是能到达的位置)。
现有一200*200大小的国际象棋棋盘,棋盘中仅有一个马,给定马的当前位置(S)和目标位置(T),求出马最少需要多少跳才能从当前位置到达目标位置。
-In chess, in the way of the horse and cart similar to chess, that is, the saying goes "walking day", as shown in the following figure is horse chess (k) in one can reach the grid (black Plaid was able to reach the location). Existing 200*200 the size of the chess board, only one horse in the Board, given the current position of the horse (s) and destination (t), and hands at least need to jump to from the current position to the target location.
现有一200*200大小的国际象棋棋盘,棋盘中仅有一个马,给定马的当前位置(S)和目标位置(T),求出马最少需要多少跳才能从当前位置到达目标位置。
-In chess, in the way of the horse and cart similar to chess, that is, the saying goes "walking day", as shown in the following figure is horse chess (k) in one can reach the grid (black Plaid was able to reach the location). Existing 200*200 the size of the chess board, only one horse in the Board, given the current position of the horse (s) and destination (t), and hands at least need to jump to from the current position to the target location.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
tmc.cpp