FORESTGA - Editorial

I used PRIORITY QUEUE which stores the time taken by tree to reach minimum length, initial height of tree and rate of growth. The tree with minimum time will be on top of the priority queue and it will always be included. In this way we can calculate the minimum time to reach the required length with complexity O(NlogN). It will be more clear to you after seeing my solution. See my solution here…
https://www.codechef.com/viewsolution/10016046

1 Like

Few test cases failing. Please can someone help me out.
https://www.codechef.com/viewsolution/10134958

Thanks in advance.

https://www.codechef.com/viewsolution/12100042

My solution is giving TLE even though the complexity is O(n log n)

I am getting wrong answer for only few test cases can someone please help
https://www.codechef.com/viewsolution/16177188