Unexpected use of Binary Search ( Codeforces problem )

binary-search
codeforces
competetiveprogramming

#1

Video

https://www.youtube.com/watch?v=BMilsTX0CW8&t=