동적 프로그래밍

문제https://www.acmicpc.net/problem/15989 코드const input = require("fs") .readFileSync( process.platform === "linux" ? "/dev/stdin" : __dirname + "/example.txt" ) .toString() .trim() .split("\n") .map((e) => e.trim());const n = +input.shift();const arr = input.map(Number);const max = Math.max(...arr);const dp = Array.from({ length: max + 1 }, () => 1);let answer = "";for (let i = 2; i
58청춘
'동적 프로그래밍' 태그의 글 목록