Ad
  • Custom User Avatar

    Fixed :)

  • Custom User Avatar

    cheers!

  • Custom User Avatar

    I really do not think that printing makes you pass more tests. What I believe happens is that printing causes more flushing, and more assertions are printed to output panel. Without printing, when timeout occurs, the non-flushed output is lost, and test framework does not get a chance to print assertions or outcome of test which were not displayed. CW test mechanism is IO-based and flushing can make a difference how many test results you see.
    You should see all assertions even if you do no printing, and just flush stdout at the beginning (or end) of your solution.

    But this does not change the fact that your main problem is performance and timeout you are getting.

  • Custom User Avatar

    Buffer error is because you print too much. Printing itself did not help to pass more tests, maybe it's because random tests sometimes produce easier, and sometimes harder inputs. But still they should pass below timeout.