题解 | #Redraiment的走法#
Redraiment的走法
https://www.nowcoder.com/practice/24e6243b9f0446b081b1d6d32f2aa3aa
n = int(input()) nums = list(map(int,input().split())) dp = [1 for i in range(n)] for i in range(len(nums)): for j in range(i+1): if nums[j] < nums[i]: dp[i] = max(dp[i],dp[j]+1) print(max(dp))