![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
最长上升子序列
文章平均质量分 85
xiaohuihuicb
分享快乐
展开
-
shuoj1936-D序列—最长上升子序列
Description已知两个长度为N的数组A和B,下标从0标号至N-1。现在定义一种D序列 (假设长度为L),这种序列满足下列条件:1. 0 2. A[D[i]] 3. B[D[i]] > B[D[i+1]] (0 求满足条件的D序列的最大长度。(其实这种序列叫做D序列的原因是:这道题是D题)Input多组数据,每组数据第一行是一个整数N。(1原创 2015-08-02 00:08:23 · 1080 阅读 · 1 评论 -
HDU1950-Bridging signals-最长上升子序列
Description'Oh no, they've done it again', cries the chief designer at the Waferland chip factory. Once more the routing designers have screwed up completely, making the signals on the chip connec原创 2015-08-02 02:04:59 · 1221 阅读 · 0 评论 -
Contest1143 - 计算思维实训-ACM程序设计练习
点击打开链接#includeusing namespace std;long long dp[10000];void dpp(int n){ dp[0] = 0; dp[1] = 1; for(int i = 2;i<=47;i++){ dp[i] = dp[i-1]+dp[i-2]; }}int main(){ int n; dpp(47); while(cin>>n原创 2016-01-04 20:18:07 · 426 阅读 · 0 评论 -
uva 10534 (dp专组H题)
题意:给一个长度为n的数字序列A,找到一个长度为2*k+1的子序列,使得前k+1个数单调上升,后k+1个数单调递减。输出2*k+1。题解:用cnt1[i]记录给定数组A到第i个元素,最长上升子序列的长度。求最长上升子序列的长度链接:http://blog.csdn.net/sinat_30062549/article/details/47193899翻转数组A得到数组B用cnt2[原创 2016-05-02 19:36:49 · 352 阅读 · 0 评论