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 (CodeChef: Practical coding for everyone)
My solution (CodeChef: Practical coding for everyone)