problem statement, You have r red and b blue beans. You'd prefer to disseminate them among a few (possibly, one) bundles so that every parcel: has no less than one red bean (or the number of red beans ri≥1); has somewhere around one blue
Correct answer will be upvoted else downvoted.
In this problem statement, You have r red and b blue beans. You'd prefer to disseminate them among a few (possibly, one) bundles so that every parcel:
has no less than one red bean (or the number of red beans ri≥1);
has somewhere around one blue bean (or the number of blue beans bi≥1);
the number of red and blue beans ought to contrast in close to d (or |ri−bi|≤d)
Would you be able to disseminate all beans?
Input
The main line contains the single integer t (1≤t≤1000) — the number of experiments.
The solitary line of each experiment contains three integers r, b, and d (1≤r,b≤109; 0≤d≤109) — the number of red and blue beans and the most extreme outright contrast in every bundle.
Output :For each experiment, in the event that you can disperse all beans, print YES. In any case, print NO. You might print each letter regardless you need.
Step by step
Solved in 4 steps with 1 images