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: docs/day2.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,3 +40,24 @@ In the example above, the reports can be found safe or unsafe by checking those
40
40
So, in this example, `2` reports are safe.
41
41
42
42
Analyze the unusual data from the engineers. How many reports are safe?
43
+
44
+
### Part Two
45
+
46
+
The engineers are surprised by the low number of safe reports until they realize they forgot to tell you about the Problem Dampener.
47
+
48
+
The Problem Dampener is a reactor-mounted module that lets the reactor safety systems tolerate a single bad level in what would otherwise be a safe report. It's like the bad level never happened!
49
+
50
+
Now, the same rules apply as before, except if removing a single level from an unsafe report would make it safe, the report instead counts as safe.
51
+
52
+
More of the above example's reports are now safe:
53
+
54
+
*`7 6 4 2 1`: Safe without removing any level.
55
+
*`1 2 7 8 9`: Unsafe regardless of which level is removed.
56
+
*`9 7 6 2 1`: Unsafe regardless of which level is removed.
57
+
*`1 3 2 4 5`: Safe by removing the second level, `3`.
58
+
*`8 6 4 4 1`: Safe by removing the third level, `4`.
59
+
*`1 3 6 7 9`: Safe without removing any level.
60
+
61
+
Thanks to the Problem Dampener, `4` reports are actually safe!
62
+
63
+
Update your analysis by handling situations where the Problem Dampener can remove a single level from unsafe reports. How many reports are now safe?
0 commit comments