Nice binary search. Fast-IO optimized.