We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- All Contests
- HourRank 9
- Mandragora Forest
- Discussions
Mandragora Forest
Mandragora Forest
Sort by
recency
|
13 Discussions
|
Please Login in order to post a comment
Just venting. I'm rather irked at myself that while I was able to come up with and implement the elegant superfast solution on my own, it just took me until an hour after the contest ended. :-P
Mandragora? I wish to meet the problem setter. There are some issues I would like to be resolved.
Again, results from PHP code were analized incorrectly because of forced removing the last new line character in the output.
My solution gets the right answer in the first test case (writing in Python), but I'm having trouble making it efficient enough to not time out. Would anyone have any tips?
My solution involves creating a second list of possible experience points for each situation depending on if Garnet and her pet eat 0 to N mandragoras, then prints the maximum value in the list.
time complexity for my code is N*lg(N) there are T number of test cases, So overall running time for one input set should be T*N*lg(N). In worst case it will be (10^5)(10^5)(lg(10^5)) > 10^10 but my code still running fine can somebody please explain it.