Ad
  • Default User Avatar

    I think the coprime test in this solution is insufficient. E.g. consider the case of the moduli being {6, 9}. These are not co-prime, however (6 % 9) != 0 and hence isValid will remain true. It also wouldn't reject moduli of {2, 4}, but would reject {4, 2}.

    Also, why the test of sys.size() >= 4? The examples in the instructions explicitly include moduli counts of 2 & 3.

  • Default User Avatar

    Running tests works fine on my C++ solution, but submitting throws up the following compiler error (it's not my code that's using Boost!):

    -isystem /runner/frameworks/cpp fatal error: 'boost/algorithm/string/join.hpp' file not found
    #include <boost/algorithm/string/join.hpp>
    ^
    1 error generated.

  • Default User Avatar

    So it turned out in my case above the error was the result of a failing test, but it appears the test harness doesn't know how to handle std::pair<>, hence the 'unsupported type' message. Once I fixed the bug in my code, the 'unsupported type' errors went away.

  • Default User Avatar

    I have the same problem, although my solution compiles and runs as expected in VS2013.

    Something funny is going on.

  • Default User Avatar

    I also found the second example confused what was otherwise a clear understanding of what was required; obviously the opposite of what an example should do!

    I feel it would be valuable to clarify that some unimportant numbers have been omitted from the second example for brevity.

  • Default User Avatar

    Subtracting vi.back() (which would become fractional after the divide) is unnecessary as n is an integral type