Ad
  • Default User Avatar

    Vectors did not come my mind, propapbly it would have been easier with vectors

  • Default User Avatar

    Wonderfull kata, i enjoyed a lot while i was solving. I think the level is underrated, this kata should be kyu 1.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    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

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    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

  • Default User Avatar

    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

  • Default User Avatar

    Nice kata. I am very satisfied with mine solution.

  • Default User Avatar

    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 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x 1 1 1 1 0 1 x 2
    0 0 0 1 1 1 0 0 0 0 0 1 1 1 1 x 2 1 2 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

  • Default User Avatar

    Finally I did it, medium test were killing me. :D

  • Default User Avatar

    I had a lot of fun solving it, it was a very nice kata

  • Default User Avatar

    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.

  • Default User Avatar

    you are right, i did not think like that :)

  • Default User Avatar

    for nasm i think it is harden then 8 kyu

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Loading more items...