Submit | All submissions | Best solutions | Back to list |
DOUGHNUT - Harry and big doughnuts |
Young Harry was asked to buy some foodstuffs for his neighbour – a strange old lady who lived with a bunch of fat cats. But the cats were strange too and they ate only doughnuts. So the lady wanted Harry to bring exactly one doughnut for each of her cats – and she had c of them. Harry had a rucksack with him but as he was a little boy he could carry only k kilograms. Harry knew that each doughnut weights w kilograms (big cats, big doughnuts). Help him decide whether he should go to supermarket and buy the doughnuts or just give up and dream he could do some magic...
Input
There is a single positive integer t (t <= 100) on the first line of input which corresponds to the number of tests (Harry was asked to buy doughnuts few times). Then t lines follow, each containing three numbers: c, k and w (1 <= c, k, w <= 100).
t [number of tests]
c k w [number of cats, Harry's hoisting capacity and weight of doughnut]
c k w [next test case]
...
Output
t lines containing word “yes” if Harry is capable of handling the task or “no” if doughnuts would cause his spine crack.
Example
Input: 3 5 15 3 1 5 4 13 25 2 Output: yes yes no
Added by: | wiele |
Date: | 2009-03-26 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All |
hide comments
|
|||||||
2014-10-29 09:53:42 Psycho_bhatt
CakeWalk :) |
|||||||
2014-10-29 09:53:42 shashi malhotra
is it a understandable problem ...? |
|||||||
2014-10-29 09:53:42 pvkcse
what an easy problem...!!!a bit logic that's it...Got AC with python in first attempt...!!! |
|||||||
2014-10-29 09:53:42 Sahil Dua
Can someone provide me some test cases? I am getting WA :\ |
|||||||
2014-10-29 09:53:42 Vasu Garg
Last edit: 2012-10-17 13:10:35 |
|||||||
2014-10-29 09:53:42 Nick Pepper
I try to submit the Erlang solution and always get 'runtime error (NZEC)' although the program is correct... I've found the problem solution here - http://stackoverflow.com/questions/3310121/avoid-nzec-error-in-erlang-in-spoj WTF! Why the module must be named only 'tested'?! Last edit: 2011-08-10 13:41:37 |