Title |
User |
Message |
Date Posted |
Re: Help |
magicalsoup |
HI vyom, I'll look over your code and check to see what's wrong Edit: remember, you can use the same club Edit: as i said before, you might want to look at dynamic programming,and try giving your vari... |
May 04, 2018 - 2:08:48 am UTC |
Help |
vyom |
I tried again and I got 3 right. Please help me. |
May 03, 2018 - 10:45:00 pm UTC |
Re: help |
magicalsoup |
btw, you don't have to use long, since there is only a max of 32 clubs and each of them don't exceed a "long" data type, |
Mar 28, 2018 - 9:19:10 pm UTC |
Re: help |
whcpeterwang |
So first off, use int instead of long long. Second of all, your code won't work for a test case such as 31m, 3 clubs, and the 3 clubs are 15, 11 and 10. Your program would output "Roberta acknowledges... |
Mar 28, 2018 - 2:54:59 am UTC |
Re: help |
magicalsoup |
search up on dynamic programming, and the reason is obvious, your code or logic/algorithm is wrong |
Mar 12, 2018 - 12:43:43 am UTC |
help |
vyom |
I'm getting the first test case right but not the other 4. |
Mar 11, 2018 - 11:39:50 pm UTC |
Re: Reusable |
spencereir |
Like SourSpinach mentioned below, it's usually important to consider the real world context; I personally wouldn't throw away my golf clubs after using them once--although that certainly would encoura... |
Apr 14, 2016 - 11:23:24 pm UTC |
Re: Reusable |
timmyjose |
Ummm.. no, it's not obvious from the problem description. It is merely your assumption. |
Apr 14, 2016 - 10:16:14 pm UTC |
Re: Reusable |
bbi5291 |
This seems obvious, but okay, sure. |
Jun 27, 2015 - 7:21:22 am UTC |
Reusable |
BMP |
The description is missing something very important. You may use the same club more than once. This solved my problem. |
Jun 27, 2015 - 1:29:53 am UTC |