🛠️ 문제 11724번: 연결 요소의 개수 💡 풀이const fs = require('fs');const path = require('path');const input = fs.readFileSync(path.join(__dirname, 'input.txt')).toString().trim().split('\n')const [n, m] = input[0].split(' ').map(Number); // n: 노드 수, m: 간선 수const graph = Array.from({ length: n + 1 }, () => []); // 노드끼리 연결된 정보를 저장할 인접 리스트// - 노드 번호가 1부터 시작하기 때문에 length: n + 1// 그래프 구축for (let i = 1; i { //..