Advent of Code 2015 day 19 part 2: solution lookup
This commit is contained in:
parent
893b20fb6f
commit
4a0b5f95fa
|
|
@ -27,4 +27,27 @@ Your puzzle input describes all of the possible replacements and, at the bottom,
|
|||
|
||||
Your puzzle answer was 535.
|
||||
|
||||
The first half of this puzzle is complete! It provides one gold star: *
|
||||
--- Part Two ---
|
||||
Now that the machine is calibrated, you're ready to begin molecule fabrication.
|
||||
|
||||
Molecule fabrication always begins with just a single electron, e, and applying replacements one at a time, just like the ones during calibration.
|
||||
|
||||
For example, suppose you have the following replacements:
|
||||
|
||||
e => H
|
||||
e => O
|
||||
H => HO
|
||||
H => OH
|
||||
O => HH
|
||||
If you'd like to make HOH, you start with e, and then make the following replacements:
|
||||
|
||||
e => O to get O
|
||||
O => HH to get HH
|
||||
H => OH (on the second H) to get HOH
|
||||
So, you could make HOH after 3 steps. Santa's favorite molecule, HOHOHO, can be made in 6 steps.
|
||||
|
||||
How long will it take to make the medicine? Given the available replacements and the medicine molecule in your puzzle input, what is the fewest number of steps to go from e to the medicine molecule?
|
||||
|
||||
Your puzzle answer was 212.
|
||||
|
||||
Both parts of this puzzle are complete! They provide two gold stars: **
|
||||
|
|
|
|||
Loading…
Reference in New Issue