This is a divide and conquer based problem.
I have tried really hard on this problem but still my solution is not getting accepted. Etiher TLE is coming or WA. I am confident with my logic and approach but still i am not able to find where am i going wrong … please guide me…
Problem link (https://www.codechef.com/LRNDSA04/problems/QHOUSE)
My solution (https://www.codechef.com/viewsolution/32464381)