aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkaiwu <kaiwu2004@gmail.com>2023-01-04 16:05:06 +0800
committerkaiwu <kaiwu2004@gmail.com>2023-01-04 16:05:06 +0800
commit2083906a47831d245dfbfccb35886bf3c90d4405 (patch)
treedb596427bb855de30abf4f78fe947fe4316f5399
parent60c29beb919bee51a577052ab99fcf0662360102 (diff)
downloadadvent-of-code-2083906a47831d245dfbfccb35886bf3c90d4405.tar.gz
advent-of-code-2083906a47831d245dfbfccb35886bf3c90d4405.zip
2022 day23 day24 day25 setup
-rw-r--r--src/2022/day23/README.md194
-rw-r--r--src/2022/day23/input71
-rw-r--r--src/2022/day23/input07
-rw-r--r--src/2022/day24/README.md230
-rw-r--r--src/2022/day24/input22
-rw-r--r--src/2022/day24/input07
-rw-r--r--src/2022/day25/README.md92
-rw-r--r--src/2022/day25/input141
-rw-r--r--src/2022/day25/input013
-rw-r--r--test/test_2022.cpp12
10 files changed, 783 insertions, 6 deletions
diff --git a/src/2022/day23/README.md b/src/2022/day23/README.md
index 8b13789..078d6cf 100644
--- a/src/2022/day23/README.md
+++ b/src/2022/day23/README.md
@@ -1 +1,195 @@
+--- Day 23: Unstable Diffusion ---
+You enter a large crater of gray dirt where the grove is supposed to be. All around you, plants you imagine were expected to be full of fruit are instead withered and broken. A large group of Elves has formed in the middle of the grove.
+
+"...but this volcano has been dormant for months. Without ash, the fruit can't grow!"
+
+You look up to see a massive, snow-capped mountain towering above you.
+
+"It's not like there are other active volcanoes here; we've looked everywhere."
+
+"But our scanners show active magma flows; clearly it's going somewhere."
+
+They finally notice you at the edge of the grove, your pack almost overflowing from the random star fruit you've been collecting. Behind you, elephants and monkeys explore the grove, looking concerned. Then, the Elves recognize the ash cloud slowly spreading above your recent detour.
+
+"Why do you--" "How is--" "Did you just--"
+
+Before any of them can form a complete question, another Elf speaks up: "Okay, new plan. We have almost enough fruit already, and ash from the plume should spread here eventually. If we quickly plant new seedlings now, we can still make it to the extraction point. Spread out!"
+
+The Elves each reach into their pack and pull out a tiny plant. The plants rely on important nutrients from the ash, so they can't be planted too close together.
+
+There isn't enough time to let the Elves figure out where to plant the seedlings themselves; you quickly scan the grove (your puzzle input) and note their positions.
+
+For example:
+
+....#..
+..###.#
+#...#.#
+.#...##
+#.###..
+##.#.##
+.#..#..
+The scan shows Elves # and empty ground .; outside your scan, more empty ground extends a long way in every direction. The scan is oriented so that north is up; orthogonal directions are written N (north), S (south), W (west), and E (east), while diagonal directions are written NE, NW, SE, SW.
+
+The Elves follow a time-consuming process to figure out where they should each go; you can speed up this process considerably. The process consists of some number of rounds during which Elves alternate between considering where to move and actually moving.
+
+During the first half of each round, each Elf considers the eight positions adjacent to themself. If no other Elves are in one of those eight positions, the Elf does not do anything during this round. Otherwise, the Elf looks in each of four directions in the following order and proposes moving one step in the first valid direction:
+
+If there is no Elf in the N, NE, or NW adjacent positions, the Elf proposes moving north one step.
+If there is no Elf in the S, SE, or SW adjacent positions, the Elf proposes moving south one step.
+If there is no Elf in the W, NW, or SW adjacent positions, the Elf proposes moving west one step.
+If there is no Elf in the E, NE, or SE adjacent positions, the Elf proposes moving east one step.
+After each Elf has had a chance to propose a move, the second half of the round can begin. Simultaneously, each Elf moves to their proposed destination tile if they were the only Elf to propose moving to that position. If two or more Elves propose moving to the same position, none of those Elves move.
+
+Finally, at the end of the round, the first direction the Elves considered is moved to the end of the list of directions. For example, during the second round, the Elves would try proposing a move to the south first, then west, then east, then north. On the third round, the Elves would first consider west, then east, then north, then south.
+
+As a smaller example, consider just these five Elves:
+
+.....
+..##.
+..#..
+.....
+..##.
+.....
+The northernmost two Elves and southernmost two Elves all propose moving north, while the middle Elf cannot move north and proposes moving south. The middle Elf proposes the same destination as the southwest Elf, so neither of them move, but the other three do:
+
+..##.
+.....
+..#..
+...#.
+..#..
+.....
+Next, the northernmost two Elves and the southernmost Elf all propose moving south. Of the remaining middle two Elves, the west one cannot move south and proposes moving west, while the east one cannot move south or west and proposes moving east. All five Elves succeed in moving to their proposed positions:
+
+.....
+..##.
+.#...
+....#
+.....
+..#..
+Finally, the southernmost two Elves choose not to move at all. Of the remaining three Elves, the west one proposes moving west, the east one proposes moving east, and the middle one proposes moving north; all three succeed in moving:
+
+..#..
+....#
+#....
+....#
+.....
+..#..
+At this point, no Elves need to move, and so the process ends.
+
+The larger example above proceeds as follows:
+
+== Initial State ==
+..............
+..............
+.......#......
+.....###.#....
+...#...#.#....
+....#...##....
+...#.###......
+...##.#.##....
+....#..#......
+..............
+..............
+..............
+
+== End of Round 1 ==
+..............
+.......#......
+.....#...#....
+...#..#.#.....
+.......#..#...
+....#.#.##....
+..#..#.#......
+..#.#.#.##....
+..............
+....#..#......
+..............
+..............
+
+== End of Round 2 ==
+..............
+.......#......
+....#.....#...
+...#..#.#.....
+.......#...#..
+...#..#.#.....
+.#...#.#.#....
+..............
+..#.#.#.##....
+....#..#......
+..............
+..............
+
+== End of Round 3 ==
+..............
+.......#......
+.....#....#...
+..#..#...#....
+.......#...#..
+...#..#.#.....
+.#..#.....#...
+.......##.....
+..##.#....#...
+...#..........
+.......#......
+..............
+
+== End of Round 4 ==
+..............
+.......#......
+......#....#..
+..#...##......
+...#.....#.#..
+.........#....
+.#...###..#...
+..#......#....
+....##....#...
+....#.........
+.......#......
+..............
+
+== End of Round 5 ==
+.......#......
+..............
+..#..#.....#..
+.........#....
+......##...#..
+.#.#.####.....
+...........#..
+....##..#.....
+..#...........
+..........#...
+....#..#......
+..............
+After a few more rounds...
+
+== End of Round 10 ==
+.......#......
+...........#..
+..#.#..#......
+......#.......
+...#.....#..#.
+.#......##....
+.....##.......
+..#........#..
+....#.#..#....
+..............
+....#..#..#...
+..............
+To make sure they're on the right track, the Elves like to check after round 10 that they're making good progress toward covering enough ground. To do this, count the number of empty ground tiles contained by the smallest rectangle that contains every Elf. (The edges of the rectangle should be aligned to the N/S/E/W directions; the Elves do not have the patience to calculate arbitrary rectangles.) In the above example, that rectangle is:
+
+......#.....
+..........#.
+.#.#..#.....
+.....#......
+..#.....#..#
+#......##...
+....##......
+.#........#.
+...#.#..#...
+............
+...#..#..#..
+In this region, the number of empty ground tiles is 110.
+
+Simulate the Elves' process and find the smallest rectangle that contains the Elves after 10 rounds. How many empty ground tiles does that rectangle contain?
diff --git a/src/2022/day23/input b/src/2022/day23/input
index e69de29..67c1637 100644
--- a/src/2022/day23/input
+++ b/src/2022/day23/input
@@ -0,0 +1,71 @@
+.###.#.#.#..###.##.#.....#.####.####..##.#.##.#....##.###.#..####.##.#.
+.###.#...######....##.#..###..#.#.##.#.######..##.#.....#...#.#.##.##..
+.##....#..#...#..##.....##......#.#..#......#..#..###..#..##..#.#.##.#.
+#####.###.##.#.##.#.#...##.##.#.#..####...#.#..####.#.######.###.######
+#...#.#.#####....#.#.###..#####..####.#.#....###.#.####..##..###.####..
+#.#.#.#####.....#....##....####.#..#...##.##..##..##..#..#...####.#..##
+....#.#..####.#...#........##...##...#.##.##########...###..#####.#...#
+.####.#...##.#..##....###.##..#.###.#.##..######.##.#.#.##....##..#....
+..#...#...#..#####......#.....#.##..#.####.##...#####..#..###.#..##....
+#..#.#.#....####...#..##..#...#..#.#####.#.##..###.#.#.#...#######.#...
+.#.#.####....###...#..#.#...#.#.####..#..#........#..###....########.#.
+#.##.#.##.#...#.##.###....##...####.###...#.##.##..##....#...####.#..#.
+.#.#.#.#..###..#.####..######.##..#.#######...####.#.#.#.##...#.....###
+#..###...##......#..#....#..#..##......#####...#.##.....#.###..#...#..#
+.####...#.#....###.#.....#.##.#.....##...##.....#..#####..###.##.#.#.##
+..#...#.#.#...##########..###.###....#..###....##..#.########.##.#.#.##
+####..#..#.####...####..##.##.##....#..###.###.......##.......#.##...##
+...#####..#.####.#.#.#.###..#..#..#.##.##..#.###.###.#...#.#.##.....#..
+##..###.##.###.##.####.#.#.....##.##.#..###..####..########.###..###.##
+#.#.#..#....###.#...#.#...#..###.###..#.##.##.####.##.##.##..#..###..##
+#..###.....##.#####.###..##.###.#.....##.#....###..######..##.#.###...#
+#.##..##.#.#.#.##.#..##..#..##..#....#..###.......###.####..##...#.#.#.
+##...#..##..#.#..##.##...#.#.#..####.#..##...#.#...######....##.#...#..
+#.###...#####..####..##..##.###..##.#.####..##.#.###.#.#..#......#.....
+.#...#.#.###........#.#.#...#..####...#.#####.#####...#....###.##.###..
+....###....####..##..###.##..##.##.#.###.##.#.#.....#.....###.##...##..
+#....######.....#.#...#.#..###.....#....#..##.##.###..##....#.###...#..
+#.#.#.#.#...#.#.#...#.#.....####.###.#####.#.##..###..#.#####.#......#.
+.##.####...######.#.###.##.###..#.##..#.#.#....##.#.#####.#...####....#
+.#.#.##..##..###.#.#....####....#......#..##..###..########...#.##.##.#
+#.###.##...#....#..###..#......##..#....#.####..#.##..#.##.#.##.#...###
+#..#....##.###..###..##..#...#......#..####.#.#.#######.#...#####..#..#
+..#.###.#..###.###......#.####..###..#.#..#.#.....##...#..#.#.##.###...
+...##.........#..###.##..#######.######....######.#####.#.#.#.#..######
+###.##..###.#.####...###..#..#...#...##.#.#......#..#.###..#.#...#....#
+...###....##....#.##.#...###....##.#...#..#...#.#.##..#..#..####....#.#
+.#.#..#########....#.##.##..#.##..##.###..#.###..##.#..#.####.#.##.##..
+##..####..###.#.....#.#.#.##...#.##....##.#.#.....##.....#..##.#.##.##.
+#..#.######.#.###...#..#.#.###.##.##.#.###.....#.......####..#...###..#
+.##..##.###.#.###.#######.#.#.#.##.#....#...#####....###.######..#..##.
+#.####....#..#...###.....###..##...###....##.#..#..##...##..#.####..#..
+..###.##.###.#.#....##.####.#.#...#.#####.####..#.#.#.###.##.###...####
+##.##..#..##.....#####..####.##.#.#.##..##.#.#..##..#.##.#.#....####...
+###.#.#....#...#...#.#...#.#..#.#.###.###.##..#..#..###.##..#.#...##...
+...#.....#.##...##....##...##.#.#..#.##.#.#..##.####.#.##..#.......#...
+#....####.#.....###.##.#.###.#####.##....#.##..#####.....#.##.##..###.#
+.#..#..##.#..##.#.######.##...##...#.##..##..#.#.#..##.#....##...######
+....##.##.#...#.###....##..#..#..#..#...#...####.##.########.###..##..#
+###...####......#.#..#..#.##.####.#.##.#.##.#..##.#..###..####..#.#.###
+..#####...#.#.....#....####.##..##.##..###...##.###..##.####.####..###.
+..#.##.##...##..##.#..##.#.###...#.#..##.#.##.###.#.#.#.#.#..#..##.#..#
+.#.....#..####..#...#.#..####.#####.#..###.##.###.###.#.......####.##..
+.#.#####.#....#..##..#.###.####.#.....#..#.####..#.#.#....#.##.##..###.
+.....#...#.#..#.#.#.#.##..####.##.##.###.#......#..#.##...####.#.#.#.#.
+##...#..#..##..##..#...#.##.###....#..#..##..#.##.#.###.###.#....#.##..
+#.##.##...#.....##...###.#####..###..#.#.#..#.#.....#####.###.#..##...#
+.###..#.#.#...###.##...##...#..#.#.#...#.###....###......#.#.###..###.#
+###..#...###...#.#.##.#..##.#.....#..##.#..#########..##.#.###.#.#.#...
+.##.#.#.#.#...#...##.##..#.##..#########..#.##.###.##.####.#.##.####.##
+##.#####...##.....##.....##....###...#....#...#.##.#..##.#...#.#.#...#.
+##....#.#....##.##..###....####.#...######.#..##......#.####...#.#.##.#
+#####.#...#.....###....#.##....#..#.##.#####.########.###.#..#.##.#..##
+##..#.#..##.#.##...#...##.#####.###.####.#...##...###...##..#...###.###
+#.##..#....######..#.###.....#.#.####.##..##.##.#####......#.#.###..###
+.#####..####.#.##...###.....#######..######.#.##....#..##.##.##.##.#.##
+...##.....#.###.####.#.###.#......##.#....#..###.....#.###.......####..
+.#.########..#.#...###.#.##....#.##.####.#.##....#.###.#.####.#.#...##.
+.###.#.#.#.#..#.##..#####..#######...#...#..######.....###...##.#.##.#.
+.#.....##..#.#..##.#.#..#.#..##.#..#...##..######.#.########...###.#...
+..###.##..#.##..#........#.#....###..#.....##.##.##..#.##..###.#...#.##
+..#.####.######.#......#...###.#...##.#...###.###.#..###.#..##.#..####.
diff --git a/src/2022/day23/input0 b/src/2022/day23/input0
index e69de29..14005cf 100644
--- a/src/2022/day23/input0
+++ b/src/2022/day23/input0
@@ -0,0 +1,7 @@
+....#..
+..###.#
+#...#.#
+.#...##
+#.###..
+##.#.##
+.#..#..
diff --git a/src/2022/day24/README.md b/src/2022/day24/README.md
index 8b13789..0945b97 100644
--- a/src/2022/day24/README.md
+++ b/src/2022/day24/README.md
@@ -1 +1,231 @@
+--- Day 24: Blizzard Basin ---
+With everything replanted for next year (and with elephants and monkeys to tend the grove), you and the Elves leave for the extraction point.
+Partway up the mountain that shields the grove is a flat, open area that serves as the extraction point. It's a bit of a climb, but nothing the expedition can't handle.
+
+At least, that would normally be true; now that the mountain is covered in snow, things have become more difficult than the Elves are used to.
+
+As the expedition reaches a valley that must be traversed to reach the extraction site, you find that strong, turbulent winds are pushing small blizzards of snow and sharp ice around the valley. It's a good thing everyone packed warm clothes! To make it across safely, you'll need to find a way to avoid them.
+
+Fortunately, it's easy to see all of this from the entrance to the valley, so you make a map of the valley and the blizzards (your puzzle input). For example:
+
+#.#####
+#.....#
+#>....#
+#.....#
+#...v.#
+#.....#
+#####.#
+The walls of the valley are drawn as #; everything else is ground. Clear ground - where there is currently no blizzard - is drawn as .. Otherwise, blizzards are drawn with an arrow indicating their direction of motion: up (^), down (v), left (<), or right (>).
+
+The above map includes two blizzards, one moving right (>) and one moving down (v). In one minute, each blizzard moves one position in the direction it is pointing:
+
+#.#####
+#.....#
+#.>...#
+#.....#
+#.....#
+#...v.#
+#####.#
+Due to conservation of blizzard energy, as a blizzard reaches the wall of the valley, a new blizzard forms on the opposite side of the valley moving in the same direction. After another minute, the bottom downward-moving blizzard has been replaced with a new downward-moving blizzard at the top of the valley instead:
+
+#.#####
+#...v.#
+#..>..#
+#.....#
+#.....#
+#.....#
+#####.#
+Because blizzards are made of tiny snowflakes, they pass right through each other. After another minute, both blizzards temporarily occupy the same position, marked 2:
+
+#.#####
+#.....#
+#...2.#
+#.....#
+#.....#
+#.....#
+#####.#
+After another minute, the situation resolves itself, giving each blizzard back its personal space:
+
+#.#####
+#.....#
+#....>#
+#...v.#
+#.....#
+#.....#
+#####.#
+Finally, after yet another minute, the rightward-facing blizzard on the right is replaced with a new one on the left facing the same direction:
+
+#.#####
+#.....#
+#>....#
+#.....#
+#...v.#
+#.....#
+#####.#
+This process repeats at least as long as you are observing it, but probably forever.
+
+Here is a more complex example:
+
+#.######
+#>>.<^<#
+#.<..<<#
+#>v.><>#
+#<^v^^>#
+######.#
+Your expedition begins in the only non-wall position in the top row and needs to reach the only non-wall position in the bottom row. On each minute, you can move up, down, left, or right, or you can wait in place. You and the blizzards act simultaneously, and you cannot share a position with a blizzard.
+
+In the above example, the fastest way to reach your goal requires 18 steps. Drawing the position of the expedition as E, one way to achieve this is:
+
+Initial state:
+#E######
+#>>.<^<#
+#.<..<<#
+#>v.><>#
+#<^v^^>#
+######.#
+
+Minute 1, move down:
+#.######
+#E>3.<.#
+#<..<<.#
+#>2.22.#
+#>v..^<#
+######.#
+
+Minute 2, move down:
+#.######
+#.2>2..#
+#E^22^<#
+#.>2.^>#
+#.>..<.#
+######.#
+
+Minute 3, wait:
+#.######
+#<^<22.#
+#E2<.2.#
+#><2>..#
+#..><..#
+######.#
+
+Minute 4, move up:
+#.######
+#E<..22#
+#<<.<..#
+#<2.>>.#
+#.^22^.#
+######.#
+
+Minute 5, move right:
+#.######
+#2Ev.<>#
+#<.<..<#
+#.^>^22#
+#.2..2.#
+######.#
+
+Minute 6, move right:
+#.######
+#>2E<.<#
+#.2v^2<#
+#>..>2>#
+#<....>#
+######.#
+
+Minute 7, move down:
+#.######
+#.22^2.#
+#<vE<2.#
+#>>v<>.#
+#>....<#
+######.#
+
+Minute 8, move left:
+#.######
+#.<>2^.#
+#.E<<.<#
+#.22..>#
+#.2v^2.#
+######.#
+
+Minute 9, move up:
+#.######
+#<E2>>.#
+#.<<.<.#
+#>2>2^.#
+#.v><^.#
+######.#
+
+Minute 10, move right:
+#.######
+#.2E.>2#
+#<2v2^.#
+#<>.>2.#
+#..<>..#
+######.#
+
+Minute 11, wait:
+#.######
+#2^E^2>#
+#<v<.^<#
+#..2.>2#
+#.<..>.#
+######.#
+
+Minute 12, move down:
+#.######
+#>>.<^<#
+#.<E.<<#
+#>v.><>#
+#<^v^^>#
+######.#
+
+Minute 13, move down:
+#.######
+#.>3.<.#
+#<..<<.#
+#>2E22.#
+#>v..^<#
+######.#
+
+Minute 14, move right:
+#.######
+#.2>2..#
+#.^22^<#
+#.>2E^>#
+#.>..<.#
+######.#
+
+Minute 15, move right:
+#.######
+#<^<22.#
+#.2<.2.#
+#><2>E.#
+#..><..#
+######.#
+
+Minute 16, move right:
+#.######
+#.<..22#
+#<<.<..#
+#<2.>>E#
+#.^22^.#
+######.#
+
+Minute 17, move down:
+#.######
+#2.v.<>#
+#<.<..<#
+#.^>^22#
+#.2..2E#
+######.#
+
+Minute 18, move down:
+#.######
+#>2.<.<#
+#.2v^2<#
+#>..>2>#
+#<....>#
+######E#
+What is the fewest number of minutes required to avoid the blizzards and reach the goal?
diff --git a/src/2022/day24/input b/src/2022/day24/input
index e69de29..f64ff83 100644
--- a/src/2022/day24/input
+++ b/src/2022/day24/input
@@ -0,0 +1,22 @@
+#.######################################################################################################################################################
+#<v^>^>^^<><^>^^v>vv^v^>>^<>^<v<>v^>>v>v><^..><v<^v<<^v>v>>>>^<v^>>>.v>.v><<v><.^>>^^^>v>>^.<v>>vv<<.<<v<<vv^<^>^v>^v<>^^.^.<<<v^>>^<^>.>vvv><^<^>v.^<>#
+#<..v<<^^.^^v<<>>v<vv.><v<<<>>>.<>>^vv^^v>v^>><v<.<<v.v^^>>v^vv<<><>>v.>.v>.<..v>^^>^<<vv>><>vv>>v>.><.<<vv<v^..v<v<v^v>v^vv<v<v^.^<v<.<<><>vvvvv^<^v>.#
+#<>>^<v>v^v>v>.^v<>v<v^<<<.^^<.>vv>>^<<^>>v<v.>^^^.<<<.>>v.>.v^<v><v>.>>>^><>v>>v^<.v^<.vv^>^v<><>>v^^<^>..<v><<^<<<^<v><^>^<>v>vvv>>^<<>><><<^^.<<v>v>#
+#>.<<<^..>><>v>^v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<><.v<v<<^^^>>><^>^>>.<>vvvv.^^v<<>^<>>><<v^v><v>>>^v.<^>.^>><v><<><vv.v<vv<v^^>v<.<^<^>v^^>v^.><#
+#><v>vv^<^.<^>v^v^<><><vvv^v>v<>>v^<>^>>>^v^<v>>v<<^.^<v^vvv^^<><vvv.<vv^.>>v^<v.^vv><vv<>v^<^<^^>^^^vv^.<><>><^v.<^<.<>.>^<^<^<>v<^.<v<v<v>^vv><.v<^>>#
+#>v^.v>^v<>>v^>>>^^^^>.v<<^>^v>.^^>^>v^<^v^^<^^v>v>.v^<v>^v><^^.><^^>>v>v^v<v.<^>><>vv><v^v^><>^vvv>>v>>^v^^<^>>v^<^vv^<^^^^vv<><vv<.v^><v>^^>v^v<><<<<#
+######################################################################################################################################################.#
diff --git a/src/2022/day24/input0 b/src/2022/day24/input0
index e69de29..158014b 100644
--- a/src/2022/day24/input0
+++ b/src/2022/day24/input0
@@ -0,0 +1,7 @@
+#.#####
+#.....#
+#>....#
+#.....#
+#...v.#
+#.....#
+#####.#
diff --git a/src/2022/day25/README.md b/src/2022/day25/README.md
index 8b13789..98b4a33 100644
--- a/src/2022/day25/README.md
+++ b/src/2022/day25/README.md
@@ -1 +1,93 @@
+--- Day 25: Full of Hot Air ---
+As the expedition finally reaches the extraction point, several large hot air balloons drift down to meet you. Crews quickly start unloading the equipment the balloons brought: many hot air balloon kits, some fuel tanks, and a fuel heating machine.
+The fuel heating machine is a new addition to the process. When this mountain was a volcano, the ambient temperature was more reasonable; now, it's so cold that the fuel won't work at all without being warmed up first.
+
+The Elves, seemingly in an attempt to make the new machine feel welcome, have already attached a pair of googly eyes and started calling it "Bob".
+
+To heat the fuel, Bob needs to know the total amount of fuel that will be processed ahead of time so it can correctly calibrate heat output and flow rate. This amount is simply the sum of the fuel requirements of all of the hot air balloons, and those fuel requirements are even listed clearly on the side of each hot air balloon's burner.
+
+You assume the Elves will have no trouble adding up some numbers and are about to go back to figuring out which balloon is yours when you get a tap on the shoulder. Apparently, the fuel requirements use numbers written in a format the Elves don't recognize; predictably, they'd like your help deciphering them.
+
+You make a list of all of the fuel requirements (your puzzle input), but you don't recognize the number format either. For example:
+
+1=-0-2
+12111
+2=0=
+21
+2=01
+111
+20012
+112
+1=-1=
+1-12
+12
+1=
+122
+Fortunately, Bob is labeled with a support phone number. Not to be deterred, you call and ask for help.
+
+"That's right, just supply the fuel amount to the-- oh, for more than one burner? No problem, you just need to add together our Special Numeral-Analogue Fuel Units. Patent pending! They're way better than normal numbers for--"
+
+You mention that it's quite cold up here and ask if they can skip ahead.
+
+"Okay, our Special Numeral-Analogue Fuel Units - SNAFU for short - are sort of like normal numbers. You know how starting on the right, normal numbers have a ones place, a tens place, a hundreds place, and so on, where the digit in each place tells you how many of that value you have?"
+
+"SNAFU works the same way, except it uses powers of five instead of ten. Starting from the right, you have a ones place, a fives place, a twenty-fives place, a one-hundred-and-twenty-fives place, and so on. It's that easy!"
+
+You ask why some of the digits look like - or = instead of "digits".
+
+"You know, I never did ask the engineers why they did that. Instead of using digits four through zero, the digits are 2, 1, 0, minus (written -), and double-minus (written =). Minus is worth -1, and double-minus is worth -2."
+
+"So, because ten (in normal numbers) is two fives and no ones, in SNAFU it is written 20. Since eight (in normal numbers) is two fives minus two ones, it is written 2=."
+
+"You can do it the other direction, too. Say you have the SNAFU number 2=-01. That's 2 in the 625s place, = (double-minus) in the 125s place, - (minus) in the 25s place, 0 in the 5s place, and 1 in the 1s place. (2 times 625) plus (-2 times 125) plus (-1 times 25) plus (0 times 5) plus (1 times 1). That's 1250 plus -250 plus -25 plus 0 plus 1. 976!"
+
+"I see here that you're connected via our premium uplink service, so I'll transmit our handy SNAFU brochure to you now. Did you need anything else?"
+
+You ask if the fuel will even work in these temperatures.
+
+"Wait, it's how cold? There's no way the fuel - or any fuel - would work in those conditions! There are only a few places in the-- where did you say you are again?"
+
+Just then, you notice one of the Elves pour a few drops from a snowflake-shaped container into one of the fuel tanks, thank the support representative for their time, and disconnect the call.
+
+The SNAFU brochure contains a few more examples of decimal ("normal") numbers and their SNAFU counterparts:
+
+ Decimal SNAFU
+ 1 1
+ 2 2
+ 3 1=
+ 4 1-
+ 5 10
+ 6 11
+ 7 12
+ 8 2=
+ 9 2-
+ 10 20
+ 15 1=0
+ 20 1-0
+ 2022 1=11-2
+ 12345 1-0---0
+314159265 1121-1110-1=0
+Based on this process, the SNAFU numbers in the example above can be converted to decimal numbers as follows:
+
+ SNAFU Decimal
+1=-0-2 1747
+ 12111 906
+ 2=0= 198
+ 21 11
+ 2=01 201
+ 111 31
+ 20012 1257
+ 112 32
+ 1=-1= 353
+ 1-12 107
+ 12 7
+ 1= 3
+ 122 37
+In decimal, the sum of these numbers is 4890.
+
+As you go to input this number on Bob's console, you discover that some buttons you expected are missing. Instead, you are met with buttons labeled =, -, 0, 1, and 2. Bob needs the input value expressed as a SNAFU number, not in decimal.
+
+Reversing the process, you can determine that for the decimal number 4890, the SNAFU number you need to supply to Bob's console is 2=-1=0.
+
+The Elves are starting to get cold. What SNAFU number do you supply to Bob's console?
diff --git a/src/2022/day25/input b/src/2022/day25/input
index e69de29..4994e21 100644
--- a/src/2022/day25/input
+++ b/src/2022/day25/input
@@ -0,0 +1,141 @@
+121=10120=1022=2=0
+10==--=-=2
+2=11
+120221-1-
+2002011
+1-00-11=0
+1==2=-200101===
+2122=-10
+1=1=2=-1
+11--=-10-0-0
+2=-210=
+2-==1221011=021==-
+2
+1-2==212
+1-2=0=12--0111010=0
+1220-20=1=1
+1211=1
+10-22=-212--00
+1=---021
+1-010-21-2-
+10-==00122-=0--
+10=-
+1=20=-=---1=1
+1-0-0
+2===11=12200=2
+1===1
+1002
+10=-==-02
+12---2-==-020122
+11=-=2
+1-==2-=--2
+1-1112
+210-212-=20220-1
+1=-0111=0==
+100=20==-
+200==22-2=
+2-
+21-=1012=2=01=
+1=-=0=0-01=0
+1-2
+1121==0=
+2--21
+212111=00=-1-=1=
+10-021-
+2=
+2=0=12-
+1-0--
+2-0=21012==112=-1=
+1222==01=100121=0-=
+1011=01
+12102-
+10012=0-11021
+1-=01-
+12=010=12-0=02=11
+1-22=2--1-
+100=010-1
+210
+1-
+22--011--1212101
+11201
+1=2=-122=---1
+1===2122=-01=0=2
+1011--0--=20
+202-2-1=2
+2=000=10=-0
+110-=00-1211
+2==0=--00-2===
+110
+2=-02-1220012-
+1=21----=-=
+1=1
+12=--2=012-21
+1=0020-1--=0-=
+1==
+11-01101221=-02
+1=0201-2==0--01
+1=120120-=1
+1-121=====2-0=-
+201=1=1101-=02==
+1-00--0-
+10-202
+22-
+1==1=-2==-0-110
+1==21=1=20-1210=12
+20112-1=0--0=
+1=-=2021--0===21
+1-==-2
+1==120-0-
+1=0111=21-00-0=2
+1-110-=11-1021
+22
+1=1212=20=
+212=1=-12---122
+2=2
+2220-1=2==022=--0=
+2-02222
+1--0=0-22=-1
+120==2100
+10==201121==2-1221-0
+12210--==2--01022
+211120-21202
+22021011
+21---0=2-10=22
+1-22=-0
+12201=-2121-=-1
+11122-=202-
+1-2---=
+1-22=01=10-10
+1-0=0=21211011-0-
+2---
+1==12100
+112=1121
+120--1
+1-11=-2=-0
+1--=02-02
+2000-22==0221=2=
+1=1-10-1-==100=1
+202-011011
+20=10=-0002=00=
+2=1-2
+220
+11==-0=120--0-10=
+1=112-22202=2
+10=-0
+1=1=2=0
+2222--11---011-1
+1=-1=2=1-2122--10-1
+11021
+101
+11=2101222==
+100112-2011
+1=1=
+2-021--
+12211-1122=2-
+2--2=-1=-
+21012=2---2=2120=1
+1-010-==--2
+12=-22000-
+2-===1-1
+22=-=122=--1=
+2-2=-0-021
diff --git a/src/2022/day25/input0 b/src/2022/day25/input0
index e69de29..027aeec 100644
--- a/src/2022/day25/input0
+++ b/src/2022/day25/input0
@@ -0,0 +1,13 @@
+1=-0-2
+12111
+2=0=
+21
+2=01
+111
+20012
+112
+1=-1=
+1-12
+12
+1=
+122
diff --git a/test/test_2022.cpp b/test/test_2022.cpp
index a62a205..38554b8 100644
--- a/test/test_2022.cpp
+++ b/test/test_2022.cpp
@@ -141,21 +141,21 @@ TEST_CASE("Beacon Exclusion Zone", "[2022]") {
// REQUIRE(0 == p.second);
//}
-TEST_CASE("", "[2022]") {
+TEST_CASE("Pyroclastic Flow", "[2022]") {
line_view lv = load_file("../src/2022/day17/input0");
auto p = aoc2022::day17(lv);
REQUIRE(0 == p.first);
REQUIRE(0 == p.second);
}
-TEST_CASE("", "[2022]") {
+TEST_CASE("Boiling Boulders", "[2022]") {
line_view lv = load_file("../src/2022/day18/input0");
auto p = aoc2022::day18(lv);
REQUIRE(0 == p.first);
REQUIRE(0 == p.second);
}
-TEST_CASE("", "[2022]") {
+TEST_CASE("Not Enough Minerals", "[2022]") {
line_view lv = load_file("../src/2022/day19/input0");
auto p = aoc2022::day19(lv);
REQUIRE(0 == p.first);
@@ -183,21 +183,21 @@ TEST_CASE("Monkey Map", "[2022]") {
REQUIRE(182170 == p.second);
}
-TEST_CASE("", "[2022]") {
+TEST_CASE("Unstable Diffusion", "[2022]") {
line_view lv = load_file("../src/2022/day23/input0");
auto p = aoc2022::day23(lv);
REQUIRE(0 == p.first);
REQUIRE(0 == p.second);
}
-TEST_CASE("", "[2022]") {
+TEST_CASE("Blizzard Basin", "[2022]") {
line_view lv = load_file("../src/2022/day24/input0");
auto p = aoc2022::day24(lv);
REQUIRE(0 == p.first);
REQUIRE(0 == p.second);
}
-TEST_CASE("", "[2022]") {
+TEST_CASE("Full of Hot Air", "[2022]") {
line_view lv = load_file("../src/2022/day25/input0");
auto p = aoc2022::day25(lv);
REQUIRE(0 == p.first);