• + 6 comments

    Was having the same problem (for me both in cases 7 and 8) - I even tried c instead of python, but no dice.

    I finally made it, now all tests work. I don't want to spoil your fun, but let me just say this: if your problem is the same I had, no amount of cheap optimization tricks will save you - instead, you might want to work out on paper what your algorithm is doing on a longish example, that was what eventually clued me in (in retrospect, I should have tried that a lot earlier)...

    Good luck!