#include <bits/stdc++.h> #include #include #include #include #include #include #include using namespace std; int n, m, t; char a[210][210]; int vis[210][210]; int dx[] = {-1, 0, 1, 0}; int dy[] = {0, 1, 0, -1}; int sx, sy, ex, ey; struct node { int x, y; }; queue q; int main() { cin >> n >> m >> t; for (int i = 1; i <= n; i ++ ) for (int j = 1; j <= m; j ++ ) { cin >> a[i][j]; if (a[i][j] == '@') sx = i, sy = j; if (a[i][j] == '+') ex = i, ey = j; } cout<<bfs(sx,sy)<<endl; return 0; }
共 1 条回复
这是框架,没有写核心