Google-Developer-Student-Club-CCOEW / Competitive-Coding

7 stars 53 forks source link

Question 67 #149

Open Mahi1901 opened 1 year ago

Mahi1901 commented 1 year ago

Ann is going to take part in a race. At the start, she has XX units of energy. For each subsequent second, she can decide to run or to rest (she must perform the chosen action during the whole second). If she runs, she loses one unit of energy during that second and if she rests, she gains one unit of energy during that second. However, if Ann decides to rest when she has XX units of energy, she does not gain any extra energy. Naturally, she cannot decide to run if she has 00 units of energy.

Ann needs to run for RR minutes to reach the goal and she needs to reach it within MM minutes. Is Ann able to finish the race on time?

Input The first line of the input contains a single integer TT denoting the number of test cases. The description of TT test cases follows. The first and only line of each test case contains three space-separated integers XX, RR and MM. Output For each test case, print a single line containing the string "YES" if Ann is able to finish the race or "NO" otherwise (without quotes).

Constraints 1≤T≤10^5 1≤X,R,M≤10^9

Sample 1: Input 2 60 3 5 60 3 4 Output YES NO

ManasiGDeshmukh commented 1 year ago

Manasi Deshmukh Cummins college of engineering for women, Pune Computer Engineering I would like to work on this issue. Can you please assign me this issue?

pranotip283 commented 1 year ago

Pranoti Patil CCOEW Comp Can you kindly assign me this issue?

ShrutikaK2911 commented 1 year ago

Name : Shrutika Kaperavenollu CCOEW Branch : IT I would like to work on this issue. Can you please assign me this issue

NikitaMiraje commented 1 year ago

Nikita Miraje Cummins college of engineering for women Dept: Electronics and telecommunication I would like to work on this issue. Can you please assign me this issue?

Mahi1901 commented 1 year ago

I have assigned. Happy coding!