【模板】最长公共子序列
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目描述
给出 的两个排列 和 ,求它们的最长公共子序列。
输入格式
第一行是一个数 。
接下来两行,每行为 个数,为自然数 的一个排列。
输出格式
一个数,即最长公共子序列的长度。
5
3 2 1 4 5
1 2 3 4 5
3
提示
- 对于 的数据, ;
- 对于 的数据, 。
ch09 - DP 优化 I
- Status
- Done
- Problem
- 8
- Open Since
- 2023-12-30 0:00
- Deadline
- 2024-3-3 23:59
- Extension
- 2400 hour(s)