#C4505. Detecting Duplicates in an Array

    ID: 48051 Type: Default 1000ms 256MiB

Detecting Duplicates in an Array

Detecting Duplicates in an Array

You are given an array of integers. Your task is to determine whether the array contains any duplicate numbers.

The input begins with an integer \( n \) which denotes the number of elements in the array. Next, \( n \) space-separated integers are provided representing the array elements.

If there exists any number that appears more than once, output "Yes"; otherwise, output "No".

inputFormat

The input is given via standard input and consists of two lines:

  • The first line contains an integer \( n \), the number of elements in the array.
  • The second line contains \( n \) space-separated integers.

outputFormat

Output a single line to standard output containing "Yes" if the array contains any duplicates, or "No" if it does not.

## sample
5
1 2 3 4 5
No