728x90
SMALL
https://www.acmicpc.net/problem/11053
fun main() = with(Scanner(System.`in`)) {
val count = nextInt()
val array: Array<Int> = Array(count) { 0 }
for(i in 0 until count){
array[i] = nextInt()
}
val dp : Array<Int> = Array(count) { 1 }
for(i in 1 until count){
for(j in 0 until i){
if(array[i] > array[j]){
dp[i] = max(dp[i], dp[j] + 1)
}
}
}
println(dp.max())
}
728x90
LIST