Set 102Question 24

Shuvo's Duplicate Detector

MediumWritten in CMust finish in 2 seconds

Shuvo is validating unique registration codes at a transport authority and needs to know if any code repeats.

What your program reads

Line1: N. Line2: N integers.

What your program prints

"YES" if a duplicate exists, else "NO".

Limits

1 ≤ N ≤ 10^5

Example input

5
1 2 3 2 5

Expected output

YES
main.c

Your work is saved in this browser as you type.

Loading editor…
Input for Run

Run tries your code on the input above and shows what it prints. Submit checks your output against every test, including hidden ones.

Shortcut: Ctrl + Enter sends it to the judge.

Shuvo's Duplicate Detector · DIU ContestHub