判断子序列
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.
Background
给定一个长度为 的整数序列 以及一个长度为 的整数序列 。
请你判断 序列是否为 序列的子序列。
子序列指序列的一部分项按原有次序排列而得的序列,例如序列 是序列 的一个子序列。
Format
Input
第一行包含两个整数 。
第二行包含 个整数,表示 。
第三行包含 个整数,表示 。
Output
如果 序列是 序列的子序列,输出一行 Yes
。
否则,输出 No
。
Samples
3 5
1 3 5
1 2 3 4 5
Yes
Limitation
2023/03/25 双指针算法-随堂测验
- Status
- Done
- Rule
- Ledo
- Problem
- 10
- Start at
- 2023-3-25 10:00
- End at
- 2023-3-25 11:00
- Duration
- 1 hour(s)
- Host
- Partic.
- 28