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.
cute
Forked and approved to resolve MC, thanks!
This comment is hidden because it contains spoiler information about the solution
The function failed! f(x) = 24.3+(83.3/(69.3*(x^x*x^42.3-9.7^76.5/87.9^x*92.5^2.5)^x/log(x*4.7^x/49.3)^28.4-21.2)^x/x), x = (-4.69,8.75)
Expected: equal to (24.3,7.17589e-06) (+/- (0.0078125,0.001))
Actual: (1.03767e+18,-1.20504e+19)
wolframalpha gives me result: 1.03767×10^18 - 1.20504×10^19 i
It's hard to find solution, including mine, which will have chance to pass random tests in first ten attmpts.
Such eh masterpiece
This comment is hidden because it contains spoiler information about the solution
I did what you ask. No need for a reference solution
Also, I increased the number of test to 500, so the probability of getting every length from 1 to 50 is ~99.8% (before it was ~0.02%).
Everything looks great to me, but I suggest including
<cstddef>
since you usestd::size_t
. On another note, I just think it's a bit of a missed opportunity that vectors of size == 1 are not included in random tests. I think this might be a case where using a reference solution instead of pre-generating answers can simplify the tests and allow for a bit more coverage. What do you think?It's 7 kyu kata, I don't think there's a need to make it more complicated than it already is
Is this a question? The short answer is probably "no".
The long answer is that tests are specifically written to avoid 64 bit overflow, so the answer is probably "no".
You are free to do or return whatever you want inside (and sometimes even outside) of the function, as long as the function signature stays the same
Do your magic, wizard :^)
Все тесты корректные, внимательно читай условие задачи, в частности, последний пункт.
approve his fork
approve his fork
@o2001 ty
Ah, okay.
Loading more items...