世界上最幸福的女孩

时间限制: 1000 ms 内存限制: 65536 kb
总通过人数: 284 总提交人数: 370

题目背景

所以,我敢肯定……现在的我……不管别人怎么说,一定是世界上最幸福的女孩。

$$ \boldsymbol{Chtholly\cdot Nota\cdot Seniorious} $$

题目描述

$\text{Chtholly}$ 收到了一份生日礼物

生日礼物里有 $n$ 个整数 $x_1, x_2, \cdots, x_n$,$\text{Chtholly}$ 可以随意指定每一个整数的数值,但是要满足:对于任意的 $1 \leq i \leq n$ ,都有 $1 \leq x_i \leq m$,且 $x_i$ 互不相等

$\text{Chtholly}$ 不喜欢三角形,所以她不希望这 $n$ 个整数中存在三个数,可以作为同一个三角形三条边的边长,即:不存在 $x_i, x_j, x_k$($1 \leq i, j, k\leq n$, 且 $i, j, k$ 互不相等),满足 $x_i + x_j > x_k$

$\text{Chtholly}$ 想知道,是否存在一种对于 $x_1, x_2, \cdots, x_n$ 的数值指定方案,满足:对于其中的任意三个数,都不能作为同一个三角形三条边的边长

输入

输入包含多组数据

第一行包含一个整数 $T$ ,表示数据组数

接下来 $T$ 行,每一行包含两个整数 $n, m$ ,表示一组数据

输出

对于每组数据,输出一行

若存在满足条件的方案,则输出 YE5,否则输出 N0

输入样例

7
10 2
4 7
5 7
3 3
114 514
1 1
16454536251 1145141919810

输出样例

N0
YE5
N0
YE5
N0
YE5
N0

样例解释

  • 当 $n = 4, m = 7$ 时,可以使 $4$ 个整数分别为 $1, 2, 4, 7$ ,满足要求
  • 当 $n = 3, m = 3$ 时,可以使 $3$ 个整数分别为 $1, 2, 3$ ,满足要求
  • 当 $n = 1, m = 1$ 时,显然满足要求

数据范围

  • 对于 $100\%$ 的数据,满足 $1 \leq T \leq 10^5, 1 \leq n \leq 10^{18}, 1 \leq m \leq 10^{18}$

题目背景 - 续

$ \text{I once swore to be with him forever, } $

$ \text{and being able to make such a vow made me incredibly happy.} $

$ \text{I once swore to be with her forever,} $

$ \text{and being able to make such a vow made me incredibly peaceful.} $

$ \text{Having such feelings makes me incredibly happy.} $

$ \text{Having such feelings makes me incredibly joyful.} $

$ \text{He once said to me: I will definitely make you happy.} $

$ \text{I once said to her: I will definitely make you happy.} $

$ \text{Hearing him say that made me incredibly happy.} $

$ \text{Being able to say that to her made me incredibly satisfied.} $

$ \text{He shared so much happiness with me.} $

$ \text{I received so much from her, but I...} $

$ \text{So for sure, I am the happiest girl in the world right now,} $

$ \text{no matter what others say.} $

相关推荐