Ignoring the programming and only addressing the logic to figure it
out, one way to solve is using halves, so test at 32, 16, 8, 4, 2, 1.
Of course if it breaks past 8 that gives you more than 3 breaks so
that doesn't work by itself.  So instead of doing halves you could
drop by 75% and go 32, 8, 2.  If 8 did not break then you go up to say
20 (half of 32-8 + 8) and repeat.  Regardless, it is most definitely
possible to find the answer for that test case.


On Sep 8, 12:30 pm, Sergey Ochkin <och...@gmail.com> wrote:
> The problem statement looks quite clear to me. Specifically, it tells
> that every test case in input file is "solvable", which means that
> there is an algorythm for determining the lowest floor where the egg
> breaks...
> However I discovered an inconsistency in the first (small) input file.
> It contains the following test case: 63 7 3.
> I simply do not believe that it is possible to determine the lowest
> crash-floor in a 63-floor building with only 7 drops and 3 breaks!
> Can anyone give a hint if I am mad or the test case is incorrect?
> --
> On Sep 8, 5:45 pm, Paul Smith <paulsmithena...@gmail.com> wrote:
>
>
>
> > The sample input has 2 test cases.  The first, 3 3 3, tell you that
> > Solvable(3,3,3) is true. So, you are asked,
>
> > what is the maximum number F such that Solveable(F,3,3) is true,
> > what is the minimum number D such that Solveable(3,D,3) is true,
> > what is the minimum number B such that Solveable(3,3,B) is true.
>
> > The answer for this case is 7 2 1, as S(7,3,3), S(3,2,3) and S(3,3,1)
> > are all true.
>
> > Similarly, given that S(7,5,3) is true, S(25, 5, 3), S(7,3,3) and
> > S(7,5,2) are all true, 7 5 3 -> 25 3 2
>
> > On Tue, Sep 8, 2009 at 1:48 PM, LeppyR64<jlep...@gmail.com> wrote:
>
> > > I'm having trouble understanding the problem statement.
>
> > > I understand what is expected for output, but not how to get from the
> > > sample input to the output.
> > > Could someone please explain the sample test case?
>
> > --
> > Paul Smithhttp://www.nomadicfun.co.uk
>
> > p...@pollyandpaul.co.uk

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-codejam" group.
To post to this group, send email to google-code@googlegroups.com
To unsubscribe from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to