简单最长子列
Redraiment的走法
https://www.nowcoder.com/practice/24e6243b9f0446b081b1d6d32f2aa3aa
n = int(input()) text = list(map(int, input().strip().split(' '))) dp = [1 for i in range(n)] for i in reversed(range(n)): for j in range(i+1,n): if text[i]<text[j]: dp[i] = max(dp[i], dp[j]+1) print(max(dp))