1540.Assertion

Time Limit: 1s Memory Limit: 256MB

Alice boldly asserts to you that if you divide $m$ items into $n$ groups, there will definitely be one group with a quantity of items greater than or equal to $d$.

Due to Alice's excessive self-confidence, she is unaware that some of her assertions are actually incorrect. Your task is to determine whether Alice's assertion is correct. If Alice's assertion is true, output 'Yes'; otherwise, output 'No'.

Input Format(From the terminal/stdin)

The input consists of multiple test cases. The first line contains a single integer $T(1≤T≤10^5)$ — the number of test cases. Description of the test cases follows.

The first line of each test case contains three integers $n,m,d (2≤m≤10^9,1≤n \lt m,0≤d≤10^9)$,$n$ and $m$ represent the number of groups and the quantity of items, respectively, in Alice's assertion. The symbol $d$ signifies Alice's claim that there will always be at least one group with a quantity of items greater than or equal to $d$.

Output Format(To the terminal/stdout)

For each set of data, output a string. If Alice's assertion is correct, output 'Yes'; otherwise, output 'No'.

Sample Input

Copy
3
1 2 1
2 3 2
3 10 4
 \n
 · · \n
 · · \n
 ·  · \n

Sample Output

Copy
Yes
Yes
Yes
   \n
   \n
   \n
Source: 2023“钉耙编程”中国大学生算法设计超级联赛(1)

Submit

请先 登录

© 2025 FAQs