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.
It's a bug in your solution. My kata works fine.
All these explosions happen at the same time. You cannot process it one by one. And you create some new shelters from existing ones (??) Please read the description and samples again. The logic is rather simple and you overcomplicate it.
This comment is hidden because it contains spoiler information about the solution
Iterating over the set of N possible fractions with a denominator d less than or equal 1 is O(N) in complexity. Perhaps your algorithm can be optimized?