Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
same problem
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.
yes, you are right。
The last line cannot have a '\n'
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.
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.
I have the same problem, although my solution compiles and runs as expected in VS2013.
Something funny is going on.
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.
Subtracting vi.back() (which would become fractional after the divide) is unnecessary as n is an integral type