2304

CS/Data Structure & algorithm

[Algorithm] 백준 2304 - 창고 다각형 (Node / C#)

문제https://www.acmicpc.net/problem/2304풀이1. Node.js(fs)const fs = require('fs');const input = fs.readFileSync('/dev/stdin').toString().trim().split('\n');// 기둥의 개수 파싱const N = parseInt(input[0]);// 기둥 정보 파싱 및 정렬const pillars = input.slice(1).map(line => { const [L, H] = line.split(' ').map(Number); return { L, H };}).sort((a, b) => a.L - b.L);// 가장 높은 기둥 찾기let maxHeight = 0;let maxIndex = 0..

개발자참치
'2304' 태그의 글 목록