Maintaining a Sequence

View as PDF

Submit solution

Points: 3 (partial)
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

Welcome to the contest! This task will prepare you for the other tasks in this contest. For this task, please print out whether there are duplicate elements in the array a.

Input Specification

The first line will contain the integer N (1 \le N \le 10^5).

The second line will contain N integers, a_i (0 \le a_i \le 10^9), the elements of the array.

Output Specification

Print YES, if there are duplicate elements, and NO otherwise.

Sample Input 1

5
1 3 9 2 0

Sample Output 1

NO

Sample Input 2

4
1 2 3 2

Sample Output 2

YES

Comments

There are no comments at the moment.