题解 | #Redraiment的走法#想了两天了

Redraiment的走法

http://www.nowcoder.com/practice/24e6243b9f0446b081b1d6d32f2aa3aa

while True:
    
    try:
        n = int(input())
        num_list = list(map(int, input().split()))
        
        help_list = [1] * n 
        for i in range(1, n):
            for j in range(i):
                if num_list[i] > num_list[j]:
                    help_list[i] = max(help_list[i], help_list[j] + 1)
        max_len = max(help_list)
        print(max_len)
        
    except:
        break
全部评论

相关推荐

白火同学:大二有这水平很牛了,可以适当对关键信息加粗一点,比如关键技术、性能指标之类的。
点赞 评论 收藏
分享
评论
7
5
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务