![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
动态规划:LCIS
skajre
这个作者很懒,什么都没留下…
展开
-
HDU 4512 完美队列I(LCIS)
这题的关键点就是第二位的限制是n-i+1,这样就会把正在匹配的a[i]也算入其中,目的是为了有可能最后的长度是奇数的,那么有一个点是不对称的,所以是自己匹配自己,只要特殊判断一下即可。//// main.cpp// Richard//// Created by 邵金杰 on 16/9/27.// Copyright © 2016年 邵金杰. All rights reserved原创 2016-09-27 18:15:56 · 420 阅读 · 0 评论 -
HDU 1423 Greatest Common Increasing Subsequence(LCIS)
//// main.cpp// Richard//// Created by 邵金杰 on 16/9/27.// Copyright © 2016年 邵金杰. All rights reserved.//#include#include#include#includeusing namespace std;const int maxn=500+10;int原创 2016-09-27 16:24:26 · 178 阅读 · 0 评论 -
HDU 5904 LCIS(最长上升公共子序列)
这题有点特殊,那就是上升序列是严格递增的,那么只需要访问x的前一个点的连续值来更新x的连续值,时间复杂度O(n)即可。//// main.cpp// Richard//// Created by 邵金杰 on 16/9/27.// Copyright © 2016年 邵金杰. All rights reserved.//#include#include#incl原创 2016-09-27 14:16:34 · 228 阅读 · 0 评论