2025(07): pull part 1

This commit is contained in:
2025-12-07 10:48:24 +01:00
parent 00a147462b
commit e5041fc74b
3 changed files with 299 additions and 0 deletions

141
2025/07/README.md Normal file
View File

@ -0,0 +1,141 @@
# Day 7: Laboratories
[https://adventofcode.com/2025/day/7](https://adventofcode.com/2025/day/7)
## Description
### Part One
You thank the cephalopods for the help and exit the trash compactor, finding yourself in the [familiar](https://adventofcode.com/2024/day/6) [halls](https://adventofcode.com/2018/day/4) of a North Pole research wing.
Based on the large sign that says "teleporter hub", they seem to be researching _teleportation_; you can't help but try it for yourself and step onto the large yellow teleporter pad.
Suddenly, you find yourself in an unfamiliar room! The room has no doors; the only way out is the teleporter. Unfortunately, the teleporter seems to be leaking [magic smoke](https://en.wikipedia.org/wiki/Magic_smoke).
Since this is a teleporter lab, there are lots of spare parts, manuals, and diagnostic equipment lying around. After connecting one of the diagnostic tools, it helpfully displays error code `0H-N0`, which apparently means that there's an issue with one of the _tachyon manifolds_.
You quickly locate a diagram of the tachyon manifold (your puzzle input). A tachyon beam enters the manifold at the location marked `S`; tachyon beams always move _downward_. Tachyon beams pass freely through empty space (`.`). However, if a tachyon beam encounters a splitter (`^`), the beam is stopped; instead, a new tachyon beam continues from the immediate left and from the immediate right of the splitter.
For example:
.......S.......
...............
.......^.......
...............
......^.^......
...............
.....^.^.^.....
...............
....^.^...^....
...............
...^.^...^.^...
...............
..^...^.....^..
...............
.^.^.^.^.^...^.
...............
In this example, the incoming tachyon beam (`|`) extends downward from `S` until it reaches the first splitter:
.......S.......
.......|.......
.......^.......
...............
......^.^......
...............
.....^.^.^.....
...............
....^.^...^....
...............
...^.^...^.^...
...............
..^...^.....^..
...............
.^.^.^.^.^...^.
...............
At that point, the original beam stops, and two new beams are emitted from the splitter:
.......S.......
.......|.......
......|^|......
...............
......^.^......
...............
.....^.^.^.....
...............
....^.^...^....
...............
...^.^...^.^...
...............
..^...^.....^..
...............
.^.^.^.^.^...^.
...............
Those beams continue downward until they reach more splitters:
.......S.......
.......|.......
......|^|......
......|.|......
......^.^......
...............
.....^.^.^.....
...............
....^.^...^....
...............
...^.^...^.^...
...............
..^...^.....^..
...............
.^.^.^.^.^...^.
...............
At this point, the two splitters create a total of only _three_ tachyon beams, since they are both dumping tachyons into the same place between them:
.......S.......
.......|.......
......|^|......
......|.|......
.....|^|^|.....
...............
.....^.^.^.....
...............
....^.^...^....
...............
...^.^...^.^...
...............
..^...^.....^..
...............
.^.^.^.^.^...^.
...............
This process continues until all of the tachyon beams reach a splitter or exit the manifold:
.......S.......
.......|.......
......|^|......
......|.|......
.....|^|^|.....
.....|.|.|.....
....|^|^|^|....
....|.|.|.|....
...|^|^|||^|...
...|.|.|||.|...
..|^|^|||^|^|..
..|.|.|||.|.|..
.|^|||^||.||^|.
.|.|||.||.||.|.
|^|^|^|^|^|||^|
|.|.|.|.|.|||.|
To repair the teleporter, you first need to understand the beam-splitting properties of the tachyon manifold. In this example, a tachyon beam is split a total of _`21`_ times.
Analyze your manifold diagram. _How many times will the beam be split?_

142
2025/07/input Normal file
View File

@ -0,0 +1,142 @@
......................................................................S......................................................................
.............................................................................................................................................
......................................................................^......................................................................
.............................................................................................................................................
.....................................................................^.^.....................................................................
.............................................................................................................................................
....................................................................^.^.^....................................................................
.............................................................................................................................................
...................................................................^...^.^...................................................................
.............................................................................................................................................
..................................................................^...^.^.^..................................................................
.............................................................................................................................................
.................................................................^...^.....^.................................................................
.............................................................................................................................................
................................................................^.^.......^.^................................................................
.............................................................................................................................................
...............................................................^.....^.^.^...^...............................................................
.............................................................................................................................................
..............................................................^...^.^.^.^...^.^..............................................................
.............................................................................................................................................
.............................................................^.^.^.........^.^.^.............................................................
.............................................................................................................................................
............................................................^...^.^.^.^.^...^.^.^............................................................
.............................................................................................................................................
...........................................................^.^.^.....^.^.^.....^.^...........................................................
.............................................................................................................................................
..........................................................^.....^.^.......^.^.^.^.^..........................................................
.............................................................................................................................................
.........................................................^.....^.....^...^.^...^...^.........................................................
.............................................................................................................................................
........................................................^.....^.^.^.^.^...^.^.....^.^........................................................
.............................................................................................................................................
.......................................................^...^...^.^...^.^.^.....^.....^.......................................................
.............................................................................................................................................
......................................................^.^.^...^.^.^.^...^.^.....^.^...^......................................................
.............................................................................................................................................
.....................................................^...^.^.^.^.^.^.^.^.^.....^.^.^.^.^.....................................................
.............................................................................................................................................
....................................................^.^.^.....^.^.^.^.^.^.^.^.^...^.^...^....................................................
.............................................................................................................................................
...................................................^.^.^.^.^...^.....^...^.......^.^.....^...................................................
.............................................................................................................................................
..................................................^.^.^...^.^.^.....^.^...^.^.^.^...^.^...^..................................................
.............................................................................................................................................
.................................................^...^.^.........^...^.^.^...^.....^.^.^...^.................................................
.............................................................................................................................................
................................................^.^.^...^...^.^.^.^.^.^...^.^.^...^.^.^.^...^................................................
.............................................................................................................................................
...............................................^.^.^.^.....^.^.^.^...^.^...^...^.....^.^.^.^.^...............................................
.............................................................................................................................................
..............................................^.^.^.^.^...^.^.....^.^.^.^.^.....^...^.^.^...^.^..............................................
.............................................................................................................................................
.............................................^.^.^.^...^.^.......^.^.^.^...^.^.^...^...^...^.^.^.............................................
.............................................................................................................................................
............................................^.^.........^.^.^...^...^.^.^.....^.^.^.....^...^.^.^............................................
.............................................................................................................................................
...........................................^.^.....^.^.^.^.^.^...^.^...^.^.^.....^.......^...^.^.^...........................................
.............................................................................................................................................
..........................................^.^.......^.^.^.....^.^.....^.................^.^.^.^.^.^..........................................
.............................................................................................................................................
.........................................^...^.^.^...^...^.^.^.^.^...^.^.^.....^.^.^...^.^.^.^.^...^.........................................
.............................................................................................................................................
........................................^.^...^.....^.^.......^.^...^.......^...^.^.^.^.^...^...^.^.^........................................
.............................................................................................................................................
.......................................^.^.^.^.....^.^.^...^...^.^.^.^.^.^.^.^.^...^.^.....^.^.^.^.^.^.......................................
.............................................................................................................................................
......................................^.^.........^.....^.^.^.....^.^...^...........^.^.^.^.......^.^.^......................................
.............................................................................................................................................
.....................................^...^...^.....^.^.^.....^.^.^...^.....^.^.^.^.^.^.^.^...^.^.^.....^.....................................
.............................................................................................................................................
....................................^.......^.^.^.^...^...^.^.^.^.^.^.^.^.^.^.^...^.^...^...^...^...^.^.^....................................
.............................................................................................................................................
...................................^...^.^.^.^.^...^...^.^.^.^.^...^.^.^...^...^.^...^.^.^.^.^...^.^.^.^.^...................................
.............................................................................................................................................
..................................^.^.^.^.^...^.^.^...^...^.^.^.^.^.^...^.^.......^.....^.^.^.^.......^.^.^..................................
.............................................................................................................................................
.................................^...^.^.^.^.^.^.^.^.^...^.....^.^.^.^.^...^.^.....^.^.^.^...^.^.^.....^.^.^.................................
.............................................................................................................................................
................................^...^.^...^.^.^.........^.^.^.....^.^.....^...^.^.^.^.^.^...^.^.^...^.^.^.^.^................................
.............................................................................................................................................
...............................^.^.^.....^.^...^.^.^.^...^.^.^.^.^...^.^.^.^.^.^.^.....^.^.^...^.^.^...^.^.^.^...............................
.............................................................................................................................................
..............................^.^...^.^.^...^.^.^.^.^...^...^.....^...^.^.^.....^.....^.^.^.^.....^.^.^.^.^...^..............................
.............................................................................................................................................
.............................^.......^.^.^...^.^...^.^.^.^.^.....^.^.........^.^.^...^.^.^.^.^.^.^.^.......^.^.^.............................
.............................................................................................................................................
............................^.^...^.^.^.....^.^.......^.^.^...^.^...^.^.....^.^...^.....^...^.^.^.^.^...^.^...^.^............................
.............................................................................................................................................
...........................^...^.^.^.......^.^...^.^.^.^.^.^.....^...^...^.^.^.^.....^.^.^...^.^.^...^.^.....^...^...........................
.............................................................................................................................................
..........................^.......^...^.^.^...^.^.^.^...^.^...^.^.^.^.^.^.^...^...^.^...^.....^...^.....^.^...^...^..........................
.............................................................................................................................................
.........................^.^.^.^.^.....^...^.^.^...^...^.^...^...^.^...^.^.^.^.....^...^...^.^.^...^...^.^.^.^.^.^.^.........................
.............................................................................................................................................
........................^.^...^.^.^.....^.^...^.^.^.^.^...^.^.^.^.^...^.....^.....^.^.^.^.^.^.^...^...^...^.^.^...^.^........................
.............................................................................................................................................
.......................^.^.^.^.^...^.^.......^.......^.^.^.^.....^...^.^.^.....^.^.^.......^.^.^...^...^.^.^.^.^.^.^.^.......................
.............................................................................................................................................
......................^.....^.^.......^.^.....^.^.^.^.^...^.....^.^.^.^.^.^.^.^.....^...^.^.^.....^...^.........^.^.^.^......................
.............................................................................................................................................
.....................^.^.^...^.^...^.^.^.^...^...^.^.^...^.....^.^.....^.^.....^.^.........^.^...^.^.^.^.^.^.....^.^.^.^.....................
.............................................................................................................................................
....................^.^.^.^.^...^...........^...^...^...^...^.^...^...^.....^.^.....^.^.....^.^.^.^.^.^.^...^.^.^.....^.^....................
.............................................................................................................................................
...................^.^...^.^...^...........^.^.^.^.^.^...^.^.....^.^.....^.....^.^.^...^.^.^.^.^...^.^.....^...^.^...^.^.^...................
.............................................................................................................................................
..................^.^.....^.............^.^.^.^.^.^.^.^.^.^...^...^.^...^.^.^.^.^.^.^.^.^.^.^.^.^.^...^.....^.......^...^.^..................
.............................................................................................................................................
.................^.....^...^.^...^...^.^...^.^.^...^...^.^.^.^.....^.^.^...^.^.^.^.^...^.^.^.^.....^.....^...^...^.^...^.^.^.................
.............................................................................................................................................
................^.^.^.^.....^...^...^.^...^.^...^.^...^.^.....^.^.^.^...^.^.^.............^.^...^.^.........^.^.^...^.^.^.^.^................
.............................................................................................................................................
...............^.^.^.^.^.^.^.^.^.^.^.^.^.^...^.^.^.^.^.^.........^.^.^.^...^.^.^.^.^...^...........^...^...^.^.^.^.....^...^.^...............
.............................................................................................................................................
..............^.....^.^...^.^.....^.^...^.^.^.^.^...^.^...^...^.^...^.......^.^...^.......^.^.....^.^...^.....^.......^.^.^.^.^..............
.............................................................................................................................................
.............^.^.^.^.^.^.^.^.^.^.^.^.^.^.^...^.^.^.^...^.....^.^...^.^.^.....^.^.^.^.^...^.^.^.^.^.^.^...^.^.^...^.^.^.^.^.^.^.^.............
.............................................................................................................................................
............^.^.^.^.^.^...^...^...........^.^.^.^.^.^.^...^.^...^...^...^.^.^.^.........^.^...^.^.^.^.^.^.^...^.....^.......^.^.^............
.............................................................................................................................................
...........^.^.....^.^.^.^.^.^.^.^...^.^.^.^.^...^.^.^.....^.^.^.^.^...^.......^...^.^.^.^.....^...^.^.^.^.^.....^.^.^.^.^...^.^.^...........
.............................................................................................................................................
..........^.^.^.^.^.^.^...^.....^.^.^...^.^.^...^...^.^.^.^.^.^.^.......^.^.......^.^.^.^.^.....^.^.^.^.^.^.....^.^...^.^...^.^.^.^..........
.............................................................................................................................................
.........^.....^.^.^.^...^...^...^...^.^...^.^.......^.^.^.^.^...^.^.^.....^.^.^.^.......^.^.^...^.^.^.^.^.......^...^.....^.^...^.^.........
.............................................................................................................................................
........^.^...^.^.^.^.^.^.....^...^.....^.^.^...^...^...^.^.^...^.^.^...^.^.....^...^.....^.^.^.^...^...^.^.^.^.....^.^.^...^.....^.^........
.............................................................................................................................................
.......^...^...^.^.^.....^.^...^...^.^.....^...^...^.^.^.^.^...^.^...^.^.^.^.....^.^.^...^.^.^...^.^...^.^.^.....^.^.^.^...^.^.^.^.^.^.......
.............................................................................................................................................
......^...........^.^.^.^.....^.^.^.^...^...............^.^.......^.^...^.^.^.^.....^...^...^.^.^.^.^...^.^...^.^.^.........^...^.^.^.^......
.............................................................................................................................................
.....^.^.^.^...^.^.^.^.^.^...^.......^.^...^.^.^.^.....^.^.^.^.^.^.^.^.^.^.^...^.^.....^.^.^...^.^...^.......^.^...^.^...^.^.^...^.^.^.^.....
.............................................................................................................................................
....^.^.^...^...^...^.^.^.^...^.^.......^.....^.....^...^.^...^...^.^.^.^.^.......^.^.^...^.^.^.....^.^.^...^...^.^.^.^.^...^.......^...^....
.............................................................................................................................................
...^.^.....^.^.^...^...^.^.^...^.^.^.^...^...^...^.^.^.^...^.^.^.^.^.^...^.^...^.^.^...^.....^.^.^...^.^.^...^.^.^.^.^.......^.^...^.^.^.^...
.............................................................................................................................................
..^.^.^.^...^.^.^.^...^.^.^.^.^.^.^...^...^.^.^.^...^.....^...^.^.^.^.^.^...^...^.^.^.^.....^.......^.^.^.^.^.....^.^.^.^.^.........^.^...^..
.............................................................................................................................................
.^.^.^.^.^.^.^.^.^...^.^.^...^...^.....^.^.....^.^.^.^.^.^...^...^.^...^.^.^.^.^...^.^.^.^...^.^.^.^...^...^...^...^.^.^.^.....^.^.^.....^.^.
.............................................................................................................................................

16
2025/07/testinput Normal file
View File

@ -0,0 +1,16 @@
.......S.......
...............
.......^.......
...............
......^.^......
...............
.....^.^.^.....
...............
....^.^...^....
...............
...^.^...^.^...
...............
..^...^.....^..
...............
.^.^.^.^.^...^.
...............