#905. C++-递归算法-汉诺塔(Hanoi)
C++-递归算法-汉诺塔(Hanoi)
Background
Description
C++-递归算法-汉诺塔(Hanoi)
Format
Input
Output
Samples
5
1:a->c
2:a->b
3:c->b
4:a->c
5:b->a
6:b->c
7:a->c
8:a->b
9:c->b
10:c->a
11:b->a
12:c->b
13:a->c
14:a->b
15:c->b
16:a->c
17:b->a
18:b->c
19:a->c
20:b->a
21:c->b
22:c->a
23:b->a
24:b->c
25:a->c
26:a->b
27:c->b
28:a->c
29:b->a
30:b->c
31:a->c
31
Limitation
1s, 1024KiB for each test case.
Statistics
Related
In following contests: