
LCS
风之旅@
努力到一定的程度,幸运就会与你不期而遇
展开
-
最长公共子序列+lcs
介绍公共子序列之前先说下一些概念:(1)子序列: 一个序列A = a1,a2,……an,中任意删除若干项,剩余的序列叫做A的一个子序列。也可以认为是从序列A按原顺序保留任意若干项得到的序列。例如:对序列 1,3,5,4,2,6,8,7来说,序列3,4,8,7 是它的一个子序列。对于一个长度为n的序列,它一共有2^n 个子序列,有(2^n – 1)个非空子序列。请注意:子序列不是子集,...转载 2018-08-10 22:19:36 · 199 阅读 · 0 评论 -
POJ - 1458 Common Subsequence
A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = < x1, x2, ..., xm > another sequence Z = < z1, z2, ..., zk > is a...原创 2019-02-20 10:13:58 · 144 阅读 · 0 评论 -
POJ - 2250 Compromise POJ
In a few months the European Currency Union will become a reality. However, to join the club, the Maastricht criteria must be fulfilled, and this is not a trivial task for the countries (maybe except...原创 2019-02-26 14:50:14 · 166 阅读 · 0 评论