1. Problem
2. My Solution
import sys
n = int(sys.stdin.readline().rstrip()) # n = 6
seqeunce = [0] +list(map(int,sys.stdin.readline().rstrip().split()))
dp = [0] * (n+1)
for i in range(1,n+1): # 1~6
if i == 1:
dp[1] = 1
else:
for j in range(1,i): # 최대 1~5
if seqeunce[j] < seqeunce[i]:
dp[i] = max(dp[i], dp[j] + 1)
print(max(dp))
import sys
n = int(sys.stdin.readline().rstrip()) # n = 6
seqeunce = [0] +list(map(int,sys.stdin.readline().rstrip().split()))
dp = [1] * (n+1)
for i in range(1,n+1): # 1~6
for j in range(1,i): # 최대 1~5
if seqeunce[j] < seqeunce[i]:
dp[i] = max(dp[i], dp[j] + 1)
print(max(dp))
3. Learned