1355: 马的遍历

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:20 Solved:19

Description

 中国象棋半张棋盘如图4(a)所示。

马自左下角往右上角跳。今规定只许往右跳,不许往左跳。比如图4(a)中所示为一种跳行路线,并将所经路线打印出来。打印格式为:0,0->2,1->3,3->1,4->3,5->2,7->4,8…


Output

后有走的方案。每行一种方案

Sample Input Copy

Sample Output Copy

0,0->2,1->4,2->3,4->4,6->2,7->4,8
0,0->2,1->4,2->3,4->1,5->3,6->4,8
0,0->2,1->4,2->3,4->1,5->2,7->4,8
0,0->2,1->4,2->2,3->4,4->3,6->4,8
0,0->2,1->4,2->2,3->4,4->2,5->4,6->2,7->4,8
0,0->2,1->4,2->2,3->4,4->2,5->0,6->2,7->4,8
0,0->2,1->4,2->2,3->3,5->2,7->4,8
0,0->2,1->4,2->2,3->1,5->3,6->4,8
0,0->2,1->4,2->2,3->1,5->2,7->4,8
0,0->2,1->4,2->2,3->0,4->2,5->4,6->2,7->4,8
0,0->2,1->4,2->2,3->0,4->2,5->0,6->2,7->4,8
0,0->2,1->3,3->2,5->4,6->2,7->4,8
0,0->2,1->3,3->2,5->0,6->2,7->4,8
0,0->2,1->3,3->1,4->3,5->2,7->4,8
0,0->2,1->3,3->1,4->0,6->2,7->4,8
0,0->2,1->1,3->3,4->4,6->2,7->4,8
0,0->2,1->1,3->3,4->1,5->3,6->4,8
0,0->2,1->1,3->3,4->1,5->2,7->4,8
0,0->2,1->1,3->2,5->4,6->2,7->4,8
0,0->2,1->1,3->2,5->0,6->2,7->4,8
0,0->2,1->0,2->2,3->4,4->3,6->4,8
0,0->2,1->0,2->2,3->4,4->2,5->4,6->2,7->4,8
0,0->2,1->0,2->2,3->4,4->2,5->0,6->2,7->4,8
0,0->2,1->0,2->2,3->3,5->2,7->4,8
0,0->2,1->0,2->2,3->1,5->3,6->4,8
0,0->2,1->0,2->2,3->1,5->2,7->4,8
0,0->2,1->0,2->2,3->0,4->2,5->4,6->2,7->4,8
0,0->2,1->0,2->2,3->0,4->2,5->0,6->2,7->4,8
0,0->2,1->0,2->1,4->3,5->2,7->4,8
0,0->2,1->0,2->1,4->0,6->2,7->4,8
0,0->1,2->3,3->2,5->4,6->2,7->4,8
0,0->1,2->3,3->2,5->0,6->2,7->4,8
0,0->1,2->3,3->1,4->3,5->2,7->4,8
0,0->1,2->3,3->1,4->0,6->2,7->4,8
0,0->1,2->2,4->3,6->4,8
0,0->1,2->0,4->2,5->4,6->2,7->4,8
0,0->1,2->0,4->2,5->0,6->2,7->4,8

Source/Category