Set 102Question 38

Priya's Pair Sum Check

MediumWritten in CMust finish in 2 seconds

Priya is checking if any two logged values at a campus canteen add up to a suspicious target sum K.

What your program reads

Line1: N K. Line2: N integers.

What your program prints

"YES" or "NO".

Limits

1 ≤ N ≤ 10^5

Example input

5 10
2 7 4 1 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.

Priya's Pair Sum Check · DIU ContestHub