题解 | #Redraiment的走法#
Redraiment的走法
https://www.nowcoder.com/practice/24e6243b9f0446b081b1d6d32f2aa3aa
while True:
try:
n = int(input())
a = list(map(int, input().split()))
ls = [1 for i in range(n)]
for i in range(-2, -n - 1, -1):
for j in range(-1, i, -1):
if a[i] < a[j] and ls[i] < ls[j] + 1:
ls[i] = ls[j] + 1
print(max(ls))
except:
break
查看6道真题和解析