class Solution { int dx[4] = { 0,0,1,-1 }; int dy[4] = { 1,-1,0,0 }; bool visit[1010][1010] = { false }; public: // 多源 bfs + 最短路 int rotApple(vector<vector<int> >&grid) { int n = grid.size(), m = grid[0].size(); queue<pair<int, int>> ...