文件名称:求解迷宫最短路径算法
文件大小:3KB
文件格式:CPP
更新时间:2016-10-27 04:05:08
队列 最短路径
给出一个迷宫 2维数组 求解迷宫的最短路径问题 例如 int mg[10][10]= { {1,1,1,1,1,1,1,1,1,1}, {1,0,0,1,0,0,0,1,0,1}, {1,0,0,1,0,0,0,1,0,1}, {1,0,0,0,0,1,1,0,0,1}, {1,0,1,1,1,0,0,0,0,1}, {1,0,0,0,1,0,0,0,0,1}, {1,0,1,0,0,0,1,0,0,1}, {1,0,1,1,1,0,1,1,0,1}, {1,1,0,0,0,0,0,0,0,1}, {1,1,1,1,1,1,1,1,1,1}, };