|
1 | | -# Day 13: Point of Incidence --- |
| 1 | +# Day 13: Point of Incidence |
2 | 2 | With your help, the hot springs team locates an appropriate spring which launches you neatly and precisely up to the |
3 | 3 | edge of **Lava Island**. |
4 | 4 |
|
@@ -79,3 +79,65 @@ rows above it, a total of **`405`**. |
79 | 79 |
|
80 | 80 | Find the line of reflection in each of the patterns in your notes. **What number do you get after summarizing all of |
81 | 81 | your notes**? |
| 82 | + |
| 83 | +# Part Two |
| 84 | +You resume walking through the valley of mirrors and - **SMACK!** - run directly into one. Hopefully nobody was |
| 85 | +watching, because that must have been pretty embarrassing. |
| 86 | + |
| 87 | +Upon closer inspection, you discover that every mirror has exactly one **smudge**: exactly one `.` or `#` should be the |
| 88 | +opposite type. |
| 89 | + |
| 90 | +In each pattern, you'll need to locate and fix the smudge that causes a **different reflection line** to be valid. |
| 91 | +(The old reflection line won't necessarily continue being valid after the smudge is fixed.) |
| 92 | + |
| 93 | +Here's the above example again: |
| 94 | +``` |
| 95 | +#.##..##. |
| 96 | +..#.##.#. |
| 97 | +##......# |
| 98 | +##......# |
| 99 | +..#.##.#. |
| 100 | +..##..##. |
| 101 | +#.#.##.#. |
| 102 | +
|
| 103 | +#...##..# |
| 104 | +#....#..# |
| 105 | +..##..### |
| 106 | +#####.##. |
| 107 | +#####.##. |
| 108 | +..##..### |
| 109 | +#....#..# |
| 110 | +``` |
| 111 | +The first pattern's smudge is in the top-left corner. If the top-left `#` were instead `.`, it would have a different, |
| 112 | +horizontal line of reflection: |
| 113 | +``` |
| 114 | +1 ..##..##. 1 |
| 115 | +2 ..#.##.#. 2 |
| 116 | +3v##......#v3 |
| 117 | +4^##......#^4 |
| 118 | +5 ..#.##.#. 5 |
| 119 | +6 ..##..##. 6 |
| 120 | +7 #.#.##.#. 7 |
| 121 | +``` |
| 122 | +With the smudge in the top-left corner repaired, a new horizontal line of reflection between rows 3 and 4 now exists. |
| 123 | +Row 7 has no corresponding reflected row and can be ignored, but every other row matches exactly: row 1 matches row 6, |
| 124 | +row 2 matches row 5, and row 3 matches row 4. |
| 125 | + |
| 126 | +In the second pattern, the smudge can be fixed by changing the fifth symbol on row 2 from `.` to `#`: |
| 127 | +``` |
| 128 | +1v#...##..#v1 |
| 129 | +2^#...##..#^2 |
| 130 | +3 ..##..### 3 |
| 131 | +4 #####.##. 4 |
| 132 | +5 #####.##. 5 |
| 133 | +6 ..##..### 6 |
| 134 | +7 #....#..# 7 |
| 135 | +``` |
| 136 | +Now, the pattern has a different horizontal line of reflection between rows 1 and 2. |
| 137 | + |
| 138 | +Summarize your notes as before, but instead use the new different reflection lines. In this example, the first |
| 139 | +pattern's new horizontal line has 3 rows above it and the second pattern's new horizontal line has 1 row above it, |
| 140 | +summarizing to the value **`400`**. |
| 141 | + |
| 142 | +In each pattern, fix the smudge and find the different line of reflection. **What number do you get after summarizing |
| 143 | +the new reflection line in each pattern in your notes**? |
0 commit comments