(BOJ) 1926 풀이
#include #define X first #define Y second using namespace std; int BFS(int x, int y); int ar[502][502], visited[502][502]; int dx[] = {1, 0, -1, 0}; int dy[] = {0, 1, 0, -1}; queue Q; int main(void) { ios::sync_with_stdio(0); cin.tie(0); int N, M, count = 0, max = 0; cin >> N >> M; for (int i = 1; i ar[i][j]; } for (int i = 1; i
2022. 2. 4.