thanks :-) I knew it must have been something simple :-) On May 12, 11:59 pm, Luke Pebody <[email protected]> wrote: > The center of mass is (the sum of the N locations) divided by N. You seem > not to be dividing by N. > On 12 May 2011 22:42, "andre" <[email protected]> wrote: > > > > > > > > > Hello, > > > While going through old Codejam problems, I find that the > > minimum distance is wrong with the example solution for > > Problem B (of round 1C of 2009), case 2 and 3: > > > (http://code.google.com/codejam/contest/dashboard?c=189252#s=p1) > > > Case 2: > > > The position of the center of mass at time t is: > > > [-18, 3, 0] + t * [3, 0, 0] > > > giving tmin = 6 as shown in the example output. > > Substituting tmin = 6 in the above expression > > I get: > > > [0, 3, 0] > > > which is 3 away from the origin, not 1 > > as in the example output. > > > Case 3: > > > For the center of mass I get: > > > [5, 14, 4] + t * [4, -6, 2] > > > where I get again tmin = 1 as shown in the example > > but substituting this I get: > > > [9, 8, 6] > > > which is 13.4536240471 away from the origin, > > not 3.36340601 as given in the example. > > > Can anybody convince me of the contrary ? > > (or could this be updated on the contest analysis ?) > > > I apologize if I state the obvious... > > > best regards, > > > Andre > > > (In addition, just as a test, I downloaded the > > solution of one of the top contestants > > for this problem, ran the small input set > > and submitted it. The verifier does not > > accept the output ...) > > > -- > > 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. > > > > > > > >
-- 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.
