题解 | Redraiment的走法
Redraiment的走法
https://www.nowcoder.com/practice/24e6243b9f0446b081b1d6d32f2aa3aa
while True: try: n = int(input()) num = list(map(int, input().split())) res = [1] * n for i in range(n): for j in range(i): if num[i] > num[j]: res[i] = max(res[j]+1, res[i]) print(max(res)) except: break