SPOJ HACKRNDM getting WA

Have implemented binary search after sorting the list to find a number 2 greater than the current element.


Question link - www.spoj.com/problems/HACKRNDM/

Please provide a link to your question.

Are you still getting WA?
I used the same logic, I got AC.

//