【模板】最长公共子序列
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
提示
- 对于 的数据, ;
- 对于 的数据, 。
天河c线性dp时空优化
- Status
- Done
- Rule
- IOI
- Problem
- 3
- Start at
- 2025-3-30 18:57
- End at
- 2025-3-30 21:27
- Duration
- 2.5 hour(s)
- Host
- Partic.
- 12