题解 | #Redraiment的走法#
Redraiment的走法
https://www.nowcoder.com/practice/24e6243b9f0446b081b1d6d32f2aa3aa
n = int(input())
nums = list(map(int, input().split()))
res = [1 for _ in range(n)]
#贪心 最长递增子序列
for i in range(n):
#往前比它小的且m最大的
cur = nums[i]
cnt = res[i]
for j in range(i):#前面的数
if nums[j] < nums[i]:
cnt = max(cnt,res[j] + 1)
res[i] = cnt
print(max(res))