This is actually what the analysis for the large case describes. Because the percentages all really sum to 100%, you want to make as many of them round up as possible. Once one has rounded up, it takes more than an addition of 0.5% to make it round up to the next integer, but it takes only 0.5% to make a new language round up, and it takes less than 0.5% to make a language which is currently rounding down to round up. So you will never add votes to a language which is already rounding up.
On Wed, May 2, 2018 at 9:33 PM Matej P <[email protected]> wrote: > My solution for the problem was marked as a correct one, but I somehow > doubt that it is truly correct, since I was a bit careless. The pseudocode > for my solution is the following: > > 1) Figure out how many more votes each of the ALREADY MENTIONED languages > would need in order for it to be rounded up. > 2) Sort those languages increasingly according to 1). > 3) Satisfy the 1st language, satisfy the 2nd language ... (if possible). > > If there are any votes left: > 4) Find out how many additional votes a language with 0 votes would need > in order for it to be rounded up. > 5) Create as many new rounded-up languages as possible. > > Clearly, this may lead to a suboptimal solution, but I cannot find an > example where this would really happen. Unfortunately, I am also unable to > prove that there aren't any such examples. > > Are you able to prove or disprove that? > > -- > 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/ef9dbb04-4e0e-4dbd-873a-a8edbf776e5d%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/CAMAzhzgU7qCXwf0KtShRB8diJ80T%2B2JDD8H6p6yFVg1M%2B9ywog%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
