Ad
  • Custom User Avatar

    I am getting "uncaught exception: IOException of type UserError\nuser error (Expected expression to not compile but it did compile)", but stderr shows deferred type errors on all the tests that should not typecheck, which means my code is correctly making them not compile.

  • Custom User Avatar

    The bonus challenges are worthy of 2kyu but unfortunately it's not possible to check them.

  • Custom User Avatar

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

  • Custom User Avatar

    you're right, I'm dumb :P

  • Custom User Avatar

    Shouldn't the output be an infinite sequence of zeros whenever the first element of the output is not 0?
    Every element of the input appears 0 times in the output, and that's the least nonnegative number that satisfies the problem condition.

  • Custom User Avatar

    How can a code that is 3 lines long compile for as long as 5 seconds? How much recursive template metaprogramming can you fit into 3 lines?

  • Custom User Avatar

    I tried implementing merge sort but the typechecker seems to go into an infinite loop.
    I implemented bubble sort and it works on the sample test cases but exceeds the time limit on the hidden test cases, even when limited to 2 iterations. I assume that's got to be the compilation time limit since I don't see how a comptime algorithm could cause long runtime...

  • Custom User Avatar

    I meant running arbitrary scripts on the host machine. The solution I commented on is nominally "in Haskell", but it actually writes a C file, compiles it using the host machine's GCC and then executes that instead.

  • Custom User Avatar

    Codewars allows arbitrary code execution??