At some point in the problem you need to find an integer X that minimizes
the sum of the distance to a list of integers.
A lot of people chose to use the average of the list, whereas the right
answer is the median (or any value between the medians if there are two).

In the small testcases, N = 2, which means that any value between the two
values of the list will do (the average for example), but in the large
testcases, N can be larger than 2, and the problems start for this kind of
solution.


On Sun, May 4, 2014 at 5:48 PM, LeppyR64 <[email protected]> wrote:

> I didn't participate in this round since I qualified through Round 1A.
>
> In analysis I noticed that a large amount of people near the bubble for
> the top 1000 who got a wrong answer for A Large.  I'm a little confused
> that I fail to see the pitfall after successfully solving the small input.
>
> We can't download the solutions that fail, so if there's anyone who
> submitted this problem and wanted to comment I would be interested in
> hearing what the pitfall was.
>
> Cheers,
> Leppy
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Code Jam" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-code/88959724-c3a2-4391-ad33-3d881664c740%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/CAG7-aDKTvWYns_mM36UD4Cx%2Br%2BtZUBmhBsE1SW7aWY8EeEoQ%2Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to