#abc296c. C - Gap Existence
C - Gap Existence
Score : points
问题描述
给定一个包含 个数的序列:。
确定是否存在一对 ,满足 ,使得 。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
You are given a sequence of numbers: .
Determine whether there is a pair with such that .
Constraints
- All values in the input are integers.
Input
The input is given from Standard Input in the following format:
Output
Print Yes
if there is a pair with such that , and No
otherwise.
Sample Input 1
6 5
3 1 4 1 5 9
Sample Output 1
Yes
We have .
Sample Input 2
6 -4
-2 -7 -1 -8 -2 -8
Sample Output 2
No
There is no pair such that .
Sample Input 3
2 0
141421356 17320508
Sample Output 3
Yes
We have .
update @ 2024/3/10 12:18:02