#abc205b. B - Permutation Check
B - Permutation Check
Score : points
问题描述
给定一个包含 个整数的序列 ,这些整数都在 到 (包括两端点)之间。
请判断序列 是否为 的一个排列。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
You are given a sequence of integers between and (inclusive): .
Determine whether is a permutation of .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
If is a permutation of , print Yes
; otherwise, print No
.
Sample Input 1
5
3 1 2 4 5
Sample Output 1
Yes
is a permutation of , so we should print Yes
.
Sample Input 2
6
3 1 4 1 5 2
Sample Output 2
No
is not a permutation of , so we should print No
.
Sample Input 3
3
1 2 3
Sample Output 3
Yes
Sample Input 4
1
1
Sample Output 4
Yes
update @ 2024/3/10 09:18:08