Ad
  • Default User Avatar

    Nothing unresolved remaining.

  • 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?

  • Default User Avatar

    Really interesting Kata :-) I'm not really sure whether my solution is actually completely correct, since it would break when a shape is allowed to have holes in it, so that it would have to return such a shape, instead of two rectangles.

  • Default 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.

  • Default User Avatar

    Please fix the setup of the Kata. Regardless of what you type, it will not compile, unless you actually put in include guards and other stuff. If that is indeed what is expected, it should be clearly stated in the Kata description.

  • Default User Avatar

    I sincerely hope that no one will ever try to come up with this kind of code in actual real world C++ code. If I'd ever be presented with that in a code review, I'd fire the person who did it...
    Apart from that: nice lesson about the really dark corners of pointer arithmetics. There's reasons why most programming languages stay clear of that stuff.

  • Default User Avatar

    Great Kata, spent quite a while sitting down with pen and paper to figure out how the numbers and digits line up. The actual programming was not that much of a challenge.

  • Default User Avatar

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

  • 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.

  • Default User Avatar

    Just a small suggestion for the C++ version of the Kata: Maybe change the signature from using long to something like uint64_t. There are compilers out there that treat a long as a 32bit variable, and that is too small for this Kata.

  • Default User Avatar

    Yeah, I figured out a different approach now, doing a deep dive into long forgotten maths classes from university. So just for clarification, from your comment I would understand that each test case has its own timeout of 12 secs - otherwise, why would I be able to tell that the last test is the one to cause the problem? Maybe one of the earlier test cases takes 10 secs and the others after that are not actually the issue? But that has nothing to do with the problem at hand, just a general observation/question.

  • 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.

  • Default User Avatar

    I'm a bit confused about the timeout in the C++ version. On my own machine, a debug build has no problems running even the big number tests in less than 5secs. Still, when attempting to solve the Kata, it times out. I'd actually be interested how much time the tests actually take, to figure out which input actually causes the problem - would it be possible to add something like that to the output?. Also, is the compile time also part of the time limit?

  • Default User Avatar

    As others have stated, the C++ interface is C, so the completely wrong language. What's more: description of the input data format is lacking a decent example, as is the description of the output. The different instructions are basically only understandable if one has solved a brainfuck interpreter kata before. For anyone else it's just guesswork - and it does not help that the description just copies verbatim from the Boolfuck webpage. So, after solving the other Esolang katas, this one was a huge disappointment.
    The actual implementation work (once I figured out what the input and output data formats are supposed to work like) was not even that complicated, definitely not a 3kyu.

  • Loading more items...