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.
Vectors did not come my mind, propapbly it would have been easier with vectors
Wonderfull kata, i enjoyed a lot while i was solving. I think the level is underrated, this kata should be kyu 1.
This comment is hidden because it contains spoiler information about the solution
this is the list with mines and the remaining numbers which count of not seen mines in the area. not a normal list for example
"X"
"X" "4" "X"
"X"
"4" = becomes zero because mines are known in around of them
also my solution is accepted in all submissions except if test case have this
This comment is hidden because it contains spoiler information about the solution
Actually it is very fast. It can complete tests in 3 second. there can be done some optimizations such as in every recursive call "points" variable is recreated maybe it can be done outside of the function
Actually your idea and my idea is the same but I think my solution is more efficient and practical then you and it also has no risk about unbalanced tree. Check out my solution
Nice kata. I am very satisfied with mine solution.
Hi, in the python version
game_map = ? ? ? ? ? 0 0 0 0 0 0 0 ? ? ? 0 0 0 ? ? ?\n
? ? ? ? ? 0 0 0 0 0 0 0 ? ? ? 0 0 0 ? ? ?\n
0 0 ? ? ? 0 0 0 0 0 0 0 0 0 ? ? ? ? ? ? ?\n
0 0 ? ? ? 0 0 0 0 0 0 0 ? ? ? ? ? ? ? ? ?\n
0 ? ? ? 0 0 0 0 0 0 0 0 ? ? ? ? ? ? ? ? ?\n
0 ? ? ? ? ? ? 0 0 0 0 0 ? ? ? 0 0 ? ? ? ?\n
0 ? ? ? ? ? ? ? 0 ? ? ? 0 0 0 0 0 0 ? ? ?\n
0 0 ? ? ? ? ? ? 0 ? ? ? 0 0 0 ? ? ? 0 0 0\n
0 ? ? ? ? ? ? ? 0 ? ? ? 0 0 0 ? ? ? 0 0 0\n
? ? ? ? 0 0 0 0 ? ? ? 0 0 ? ? ? ? ? 0 0 0\n
? ? ? ? 0 0 0 0 ? ? ? 0 0 ? ? ? 0 0 0 ? ?\n
? ? ? ? ? ? 0 0 ? ? ? ? ? ? ? ? 0 0 ? ? ?\n
0 ? ? ? ? ? 0 0 0 0 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 1 1
0 0 1 1 1 0 0 0 0 0 0 1 1 1 1 1 2 x 1 1 1
0 1 2 x 1 0 0 0 0 0 1 2 x 1 1 2 3 2 1 1 x
0 1 x 2 1 0 0 0 0 0 1 x 2 1 1 x x 1 0 1 1
0 1 1 1 0 0 0 0 0 0 1 1 1 0 1 2 2 1 0 0 0
1 1 0 0 0 0 0 0 0 0 1 2 2 1 0 0 0 0 0 0 0
x 2 1 1 1 1 1 0 1 1 2 x x 1 0 1 1 1 0 0 0
1 2 x 1 1 x 2 1 3 x 3 2 2 1 0 1 x 1 0 0 0
0 1 1 1 1 1 2 x 3 x 2 0 0 0 0 1 1 1 0 0 0
but this is not solvable
['x', '0', '0', 'x', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'x', '0', '0', '0', '0', '1', '?', '?']
['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '?', '?']
['0', '0', '0', 'x', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', 'x', '?']
['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'x', '0', '0', 'x', '?', '?']
['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'x', '0', '0', '0', '0', 'x', '1', '1']
['0', '0', 'x', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'x', '0']
['0', '0', '0', '0', 'x', 'x', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0']
['0', '0', '0', 'x', '0', '0', 'x', '0', '0', '0', 'x', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0']
['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'x', '0', '0', '0', '0']
['0', '0', 'x', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0']
['0', 'x', '0', '0', '0', '0', '0', '0', '0', 'x', '0', '0', '0', '0', 'x', '0', '0', '0', '0', '0', '0']
['0', '0', 'x', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'x']
['0', '0', '0', '0', 'x', '0', '0', '0', '0', '0', '0', '0', 'x', '0', '0', '0', '0', '0', '0', 'x', '0']
['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'x', '0', '0', '0', '0', '0']
['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'x', '0', '0', '0']
['0', '0', '0', 'x', '0', '0', '0', '0', '0', '0', '0', '0', 'x', '0', '0', '0', '0', '0', '0', '0', 'x']
['0', '0', 'x', '0', '0', '0', '0', '0', '0', '0', '0', 'x', '0', '0', '0', 'x', 'x', '0', '0', '0', '0']
['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0']
['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0']
['x', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'x', 'x', '0', '0', '0', '0', '0', '0', '0', '0']
['0', '0', 'x', '0', '0', 'x', '0', '0', '0', 'x', '0', '0', '0', '0', '0', '0', 'x', '0', '0', '0', '0']
['0', '0', '0', '0', '0', '0', '0', 'x', '0', 'x', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0']
this is the list with mines and the remaining numbers which count of not seen mines in the area
ther are 2 possibility mines can have
{(0, 19), (3, 19)}
{(3, 20), (1, 19)}
so this map can not be solved
Finally I did it, medium test were killing me. :D
I had a lot of fun solving it, it was a very nice kata
Very nice kata i enjoyed so much but if you wrote in assembly and knew how things work in assembly it is actually too easy to write.
you are right, i did not think like that :)
for nasm i think it is harden then 8 kyu
This comment is hidden because it contains spoiler information about the solution
Loading more items...