2015年4月20日

poj 2127 Greatest Common Increasing Subsequence (记录路径LICS)

摘要: 题意:求最长递增公共子序列这道题需要将该序列输出,这就牵涉到了路径记录的问题.#include #include #include using namespace std;int a[505],b[505],dp[505],n,m,cnt;int mark[505][505],ans[505];in... 阅读全文

posted @ 2015-04-20 16:55 王老大- 阅读(140) 评论(0) 推荐(0) 编辑

POJ 2533 Longest Ordered Subsequence (模版LIS)

摘要: 题意:输出最长递增子序列的长度思路:直接裸LIS,#includeconst int N = 1001;int a[N], f[N], d[N]; // d[i]用于记录a[0...i]的最大长度int bsearch(const int *f, int size, const int &a) { ... 阅读全文

posted @ 2015-04-20 15:29 王老大- 阅读(135) 评论(0) 推荐(0) 编辑

导航