Seems like yours is /slightly/ too slow on Python 3. You can probably make it fast enough by only filling half the DP array and sorting to make R < B.
Annoying that they nerfed Python to such an extent, it's practically useless now given the amount of extra effort and insight you need to get a valid solution, even one that is optimal in big O terms. Perhaps they weren't away how many of the Python entries were using Pypy in previous years... Is there a good reason for excluding Pypy as a platform? On Sunday, May 20, 2018 at 11:49:05 AM UTC+1, Xiongqi ZHANG wrote: > Here is my successful python2 solution > https://paste.ubuntu.com/p/HcP7Cqb88x/ > > > > Even though solution exists, I still agree that we should either run codes > with pypy or has extended runtime for python solutions.. > > > Chris Knott <christoph...@gmail.com>于2018年5月20日周日 上午1:30写道: > Does anyone have a successful Python solution for B that doesn't just include > a precalculated array in the source? > > > > The solution they've described in the analysis doesn't seem remotely fast > enough...? > > > > I really think Google need to consider either allowing Pypy as a platform, or > just giving more running time to the slower languages. > > > > -- > > 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 google-code...@googlegroups.com. > > To post to this group, send email to googl...@googlegroups.com. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-code/7efd55a5-19c6-421e-ae98-7c4b43085503%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 google-code+unsubscr...@googlegroups.com. To post to this group, send email to google-code@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/google-code/ed2a5429-6216-42b7-8d7b-aaefd910f76a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.