You have a map that marks the location of a treasure island. Some of the map areas have jagged rocks and dangerous reefs. Other areas are safe to sail in.
This is a companion discussion topic for the original entry at https://algo.monster/problems/treasure_island_ii/