Sorry, I meant total floors only.
No Black magic. If and else cases can be combined together as you are
measuring the total number of floors, and each cases represent each
side(below/top) of the current floor.
Thanks

On Wed, Sep 9, 2009 at 9:46 PM, Satyajit Malugu
<malugu.satya...@gmail.com>wrote:

> @sajith
> "so total breaks become,
> 1 + F(D-1, B-1) + F(D-1,B)"
>
> Isn't it the total floors? That's what I got from code of top players. Also
> what I don't understand is - How you can combine if and else cases to a same
> equation - 1 + F(D-1, B-1) + F(D-1,B)
>
> May be I am missing something.. but all of this seems black magic
>
>
> On Tue, Sep 8, 2009 at 3:49 PM, sajith varghese <sajithvarghe...@gmail.com
> > wrote:
>
>>
>> will this makes the logic simple.
>> want to find F(D,B)
>> I drop an egg from some floor, if it breaks it will break on some
>> floor below, and I have left B-1 breaks and D-1 drops. If it doesn't
>> break I have to find a floor above the current floor and have B breaks
>> and D-1 drops.
>> so total breaks become,
>> 1 + F(D-1, B-1) + F(D-1,B)
>>
>> So you will start droping in the floor F(D-1,B-1)+1; then you move
>> accordingly up or down.
>>
>> when B= 0,  F(D,B) = 0
>> when B= 1,  F(D,1) = D if D != 0
>>
>> For solving you can make a 2d array and tryout.
>>
>> On 9/8/09, 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
>> >
>> > >
>> >
>>
>>
>>
>
>
> --
> Satyajit
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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