摘要:
http://poj.org/problem?id=3083题意:迷宫问题,求从进入点到出口,分别按靠左边,右边和最短距离到达出口所学要的步数;思路:用dfs求得靠左靠右走到达出口的步数,用bfs求最短最少到达出口的步数;代码:View Code #include <cstdio>#include <iostream>#include <algorithm>#include <cstring>#include <cstdlib>#include <queue>using namespace std;int xx[6] = 阅读全文