![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
DP之LCS
文章平均质量分 81
笑着走完自己的路
这个作者很懒,什么都没留下…
展开
-
hdoj 1513 Palindrome 【LCS 滚动数组实现】
PalindromeTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4062 Accepted Submission(s): 1384Problem DescriptionA palindrome is原创 2015-08-10 20:48:09 · 501 阅读 · 0 评论 -
hdoj 1080 Human Gene Functions 【LCS变形】
题目链接:hdoj 1080 Human Gene FunctionsHuman Gene FunctionsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3041 Accepted Submission(s): 1719Prob原创 2016-05-01 12:20:00 · 606 阅读 · 0 评论 -
lightoj 1013 - Love Calculator 【LCS 变形】
题目链接:lightoj 1013 - Love Calculator1013 - Love Calculator PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB Yes, you are developing a ‘Love calculator’. The softw原创 2016-04-07 18:04:55 · 700 阅读 · 0 评论 -
zoj 2432 && hdoj 1423 Greatest Common Increasing Subsequence 【打印LCIS】
Greatest Common Increasing SubsequenceTime Limit: 2 Seconds Memory Limit: 65536 KB Special JudgeYou are given two sequences of integer numbers. Write a program to determine their com原创 2015-12-15 18:08:38 · 529 阅读 · 0 评论 -
uva 10635-Prince and Princess 【LIS 求解 LCS】
链接:题意:给定两个分别具有q+1个和p+1个元素的序列,序列中的元素均不相同且均在1-n*n范围内。让你求解LCS的长度。思路:n最大为250,n*n = 250 * 250 = 62500,LCS的O(n^2)算法会TLE。先将一个序列里的元素建立val-id的映射fp,在另一个序列用fp[val]来替换val,然后求解LIS即可,为了方便求解,可以将fp[原创 2015-12-14 20:31:33 · 424 阅读 · 0 评论 -
Codeforces 597C Subsequences 【树状数组优化DP】
C. Subsequencestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFor the given sequence with n different elem原创 2015-11-13 21:57:02 · 682 阅读 · 0 评论 -
hdoj 5495 LCS 【统计元素个数大于1的置换群数目】【LCS变形】
LCSTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 23 Accepted Submission(s): 12Problem DescriptionYou are given two sequence原创 2015-10-03 21:26:21 · 643 阅读 · 0 评论 -
hdoj 1159 Common Subsequence 【最大连续子序列】
Common SubsequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 26373 Accepted Submission(s): 11713Problem DescriptionA subse原创 2015-04-23 20:12:26 · 592 阅读 · 0 评论 -
hdoj 1503 Advanced Fruits 【最长公共子序列 变形】
Advanced FruitsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1756 Accepted Submission(s): 907Special JudgeProblem Description原创 2015-04-15 22:04:43 · 511 阅读 · 0 评论 -
poj 2250 Compromise 【最长公共子序列变形】
CompromiseTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 6819 Accepted: 3051 Special JudgeDescriptionIn a few months the European Currency Union原创 2015-05-01 21:49:38 · 486 阅读 · 0 评论 -
HZAUoj 1015: LCS 【LCS变形】 + 1016: Array C 【贪心】
真是SB,20多个人花了6个小时顶着太阳去爬山,结果还没到顶,真心不如在机房打代码。题目链接:HZAUoj 1015: LCS 题意:给定两个字符串a和b,让你找它们特殊的LCS——该LCS在a、b原串中任一连续段长度不小于k。问你最长的LCS。 思路:考虑dpdp 设置End[i][j]End[i][j]表示以a[i]、b[j]结尾的串的最大连续段长度。 设置dp[i][j]dp[i][j原创 2016-05-16 20:58:27 · 632 阅读 · 0 评论