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.
n
should bestd::size_t
, notint
. This change would remove the need for the odd cast in theif
. Variables throughout your code that are supposed to represent an index or a size should bestd::size_t
private
section of theDescribe
struct, and keep the existing code in apublic
section. Here is an example#include
:<vector>
,<cstddef>
,<random>
(more on that below)ExtraMessage
. Many examples on how you can do so in this example suite<random>
instead. Link to the relevant docsconst std::vector<int>&
instead of by valuereturn {};
to the body of the solution setupTODO
comment on top of each snippet. It's bound to confuse some solversYes, it is more clear for me now.
oh I see, is it ok now?
I read it as "no (repeating or zero integer roots)". Also "zero integer roots" reads like "it should have at least one integer root".
I don't get it, the current description already states "integer roots"
Description was not clear for me. I would suggest to change it to
Currently it sounds like real and complex roots are ok.
Try not to use floating point arithmetic.
Guys,
I thought I understood the problem well and found the proper solution to it.
(JS)
At that, while my solution always passes complete set of "small" random tests, it fails the 1st "big" test.
Can there be something wrong with JS "big" tests or I am really so stupid on Friday morning :) ...
done
upper bound lowered
I published a fork, but please review it, there are a few changes I'm not too sure about. And yes, I couldn't make a fork because I was on my phone.
I made a fork for the Python test cases.
Small
,Medium
andBig
for both fixed and random tests.1000
to150
,1000
felt like it was too much.failed on test 324
. I didn't see a good reason for it, especially with fewer tests.Any of these changes can be reverted, so be sure to let me know if you disagree with any of them.
JavaScript: either
BigInt
should be used or the input upper bound should be lowered in random tests.Feel free to suggest changes or a fork. Just make sure to keep test output a black box.
Loading more items...