문제 번호 : 1715 번 문제 바로가기 ☞ https://www.acmicpc.net/problem/1715 const fs = require("fs"); const filePath = process.platform === "linux" ? "/dev/stdin" : "./input.txt"; let input = fs.readFileSync(filePath).toString().split("\r\n"); let heap = [null]; const swap = (a, b) => { [heap[a], heap[b]] = [heap[b], heap[a]]; }; const heappush = (value) => { heap.push(value); let curIdx = heap.length - 1; le..
[BaekJoon] 1715 번 카드 정렬하기 문제 - (nodejs)
문제 번호 : 1715 번 문제 바로가기 ☞ https://www.acmicpc.net/problem/1715 const fs = require("fs"); const filePath = process.platform === "linux" ? "/dev/stdin" : "./input.txt"; let input = fs.readFileSync(filePath).toString().split("\r\n"); let heap = [null]; const swap = (a, b) => { [heap[a], heap[b]] = [heap[b], heap[a]]; }; const heappush = (value) => { heap.push(value); let curIdx = heap.length - 1; le..
2022.05.04