I’m getting WA on SPOJ.
Here’s the problem: SPOJ.com - Problem BSEARCH1
Here’s the code: 0CSrEj - Online Python Interpreter & Debugging Tool - Ideone.com
(it includes optimization)
I need a test case that will help to find a mistake. I’ve tried several cases and can’t find mistakes.