I am trying to solve this binary search problem (https://www.codechef.com/problems/FAKEBS) on codechef.
I am getting on W.A on 3 tasks out of 12 and those are small tasks. I think I am missing some edge cases. Can someone please help ?
Code :- https://ideone.com/VnwXtb
Thanks.