C - Distinct or Not
Editorial
/


Time Limit: 2 sec / Memory Limit: 1024 MB
配点 : 点
問題文
整数列 が与えられます。
この整数列のどの つの要素も互いに異なるならば YES
を、そうでないなら NO
を出力してください。
制約
- 入力は全て整数
入力
入力は以下の形式で標準入力から与えられる。
出力
整数列のどの つの要素も互いに異なるならば YES
を、そうでないなら NO
を出力せよ。
入力例 1Copy
Copy
5 2 6 1 4 5
出力例 1Copy
Copy
YES
どの つの要素も互いに異なります。
入力例 2Copy
Copy
6 4 1 3 1 6 2
出力例 2Copy
Copy
NO
番目の要素と 番目の要素が同じです。
入力例 3Copy
Copy
2 10000000 10000000
出力例 3Copy
Copy
NO
Score : points
Problem Statement
Given is a sequence of integers .
If its elements are pairwise distinct, print YES
; otherwise, print NO
.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
If the elements of the sequence are pairwise distinct, print YES
; otherwise, print NO
.
Sample Input 1Copy
Copy
5 2 6 1 4 5
Sample Output 1Copy
Copy
YES
The elements are pairwise distinct.
Sample Input 2Copy
Copy
6 4 1 3 1 6 2
Sample Output 2Copy
Copy
NO
The second and fourth elements are identical.
Sample Input 3Copy
Copy
2 10000000 10000000
Sample Output 3Copy
Copy
NO