✨ 문제 ✨

✨ 정답 ✨
const { json } = require("express/lib/response");
const fs = require("fs");
const filePath = process.platform === "linux" ? "/dev/stdin" : "./예제.txt";
let input = fs.readFileSync(filePath).toString().trim().split('\n');
let N = +input[0]
input.shift()
let array = input[0].split(' ').map(el => +el)
dp = [...new Array(N).fill(1)]
for (let i=1;i<N;i++){
const values=[1];
for (let j=0;j<i;j++){
if (array[i]>array[j]){
values.push(dp[j]+1);
}
dp[i]=Math.max(...values);
}
}
console.log(Math.max(...dp))