文件名称:0810610
介绍说明--下载内容均来自于网络,请自行研究使用
编写程序求解“骑士巡游”问题:在n行n列的棋盘上(如n=5),假设一位骑士(按国际象棋中“马走日”的行走法)从初始坐标位置(x,y)出发,要遍访(巡游)棋盘中的每一个位置有且仅有一次。请编一个程序,为骑士求解巡游“路线图”(或告诉骑士,从某位置出发时,无法遍访整个棋盘 — 问题无解)。由于n比较大的时候输出结果会很多,以至于运行时间很长,没有实际意义,所以本程序只做了n=5的时候的情况。-Write a program for solving the Knight Parade ": n lines n columns on the board (eg, n = 5), assuming that a knight (chess" horse walk "walking method) from the initial coordinate position (x,y), starting to be visited (parade) board in each position and only once. Please compile a program, and solving for Knight Parade "road map" (or tell the knight, starting from a position can not be visited the whole board- no solution). Since n is relatively large when the output result will be a lot of that running time is very long, has no real meaning, so this procedure only when n = 5.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
0810610.cpp