aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkaiwu <kaiwu2004@gmail.com>2022-03-22 14:20:34 +0800
committerkaiwu <kaiwu2004@gmail.com>2022-03-22 14:20:34 +0800
commit79c4ecc0eaca2119486821c3a70daaf69601c1b3 (patch)
tree448f601c1c5af53caaf60b42397e0e98b36e577e /src
parentb03d29360fa8acd59c613345ec35bd0e6686cbc4 (diff)
downloadadvent-of-code-79c4ecc0eaca2119486821c3a70daaf69601c1b3.tar.gz
advent-of-code-79c4ecc0eaca2119486821c3a70daaf69601c1b3.zip
day19 part1
Diffstat (limited to 'src')
-rw-r--r--src/2015/day19/README.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/2015/day19/README.md b/src/2015/day19/README.md
index 95337ec..4945df8 100644
--- a/src/2015/day19/README.md
+++ b/src/2015/day19/README.md
@@ -28,4 +28,23 @@ The machine replaces without regard for the surrounding characters. For example,
Your puzzle input describes all of the possible replacements and, at the bottom, the medicine molecule for which you need to calibrate the machine. How many distinct molecules can be created after all the different ways you can do one replacement on the medicine molecule?
+--- 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?