https://www.acmicpc.net/problem/3184 코드#include #include using namespace std;#define MAX 251#define FASTIO ios::sync_with_stdio(false); cin.tie(NULL);typedef pair pi;int r, c, dx[4] = { 1,-1,0,0 }, dy[4] = { 0, 0,1,-1 };int fs, fw;string arr[MAX];bool visit[MAX][MAX];void bfs(int i, int j) { visit[i][j] = true; int ansS = 0, ansW = 0; queue q; q.push({ i, j }); while (!q.empty()) { int x = q.fr..