https://www.acmicpc.net/problem/11053
import sys
input = sys.stdin.readline
N = int(input())
li = list(map(int, input().split(" ")))
dp = [1]*N
for i in range(1, N):
for j in range(i):
if li[i] > li[j]:
dp[i] = max(dp[i], dp[j]+1)
print(max(dp))'코딩테스트 > 코딩테스트 문제풀이' 카테고리의 다른 글
| [Python] 백준 <11054-가장 긴 바이토닉 부분 수열> (0) | 2025.07.11 |
|---|---|
| [Python] 백준 <16929-Two Dots> (0) | 2025.07.11 |
| [Python] 백준 <2866-문자열 잘라내기> (0) | 2025.07.10 |
| [Python] 백준 <12904-A와 B> (0) | 2025.07.10 |
| [Python] 백준 <9205-맥주 마시면서 걸어가기> (0) | 2025.07.08 |