구름톤 챌린지 15일차 일기
문제 13. 발전기 (2) let input, N, K; const village = []; rl.on('close', () => { const dir = [[1, 0], [-1, 0], [0, 1], [0, -1]] const groups = Array(33).fill(0); const memo = Array.from(Array(Number(N)), () => Array(Number(N)).fill(0)); const BFS = (i, j) => { let cnt = 1; const queue = [[i, j]]; while (queue.length) { const queuePop = queue.shift(); const queueI = queuePop[0] const queueJ = queuePop[..
더보기