What should be the approach for this problem? I have seen other coders' solution, but I am not able to understand.How binary search can be applied? Please help me. Problem link: https://www.codechef.com/TJCN2019/problems/TSECJC04
I am really thankful to you.