[백준][C++] 2667 단지번호붙이기


[백준][C++] 2667 단지번호붙이기

2667. 단지번호붙이기 문제 풀이 > len; for (int i = 0; i < len; i++) { string str; cin >> str; for (int j = 0; j < len; j++) { field[i][j] = (str[j] == '1'); } } // DFS for (int y = 0; y < len; y++) { for (int x = 0; x < len; x++) { if (!visited[y][x] && field[y][x]) { // 방문 횟수를 우선순위 큐에 넣음 pQueue.push(DFS(y, x)); } } } // 사이즈 출력 cout


원문링크 : [백준][C++] 2667 단지번호붙이기