解题步骤:DFS或者BFS裸题,记录好障碍和边界,然后从起点搜索判断能否走到终点 #include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 505; const int dir[][2] = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}}; int n, m; string mz[maxn]; bool flag = 0; bool vis[maxn][maxn]; struct node { int x, y; }; bool chec...