#CCBCHBAHAI0000176. Giá trị lặp lại (Repeated Value)
Giá trị lặp lại (Repeated Value)
Repeated Value
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem
You are given an array of integers in .
Determine whether there exist two distinct indices such that .
Input
- The first line contains .
- The second line contains .
Output
Print YES if some value occurs at least twice; otherwise print NO.
Subtasks
Subtask 1 (20 points): and .
Subtask 2 (30 points): and .
Subtask 3 (50 points): and .
Example
Input
6
3 8 1 8 5 9
Output
YES
Explanation
The value 8 occurs twice, so the answer is YES.