#776. C++-函数-编程实现汉诺塔游戏
C++-函数-编程实现汉诺塔游戏
Background
Description
C++-函数-编程实现汉诺塔游戏
Format
Input
Output
Samples
2
1.move 1 from a to b
2.move 2 from a to c
3.move 1 from b to c
3
1.move 1 from a to c
2.move 2 from a to b
3.move 1 from c to b
4.move 3 from a to c
5.move 1 from b to a
6.move 2 from b to c
7.move 1 from a to c
4
1.move 1 from a to b
2.move 2 from a to c
3.move 1 from b to c
4.move 3 from a to b
5.move 1 from c to a
6.move 2 from c to b
7.move 1 from a to b
8.move 4 from a to c
9.move 1 from b to c
10.move 2 from b to a
11.move 1 from c to a
12.move 3 from b to c
13.move 1 from a to b
14.move 2 from a to c
15.move 1 from b to c
Limitation
1s, 1024KiB for each test case.