文件名称:hourse
介绍说明--下载内容均来自于网络,请自行研究使用
算法的基本思路是:
定义结构体:struct PLACE{int x, int y}表示棋盘上的位置。
依题意,马每跳一步之后都可以从七个不同的方向选择下一步的跳马,当然,前提是跳的这一步在棋盘内且它前面的任何一步都没跳到这一格子上(限界),就可以认为这一步跳成功,否则跳马不成功。若跳马不成功,则找下一个方向尝试跳马,若七个方向都跳马不成功,则回溯。
-algorithm for the basic ideas : the structure definition : PLACE struct (int x, int y) expressed position on the chessboard. According to that intended, Ma every step dancing followed from 7 to choose a different direction next vault, of course, the premise is this step jump on the chessboard in front of it, within any step no jumping on the lattice (Bound), that could jump to success, or else vault unsuccessful. Vault if unsuccessful, to find a direction to vault, if the seven directions vault unsuccessful, then backtracking.
定义结构体:struct PLACE{int x, int y}表示棋盘上的位置。
依题意,马每跳一步之后都可以从七个不同的方向选择下一步的跳马,当然,前提是跳的这一步在棋盘内且它前面的任何一步都没跳到这一格子上(限界),就可以认为这一步跳成功,否则跳马不成功。若跳马不成功,则找下一个方向尝试跳马,若七个方向都跳马不成功,则回溯。
-algorithm for the basic ideas : the structure definition : PLACE struct (int x, int y) expressed position on the chessboard. According to that intended, Ma every step dancing followed from 7 to choose a different direction next vault, of course, the premise is this step jump on the chessboard in front of it, within any step no jumping on the lattice (Bound), that could jump to success, or else vault unsuccessful. Vault if unsuccessful, to find a direction to vault, if the seven directions vault unsuccessful, then backtracking.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
跳马
....\Knight.cpp
....\Knight.exe
....\文档.doc
....\Knight.cpp
....\Knight.exe
....\文档.doc