2013年4月6日

队列求解迷宫最短路径

摘要: #include <stdio.h>typedef struct{ int x; int y; int pre;}Queue;Queue Qu[1000];int Map[20][20];int front, rear;int M, N;int aim[4][2] = {{0, 1}, {1, 0}, {0, -1}, {-1, 0}};void Print(int front){ int j, k; j = k = front; j = front; while(j != 0) { j = Qu[k].pre; Qu[k].pre = -1... 阅读全文

posted @ 2013-04-06 22:02 lzm风雨无阻 阅读(2785) 评论(0) 推荐(0) 编辑

导航