Ad
  • Custom User Avatar

    @B4rrCH, already figured it out thanks. Trick was that test suite runs 1x1 up to 100x100 random tests five times not just once.
    What I did initally (and probably you too) was short-circuit to a wrong answer on first occurrance of 100x100 in which case it would halt in mere seconds, not 12 sec timeout. However short-circuiting on 2nd or 3rd occurrance of 100x100 makes it clear that randoms run multiple times.

  • Custom User Avatar

    Tho there are absolutely no differences between 99x99 and 100x100 on the tests side. :/

    and a reasonnable amount of solutions already exists... So that should be on your side, even if hard to track (local executions aren't "trustful", since you bypass some kind of interactions. Like: would you have a global data structure that doesn't get updated/cleared correctly at some point? You won't ever see that on just one test, run locally)

  • Custom User Avatar

    Same issue, codewars passes randoms up to 99x99 in less than 4s and then hangs on 100 x 100 every time.
    I dumped the input it completes with correct result in matter of milliseconds locally. Must be some limitations of the codewars sandbox?

    UPD: OK it times out because random tests run multiple times (not clear how many times exactly) not because of any particularly hard puzzle. Should description be more obvious about perfromance expectations?

  • Custom User Avatar
  • Custom User Avatar

    I don't do C#, sorry. about the time out, the idea it's that if you print enough from the right place, you'll get a buffet limit error befits the time out. Then you get some feedback

  • Custom User Avatar

    print the inputs and print stuff into everyone of your while loops, to make sure that your videdoesn't get stuck into an infinite loop in some cases.