Ad
  • Custom User Avatar

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

  • Custom User Avatar

    Unfortunately, I have to disappoint you, because if I follow your instruction and take the first number as x-coordinate (as stated in the description) and the second as y-coordinate, I get 2,1 = 0 (first row, second column). If I change the coordinates, 2,1 gives back 3 (second row, first column). If I index the first row as 0, I get into trouble with the last one, because 3,3 is out of range.

  • Custom User Avatar

    I'm solving the cata with python, and I can't really figure out how there's a sunken, a damaged and an untouched boat in the second basic test case. Because the board looks like this:

    board = [ [3, 0, 1],
    [3, 0, 1],
    [0, 2, 1],
    [0, 2, 0] ]

    And the attacks [[2, 1], [2, 2], [ 3, 2], [3, 3]].

    So if I follow the coordinates of the attacks, I get the numbers 0, 0, 1, 1, which means that one boat is damaged and two boats are untouched. Even if I assume that the first line was accidentally copied into this test case, I only get 1 sunken boat, 0 damaged and 2 untouched.