I attempted problem C Contest 537 Div 2. I implemented a modified binary search which seems to cover all the edge cases as well. I don't why I get a time limit exceeded on Testcase 5.
It would be great if someone could look at my code and help me out.
My code is 49673257 .
Any kind of help would be deeply appreciated.