题解 | #Redraiment的走法#
Redraiment的走法
https://www.nowcoder.com/practice/24e6243b9f0446b081b1d6d32f2aa3aa
# 我学习别人的,分享出来,有需要的也可以相互学习 n = int(input()) num = list(map(int,input().split())) length = [1]*n for i in range(len(num),-1,-1): #减少重复计算 for j in range(i+1,len(num)): if num[j] > num[i]: length[i] = max(length[i],length[j]+1) print(max(length))