Skip to content

Commit 60571f9

Browse files
committed
doc: Add part 2 docs
1 parent f135a09 commit 60571f9

File tree

1 file changed

+21
-1
lines changed
  • internal/puzzles/solutions/2024/day02

1 file changed

+21
-1
lines changed

internal/puzzles/solutions/2024/day02/spec.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,25 @@ Analyze the unusual data from the engineers. How many reports are safe?
4949

5050
## --- Part Two ---
5151

52-
<!--- Pass here the description for part two --->
52+
The engineers are surprised by the low number of safe reports until they realize they forgot to tell you about the
53+
Problem Dampener.
54+
55+
The Problem Dampener is a reactor-mounted module that lets the reactor safety systems tolerate a single bad level in
56+
what would otherwise be a safe report. It's like the bad level never happened!
57+
58+
Now, the same rules apply as before, except if removing a single level from an unsafe report would make it safe, the
59+
report instead counts as safe.
60+
61+
More of the above example's reports are now safe:
62+
63+
- `7 6 4 2 1`: Safe without removing any level.
64+
- `1 2 7 8 9`: Unsafe regardless of which level is removed.
65+
- `9 7 6 2 1`: Unsafe regardless of which level is removed.
66+
- `1 3 2 4 5`: Safe by removing the second level, 3.
67+
- `8 6 4 4 1`: Safe by removing the third level, 4.
68+
- `1 3 6 7 9`: Safe without removing any level.
69+
Thanks to the Problem Dampener, 4 reports are actually safe!
70+
71+
Update your analysis by handling situations where the Problem Dampener can remove a single level from unsafe reports.
72+
How many reports are now safe?
5373

0 commit comments

Comments
 (0)