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.
Input should not be provided as a sequence when it is of fixed size.
Lua translation !
JavaScript: Reference solution and example solution are unreasonably golfed and should be changed to some more maintainable form. I would do it myself, but I cannot make heads and tails of this mess. Halp!
How exactly are the spells produced? I could figure out how to derive modifier and maximum spell level!
I have found the math formula for this problem and tested in local.Though I reduced the time complexity to O(n), It still show time out (12000 ms).It's a bit annoying。
Lua Fork
math.randomseed(os.time())
to generate different random tests each time we run themtester
function displaying parameters to the userxbonacci
to the function to match description and display of inputsSample Tests
init
s so they are actually testedFixed Tests
andSample Tests
to increase readabilityHaskell fork
$O(n^2)$
solutions fail.The C# reference solution returns different results compared to other languages.
Possible Java translation
Fixed description merge problems of Clojure Translation by a deleted user.
Python new test framework required.
Haskell translation
This comment is hidden because it contains spoiler information about the solution
Description should be language-agnostic
C, C++, Objective-C, possibly NASM: random tests generate 63-bit numbers which can be very unfavorable and result in unsolvable inputs, and, as a result, timeouts (they can't be handled even by reference solution). Upper bounds of inputs should be either unified between languages, or inputs sohuld be guaranteed to be solvable.
Loading more items...