You are not logged in. Please login at www.codechef.com to post your questions!

×

Binary search Python 2.7

I'm getting WA on SPOJ. Here's the problem: http://www.spoj.com/problems/BSEARCH1/ Here's the code: http://ideone.com/0CSrEj (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.

asked 22 Mar '13, 00:43

indra_uolles's gravatar image

2★indra_uolles
1113
accept rate: 0%

edited 22 Mar '13, 01:12


See input number 2 on your link it is giving RE (list index out of range) check it out.

link

answered 25 May '13, 17:15

kunal361's gravatar image

4★kunal361
6.0k133272
accept rate: 21%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×1,056
×529

question asked: 22 Mar '13, 00:43

question was seen: 2,338 times

last updated: 25 May '13, 17:15