#P11128. 【MX-X5-T0】「GFOI Round 1」Hypnotize
【MX-X5-T0】「GFOI Round 1」Hypnotize
Background
Original link: https://oier.team/problems/X5A.
$\small\text{The absolute catastrophe of \textbf{I\&“Ī྄”} .}$
Problem Description
There are charts in Arcaea. The difficulty of the -th chart is a positive integer .
You are given a positive integer , and you want to play two charts whose difficulty difference is exactly .
You need to determine whether there exist two charts that satisfy the requirement. If yes, output Yes; otherwise, output No.
Input Format
The first line contains two positive integers .
The second line contains positive integers .
Output Format
If there exist two charts that satisfy the requirement, output Yes; otherwise, output No.
10 4
1 3 2 4 3 5 4 6 5 7
Yes
10 11
1 3 2 4 3 5 4 6 5 7
No
Hint
Sample Explanation #1
In the first sample, choose the -st and the -th charts. Since , output Yes.
Sample Explanation #2
In the second sample, there are no two charts with difficulty difference , so output No.
Constraints
This problem contains test points, and each test point has the same score.
For all testdata, , .
Translated by ChatGPT 5