ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1064. Binary Search

i think sample test case in given problem is wrong
take N=29
p=0   q=28  i=14  L=1
p=15  q=28  i=21  L=2
p=21  q=28  i=24  L=3
this is cancelled since i value is not 10
NOW the other way
p=0   q=28  i=14  L=1
p=0   q=13  i=6   L=2
p=0   q=5   i=2   L=3
this is cancelled since i value is not 10
can any body explain me this??
Re: i think sample test case in given problem is wrong
take N=29
p=0 q=28 i=14 L=1
p=15 q=28 i=21 L=2
p=22 q=28 i=25 L=3
this is cancelled since i value is not 10
NOW the other way
p=0 q=28 i=14 L=1
p=0 q=13 i=6 L=2
p=0 q=5 i=2 L=3
this is cancelled since i value is not 10
can any body explain me this??
Re: i think sample test case in given problem is wrong
Posted by Ildar Valiev 25 Mar 2009 21:39
Answer - is a POSSIBLE value of N. It means, that from this value you CAN get I for L steps.
P = 0  Q = 28  I = 14  L = 1
P = 0  Q = 13  I = 6   L = 2
P = 7  Q = 13  I = 10  L = 3