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.
Resu can become unnecessarily huge for large values of n.
I guess great minds think similarlly ;).
That's really clever, but it's undefined C (that is, side-effect operations with binary operations yield undefined effects). And the strict defintion of "undefined behavior" means allowing the compiler to do anything it chooses.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
For C++, I honestly think the random tests have a bug. For example, for this list
The test harness says the answer should be to remove "196" whereas my code says "-199", which according to Excel, is the smaller q value (1.0269E-140 for -199 vs 1.4917E-140 for 196).
This comment is hidden because it contains spoiler information about the solution
This appears to have NOT been resolved. For n = 63, there an overflow even with the C unsigned long long type. For that series, the last two numbers overflow:
I recommend stopped at n = 62 (this would also correct the bogus range of the "High Performance" tests to not exceed UCHAR_MAX).
LOL -- I made the same mistake: "i < 0" for size_t will always be false... (what saves you is the i >= board.size() check)
LOL. I've very much written code like that :) (i.e. trying to emphasize some aspect and losing my follow code reviewers). Code clarity is Hard.
This comment is hidden because it contains spoiler information about the solution
Ick -- this can use a ton of memory...
How the heck does this work??
Very clever! Also note you could early exit with 'false' in the loop if r ever goes negative.
This comment is hidden because it contains spoiler information about the solution
Loading more items...