DP一般看规律
__Soul__
灌水大户
展开
-
暑期集训LIS、LCS
LIS 最长上升子序列子序列:字符序列的子序列是只从给定字符序列中随意地不一定连续地去掉若干个字符(也可能不去掉)后所形成的字符序列。给定一个长度为n的序列:a[0],a[1],a[2]...a[n],求其最长上升子序列的长度。最长上升子序列:递增的可间断的子序列。eg: 1, 3, -3, 5, -2, 6,其最长上升子序列为1, 3, 5, 6。1.O(n²)算法定义d...原创 2018-07-25 17:07:17 · 157 阅读 · 0 评论 -
简单DP---Adjacent Bit Counts
Description For a string of n bits x1, x2, x3,…, xn, the adjacent bit count of the string (AdjBC(x)) is given by which counts the number of times a 1 bit is adjacent to another 1 bit. For exam...原创 2018-10-17 20:29:38 · 157 阅读 · 0 评论