Yes, this solution works. Sadly, I came up with this solution after the contest.
The solution that I crafted during the contest was the binary-search method, but I had a little bug in deciding whether a given value would not work. My method worked for all of the examples in the small test, and all of the examples but 1 in my large test. It actually works for all of the examples in the version of the large data set that can be downloaded now. Very frustrating. -- 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/CAECKw-ONix-1xkLKkKAd1YMZmQ036TLQ2eL%2BPSHVGAbY7CUBNQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
