-
题目要求
在n*m的棋盘中,马只能走日字。马从位置(x,y)处出发,把棋盘的每一点都走一次,且只能走一次,找出所有路径。 -
代码
#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <stdlib.h>
#define M 5
#define N 4
int fx[8] = {
1, 2, 2, 1, -1, -2, -2, -1 };
int fy[8] = {
2, 1, -1, -2, -2, -1, 1, 2 };
int a[M][N];
int dep, x, y, count;
void output