文件名称:hanoi
介绍说明--下载内容均来自于网络,请自行研究使用
hanoi塔问题描述:有a,b,c三个塔座。开始时,在塔座上有一叠共n个圆盘,这些圆盘自下而上,由大到小地叠在一起。各圆盘从小到大编号为1,2,....,n。现在要求将塔座a上的这一叠圆盘移动到塔座b上,并仍按同样顺序叠置。在移动圆盘时应遵守以下移动规则:
(1)每次只能移动一个圆盘
(2)任何时刻都不允许将较大的圆盘压在较小的圆盘之上
(3)在满足规则(1),(2)的前提下,可将圆盘a,b,c中任何一塔座上-tower of hanoi Descr iption: have a, b, c three塔座. Initially, in塔座on a total of n has a pile of disks, these disks bottom-up, descending to stack together. The disc from small to large number 1,2 ,...., n. Now requested that塔座a disc on the stack to move to塔座b, and is still the same order, stacked. In the mobile disk mobile rules should comply with the following: (1) can only move one disc (2) any time does not permit a larger disc pressure in the smaller disk on top of (3) in meeting the rules (1), (2) under the premise of the disc may be a, b, c 1塔座on any
(1)每次只能移动一个圆盘
(2)任何时刻都不允许将较大的圆盘压在较小的圆盘之上
(3)在满足规则(1),(2)的前提下,可将圆盘a,b,c中任何一塔座上-tower of hanoi Descr iption: have a, b, c three塔座. Initially, in塔座on a total of n has a pile of disks, these disks bottom-up, descending to stack together. The disc from small to large number 1,2 ,...., n. Now requested that塔座a disc on the stack to move to塔座b, and is still the same order, stacked. In the mobile disk mobile rules should comply with the following: (1) can only move one disc (2) any time does not permit a larger disc pressure in the smaller disk on top of (3) in meeting the rules (1), (2) under the premise of the disc may be a, b, c 1塔座on any
(系统自动生成,下载前可以参看下载内容)
下载文件列表
hanoi.cpp