https://www.acmicpc.net/problem/1194코드#include #include using namespace std;#define FASTIO ios::sync_with_stdio(false);cin.tie(NULL);#define MAX 51int n, m, x, y;int dx[4] = { 1, -1, 0, 0 }, dy[4] = { 0, 0, 1, -1 };char arr[MAX][MAX];bool visit[MAX][MAX][1 q; q.push({x, y, 0, 0}); visit[x][y][0] = true; while (!q.empty()) { int nx = q.front().x; int ny = q.front().y; int key = q.front().key;..