题解 | #拦截导弹#
拦截导弹
https://www.nowcoder.com/practice/dad3aa23d74b4aaea0749042bba2358a
n = int(input())
num = list(map(int, input().split(" ")))
dp = [1 for i in range(n)] # 初始为1
for i in range(n):
for j in range(i):
if num[j] >= num[i]:
dp[i] = max(dp[i], dp[j] + 1)
ans = 1
for i in range(n):
if dp[i] > ans:
ans = dp[i]
print(ans)
