Ad
  • Custom User Avatar

    Seeing that you've eventually solved this without segfaults, do you wish to resolve the outstanding issue or is there something still unresolved?

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    this is a puzzle kata, you have to figure out how to make the code compile.

  • Custom User Avatar

    Maybe one of the earlier test cases takes 10 secs and the others after that are not actually the issue?

    It's possible, but usually that's not the case. 12 seconds is given for all the tests combined, not individual ones. You can also modify sample tests to simply run one test at a time. If your code takes 2 seconds for average test, then you may be timing out at the very start of some test, but usually tests are constructed such way that they get increasingly more difficult to solve.

  • Custom User Avatar

    Your code doesn't even go past fixed tests (including hidden ones), and there are 40 random tests including numbers like 2000186715165977672, which your code can't handle. You may need a different approach :P

    Also, is the compile time also part of the time limit?

    Yes.

    would it be possible to add something like that to the output?

    I don't think that's possible. Test runner shuts down after timeout limit (12s). The last input that you see in console is the that causes problems. To test the actual time (if it's over 12s), you can do it locally.