We look at each valid (having coordinates inside the grid) neighbor to a cell including a paper roll and then see if the neighbor contains a roll of paper or not. Finally we count the number of rolls, if it is less than 4 we can pick it. |
||
|---|---|---|
| .. | ||
| day1.text | ||
| day2.txt | ||
| day3.txt | ||
| day4.txt | ||