That's pretty odd. I did some optimization (not affecting worst case complexity though) and passed. But I serious doubt that the time limit for python(3?) is sufficient.
see my code at https://ideone.com/Qzgziu -- 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/b58c3f5e-9961-4a7d-b995-3a10ba186347%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
