part2 (989B)
1--- Part Two --- 2 3Unfortunately, considering only horizontal and vertical lines doesn't give you the full picture; you 4need to also consider [1m[37mdiagonal lines[0m. 5 6Because of the limits of the hydrothermal vent mapping system, the lines in your list will only ever 7be horizontal, vertical, or a diagonal line at exactly 45 degrees. In other words: 8 9 10 - An entry like 1,1 -> 3,3 covers points 1,1, 2,2, and 3,3. 11 12 - An entry like 9,7 -> 7,9 covers points 9,7, 8,8, and 7,9. 13 14 15Considering all lines from the above example would now produce the following diagram: 16 171.1....11. 18.111...2.. 19..2.1.111. 20...1.2.2.. 21.112313211 22...1.2.... 23..1...1... 24.1.....1.. 251.......1. 26222111.... 27 28You still need to determine [1m[37mthe number of points where at least two lines overlap[0m. In the above 29example, this is still anywhere in the diagram with a 2 or larger - now a total of [1m[37m12[0m points. 30 31Consider all of the lines. [1m[37mAt how many points do at least two lines overlap?[0m 32 33