mirror of
https://github.com/jcreek/advent-of-code.git
synced 2026-07-12 18:53:47 +00:00
feat(2025-04): Add day 4
This commit is contained in:
@@ -79,7 +79,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AOC.Utilities\AOC.Utilities.csproj"/>
|
||||
<ProjectReference Include="..\AOC.Helpers\AOC.Helpers.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
..@..@..@..@..@@..@@@@@@.@.@@@@.@.@@@..@.@@@.@@@.@@@.@@@.@.@.@@..@@@@@@@@@@.@@@..@@.@@@@..@@.@.@@..@@@@@@@@...@.@@.@@.@@@@.@@.@@......@@.@@
|
||||
@@@@@@@@@@@..@.@@@@.@...@@.@@@.@@@@@@@@.@.@@...@@..@@..@@..@.@..@.@.@@..@.@@@@@@@@@@@.@@@@@@.@@.....@@@@..@@.@..@@@@@@@@.@.@.@@@...@@@.@@@@
|
||||
.@@@.@@..@@@@.@.@..@@.....@....@@@@.@@@.@...@.@@.@.@@@@@@@@@@@@@@..@@@@@.@@@.@.@@...@@.@@.@@@@@..@..@@@@@@..@@@@...@@@.@.@@..@.@@@@.@.@@.@@
|
||||
@...@@@.@@.@@@.@@@@.@@@.@@.@@@@@@@@@@@@@@.@@@..@@@@.@@@..@@@.@.@@.@.@.@@@..@@@@@@.@.@.@.@.@@@@@@@@@@@.@@@@.@...@@@@@@@@@@@.@@...@@@@@@@@...
|
||||
@@@@.@.@@@.@..@.@@@@@@@@@@@@@@.@..@@@..@@@.@.@.@@@...@@@@@..@.@.@.@@@..@.@@...@..@.@....@@@@@.@..@@@.@@@@@@@@.@@.@@@.@..@.@@@@@@@@.@@.@@@..
|
||||
@.@@.@@@@@@@@@@.@..@...@@@.@@@@@@.@.@@@@@.@@@.@@@...@..@.@.@.@@@@.@@.@.@@@@@@@..@@...@@@@@@@.@.@@@@.@@.@@..@@.@..@@.@@@.@@@@@.@@@..@@.@..@@
|
||||
@.@@@...@.@@@@@..@@@@@@..@.....@@.@.@@@@...@@@.@@@.@@@@.@@@@@@@@@..@@@@@@..@@@@@..@@@@.@@@@@..@@.@...@..@@@..@@@.@@@.@@@.@.@..@@@.@@@@@@@.@
|
||||
@@@@...@@.@@.@@@@@@....@@@@.@@.@@@@.@@.@@..@@@@@@.@.@@@.@..@@@@@@.@@@..@@@@@.@@@@..@..@.@@@.@@@..@@@.@@@@.@@@.@.....@@..@@@@.@..@.@@@@@@.@@
|
||||
.......@@@@@@.@@@.@@@@@..@@.@@.@@.@@.@@@@.@@@@@..@@.@@@.@@.@.@@@.@@@@@.@@@.@@@..@.@.@@@@@@@.@@@.@@@@@@@.@@@@@@@.@@..@@@.@@.@@@.@@@@.@@@.@@@
|
||||
..@..@.@@.@.@@@.@..@...@@@.@@@@@@.@@@.@@..@.@@.@@.@@@@@.@@@...@@@@@@@@@..@@@@.@.@.@...@@@@@@@..@@@.@@@@@@@.@@@@.@@@@.@@@@..@..@@.@.@.@@.@..
|
||||
.@@@.@@@@@@@@@@@...@.@..@@@@@.@@@@@@@@@@@@.@.@@@..@@@@.@@@@.@.@@.@....@@@.@@..@@.@@..@@@...@@@.@@..@@.@@.@@.@@@@.@.@@.@@@.@@.@@..@.@..@...@
|
||||
@@.@@@@@@@@@.@..@@.@..@@@@.@@.@@.@@...@.@......@@@@@@.@.@.@@@@@@@@..@...@.@@@.@@.@...@@..@.@@..@@.@.@.@@@.@..@@.@@.@@...@@...@.@@.@@@.@@@@@
|
||||
@@@.@.@@@@@@.@@@@@@.@@@@.@..@..@@.@.@@@@.@@..@...@@@@@.@@@@@.@.....@...@@@@@.@@@.@@@.....@...@@@@.@.@@.@@.@@..@@.@@..@.@.@.@@@@@@@@...@@@.@
|
||||
@..@@@@@@.@@@@@@@.@@@@@.@...@@@.@@.@.@@.@.@@@.@@.@.@@.@.@@..@@@@.@.....@@@.@.@@.@@..@@@@.@@@@@@@@@@@@.@.@.@..@@.@@@@.@@.@..@@.@@@@.@@@@.@.@
|
||||
.@@@.@....@@.@@...@@..@@.@@@@@@.@@.@..@.@.......@.@@@@@.@.@@@@.@@...@@..@@@..@.@@@.@..@.@@@@@@..@@.@@@@@@@@@.@@..@@@.@@@@@..@@.@@..@.@@@@..
|
||||
@@@@@....@.@.@.@@@@..@@@..@.@@@@.@.@@@@@@@@@...@@..@...@@@@@@@@.@.@@.@@.@@@@@@@.@.@@@@@@@@@@@.@..@@@@@.@.@@@.@@@@..@@..@..@@@@@.@@@@@...@@.
|
||||
@..@@@.@@.@...@.@.@@@@@.@@....@@.@@@@..@...@.@@.@@@..@@.@@.@@@.@@@.@.@.@@@@@.@@@@@@@@.@@@@@@.@@.@..@@@@@@...@@@.@@@.@@@@.@.@.@@..@@@@@@..@.
|
||||
@@@@@@@@@@@..@@.@...@.@@@@@@@.@.@.@@....@@@@.@.@@..@@..@@.@@@..@.@@@.@@.@.@@@@@.@@.@@@.@.@@.@.@@@@@.@@@...@@...@@.@@@.@.@@@.@.@@.@@.@.@@@.@
|
||||
@.@@@@@..@@@@@@@@.@..@.@.@@@.@..@@.@@.@@@.@....@...@@@..@.@.@.@.@@@..@@@@.@.@@@@@@.@@.@..@@.@@@..@@.@.@@.@.@@@@.@@@@@@.@@....@.@@.@@@@.@@.@
|
||||
@..@.@.@@@@@@@.@@@@@@@..@@@@.@@....@..@...@...@@.@@..@@@.@@@@..@@@@@@.@@@..@@@@@@@@@.@@@..@@@@@@@@@@@@@@@.@@@.@@.@@@@@@@..@@.@@...@@.@@.@.@
|
||||
.@@.@..@@@@...@@..@@@@@..@@@@@@@.@...@@@...@@@....@..@@.@@@@@@....@@@@..@@.@.@@..@@@.@@@.@@@.@..@@..@.@@.@.@@@@.@.@.@@@@.@@.@....@..@@@.@@.
|
||||
.@@@@@@.@@..@...@.@@.@@@@@@@@@@..@@@.@..@.@..@@.@.@@.@@@@..@@@@@@@....@@.@@.@@.@@@@.@.@.@@@@@@@@..@@.@@@.@@.@@@@..@@.@@.......@@@@@@..@@.@.
|
||||
.@.@@@.@.@@@@@@@.@@@@@@@@@@@@..@@@@@..@.@@@@@@..@@.@.@.@@.@.@.@.@@@...@@.@@@@.@@.@.@@..@.@@@..@@@.@..@.@.@.@@@.@.@@@..@@..@@..@@@..@@@..@..
|
||||
@@@@@..@@@.@@@@@@@@.@....@.@@.@@@@..@..@.@.@@@..@.@@@@@.@..@.@@@..@.@@@.@@.@.@@@.@..@@...@@@@@...@@@@@@.@@@@@@@.@@@@@@.@@.@@@@.@...@@..@@.@
|
||||
@@.@.@@...@@@@@@@....@.@.@@.@@.@.@@@..@.@@@.@@.@...@@@.@..@@@@@@@@@@...@.@.@.@@@@..@@.@@.@@@@@@@@@.....@.@@@..@@@@.@@..@@..@.@...@.@@@.@.@@
|
||||
@@@@@.@@@@@@.@@...@@@@@.@@@@@.@@...@.@@@@@@@.@..@@@.@.@.@@@@@...@..@..@.@.@.@@@..@.@@@@@..@@.@@.@..@@.@.@..@.@@@@@@@@@.@.@@@@..@@@@@@@@@..@
|
||||
.@@.@@@@@@@@@@@@@@@@...@.@@@@.@@@@@@@@...@@@@@.@.@.@@@@.@@.@.@@@@....@@@@@...@@@.@@@.@@.@@@.@@.@@@@@@.@@@@@.@@..@@@..@@@@@@@..@@@@.@..@...@
|
||||
@@.@@@@@@@.@.@@@@@@@.@@.@...@.@.@@@..@.@@..@@@@@@@@....@.@...@.@@@@@@.@@@..@.@@.@@@.@@@.@@@.@@@@@@@@.@@.@@@@@@@@@..@...@@@.@@@@@@@@@@@@@@@@
|
||||
@@.@@@.@@@.@@.@@.@..@.@.@@@.@..@.@@@@@@.@@@@@@..@@.@@@.@@@@@@@.@@@.@.@..@..@.@@....@@.@.@@@...@@..@@..@..@@@@@@@@.@.@@@@@....@...@.@@.@@@@@
|
||||
.@..@.@@@@@@@@.@.@@@@..@@@@.@@.@@@.@@@@@..@@@.@@..@@@@...@..@@@@.@@.@..@..@@@.@.@...@.@@.@@@@@..@@@@@@.@@.@@.@.@@.@@@.....@...@...@@.@@@@.@
|
||||
@...@@.@@.@@@@@@@@@@@@.@.@@@....@@@@..@...@@@@..@@.@@@@.@.@@@@@@.@.@.@..@.@.@.@@@...@.@@.@@@@@..@@@..@@.@.@@.@@@.@...@.@@.@@@@@@...@@..@@@@
|
||||
@.@@.@..@...@..@@@@.@@@@@@@@@.@....@.@.@@.@@@@.@@@@@@.@@.....@@@@@@@@@...@@......@@@.@@@.@.@@.@@@@@..@@@@@.@@@@..@@.@.@.@...@@..@...@..@@@@
|
||||
@@.@.@@.@@@@@.@@@.@@@@@.@@.@.@@..@..@.@@@@.@.@....@..@@..@@@@.@@@@.@@@@@.@.@@@@...@@@..@@@..@@@@@@..@@@.@@@.@.@@@.@.@@@@@@...@.@.@@@@@@..@.
|
||||
.@.@@@.@.@.@@...@@@@@@@@@..@.@@.@@@..@@@@@.@.@@@.@...@..@...@..@@@.@..@@@@@@..@@.@@@.@@@@@@@@@.@@@@@@@@@..@@@@@...@@.@.@@.@@.@.@@@..@..@.@@
|
||||
@@@@..@@.@.....@@@@@@.@@@@...@.@@@@@@...@@@.@@..@.@@...@@@@@@@@@@.@..@@.@@@@.@@.@@@.@@@@@@.@.@.@@..@@@.@.@@.@@@@@@@@.@@@..@@@@@@@.@@.@@.@@@
|
||||
@@..@@@@..@@.@@@..@@.@@.@@@@@...@@.@..@@@@..@@.@@@.@..@@.@@.@..@@@.@@@@@.@@.@.@@@@@.@@.@@..@@@@..@@..@@@@@.@@@@@@@@@@.......@.@@@@@@..@@@@.
|
||||
@.@@@@.@@@@@.@@@@.@@.@@@@..@.@..@@@@@@@@.@@.@@.@@@.@@@@@.@@@.@@@@..@.@.@@@@..@.@...@.@.@@@@@@@.@...@@.@@@..@@.@@..@.@@@@@@.@..@@@@@@.@@@@.@
|
||||
.@@@..@@@@.@@.@...@...@.@@@....@...@.@@@@@@@@@.@@.....@@..@@@@@@..@@.@...@@.@@....@@@@.@@@.@.@.@@.@@@@@@@@.@.@@@@@.@@@.@@@.@@.@@@@..@@@@@.@
|
||||
@.......@.@@@@@@..@@@@@@.@@@@.@.@@@@..@.@@@@@@@.@@@.@@@@@.@.@@@@@..@@@@.@.@@.@@.@@@@@.@@@.@.@.@.@.@@@.@.@.@@..@.@@@..@@@@..@@@@.@.@@@..@...
|
||||
@.@@@@@@@..@@..@@@@@@.@.@@..@.@...@@...@.@...@@@..@..@@@.@..@@@@@.@@@@@@@..@@@@@@@..@@.@@@..@..@.@@@@@..@@@.@@@@@..@@@@@@@@.@@.@@....@@..@@
|
||||
...@@@@@@@.@.@..@@@@@@..@@@@@.@.@@@.@@.@@@@@@@@@..@@@.@@@.@@...@@@@@@@@.@@@..@@.@.@.@@@..@@@.@.@.@@.@...@.@@@@@@@@..@@@..@@@@@@.@@@@@@...@@
|
||||
@..@.@@@.@....@@@@..@@..@.@@.@@.@...@@..@@@@..@@@.@@..@..@.@@@@@@@.@.@@....@@...@@@.@.@@@.@@@@@@@@.@@@..@.@@@.@@@@.@@@@@.@@@@@..@@..@@@@@@@
|
||||
.@@.@@@@@@@@@@.@@@.@@..@@@@@@@@@..@@@..@@@@...@@@.@@@@@@@..@@@@@@.@@@.@@@....@@@@.@@@@...@..@@.@@.@@@@@@@@..@.@@@@@@@@@@@@.....@.@@.@@@..@.
|
||||
@@@@@@..@.@@.@.@.@.@...@..@@@@.@.@.@@@..@@@@@@@@@@@.@@@@@@@@@..@.@.@@@.@@.@@.....@@..@@@..@.@.@@..@@@@@.@@@..@@@@@@.@@....@@.@@.@@.@@.@...@
|
||||
@.@@..@.@@@@@@@@@..@@@@.@@@@@.@@.@@@..@.@@...@...@@@@@@.@@@@@@@@@.@..@@@@.@@@@...@@@@@@@@.@.@@..@@@@.@@@@@@.@.@@@..@@..@.@@@@@.@@@@.@@@@@@@
|
||||
@.@@.@..@.@..@@@.@..@@@..@.@@@@@.@@.@.@.@@@.@...@@@@.@@@@@@@...@@@.@...@.@@@@@@@@@.@.@@@@@@@.@..@@.@@@@.@.@@..@@@@@@@.@.@@@@@......@@@@@@@.
|
||||
@@@@@..@.@@@.@@.@..@.@..@@.@@@.....@.@@..@@.@@@@@@@@@@@@.@......@@@@..@.@@@@.@..@.@..@@@@@@.@@.@@@@.@@.@.@@..@@@@..@@@@@@@.@@..@.@@@.@@@...
|
||||
..@.@..@@@@.@..@.@@@@@..@@@@@@@@@@@@.@.@.@@.@@@...@@@..@@...@@@@@..@.@@@@@@@@..@.@..@@@@@@@.@@@.@@..@.@@@.@....@@@@@@@.@@@@@..@@..@@@@@.@@.
|
||||
..@..@..@.@@@@.@..@@@@.@.@@.@.@@@@....@@.@@.@.@@.@@@.@@....@@@..@.@@.@@.@..@@@@.@@@@@@.@..@....@..@@@@@@@.@..@..@@@.@.@@..@@@@@..@..@.@...@
|
||||
@@@.@@@@@@@@@@..@....@.@@..@@@.@..@@@.@@@@@.@.@@.@@@.@.@@@..@@.@@@@..@@@@..@@@.@@..@@@@@@@.@@.@@@@@.@@@@@@@@....@.@@.@.@.@@@....@@@@@@@.@@.
|
||||
@@@.@@@@@@@@.@@@@@.@.@.@@.@@@@@@@@@@@@@...@@@.@@...@@..@..@@..@@.@@..@.@@@@@.@@@@@@.....@.@@.@........@@@@@.@.@@@@@@@@@@.@@@...@..@@...@..@
|
||||
@@...@@@.@...@@..@.@.@@.@.@...@@.@@...@@@@.@@@@.@..@..@.@.@..@@.@@@@@.@@.@.@.@@..@.@@@@.@.@..@@@@@..@..@.@@.@@@@@@...@@@@@@...@@..@@@.@.@@.
|
||||
@@@@@@@@@....@..@@@..@@..@@.@@.@@@.@.@.@@@@@@@@@.@..@@@@..@.@@....@.@@@.@@@.@..@@@@@..@@@.@@@@....@@.@@.@.@@@.@@.@@@@.@..@.@@..@@@@@@..@@@@
|
||||
.@.@.@.@..@.@@...@@@.@@@.@@@@@@@@@@@..@@@@@.@@@@.@@@@.@.@..@@.@@@@.@.@.@....@..@@@.@..@@.@@.@@.@@.@@.@@@.@.@@.@@.@@..@@@....@@.@.@@@@.@.@@.
|
||||
@..@..@..@@@@@..@@.@..@@...@.@@.@.@@.@@@@@.@@@@@.@.@.@@@..@@.@..@@@..@@@@.@@@.@@.@@@@.@...@@@@@@..@@@..@..@@@.@@..@@..@@@@@@@@@.@@.@@@@@@..
|
||||
@@@@.@@.@@@@@@@...@@@@@@@.@.@@.@@@.@@@.@@.@@@@...@@@@@@@.@.@@.@.@.@@@@@@.@@@@.@..@@@@@@.@@.@@@@@...@.@@@.@@.@@@@@@.@.@@.@@.@@@@@@@.@@@@@.@@
|
||||
@@@@@@@....@@.@@@@@.@@@.@@..@..@.@.@@..@.@@@@..@@@@...@.@@@.@.@.@.@@@..@..@.@@.@@@@@@..@@@@@@@@@@.@@.@@@..@@@.@@.@@@@@@@@@@@@@@.@@@.@@.@@@@
|
||||
@@@@@@.@..@..@@@.@.@.@@@..@@@.@@@@@..@@@@.@..@.@@.@.@@@@@..@@@.........@..@..@@@..@@@.@@@.@@@.@.@@..@.@.@@@@@@.@..@@@.@.@....@@@..@...@..@@
|
||||
@@@@..@.@@@@@@.@.@@@@@@.@@@@@@@.@@..@@.@.@@.@@....@@@@@..@@@@@@@.@.@@@@@.@@.@@@.@@@@.@@@.@@.@.@@@.@.@@.@@...@@@@.@..@.@@@.@.@...@@@@@..@@@@
|
||||
@@.@@@@@@@..@@@@.@@@@@@.@@@.@@@@.@.@.@.@@..@@@@@.@@@@@@@.@@.@.@@@..@..@.@@@@@@@@@@.@..@.@.@@@@@@.@@@@.@@@.@..@@@@@..@@@.@@@@...@@.@..@.@.@@
|
||||
@@.@@..@@.@.@@@@@@..@@.@.@@@.@@@@@@..@@@@..@@@@.@@@@@@.@@@@.@@......@@@@@.@@.@.@@.@.@@.@.@....@.@@@@@@@@@@@@@@@@@@@.@.@@.@@..@@@...@.@...@@
|
||||
@.@@.@.@.@.@.@@....@@@@@@@@...@.@.@@@@..@.@@.@@@@@.@@@..@@@@@@@....@@.@@@@@@@.@@@.@@.@@.@@.@@@@@@@.@@@@.@@@.@@@@...@@@@@.@.@.@.@@.@@@.@@@..
|
||||
..@@@...@@.@@@...@@.@@.@@.@@..@@.@@@@@@.@@@@@@@@.@@@@@@@.@@@@@@@@@@@@@@@@@@@.@@@.@..@..@@@.@@.@@@@@@.@..@@@@.@@@@@..@@@...@.@@@.@@.@.@.@..@
|
||||
@.@@@....@@@@@@@.@@.@@.@.@@..@.@@@@.@@@@@@@@@@@@@@@.@@..@@.@@@@@.@....@@@@.@@@@@@@@@.@@@@@@@@@..@.@@..@.@.@.@..@@..@@@@@..@.@.@@@@@@.@@@@@.
|
||||
@..@@.@@@@@@@..@@@.@@.@@@.@.@@@.@@@@@@@@@@@@...@...@@@@@@.@....@..@.@@@@@@.@..@@@@@@@@...@..@@.@@@..@@@.@.@.@@@@...@@@.@@@...@@..@...@.@@@@
|
||||
.@@..@..@@.@@@.@.@.@.@@.@@@.@@.@@@..@..@@.@@@.@.@@@@@.@@.@@@@@@.@@.@.@@..@.@.@.@@...@@@.@@.@.@.@.@@@@.@@@@@@@..@@@@@@@.@@@@@@..@.@@..@@.@@@
|
||||
...@..@@@@@@.@@@..@@@@.@@.@@@...@@@@@.@@@@...@@@@@@@@@@@.@..@@@@@.@@@@@@@@@@@@.@@.@@@..@@.@@@@@.@..@@.@.@@@@@@.@.@@@@@@@@.@@@@.@..@..@..@..
|
||||
.@.@.@..@.@.@@@@@@@@@@@@.@@.@@@@...@@@.@.@@@..@@@.@@@@...@@@@@.@....@@@@..@@@.@.@@..@@...@@@@@.@@.@@.@@@@.@.@@@@.@@.@@...@@@.@@@@.@.@@@@.@@
|
||||
@.@..@.@.@..@..@@@..@.@@@@.@@@.@@@.@@.@@.@@@.@.@@@@@..@@@@.@@@@.@@@@@@@.@@@@@@.@@@..@@.@..@.@@@.@@...@.@@@.@.@..@....@@@.@@@@.@@@@.@@@@.@@@
|
||||
@@@@@.@.@@@@.@@@@@@@@@@@@@@@@@@..@.@@....@@....@@@@.@@.@@@@@.@.@@@@...@@@@@@.@@..@@.@.@.@@@...@@@@@@..@@.@@.@@.@@.@@@@@@@@@.@@@.@.@@.@@@@@@
|
||||
@@@.@....@@@@....@@.@..@.@.@.@@@....@@@.@@@.@@@@@@@@.@@@.@@.@.@@@.@@@@.@@@.@.@.@.@.@@.@.@..@.@.@@@@@@...@.@.@..@.@.@@@@@@@.@.@.@@@@@....@.@
|
||||
@@@@...@.@..@..@..@.@@..@.@.@@@.@.@.@@@@.@.@..@...@@..@@@@.@@@.@...@@@@.@@@@.@.@.@.@@@@.@@@@@.@@.@@@@@@.@...@@.@@.@@@@.@.@@@@@@.@.@@@@..@.@
|
||||
@.@.@...@..@@.@@..@@.@@@@@.@@@@@@@@@@@.@...@.@@@@.@@@.@...@@@@.@@@@@..@@.@.@@@@@...@.@.@@@@@@@@@@@@@@@@.@@@@..@.@....@.@..@@@@@.@@@.@@.@.@@
|
||||
.@@..@.@.@@@..@@@@@@.@..@@@@@.@.@..@.@@@..@@@@@@@@.@.@@@@@.@@@.@@@@@@@@@@.@@.@@@.@@@@@@@@.@...@@@@@.@.@...@@@@@@.@@@.@.@..@.@@@@@@.@@.@@.@.
|
||||
@@..@@.@@@@@@@.@@@@.@@@@..@@@..@@.@..@@@.@...@@...@@.@@@@.@@@@.@@@@.@@.@@@.@.@.@@..@@@..@..@@@.@@.@.@@@.@..@@.@@.@@@@@@..@..@@@.@@.@@@....@
|
||||
@.@.@....@.@...@@@@@@.@@.@@@@.@.@.@@@@...@@@@@@.@@.@@.@@@@.@@.@@@@@@@@@.@@..@.@.@.@@@.@@@@.....@@..@@@@@.@@@..@.@@@@@@@.@.@@@.@.@@@....@@@.
|
||||
@@..@..@@.@@.@@@@@....@@.@@.@@@.@@@.@...@@.@.@@.@.@.@.@..@.@@@@@..@.@.@..@@@@@@@@.@.@@@@@.@@@@@@..@.@..@....@.@@@@.@@@.@.@@@@.@@.@@.@@@@@@.
|
||||
.@@@@@@.@@.@.@@@@@..@@.@@@..@@@@@@..@.@...@.@.@@@@.@@@@.@@.@@@@@@@@@..@..@@@@@@@@.@@.@@@..@.@.@@@@@.@.@.@@@.@@..@@.@@@@@.@@@.@@@.@@@.@..@@@
|
||||
@@.@.@@@.@.@...@@@@@@@@...@@@@@@@@@.@@@@@.@@@.@@@@@..@@@..@@@.@@..@@@.@.@@@.@.@.@.@@@@@@.@@@@@.@@@@..@.@@@@@.@..@.@.@@@.@.@@@@@@@.@@.@@@@.@
|
||||
.@@.@.@@@.@@@@@@@@.@.@...@.@@@@@@@@@@@@@.@.@.@@@@@@@.@@@@.@@.@@@.@@@@@@@@@@@@@@.@.@@@@...@.@.@..@@.@..@...@.@@.@@@@@@@..@@@@.@@@@@.@@..@@@@
|
||||
..@@@@@@..@@.@.@.@@@@@..@@@@@.@@@@@.@@@@.@.@@@.@@.@@.@@@.@.@.@..@.@@...........@@@@@@@@..@@@..@@@.@.@@.@.@.@.@@@@@@@@@.@@@.@.@@.@@@..@@@.@@
|
||||
@@@...@@..@.@@@@@@@..@..@@.@.@@@@.@@@@.@@@...@..@@@@@@@.@@..@@@@@@..@...@@@@@@@.@@@@@@@@..@@.@@@@.@@..@.@.@@@@.@.@...@@.@@@..@@@@@@@..@.@@@
|
||||
@@.@@@@@@@.....@....@.@.@..@@@@.@.@@@@@.@.@@@..@.@.@@.@@.@@@@@.@@.@@.@@.@.@@@.@@@@@.@@@@@.@@@@@@..@@.@@.@@@@@.@..@@@@@@@@.@@@..@.@@@.@..@@@
|
||||
@.@...@.@.@..@@@.@@@@@.@@....@..@@@@@..@.@@.@.@@@@...@.@..@@@@@@@.@@@@.@@@.@@@@.@@@@@@@@.@..@.@@.@@.@@@@@..@@@@.@@@@@@..@.@.@@@@@.@.@.@@.@.
|
||||
@@.@@..@@@@@.@@..@.@..@@..@@@@@@@.@@@@@@.....@@..@@.@@.@.@@.@@@.@@@@.@@@@@@..@@@@.@@.@@@@@..@@.@.@@@@@@@@.@@..@@@@..@@..@@@@@@.@@@.@@.@@@@@
|
||||
@@..@@@@..@.@@@@..@...@@.@@@@@@@@..@.@.@@@@@..@@@@.@.@@@..@@@@@@@@@@@@@@..@.@.@@@@@.@.@@...@@@@@@.@@@@@.@@@@@.@@@.@@..@.@@@..@..@@.@@@@@@@@
|
||||
..@@@.@@@.@@@.@@.@@@.@@@@.@@@@...@.@.@.@.@.@@@@.@.@@@@@@@@@..@@.@@@@@@@@.@@@@.@.@.@@@.@@.@@@..@@..@@@@@@@@@@@@.@@...@..@.@@...@.@@.@.@.@@@.
|
||||
..@@..@@@.@@.@@@@.@@.@@@...@.@@@@@@@.@@.@@@@@@@..@..@@@@.@@.@@.@@..@@@..@@@@...@@@.@@.@@@@@@@@.@@..@..@@@@.@@@@@@.@@.@@@@@@@@@.@..@..@.@.@.
|
||||
.@..@@@@@@@.@.@@.@...@@@@@@@.@.@@@@@..@@..@@@@..@@@@@@@@@@@@@@.@..@@.@@@@@@.@.@@@@@.@@@@@.@@@@..@..@.@.@@..@@.@.@@..@.@@.@.@@@.@@@@@.@@..@@
|
||||
@.@@@@@.@.@@@.@..@..@@.@@@@@@@...@.@@@@@..@.@..@.@.@..@@@...@@.@...@@@@.@@@@.@@@...@..@@.@@@@@@@@@@@.@@..@@.@@@@@@.@@.@@@...@.@..@@@@.@.@@@
|
||||
@@@@@@@.@@@...@@.@@.@@@@.@.@@@@@@@@@@@.@@.@@..@@.@@@@@@...@@.@@@@..@@@@@@.@..@@...@@.@@@@@.@@@.@..@@@...@@..@@@.@@...@@....@@@@@@.@@@@.@@@.
|
||||
...@@...@@....@.@.@@..@.@@@@@@..@@@@@@@.@....@.@@..@@@@..@@..@@@@@.@@@.@@@.@@..@@@@.@@@....@..@@@.@.@..@@@.@@.@@@.....@.@@@..@@.@@@.@@...@@
|
||||
@@@.@@@@@.@@@.@@@.@@@@@@@....@@@@.@@...@@.@@..@@@.@@@@@..@@@@.@.@@@@..@..@...@@@@@@@@.@@@.@@....@@..@@..@@@...@@.@...@@@..@.@.@@@@.@.@@@@.@
|
||||
@.@..@@.@@.@@.@@@@.@@@@..@.@.@.@..@@@@.@.@@@@.@.@@..@.@....@@...@@@@@@.@@@@@@@@@.@@.@@@@.@@@..@.@@@@.@.@@@.@...@..@..@@@@@@.@@.@@@@.@@@@.@@
|
||||
@..@@@@.@.@@.@..@.@..@@@@..@@.@.@@@@@@@@@@@@@.@@@.@@@@@...@@@@@@@@@@.@@..@@.@@...@.@.@@@@@@@@.@.@..@@..@@..@..@@@@@@@@....@@@@.@@.@@.@@@@@@
|
||||
@@.@@@....@..@@@.@.@@@@@@@.@.@..@@@@.@@@@@@@.@@@...@@.....@.@@@@@@@@@..@.@@@..@@...@@@@.@@@..@..@@.@@@@.@@.....@..@@@@@.@@....@@@..@@@.@@.@
|
||||
@@@@.@@@@@@.@@.@@.@@@.@@@.@@@.@@@@...@.@.@@@@@@.@.@@@@@@@@@@.@.@.@...@@@@.@.@@@...@@..@@@.@@@@@@@....@@@@.@.@@@@@@@@@@@.@@@..@@@@@.@.@@@...
|
||||
@@@@@@@@@.@......@@@..@@@.@.@@@@..@@@.@@@.@@@.@@@@@@.@@@.@@@@.@.@@@@@..@@@....@.@@.@@@...@.@@.@@.@@@.@@@@@..@@@@@.@@@@.@@@@@@@@.@..@@...@.@
|
||||
.@.@..@@@@.@@.@@.@@@..@@@@@@@@@@@.@@@.@@.@..@.@@@@@.@@@@...@@@.@@@@@@......@.@@@..@@@...@@..@.@@@.@@@.@@@@...@.@.@.@..@..@@@..@@@.@.@@.@@@@
|
||||
@@@@.@@@.@@.@@.@@@.@.@.@@@.@...@@@.@.@@@@@..@@@@..@.@@....@@@@@@@@@..@@....@@@@.@@@@.@.@@@@@@@@.@@..@.@@...@.@@@.@..@@@@@@..@.@@@.@@@@@..@.
|
||||
@@@..@@@@@@.@@.@@@.@..@@@@..@@@@.@.@@@@@.@@@@@@@@.@@@.@..@.@@@@.@@@@@@@@@@@@@.@@@@@.@.....@@@..@..@@..@@..@.@@@..@.@.@@@@@.@@@.@..@@....@@.
|
||||
@@@@@...@....@@@@@.@@@@..@@@.@@@.@@.@@...@@.@@@@@@@@@@..@@@.@.@.@@@@@@@@@.@@.@@@@@.@@.@@.@.@@..@@@@@@@@..@@@@@..@@@@..@@@.@.@@.@@.@.@@.@@.@
|
||||
@@@@.@@@@@@@@.@@..@.@@@@.@@@.@@@@.@.@.@.@@@@@..@.@@@@@@...@@@@@@@@.@.@.@@.@@@..@@..@..@@@@@@@@..@@@@@@@..@@@@@@@.@@@@@.@@@@@@.@.@.@.@@@..@@
|
||||
@@.@@@@.@@@@.@..@@@@@@@@@@@@..@@@@@@@.@.@@..@..@.@@@@@@@@@@.@@@@..@.@@@@@@.@.@@.@@@@.@@@.@@..@@@...@.@@@.@@@@@.@@@@@@@@@@..@@.@@..@@..@@@@@
|
||||
@@@..@.@@.@@@.@..@.@......@@@..@@@@@.@@@@@@.@@@.@@..@@.@.@@..@...@.@@@@@@@@@@@@@.@@@@@.@...@@@@@@@@.@@..@@@@.@.@@@@@..@.@..@@@.@@@@@@@..@.@
|
||||
@@@.@@..@@@@@.@..@@@.@.@@@.@@@@@..@..@........@@@.@.@@@@@@@@@...@@@.@@@@.@.....@@@.@..@@.....@.@..@@@@@.@@@@@.@.@.@@@..@@@@.@@@@.@.@@@.@..@
|
||||
.....@@.@.@..@@@@@@@.@@.@@@.@@.@@@.@.@@@@.......@.@@@.@..@@@.@.@@@@@@@@..@@@.@..@@@@@@@...@@.@@@@@@.@@@@@@@@.@@@@...@@@@@.@@@@@...@@@@.@.@@
|
||||
.@@@@....@@.@.@@@.@.@@@.@@@.@@@.@@@.@@@@.@@@@@@@@@@@@@.@@@@@.@@@@@.@@@.@@@@@@@@.@..@..@.@...@@.@@@@@@@.@.@..@@@@..@..@@.@@@@@@@.@@@.@@@@.@.
|
||||
@@@@.@@@@...@@..@@@@@@@@..@.@@@@..@@.@@..@@@.@.@.@..@@@@.@.@@@.@.@@@@@@.@.@@@@@@@@@.@.@.@@.@@@@@.@@@@@@.@@@@@@.@@..@@@@@@..@@@@@@@@@.@@@.@@
|
||||
@.@@@@.@@@.@@@.@@..@@@@@.@.@@@@@.@@.@@...@@....@@@@.@@@@@@@...@.@@@@.@.@.@.@.@.@...@@.@@@@.@@..@.@...@@.@@@@@@@@@.@@@.@.@....@.@..@@@..@@..
|
||||
.@@@@@@..@..@@@.@@@.@@...@@.@.@@@@.@@@@@..@.@.@@.@@@..@@@@@@@@@@@@..@@..@@.@@@@@.@@@..@@@@@@@@@.@@@.@...@.@@.@.@...@.@..@@@@.@.@@@.@@@.@.@.
|
||||
@@@@..@@@.@.@.@.@@@.@@@..@@@....@@.@@..@..@@.@.@.@@.@@@@@.@@@@@@@@@@@@..@.@.@..@.@.@..@@.@@...@@.@@.@@...@..@@.@@.@@@.@@@@@@@@@@.@@@.@@@@@@
|
||||
@@@@@..@@@..@@..@.@@..@..@.@.@@...@@.@..@@@@.@@@@....@@@@.@.@@..@@@@..@@.@@..@.@.@...@@@.@@@..@@@.@.@.@.@..@@@@.@@.@..@...@@@@@@@@@.@.@@.@.
|
||||
@@@@@..@...@@@.@@@@.@.@.@@@.@@@...@@@.@.@@@@@.@@..@@.@@.@.@@@@@.@@.@@@@@@@@@@@@.@@@.@...@..@...@.@@@.@.@.@@@@@@@.@@@...@@@.@.@@@@@.@@..@.@.
|
||||
.....@@@@@@@.@@@@.@@@@@..@@@.@.@.@@...@..@..@.@..@....@@@@@@@..@@..@..@.@@.@@@@.@.@@.@..@.....@@@@@@@..@.@@@@@@@@.@.@@@@...@@.@@.@@.@.@@..@
|
||||
@..@@@.@@@@@.@@.@@@.@@@@.@@@@.....@@@...@.@@@@.@@@@@@.@@@@.@@.@@@@@@.@@.@.@..@@@@@.@@@.@@@@@...@.@@@@.....@@..@@@.@.@.@@@@@@@@@.@@..@.@..@@
|
||||
.@@@..@..@..@@..@..@@@@@@@...@@@.@@.@@.@..@@@..@@@.@.@.@@@@@@@@@@...@@@.@.@@@@@.@..@@@@..@@.@@@@@@.@.@.@.@@@@@@@@@@@.@@@@@@@@@@@..@@.@@@...
|
||||
@.@..@@.@@.@@.@@@@@@@@@@..@.@@@@@.@@..@..@.@@@@..@@@.@@@.@@@@@@.@.@...@@@@.@.@..@@@@@@@@.@@@@@.@@@@.@.@@@@@@@.@@.@@...@@@@@@@@....@@@@@@@@.
|
||||
@@@@@..@.@@@.@@.@@@@@@@@.@.@...@@@@@.@@.@.@@@.@.@.@.@@@@@.@@.@.@@.@.@.@..@@.@@@@@@@@.@.@@@@@@@@....@...@@.@@@@@@..@@@@@.@@.@.@.@.@@.@.@@@..
|
||||
..@.@@@.@...@@@.@@.@@@@@@@@.@...@@@.@@@.@@.@.@.@.@.@.@@.@@.@..@.@@@...@@@@@@@.@@@@@@@@..@.@.@@@.@.@@.@..@....@@@......@@.@@..@.@@.@@..@..@.
|
||||
.@@@.@@@.@..@@@@@@.@..@.@.@.@@.@@@.@..@.@@.@@@.@.@@..@@@@@..@.@@@@.@.@@.@..@@.@@@..@@.....@..@@@..@.@.@.@..@.@.@.@..@.@@.@@.@@@..@..@@@@@.@
|
||||
@@.@@.@@..@@@@@@.@@@@@@.@.@.@@.@.@@@...@...@@...@.@@@@@@.@.@@.@@@..@@.@.@@@@@.@..@@@@@@.@.@.@@@..@.@@.@.@.@@.@@@@.@@@@@.@..@@@@@@@@@.@..@.@
|
||||
@@@@@@@@@..@.@..@@..@@@@@...@@@@@.@@.@@@@@@@...@...@..@.@@@.@....@@@@@.@@@@@@@@.@@.@@@@@@.@@.@...@.@@..@@...@@@@.@@@@@@@.@@@@@@..@.@@@...@@
|
||||
@.@@..@@@...@.@@.@@@@@..@.@@@@@@@.@@@@@..@@.@@@.@..@@@@@@@.@@@@@@@..@.@.@.@..@@.@@@@.@@@@.@@@@@@@@@@.@@.@@@@@@@@.@@@@@@@@@.@@@@..@@@@@..@@@
|
||||
@@@@@.@...@.@@@@.@@@.@@.@@@.@@.@.@...@@@@@@...@@@@...@..@@..@.@.@@@.@@@@@@@@...@@@@@@@..@@@@@@@@.@@@@@@@.@@@..@@@@@@@...@.@@@.@@@@@@@@.@@@@
|
||||
.@@.@@..@.@@@@@.@..@@.@@@@...@@@@@.@@@.@.@.@.@@@@@.@@.@...@.@@@@.@.@@@@.@@@@@.@..@.@.@@@@@@@.@@.@.@@@...@.@@@@.@..@..@.@@@@.@..@@@@@@.@@@.@
|
||||
@@@.@..@@.@@@@.@@@...@.@.@@@.@@@@@@@.@@.@@...@@@@@@@@.@@@@@..@@@..@@@..@@@.@..@@@@..@@.@@.@@@@@@@.@@@@.@@.@.@.@@@@@.@@@@.@@..@@@.@@@@@@@.@@
|
||||
.@@.@@@...@.@@@.@@@..@..@..@@.@@@@...@..@@..@@..@.@@.@@@@.@.@@.@.@@@.@..@@@@@.@@@@@..@.@..@.@@..@.@..@..@.@@@@@@@@.@@.@@@@@@@.@@.@@...@@.@@
|
||||
@@.@@@..@@@..@..@@.@.@..@@@.@@.@@@@.@@.@@@.@.@@@.@@.@.@@@@.@.@..@@@...@@@@@....@.@@.@@.@@@@@@@@@.@@@@.@@.@.@.@.@@@@@@@@@.@.@@@@@.@.@@@@@..@
|
||||
.@@@@.@...@.@@@...@@.@.....@@.@@...@@@@@..@@@..@@.@..@@@@@@@.@.@@.@.@@@@.@.@@@@@.@@..@....@...@@..@@@...@@@@@@..@..@@@@@...@@@@@.....@@.@@@
|
||||
@..@.@@.@@@....@@@@.@@@@@@@@@..@.@@@..@@@@.@@@@@@@@@@@.@..@@@.@.@.@..@@..@@....@@@..@..@.@@.@@@.@...@@..@@.@@@@@....@@.@@@@.@@.@@@@@@...@@.
|
||||
.@@..@@..@@@@@@....@@.@..@@.@@@.@@@@@.@@@@...@....@@.@@@.@..@@.@.@.....@@@@@@.@@.@@@@@..@..@@@@.@@@.@..@@..@@@@..@.@@@..@@@@@.@.@@.@@.@@@@@
|
||||
@@@@@@@@@..@.@..@@@.@@@.@.@@@@@..@@@..@@@@@@..@@@@....@@.@.@.@...@.@@.@@@@.@.@@.@@@.@.@@..@@@@.@@....@@@...@@..@@@@@@...@.@@@@.@@.@@@@....@
|
||||
.@@.@.@@@.@.@@.@@..@..@@@@.@@.@.@.@..@@.@..@@@@@@@..@@@@@.@.@@.......@@@@@@..@.@@@.@.@@..@...@...@@@@@.@.@@@@@@@@.@@@@@.@.@@@@@@@@@@@@@@@@.
|
||||
.@@@.@@@@.@@..@@@@@.@@.@@.@@@..@.@.@@.@@..@@@@@@.@@@@@@@@@..@@@@@.@@@.@@@@@..@@@@@@@@@@.@.@@.@@.@@@.@@@@@@@@...@......@...@@@@.@@.@@@@@..@@
|
||||
.......@@@@@..@.@.@@@@@.@@..@@@@@@...@@@..@@.....@@@.@@.@@@@.@@.@@@@@@@@.@.@.@@@@.@@@.@@@@@@@@@.@@..@.@.@....@@@@@@@@@@@..@@.@@@.@@..@@..@@
|
||||
.@@@@@@.@@@...@.@@@@.@..@@@@@@@.@.@@......@@@@@@@@.@...@@..@.....@@@@.@@..@@@@@......@.@.@.@.@@.@..@.@@@@@.@.@@@@@@@@@...@.@@..@@@..@..@...
|
||||
@@.@@.@@@@@@@@.@@.@.@@.@@@@@@@@@@..@.@@@@.@@@@@@@@@@@..@.@.@@@@@@@@@@@@@@@@..@.@@.@.@@.@.@@@@.@@@@..@.@@.@@.@..@@@@.@@@@@..@@...@@@@@@.@@..
|
||||
@@@...@@.@@@@@@@@.@@@.@@@..@@@@..@@..@@.@..@@@@@..@@.@.@@@.@@@..@@..@@.@@@...@@@@.@@@.@@@@@@.@@.@@.@..@@@@.@@...@@@..@@.@@..@.@@@@.@@@@.@@@
|
||||
@@ -0,0 +1,134 @@
|
||||
using AOC.Helpers;
|
||||
|
||||
namespace AOC.Tests.Y2025;
|
||||
|
||||
[TestFixture]
|
||||
[Parallelizable(ParallelScope.All)]
|
||||
public class Day04
|
||||
{
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
realData = File.ReadAllLines(Path.Combine(TestContext.CurrentContext.TestDirectory, "Y2025", "Data",
|
||||
$"{GetThisClassName()}.dat"));
|
||||
}
|
||||
|
||||
protected string GetThisClassName() { return GetType().Name; }
|
||||
private string[] realData;
|
||||
|
||||
[TestCase(@"..@@.@@@@.
|
||||
@@@.@.@.@@
|
||||
@@@@@.@.@@
|
||||
@.@@@@..@.
|
||||
@@.@@@@.@@
|
||||
.@@@@@@@.@
|
||||
.@.@.@.@@@
|
||||
@.@@@.@@@@
|
||||
.@@@@@@@@.
|
||||
@.@.@@@.@.", 13)]
|
||||
[TestCase(null, 1451)] // The actual answer
|
||||
public void Part1(string? input, int? expected)
|
||||
{
|
||||
// string[] lines = input != null ? new[] { input } : realData;
|
||||
string[] lines = input != null ? input.Split("\n") : realData;
|
||||
|
||||
char[,] array = TwoDimensionalArrays.Make2DArrayFromStringArray(lines);
|
||||
|
||||
int rollsOfPaperThatCanBeAccessed = 0;
|
||||
|
||||
foreach ((int row, int column, char value) in TwoDimensionalArrays.Cells(array))
|
||||
{
|
||||
if (value != '@')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
List<(int, int)> positionsWherePaperExists =
|
||||
TwoDimensionalArrays.CheckAllSurroundingCellsForCharacter(array, row, column, '@');
|
||||
|
||||
if (positionsWherePaperExists.Count < 4)
|
||||
{
|
||||
rollsOfPaperThatCanBeAccessed++;
|
||||
}
|
||||
}
|
||||
|
||||
int result = rollsOfPaperThatCanBeAccessed;
|
||||
|
||||
if (expected != null)
|
||||
{
|
||||
Assert.That(result, Is.EqualTo(expected.Value));
|
||||
}
|
||||
|
||||
Console.WriteLine($"Part 1: {result}");
|
||||
}
|
||||
|
||||
[TestCase(@"..@@.@@@@.
|
||||
@@@.@.@.@@
|
||||
@@@@@.@.@@
|
||||
@.@@@@..@.
|
||||
@@.@@@@.@@
|
||||
.@@@@@@@.@
|
||||
.@.@.@.@@@
|
||||
@.@@@.@@@@
|
||||
.@@@@@@@@.
|
||||
@.@.@@@.@.", 43)]
|
||||
[TestCase(null, 8701)] // The actual answer
|
||||
public void Part2(string? input, int? expected)
|
||||
{
|
||||
//string[] lines = input != null ? new[] { input } : realData;
|
||||
string[] lines = input != null ? input.Split("\n") : realData;
|
||||
|
||||
char[,] array = TwoDimensionalArrays.Make2DArrayFromStringArray(lines);
|
||||
|
||||
int totalRollsOfPaperRemoved = 0;
|
||||
int rollsOfPaperAccessed = 0;
|
||||
|
||||
bool continueLoop = true;
|
||||
|
||||
while (continueLoop)
|
||||
{
|
||||
List<(int, int)> positionsToRemovePaper = new();
|
||||
foreach ((int row, int column, char value) in TwoDimensionalArrays.Cells(array))
|
||||
{
|
||||
if (value != '@')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
List<(int, int)> positionsWherePaperExists =
|
||||
TwoDimensionalArrays.CheckAllSurroundingCellsForCharacter(array, row, column, '@');
|
||||
|
||||
if (positionsWherePaperExists.Count < 4)
|
||||
{
|
||||
totalRollsOfPaperRemoved++;
|
||||
rollsOfPaperAccessed++;
|
||||
positionsToRemovePaper.Add((row, column));
|
||||
}
|
||||
}
|
||||
|
||||
if (rollsOfPaperAccessed == 0)
|
||||
{
|
||||
continueLoop = false;
|
||||
}
|
||||
|
||||
rollsOfPaperAccessed = 0;
|
||||
|
||||
// Remove each roll
|
||||
foreach ((int, int) position in positionsToRemovePaper)
|
||||
{
|
||||
array[position.Item1, position.Item2] = 'x';
|
||||
}
|
||||
|
||||
positionsToRemovePaper.Clear();
|
||||
}
|
||||
|
||||
int result = totalRollsOfPaperRemoved;
|
||||
|
||||
if (expected != null)
|
||||
{
|
||||
Assert.That(result, Is.EqualTo(expected.Value));
|
||||
}
|
||||
|
||||
Console.WriteLine($"Part 2: {result}");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
--- Day 4: Printing Department ---
|
||||
You ride the escalator down to the printing department. They're clearly getting ready for Christmas; they have lots of large rolls of paper everywhere, and there's even a massive printer in the corner (to handle the really big print jobs).
|
||||
|
||||
Decorating here will be easy: they can make their own decorations. What you really need is a way to get further into the North Pole base while the elevators are offline.
|
||||
|
||||
"Actually, maybe we can help with that," one of the Elves replies when you ask for help. "We're pretty sure there's a cafeteria on the other side of the back wall. If we could break through the wall, you'd be able to keep moving. It's too bad all of our forklifts are so busy moving those big rolls of paper around."
|
||||
|
||||
If you can optimize the work the forklifts are doing, maybe they would have time to spare to break through the wall.
|
||||
|
||||
The rolls of paper (@) are arranged on a large grid; the Elves even have a helpful diagram (your puzzle input) indicating where everything is located.
|
||||
|
||||
For example:
|
||||
|
||||
..@@.@@@@.
|
||||
@@@.@.@.@@
|
||||
@@@@@.@.@@
|
||||
@.@@@@..@.
|
||||
@@.@@@@.@@
|
||||
.@@@@@@@.@
|
||||
.@.@.@.@@@
|
||||
@.@@@.@@@@
|
||||
.@@@@@@@@.
|
||||
@.@.@@@.@.
|
||||
The forklifts can only access a roll of paper if there are fewer than four rolls of paper in the eight adjacent positions. If you can figure out which rolls of paper the forklifts can access, they'll spend less time looking and more time breaking down the wall to the cafeteria.
|
||||
|
||||
In this example, there are 13 rolls of paper that can be accessed by a forklift (marked with x):
|
||||
|
||||
..xx.xx@x.
|
||||
x@@.@.@.@@
|
||||
@@@@@.x.@@
|
||||
@.@@@@..@.
|
||||
x@.@@@@.@x
|
||||
.@@@@@@@.@
|
||||
.@.@.@.@@@
|
||||
x.@@@.@@@@
|
||||
.@@@@@@@@.
|
||||
x.x.@@@.x.
|
||||
Consider your complete diagram of the paper roll locations. How many rolls of paper can be accessed by a forklift?
|
||||
|
||||
--- Part Two ---
|
||||
Now, the Elves just need help accessing as much of the paper as they can.
|
||||
|
||||
Once a roll of paper can be accessed by a forklift, it can be removed. Once a roll of paper is removed, the forklifts might be able to access more rolls of paper, which they might also be able to remove. How many total rolls of paper could the Elves remove if they keep repeating this process?
|
||||
|
||||
Starting with the same example as above, here is one way you could remove as many rolls of paper as possible, using highlighted @ to indicate that a roll of paper is about to be removed, and using x to indicate that a roll of paper was just removed:
|
||||
|
||||
Initial state:
|
||||
..@@.@@@@.
|
||||
@@@.@.@.@@
|
||||
@@@@@.@.@@
|
||||
@.@@@@..@.
|
||||
@@.@@@@.@@
|
||||
.@@@@@@@.@
|
||||
.@.@.@.@@@
|
||||
@.@@@.@@@@
|
||||
.@@@@@@@@.
|
||||
@.@.@@@.@.
|
||||
|
||||
Remove 13 rolls of paper:
|
||||
..xx.xx@x.
|
||||
x@@.@.@.@@
|
||||
@@@@@.x.@@
|
||||
@.@@@@..@.
|
||||
x@.@@@@.@x
|
||||
.@@@@@@@.@
|
||||
.@.@.@.@@@
|
||||
x.@@@.@@@@
|
||||
.@@@@@@@@.
|
||||
x.x.@@@.x.
|
||||
|
||||
Remove 12 rolls of paper:
|
||||
.......x..
|
||||
.@@.x.x.@x
|
||||
x@@@@...@@
|
||||
x.@@@@..x.
|
||||
.@.@@@@.x.
|
||||
.x@@@@@@.x
|
||||
.x.@.@.@@@
|
||||
..@@@.@@@@
|
||||
.x@@@@@@@.
|
||||
....@@@...
|
||||
|
||||
Remove 7 rolls of paper:
|
||||
..........
|
||||
.x@.....x.
|
||||
.@@@@...xx
|
||||
..@@@@....
|
||||
.x.@@@@...
|
||||
..@@@@@@..
|
||||
...@.@.@@x
|
||||
..@@@.@@@@
|
||||
..x@@@@@@.
|
||||
....@@@...
|
||||
|
||||
Remove 5 rolls of paper:
|
||||
..........
|
||||
..x.......
|
||||
.x@@@.....
|
||||
..@@@@....
|
||||
...@@@@...
|
||||
..x@@@@@..
|
||||
...@.@.@@.
|
||||
..x@@.@@@x
|
||||
...@@@@@@.
|
||||
....@@@...
|
||||
|
||||
Remove 2 rolls of paper:
|
||||
..........
|
||||
..........
|
||||
..x@@.....
|
||||
..@@@@....
|
||||
...@@@@...
|
||||
...@@@@@..
|
||||
...@.@.@@.
|
||||
...@@.@@@.
|
||||
...@@@@@x.
|
||||
....@@@...
|
||||
|
||||
Remove 1 roll of paper:
|
||||
..........
|
||||
..........
|
||||
...@@.....
|
||||
..x@@@....
|
||||
...@@@@...
|
||||
...@@@@@..
|
||||
...@.@.@@.
|
||||
...@@.@@@.
|
||||
...@@@@@..
|
||||
....@@@...
|
||||
|
||||
Remove 1 roll of paper:
|
||||
..........
|
||||
..........
|
||||
...x@.....
|
||||
...@@@....
|
||||
...@@@@...
|
||||
...@@@@@..
|
||||
...@.@.@@.
|
||||
...@@.@@@.
|
||||
...@@@@@..
|
||||
....@@@...
|
||||
|
||||
Remove 1 roll of paper:
|
||||
..........
|
||||
..........
|
||||
....x.....
|
||||
...@@@....
|
||||
...@@@@...
|
||||
...@@@@@..
|
||||
...@.@.@@.
|
||||
...@@.@@@.
|
||||
...@@@@@..
|
||||
....@@@...
|
||||
|
||||
Remove 1 roll of paper:
|
||||
..........
|
||||
..........
|
||||
..........
|
||||
...x@@....
|
||||
...@@@@...
|
||||
...@@@@@..
|
||||
...@.@.@@.
|
||||
...@@.@@@.
|
||||
...@@@@@..
|
||||
....@@@...
|
||||
Stop once no more rolls of paper are accessible by a forklift. In this example, a total of 43 rolls of paper can be removed.
|
||||
|
||||
Start with your original diagram. How many rolls of paper in total can be removed by the Elves and their forklifts?
|
||||
Reference in New Issue
Block a user