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.
I edited it, it should be set to C++17 now
C++ translation published
C++ translation published
C++ translation published
This fork should fix the issue
After verification, the C++ test suite is definitely broken. This is an example of input for the medium tests in C++ :
{3,6,3,5,7,3,5,8,6,10,5,7,6,5,7,7,7,3,1,8,3,3,6,1,6,10,8,5,7,2,10,1,8,4,5,6,8,9,5,5,1,10,1,6,4,7,4,2,2,5,9,4,9,6,6,5,5,5,9,1,7,10,3,6,3,8,1,10,8,6,4,8,5,4,6,10,3,9,1,4,3,1,9,2,7,7,8,3,1,6,4,9,5,8,4,9,5,7,8,5,2,3,2,8,8,7,9,10,6,9,5,10,1,4,3,7,10,10,10,2,5,5,1,1,2,6,1,9,2,8,3,5,2,4,2,10,3,10,1,10,10,8,9,1,1,2,9,2,1,8,5,8,4,7,10,6,3,1,6,6,10,8,1,2,1,4,3,5,6,5,4,5,2,5,7,4,6,6,7,8,5,2,7,9,8,7,6,2,9,1,8,10,8,10,3,10,5,5,7,10,2,10,7,3,4,3,9,1,10,5,1,5,6,7,5,6,5,10,9,5,2,8,5,9,7,7,10,2,4,6,3,5,8,9,9,3,4,9,4,5,4,6,1,1,4,5,8,9,6,7,5,7,4,9,7,3,8,7,6,1,4,8,7,3,9,7,6,4,6,1,10,9,6,1,1,9,5,9,9,1,7,4,9,10,4,6,4,1,4,9,1,9,9,7,2,7,4,7,2,1,7,1,9,4,1,9,2,8,9,3,8,5,6,6,7,9,3,10,2,6,9,2,5,7,1,6,5,6,4,6,6,2,6,6,5,9,6,8,6,5,10,5,9,7,2,5,8,5,7,9,2,5,2,8,3,2,3,7,9,8,2,6,9,9,1,3,9,7,3,4,3,4,8,3,1,2,10,8,6,6,8,7,10,9,5,2,3,9,10,1,9,1,7,7,1,9,2,10,7,4,3,9,7,3,4,9,4,3,8,1,8,5,9,9,4,5,2,6,6,1,8,4,3,6,10,3,5,1,4,3,6,9,4,5,1,7,3,6,9,1,8,8,5,6,6,10,1,7,7,6,9,5,1,1,2,10,5,8,3,9,1,8,7,4,4,9,10,7,6,10,7,3,7,3,8,4,3,10,10,9,7,10,5,7,10,7,7,6,6,1,4,6,10,2,1,4,10,2,10,5}
and the correct output (computed with the Python reference solution) is
9189219707931193199459304195173016683771551867906074348090583697662521149392759681823894170077096644424564514318051866413296335691814331382722620500757801464266905719107348148032214941363160214553271053804378298390939293712808946127253452553014633676202571044656910855336273969534459600000
which is far too big for an
unsigned long long
to hold.This comment is hidden because it contains spoiler information about the solution
I'm encountering the same problem. My C++ solution overflows on medium and large tests, but passes all tests when rewritten in Python (so the algorithm it uses is likely correct). The intermediate values it manipulates are smaller than the total result, which would indicate that the expected result for medium and large tests does not fit in 64-bit integers, and that the reference C++ solution either overflows or does modular arithmetic over an unspecified constant
I've merged the descriptions in this fork. Are there any other changes I should make that I missed ?
It's done
Done. I don't know of an easy way to check this kind of thing in C++, so I used a regex to check if
<regex>
has been included in the solution's code.My mistake, the tests should be in the correct order now
I had this random test at some point :
Yet the WolframAlpha command
derivative of 22.5+log(sin(77.6)^(50.2^42.1)/(x/x)-(81.9/x^x*58.8)*(18*57.2^x-x^x+81.9*x^5.2*x^62)^x) at x=-4.6-9.47i
does give me
226.443+4.30916i
?Thanks !
Approved !
I haven't seen many katas tackling asynchronous programming (at least in C++), so this one was refreshing
Loading more items...