POJ No.2456, binary search