迷宫问题方法2 —— bfs迷宫很大的情况下比dfs更优 #include <iostream> #include <queue> #include <vector> using namespace std; int n, m; //迷宫大小 int map[11][11] = {0}; //0表示可以走,1表示障碍物 int v[11][11] = {0}; //访问标记 int dx[4] = {0, 1, 0, -1}; //移动增量 int dy[4] = {1, 0, -1, 0}; struct Node { int x, y, step; //...