

Time Limit: 2 sec / Memory Limit: 1024 MB
配点 : 点
問題文
の番号がついた 人の人がいます。
回の舞踏会が行われました。 回目の舞踏会には 人が参加し、参加した人は人 でした。
どの二人も少なくとも 回同じ舞踏会に参加したか判定してください。
制約
- 入力は全て整数
入力
入力は以下の形式で標準入力から与えられる。
出力
どの二人も少なくとも 回同じ舞踏会に参加した場合 Yes
を、そうでない場合 No
を出力せよ。
入力例 1Copy
3 3 2 1 2 2 2 3 2 1 3
出力例 1Copy
Yes
人 と人 は共に 回目の舞踏会に参加しています。
人 と人 は共に 回目の舞踏会に参加しています。
人 と人 は共に 回目の舞踏会に参加しています。
以上よりどの二人も少なくとも 回同じ舞踏会に参加したので、答えは Yes
です。
入力例 2Copy
4 2 3 1 2 4 3 2 3 4
出力例 2Copy
No
人 と人 は 回も同じ舞踏会に参加していないので、答えは No
です。
Score : points
Problem Statement
There are people numbered .
parties were held. people attended the -th party, and they were People .
Determine if every two people attended the same party at least once.
Constraints
- All values in the input are integers.
Input
The input is given from Standard Input in the following format:
Output
Print Yes
if every two people attended the same party at least once; print No
otherwise.
Sample Input 1Copy
3 3 2 1 2 2 2 3 2 1 3
Sample Output 1Copy
Yes
Both Person and Person attended the -st party.
Both Person and Person attended the -nd party.
Both Person and Person attended the -rd party.
Therefore, every two people attended the same party at least once, so the answer is Yes
.
Sample Input 2Copy
4 2 3 1 2 4 3 2 3 4
Sample Output 2Copy
No
Person and Person did not attend the same party, so the answer is No
.