You've heard that the most high quality red dye is mined from deep sea cadmium
nodules. Of course easters.dev also runs a deep sea operations unit.
Once arrived at the deep sea operations unit they tell that they will gladly mine
cadmium given that they follow all the environmental standards.
You've been given a map of the sea bed like this:
10101
1.G...
0..O..
1.O...
0G...O
1...G.
The nodules are marked by O
, empty spaces by .
and
unbuildable granite by G
.
Each nodule should have exactly one mine orthogonal to it. A mine cannot be
build on a granite tile. Since the mines produce a lot of heat, there cannot be
another mine in the eight surrounding cells of it.
For the aformentionend environmental reasons, only certain amounts of mines are
allowed. The number before each row and column show how many mines are allowed
in that row or column.
A possible placement of mines for the above example could look like this. Note
that only mines (M
) and nodules (O
) are being displayed.
10101
1..M..
0..O..
1MO...
0....O
1....M
To check if your mine placement follows all regulations you have to submit the
checksum of your placement. The checksum of a single mine is its row position
xor
its column position, where the row position starts at the top from 1, and
the column position starts at the left at 1. The checksum of the whole grid
is the sum of all the mine checksums.
The checksum for the above example is 4
.
What is the checksum of your map after you've placed all mines possible?