最长上升子序列LIS
CaprYang
这个作者很懒,什么都没留下…
展开
-
FatMouse's Speed HDU - 1160 dp
题解按照第一维降序排序(第一维相同按第二维降序排列防止第一维相同贡献) 在第二维中找最长上升子序列 用p数组记录转移路径方便输出AC代码#include <stdio.h>#include <bits/stdc++.h>using namespace std;typedef long long ll;const int INF = 0x3f3f3f3f;c...原创 2018-10-14 22:52:42 · 219 阅读 · 0 评论 -
Longest Ordered Subsequence POJ - 2533 dp lis
题解题目已经说明 使用最长上升子序列求解。。AC代码#include <stdio.h>#include <string.h>#include <iostream>#include <algorithm>using namespace std;typedef long long ll;const int INF = 0x3f3f3...原创 2018-10-14 23:13:44 · 212 阅读 · 0 评论 -
程序员的背包 ZZULIOJ - 2485 离散化 dp lis | 树状数组
题解经典的最长上升子序列问题 因为数值过大使用二分进行优化AC代码#include &lt;stdio.h&gt;#include &lt;bits/stdc++.h&gt;using namespace std;typedef long long ll;const int INF = 0x3f3f3f3f;const int MAXN = 5e4 + 10;int a[MAX...原创 2018-12-23 18:09:02 · 441 阅读 · 0 评论