搜索资源列表
hannota70
- 总个数确定后,每张盘curDisk的移动方向maybe_To是确定的且唯一的:如共有三个盘时,盘1始终向左移动。 这里,将柱子由左向右看成A(源柱子Source),B(借助的柱子Borrow),C(目标柱子Target). A的左看成C,B的左看成A,C的左看成B; A的有看成B,B的右看成C,C的右看成A; 每张盘的移动方法(因为不可能连续两次移动相同的盘!): 一个盘curDisk现在在 柱子curStick上,那么curDisk另一个柱子(3个中除了2个的另1个) 只要有选择的选择一个柱子
qishi
- 8×8的棋盘上分布着n个骑士,他们想约在某一格中聚会。骑士每天可以像国际象棋中的马那样移动一次,如图所示,可以从中间向8个方向移动,请你计算n个骑士的最早聚会地点和要走多少天。要求尽早聚会,且n个人走的总步数最少,先到聚会地点的骑士可以不再移动等待其他骑士。 -8 × 8 chessboard on distributed n-Cavalier, they want to about gathering in a cell. Cavalier day like chess in the hors
hnt_src
- VC++汉诺塔算法的实现,动态移动图形。汉诺塔是一个遥远的古代传说故事,至于讲的是什么,这个大家可以另查资料,这里不多说。研究汉诺塔问题,可以帮助你理解C++数组与算法的一些技巧,还是有必要参考的。-VC++ Tower of Hanoi algorithm, dynamic mobile graphics. Tower of Hanoi is an ancient legends of the distant, as to what is said, you can also check th
DivideCardGame
- 游戏规则:将总数为M的纸牌(是N的倍数),任意的划分成成数目不等的N堆,然后经过下列规则的移动,使得每堆牌的数目相等:1.要向第i堆牌移动牌,只能从i+1堆或i-1堆中取得;2.第一堆牌只能从第二堆牌中取得;3.第N堆牌只能从第N-1堆牌中取得。 算法要求:求解均分时的最小移动次数-Rules of the game: the total M of the card (which is a multiple of N), divided into any number ranging fro
063
- 印度的一个古老的游戏汉诺塔问题,输入盘子数,程序给出了相应的移动法则-India is an ancient game Tower of Hanoi problem, the input plate number, the program gives the mobile rule
EightdigitalJiugongge
- 八数码九宫格小游戏,在一个九宫格里面放入8个数字,数字只能上下左右移动,并且只能移动到空白处。通过若干此移动后,能把数字移动成初始状态。-Eight digital Squares game, in which a squared into eight figures, numbers can only move around and can only be moved to the margin. Through a number of the mobile, the initial stat