Ad
  • Custom User Avatar

    It seems to be an issue with the starting code. Just submitting the "solution" without making any changes yields:
    tests/Fixture.cs(10,38): error CS0103: The name 'MorseCodeDecoder' does not exist in the current context
    tests/Fixture.cs(10,68): error CS0103: The name 'MorseCodeDecoder' does not exist in the current context

    So, the test is actually expecting MorseCodeDecoder, not Decoder.

  • Custom User Avatar

    There is a pause of 1 time unit between characters. So, one dash would look like "111", 3 dots would look like "10101".
    Pauses between words have 3 time units difference. So the string "e e" would look like "10001".
    You can assume that there is no message only containing a single character (my solution would have broken if it had that, and it was accepted).

  • Custom User Avatar

    I shouldn't have to since the problem should have been written such that it works. You may put "using namespace std;", but I prefer not to.

  • Custom User Avatar

    Did you put "using namespace std;" ahead of your solution?

  • Custom User Avatar

    I can't even compile when using attempt due to this issue.
    -isystem /runner/frameworks/cpp/ error: unknown type name 'string'; did you mean 'std::string'?
    string sol1 = "[10, 3.0418396189]";

  • Custom User Avatar

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

  • Custom User Avatar

    I have the same problem, with the same exact numbers (1220 and 1760).

    So, either we made the same error, or the test is wrong.

  • Custom User Avatar

    all well and good, but only 3 things are mentioned in the requirements:

    • Optimize the given Brainfuck code.
    • Check it for mistakes.
    • Translate the given Brainfuck programming code into C programming code.

    If there is a hidden requirement, such as "and it should be able to process 90k input in under 12 seconds", that should at least be mentioned. Furthermore, the time you get seems to be different per programming language (20 seconds for C++). This makes it a rather unbalanced problem IMHO.

    I guess you can expect the participant to create efficient code, it is 2kyu after all. But this requirement seems too well hidden, and too random for me.

  • Custom User Avatar

    the sample tests represent at most 0,000001% of the performance requierment. They are just present for you to check the correctness of the basic requierments, not the performances.

    EDIT: I missread your comment, but the result will be the same: the tape you found on this link is a rather small one and there are 10 tests for each size of tape (size up to several millions of characters for the performance tests (only one test) or ten thausend for the random tests)

  • Custom User Avatar

    Thank you very much for the hint. The downvoting is my misoperation in fact, sorry about it. Finnally fixed the issue haha.

  • Custom User Avatar

    In the Python solution, I keep getting a timeout, saying my code takes over 12 seconds to complete.

    Now, my code may not be optimal, but on my run-of-the-mill desktop machine, even the code sample at https://pastebin.com/SaU5Jfcv (mentioned in the comment from Naiten) completes in under a second.

  • Custom User Avatar

    It is only the "boilerplate" so it doesn't matter that much. I thought that every C++ guy knew that.

    Edit: added.

  • Custom User Avatar

    For C++, the boilerplate says:
    class PiApprox
    {
    public:
    static string iterPi(double epsilon);
    };

    Which is incorrect without "using namespace std".

    Please change to
    class PiApprox
    {
    public:
    static std::string iterPi(double epsilon);
    };