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.
you can just call constructor recursively for one-liner
the input is an array of bits, so
int
would waste memory.bool
would have been a better fit for this precise kata, yes, butunsigned char
is the standard datatype for working with binary data (because it is byte-sized and because it avoids the usual caveats of bitwise operators with signed numbers)Respectable approach for sure, but I still feel that being able to prove the answer is what you suspect it to be is also a pretty important skill (not sure if that's what you meant or not).
The real abomination is modern website and OS design and planned obsolescence enacted through willful anti-efficiency. But the 17th
ret*=59;
overflowsunsigned long long
anyway. I simply precomputed the final answers, and 24 was still overkill, and now I can see that the last third of even those few are simply wrong.Excellent kata, approved at average vote of kyu 2!
This comment is hidden because it contains spoiler information about the solution
Please when you post a question, don't post an issue... but a question.
Can you give some example: input town + result of the test.
30 people passed the Shell kata so I am quite sure that tests are not broken.
Could it be that the Shell tests are broken??? It is difficult to debug in Shell but from my side it really looks that in several cases the test expects -1 when in fact there is a valid input.
I think you missed a couple of braces
Nice kata! Would be cool if author made a 4kyu or 3kyu version where every floor is 2D. Another cool option would be to add several stairs at each floor - finding a shortest route would be a quite challenging 3kyu kata.
Please use spoiler flag next time. Your comment is visible from the dashboard.
This comment is hidden because it contains spoiler information about the solution
Manual notification.
Voted clever because I have no idea whats going on. Some comments or explanation would be nice though.
Thank you very much! I will definately look into it. This might be usefull in some other circumstances.
Loading more items...