https://www.acmicpc.net/problem/13903코드#include #include #include using namespace std; #define FASTIO ios::sync_with_stdio(false); cin.tie(NULL); #define MAX 1001 typedef pair pi; int r, c, arr[MAX][MAX], n, ans = INT_MAX, dx[11], dy[11]; bool visit[MAX][MAX]; queue q; void bfs() { while (!q.empty()) { int nx = q.front().first.first; int ny = q.front().first.second; int cnt = q.front().second; q..