Practice Contest
Hard
Binary Search
http://www.ioi2009.org/GetResource?id=1969 Page 39
Can be found here.