Should binary search work in this problem? I think it has to be a ternary search...
2009/9/14 Saul Hidalgo <[email protected]> > Hello! Now, i could solve the problem. First, i fix the special > case with velocity 0. And after, I see that i can not limit the binary > search with "While(eps < maximo - minimo)". I changed it for "FOR(i,0,2000)" > and i got "Correct". Thanks to all :) > > On Tue, Sep 15, 2009 at 10:15 AM, Mayank Jaiswal <[email protected]>wrote: > >> >> Always look for boundary cases! >> The are the catch most of the time >> >> On Mon, Sep 14, 2009 at 8:09 PM, Grant Kot <[email protected]> wrote: >> >>> Perhaps there's a problem with handling the special case where the speed >>> averages to zero? At that point any time between the minimum and maximum >>> would give you the minimum distance. >>> >>> >>> >> >> >> -- >> Mayank Jaiswal >> B.Tech >> Final Year Student >> Computer Science and Engineering >> Indian Institute of Technology, Kharagpur >> >> D-220, Nehru Hall of Residence >> +91 97344 28874 >> http://www.linkedin.com/in/msjaiswal >> >> >> >> >> > > > -- > Saul Hidalgo > > > > > -- Renato. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "google-codejam" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-code?hl=en -~----------~----~----~----~------~----~------~--~---
