2226: 【搜索与回溯】跳马问题(例题)

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:4 Solved:3

Description

    在5*5的棋盘上,有一只中国象棋的马,从(1,1)点出发,按日字跳马,它可以朝8个方向跳,但不允许出界或跳到已跳过的格子上,要求其跳遍整个棋盘。输出跳遍整个棋盘的不同方案总数。

    例如其中的一种跳法为:
        1    16   21   10   25
        20  11   24   15    22
        17  2     19   6     9
        12  7     4     23   14
        3   18    13   8     5

Input

    无输入。

Output

    跳遍整个棋盘的不同方案总数。

Sample Input Copy


Sample Output Copy