Minion Chef and Bananas (MINEAT) .....Please tell me what's wrong with my solution

binary-search

#1

This is the question: https://www.codechef.com/problems/MINEAT

This is my solution - https://www.codechef.com/viewsolution/18905480

My solution gives correct answer for sample test cases. I know this solution will not get me through Subtask2 but I think it should have cleared Subtask1. Please help.


#2

“Chef would like to make sure that she can finish eating all bananas by that time”
What you are doing is checking if time == hour. if(time<=hour) then also it will do, because she just wants to finish it before her mother comes.


#3

thanks a lot