![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
最长公共子序列LIS
lao_kai_ybqy
这个作者很懒,什么都没留下…
展开
-
密码脱落(区间dp,最长公共子序列)
密码脱落题目链接X星球的考古学家发现了一批古代留下来的密码。这些密码是由A、B、C、D 四种植物的种子串成的序列。仔细分析发现,这些密码串当初应该是前后对称的(也就是我们说的镜像串)。由于年代久远,其中许多种子脱落了,因而可能会失去镜像的特征。你的任务是:给定一个现在看到的密码串,计算一下从当初的状态,它要至少脱落多少个种子,才可能会变成现在的样子。输入格式共一行,包含一个由大写字母ABCD构成的字符串,表示现在看到的密码串。输出格式输出一个整数,表示至少脱落了多少个种子。数据范围原创 2021-03-05 15:43:13 · 262 阅读 · 0 评论 -
快乐风男(最长上升子序列求个数及其下标)
牛客小白月赛20G 快乐风男算法分析这道题就是求最长上升子序列,就是多了个寻找下标编号并要求下标字典序最小,是下标不是子序列;算法实现#include<string>#include<iostream>#include<math.h>#include<cstring>#include<algorithm>using namespace std;const int maxn=1e5+5;int a[maxn],len[maxn]原创 2021-01-17 00:35:52 · 364 阅读 · 0 评论 -
Common Subsequence(最长公共子序列)
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 subsequence of X if there exists a s原创 2020-12-20 11:45:18 · 188 阅读 · 1 评论 -
最长公共上升子序列(路径输出)
Greatest Common Increasing Subsequence题目链接You are given two sequences of integer numbers. Write a program to determine their common increasing subsequence of maximalpossible length.Sequence S1, S2, …, SN of length N is called an increasing subsequence原创 2020-12-20 11:36:56 · 459 阅读 · 1 评论 -
Bridging signals(LIS二分优化)
Problem Description题目链接‘Oh no, they’ve done it again’, cries the chief designer at the Waferland chip factory. Once more the routing designers have screwed up completely, making the signals on the chip connecting the ports of two functional blocks cross原创 2020-12-14 22:42:26 · 95 阅读 · 0 评论 -
Super Jumping! Jumping! Jumping!(LIS)
Problem DescriptionThe game can be played by two or more than two players. It consists of a chessboard(棋盘)and some chessmen(棋子), and all chessmen are marked by a positive integer or “start” or “end”. The player starts from start-point and must jumps into原创 2020-12-14 22:18:20 · 81 阅读 · 0 评论