You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 2018/10/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -146,14 +146,14 @@ Over time, the points listed above would move like this:
146
146
......................
147
147
148
148
149
-
After 3 seconds, the message appeared briefly: `_HI_`. Of course, your message will be much longer and will take many more seconds to appear.
149
+
After 3 seconds, the message appeared briefly: _`HI`_. Of course, your message will be much longer and will take many more seconds to appear.
150
150
151
151
_What message will eventually appear in the sky?_
152
152
153
153
-----------------
154
154
155
155
## --- Part Two ---
156
156
157
-
Good thing you didn't have to wait, because that would have taken a long time - much longer than the `_3_` seconds in the example above.
157
+
Good thing you didn't have to wait, because that would have taken a long time - much longer than the _`3`_ seconds in the example above.
158
158
159
159
Impressed by your sub-hour communication capabilities, the Elves are curious: _exactly how many seconds would they have needed to wait for that message to appear?_
@@ -44,7 +44,7 @@ Here are some more example power levels:
44
44
45
45
Your goal is to find the 3x3 square which has the largest total power. The square must be entirely within the 300x300 grid. Identify this square using the `X,Y` coordinate of its _top-left fuel cell_. For example:
46
46
47
-
For grid serial number `18`, the largest total 3x3 square has a top-left corner of `_33,45_` (with a total power of `29`); these fuel cells appear in the middle of this 5x5 region:
47
+
For grid serial number `18`, the largest total 3x3 square has a top-left corner of _`33,45`_ (with a total power of `29`); these fuel cells appear in the middle of this 5x5 region:
48
48
49
49
-2 -4 4 4 4
50
50
-4 4 4 4 -5
@@ -53,7 +53,7 @@ For grid serial number `18`, the largest total 3x3 square has a top-left corner
53
53
-1 0 2 -5 -2
54
54
55
55
56
-
For grid serial number `42`, the largest 3x3 square's top-left is `_21,61_` (with a total power of `30`); they are in the middle of this region:
56
+
For grid serial number `42`, the largest 3x3 square's top-left is _`21,61`_ (with a total power of `30`); they are in the middle of this region:
57
57
58
58
-3 4 2 2 2
59
59
-4 4 3 3 4
@@ -74,7 +74,7 @@ Realizing this, you now must find the _square of any size with the largest total
74
74
75
75
For example:
76
76
77
-
* For grid serial number `18`, the largest total square (with a total power of `113`) is 16x16 and has a top-left corner of `90,269`, so its identifier is `_90,269,16_`.
78
-
* For grid serial number `42`, the largest total square (with a total power of `119`) is 12x12 and has a top-left corner of `232,251`, so its identifier is `_232,251,12_`.
77
+
* For grid serial number `18`, the largest total square (with a total power of `113`) is 16x16 and has a top-left corner of `90,269`, so its identifier is _`90,269,16`_.
78
+
* For grid serial number `42`, the largest total square (with a total power of `119`) is 12x12 and has a top-left corner of `232,251`, so its identifier is _`232,251,12`_.
79
79
80
80
_What is the `X,Y,size` identifier of the square with the largest total power?_
Copy file name to clipboardExpand all lines: 2018/12/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ The generation is shown along the left, where `0` is the initial state. The pot
71
71
72
72
After one generation, only seven plants remain. The one in pot `0` matched the rule looking for `..#..`, the one in pot `4` matched the rule looking for `.#.#.`, pot `9` matched `.##..`, and so on.
73
73
74
-
In this example, after 20 generations, the pots shown as `#` contain plants, the furthest left of which is pot `-2`, and the furthest right of which is pot `34`. Adding up all the numbers of plant-containing pots after the 20th generation produces `_325_`.
74
+
In this example, after 20 generations, the pots shown as `#` contain plants, the furthest left of which is pot `-2`, and the furthest right of which is pot `34`. Adding up all the numbers of plant-containing pots after the 20th generation produces _`325`_.
75
75
76
76
_After `20` generations, what is the sum of the numbers of all pots which contain a plant?_
You finally have a chance to look at all of the produce moving around. Chocolate, cinnamon, mint, chili peppers, nutmeg, vanilla... the Elves must be growing these plants to make _hot chocolate_! As you realize this, you hear a conversation in the distance. When you go to investigate, you discover two Elves in what appears to be a makeshift underground kitchen/laboratory.
10
+
11
+
The Elves are trying to come up with the ultimate hot chocolate recipe; they're even maintaining a scoreboard which tracks the quality _score_ (`0`-`9`) of each recipe.
12
+
13
+
Only two recipes are on the board: the first recipe got a score of `3`, the second, `7`. Each of the two Elves has a _current recipe_: the first Elf starts with the first recipe, and the second Elf starts with the second recipe.
14
+
15
+
To create new recipes, the two Elves combine their current recipes. This creates new recipes from the _digits of the sum_ of the current recipes' scores. With the current recipes' scores of `3` and `7`, their sum is `10`, and so two new recipes would be created: the first with score `1` and the second with score `0`. If the current recipes' scores were `2` and `3`, the sum, `5`, would only create one recipe (with a score of `5`) with its single digit.
16
+
17
+
The new recipes are added to the end of the scoreboard in the order they are created. So, after the first round, the scoreboard is `3, 7, 1, 0`.
18
+
19
+
After all new recipes are added to the scoreboard, each Elf picks a new current recipe. To do this, the Elf steps forward through the scoreboard a number of recipes equal to _1 plus the score of their current recipe_. So, after the first round, the first Elf moves forward `1 + 3 = 4` times, while the second Elf moves forward `1 + 7 = 8` times. If they run out of recipes, they loop back around to the beginning. After the first round, both Elves happen to loop around until they land on the same recipe that they had in the beginning; in general, they will move to different recipes.
20
+
21
+
Drawing the first Elf as parentheses and the second Elf as square brackets, they continue this process:
22
+
23
+
(3)[7]
24
+
(3)[7] 1 0
25
+
3 7 1 [0](1) 0
26
+
3 7 1 0 [1] 0 (1)
27
+
(3) 7 1 0 1 0 [1] 2
28
+
3 7 1 0 (1) 0 1 2 [4]
29
+
3 7 1 [0] 1 0 (1) 2 4 5
30
+
3 7 1 0 [1] 0 1 2 (4) 5 1
31
+
3 (7) 1 0 1 0 [1] 2 4 5 1 5
32
+
3 7 1 0 1 0 1 2 [4](5) 1 5 8
33
+
3 (7) 1 0 1 0 1 2 4 5 1 5 8 [9]
34
+
3 7 1 0 1 0 1 [2] 4 (5) 1 5 8 9 1 6
35
+
3 7 1 0 1 0 1 2 4 5 [1] 5 8 9 1 (6) 7
36
+
3 7 1 0 (1) 0 1 2 4 5 1 5 [8] 9 1 6 7 7
37
+
3 7 [1] 0 1 0 (1) 2 4 5 1 5 8 9 1 6 7 7 9
38
+
3 7 1 0 [1] 0 1 2 (4) 5 1 5 8 9 1 6 7 7 9 2
39
+
40
+
The Elves think their skill will improve after making a few recipes (your puzzle input). However, that could take ages; you can speed this up considerably by identifying _the scores of the ten recipes_ after that. For example:
41
+
42
+
- If the Elves think their skill will improve after making `9` recipes, the scores of the ten recipes _after_ the first nine on the scoreboard would be `5158916779` (highlighted in the last line of the diagram).
43
+
- After `5` recipes, the scores of the next ten would be `0124515891`.
44
+
- After `18` recipes, the scores of the next ten would be `9251071085`.
45
+
- After `2018` recipes, the scores of the next ten would be `5941429882`.
46
+
47
+
_What are the scores of the ten recipes immediately after the number of recipes in your puzzle input?_
Copy file name to clipboardExpand all lines: 2018/18/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -157,7 +157,7 @@ For example, suppose the lumber collection area is instead only 10 by 10 acres w
157
157
||||||||||
158
158
159
159
160
-
After 10 minutes, there are `37` wooded acres and `31` lumberyards. Multiplying the number of wooded acres by the number of lumberyards gives the total _resource value_ after ten minutes: `37 * 31 = _1147_`.
160
+
After 10 minutes, there are `37` wooded acres and `31` lumberyards. Multiplying the number of wooded acres by the number of lumberyards gives the total _resource value_ after ten minutes: <code>37 * 31 = <em>1147</em></code>.
161
161
162
162
_What will the total resource value of the lumber collection area be after 10 minutes?_
Copy file name to clipboardExpand all lines: 2018/22/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -275,6 +275,6 @@ For example, using the same cave system as above, starting in the top left corne
275
275
||.|==.|.|.||=||
276
276
277
277
278
-
This is tied with other routes as the _fastest way to reach the target_: `_45_` minutes. In it, `21` minutes are spent switching tools (three times, seven minutes each) and the remaining `24` minutes are spent moving.
278
+
This is tied with other routes as the _fastest way to reach the target_: _`45`_ minutes. In it, `21` minutes are spent switching tools (three times, seven minutes each) and the remaining `24` minutes are spent moving.
279
279
280
280
_What is the fewest number of minutes you can take to reach the target?_
Copy file name to clipboardExpand all lines: 2018/25/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ Two points are in the same _constellation_ if their manhattan distance apart is
40
40
12,0,0,0
41
41
42
42
43
-
In the above list, the first six points form a single constellation: `0,0,0,0` is exactly distance `3` from the next four, and the point at `0,0,0,6` is connected to the others by being `3` away from `0,0,0,3`, which is already in the constellation. The bottom two points, `9,0,0,0` and `12,0,0,0` are in a separate constellation because no point is close enough to connect them to the first constellation. So, in the above list, the number of constellations is `_2_`. (If a point at `6,0,0,0` were present, it would connect `3,0,0,0` and `9,0,0,0`, merging all of the points into a single giant constellation instead.)
43
+
In the above list, the first six points form a single constellation: `0,0,0,0` is exactly distance `3` from the next four, and the point at `0,0,0,6` is connected to the others by being `3` away from `0,0,0,3`, which is already in the constellation. The bottom two points, `9,0,0,0` and `12,0,0,0` are in a separate constellation because no point is close enough to connect them to the first constellation. So, in the above list, the number of constellations is _`2`_. (If a point at `6,0,0,0` were present, it would connect `3,0,0,0` and `9,0,0,0`, merging all of the points into a single giant constellation instead.)
44
44
45
45
In this example, the number of constellations is `4`:
Copy file name to clipboardExpand all lines: 2018/8/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ In this example, each node of the tree is also marked with an underline starting
37
37
*`C`, which has `1` child node (`D`) and `1` metadata entry (`2`).
38
38
*`D`, which has `0` child nodes and `1` metadata entry (`99`).
39
39
40
-
The first check done on the license file is to simply add up all of the metadata entries. In this example, that sum is `1+1+2+10+11+12+2+99=_138_`.
40
+
The first check done on the license file is to simply add up all of the metadata entries. In this example, that sum is <code>1+1+2+10+11+12+2+99=<em>138</em></code>.
41
41
42
42
_What is the sum of all metadata entries?_
43
43
@@ -56,7 +56,7 @@ However, if a node _does have child nodes_, the metadata entries become indexes
56
56
For example, again using the above nodes:
57
57
58
58
* Node `C` has one metadata entry, `2`. Because node `C` has only one child node, `2` references a child node which does not exist, and so the value of node `C` is `0`.
59
-
* Node `A` has three metadata entries: `1`, `1`, and `2`. The `1` references node `A`'s first child node, `B`, and the `2` references node `A`'s second child node, `C`. Because node B has a value of `33` and node `C` has a value of `0`, the value of node `A` is `33+33+0=_66_`.
59
+
* Node `A` has three metadata entries: `1`, `1`, and `2`. The `1` references node `A`'s first child node, `B`, and the `2` references node `A`'s second child node, `C`. Because node B has a value of `33` and node `C` has a value of `0`, the value of node `A` is <code>33+33+0=<em>66</em></code>.
60
60
61
61
So, in this example, the value of the root node is `66`.
The goal is to be the _player with the highest score_ after the last marble is used up. Assuming the example above ends after the marble numbered `25`, the winning score is `23+9=_32_` (because player 5 kept marble `23` and removed marble `9`, while no other player got any points in this very short example game).
49
+
The goal is to be the _player with the highest score_ after the last marble is used up. Assuming the example above ends after the marble numbered `25`, the winning score is <code>23+9=<em>32</em></code> (because player 5 kept marble `23` and removed marble `9`, while no other player got any points in this very short example game).
0 commit comments