#define _CRT_SECURE_NO_WARNINGS #include #include #include using namespace std; // 백준 2667 단지번호 붙이기 // 2차원 bfs로 풀이 int grid[26][26]; int check[26][26]; int block[700] = { 0, }; int dx[4] = { -1, 1, 0, 0 }; int dy[4] = { 0,0,-1,1 }; int n; void bfs(int x,int y,int bcnt) { queue q; q.push(make_pair(x, y)); int acnt = 1; check[x][y] = bcnt; while (!q.empty()) { x = q.front().first; y = q.front().se..