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: 2024/Day_20/README.md
+67Lines changed: 67 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -136,3 +136,70 @@ In this example, the total number of cheats (grouped by the amount of time they
136
136
- There is one cheat that saves 64 picoseconds.
137
137
138
138
You aren't sure what the conditions of the racetrack will be like, so to give yourself as many options as possible, you'll need a list of the best cheats. **How many cheats would save you at least 100 picoseconds?**
139
+
140
+
---
141
+
142
+
## --- Part Two ---
143
+
144
+
The programs seem perplexed by your list of cheats. Apparently, the two-picosecond cheating rule was deprecated several milliseconds ago! The latest version of the cheating rule permits a single cheat that instead lasts at most **20 picoseconds**.
145
+
146
+
Now, in addition to all the cheats that were possible in just two picoseconds, many more cheats are possible. This six-picosecond cheat saves **76 picoseconds**:
147
+
148
+
```
149
+
###############
150
+
#...#...#.....#
151
+
#.#.#.#.#.###.#
152
+
#S#...#.#.#...#
153
+
#1#####.#.#.###
154
+
#2#####.#.#...#
155
+
#3#####.#.###.#
156
+
#456.E#...#...#
157
+
###.#######.###
158
+
#...###...#...#
159
+
#.#####.#.###.#
160
+
#.#...#.#.#...#
161
+
#.#.#.#.#.#.###
162
+
#...#...#...###
163
+
###############
164
+
```
165
+
166
+
Because this cheat has the same start and end positions as the one above, it's the **same cheat**, even though the path taken during the cheat is different:
167
+
168
+
```
169
+
###############
170
+
#...#...#.....#
171
+
#.#.#.#.#.###.#
172
+
#S12..#.#.#...#
173
+
###3###.#.#.###
174
+
###4###.#.#...#
175
+
###5###.#.###.#
176
+
###6.E#...#...#
177
+
###.#######.###
178
+
#...###...#...#
179
+
#.#####.#.###.#
180
+
#.#...#.#.#...#
181
+
#.#.#.#.#.#.###
182
+
#...#...#...###
183
+
###############
184
+
```
185
+
186
+
Cheats don't need to use all 20 picoseconds; cheats can last any amount of time up to and including 20 picoseconds (but can still only end when the program is on normal track). Any cheat time not used is lost; it can't be saved for another cheat later.
187
+
188
+
You'll still need a list of the best cheats, but now there are even more to choose between. Here are the quantities of cheats in this example that save **50 picoseconds or more**:
189
+
190
+
- There are 32 cheats that save 50 picoseconds.
191
+
- There are 31 cheats that save 52 picoseconds.
192
+
- There are 29 cheats that save 54 picoseconds.
193
+
- There are 39 cheats that save 56 picoseconds.
194
+
- There are 25 cheats that save 58 picoseconds.
195
+
- There are 23 cheats that save 60 picoseconds.
196
+
- There are 20 cheats that save 62 picoseconds.
197
+
- There are 19 cheats that save 64 picoseconds.
198
+
- There are 12 cheats that save 66 picoseconds.
199
+
- There are 14 cheats that save 68 picoseconds.
200
+
- There are 12 cheats that save 70 picoseconds.
201
+
- There are 22 cheats that save 72 picoseconds.
202
+
- There are 4 cheats that save 74 picoseconds.
203
+
- There are 3 cheats that save 76 picoseconds.
204
+
205
+
Find the best cheats using the updated cheating rules. **How many cheats would save you at least 100 picoseconds?**
0 commit comments