描述:迷宫设计用2代表墙壁,1代表走过的路径(老鼠的走法用上下左右四个方向)
用C代码打印出一条路线,用python实现打印多条路径
C代码
#include<stdio.h>
#include<stdlib.h>
int reach(int i, int j);
int maze[7][7] = { { 2,2,2,2,2,2,2 },{ 2,0,0,0,0,0,2 },{ 2,0,2,0,2,0,2 },
{ 2,0,0,2,0,2,2 },{ 2,2,0,2,0,2,2 },{ 2,0,0,0,0,0,2 },{ 2,2,2,2,2,2,2 } };
int start_i = 1;//入口位置
int start_j = 1;
int end_i = 5;//出口位置
int end_j =