JS
const fs = require('fs');
const input = fs.readFileSync('input.txt', 'utf8').trim().split(/\n+/);
const [N, K] = input[0].split(/\s+/).map(Number);
const problems = input.slice(1).map(line => line.trim().split(/\s+/).map(Number));
const colorPositionList = Array.from({length: K + 1}, () => [])
let start
problems.forEach(problem => {
const [x, y, color] = problem
colorPositionList[color].push([x, y])
})
let minSize = Number.MAX_SAFE_INTEGER
// 0: 탑, 1: 바텀, 2: 오른,...
- 연습문제 톡
- 날짜
- 2024-11-18 10:19:32
- 작성자
- vavoya6324
- 댓글
- 0
#[HSAT_2회_정기_코딩_인증평가_기출]_사물인식_최소_면적_산출_프로그램
#js