diff --git a/Day12_2/Day12_2.csproj b/Day12_2/Day12_2.csproj new file mode 100644 index 0000000..051c6b3 --- /dev/null +++ b/Day12_2/Day12_2.csproj @@ -0,0 +1,24 @@ + + + + Exe + net8.0 + enable + enable + + + + + + + + + PreserveNewest + + + + + + + + diff --git a/Day12_2/Program.cs b/Day12_2/Program.cs new file mode 100644 index 0000000..73bd0d0 --- /dev/null +++ b/Day12_2/Program.cs @@ -0,0 +1,88 @@ +using System.Numerics; + +var input = File.ReadAllLines("input.txt"); + +BigInteger runningTotal = 0; +foreach (var line in input) +{ + var parts = line.Split(' '); + var pattern = parts[0]; + pattern = string.Join("?", Enumerable.Repeat(pattern, 5)); + var groups = parts[1].Split(',').Select(int.Parse).ToArray(); + var totalGroups = new List(); + for (int i = 0; i < 5; i++) + { + totalGroups.AddRange(groups); + } + runningTotal += GetArrangmentsCount(pattern, totalGroups.ToArray()); +} + +Console.WriteLine(runningTotal); + +long GetArrangmentsCount(string pattern, int[] groups) +{ + var arrangements = new long[pattern.Length + 1, groups.Length + 1]; + arrangements[0, 0] = 1; + + for (int patternLength = 1; patternLength <= pattern.Length; patternLength++) + { + var patternIndex = patternLength - 1; + for (int groupCount = 0; groupCount <= groups.Length; groupCount++) + { + var character = pattern[patternIndex]; + if (character == '.' || character == '?') + { + arrangements[patternLength, groupCount] += arrangements[patternLength - 1, groupCount]; + } + + if (character == '#' || character == '?') + { + if (groupCount == 0) + { + continue; + } + + // The last group must end on this character + var groupSize = groups[groupCount - 1]; + if (patternLength < groupSize) + { + continue; + } + + bool canPlaceGroup = true; + for (int endIndex = patternIndex; endIndex >= patternIndex - groupSize + 1; endIndex--) + { + if (pattern[endIndex] == '.') + { + canPlaceGroup = false; + break; + } + } + + // There must be a non-# before the group + if (patternIndex - groupSize >= 0 && pattern[patternIndex - groupSize] == '#') + { + canPlaceGroup = false; + } + + if (canPlaceGroup) + { + if (patternLength == groupSize) + { + if (groupCount == 1) + { + arrangements[patternLength, groupCount] += 1; + } + } + else + { + arrangements[patternLength, groupCount] += + arrangements[patternLength - groupSize - 1, groupCount - 1]; + } + } + } + } + } + + return arrangements[pattern.Length, groups.Length]; +} \ No newline at end of file diff --git a/Day12_2/Properties/launchSettings.json b/Day12_2/Properties/launchSettings.json new file mode 100644 index 0000000..458e04e --- /dev/null +++ b/Day12_2/Properties/launchSettings.json @@ -0,0 +1,7 @@ +{ + "profiles": { + "Run": { + "commandName": "Project" + } + } +} \ No newline at end of file diff --git a/Day12_2/input.txt b/Day12_2/input.txt new file mode 100644 index 0000000..c43668e --- /dev/null +++ b/Day12_2/input.txt @@ -0,0 +1,1000 @@ +????.??#?#?#.??? 1,2,7,1 +?.????#???..??##???? 1,7,4,1 +????????.????. 1,2,2,1 +?.?#.?###??.#???? 2,4,1,2 +.??#?????.???????# 4,5,2 +?#??????#??????????. 7,9 +.?.????????.? 5,1 +.???.?.??? 3,1 +??#?#????????#????? 5,2,7 +???##...????.? 4,1,1,1 +??.?##.?######?.?? 2,7 +??????#??#####??.#?? 12,2 +.??.?###?????????? 1,7,1,1,1 +#??##.#??#?? 1,2,2,3 +?#?##..??##??## 1,2,3,2 +?.???###?.??????.? 7,4 +.???#???.#.? 2,4,1 +#????#?#?#?##?#? 3,11 +#?..?#?#?##?#???#? 1,13 +??.???###???#?? 1,7 +????#??#???#??.?#?. 12,2 +.???#.?#??# 1,1,2 +?##????#?.##. 4,1,2,2 +?#??#??.?????# 1,2,5 +?#?##???#.??#??#? 5,1,6 +##????????. 6,3 +??#??#.??#?.?#?? 6,3,1 +?????.?#?#?????... 2,8 +.?#?#??#???###????#. 15,2 +??##?##??????#??.??? 1,14,1 +?.?###?.??.?????# 4,2,4 +??##?#???#?.?#?## 7,2,4 +?###?#???##??#????.. 10,1,2 +?.??#?##?.?????. 1,6,2 +????#?.???..??.?#?.? 1,4,1,2,2,1 +.?????.??? 1,1 +???.????#??? 2,2,1,1 +??????..??????#.?? 4,1,2,1,1 +???.#???##??#.?## 1,6,2,3 +????#.????###??# 1,1,1,7,1 +#??.#?.#???#?##??? 1,1,1,1,9 +..#.#??##?? 1,6 +??#??.#??. 1,3 +..#..??#????.? 1,4,1,1 +?#?????????.#?.. 4,3,1,2 +???#???#.???? 1,1,2,2 +#??.?#?????#?#.? 3,1,6 +?#????#????#?.? 7,3 +.???#??????.?#? 1,2,1,2,1 +??#??????? 1,3 +?#?#??#??? 4,4 +?????#????.?? 6,1,1 +???.??????#?#??#? 1,1,7,1 +???#?.?.#.?...?? 3,1 +.???##????? 4,2 +???##????.????#?? 5,1,4,1 +#???.???#??#??????? 1,1,1,5,4 +?.##??????? 4,2 +??##??#???? 4,3,1 +?#??????#?##??#..? 1,11 +?#??#?#??????#? 1,10 +??##???.?. 4,1 +?#?????###?#?.???##? 12,1,4 +#?#???#?#.#??? 1,1,5,3 +??.??.#???.???# 2,1,2,1,1 +?.??#????.??? 4,2 +????.??.?#.?.#??#? 3,1,2,1,5 +??#????#?????#?#?? 7,5 +?##?#????? 6,1 +??.???.?.#?#??. 1,4 +?????..##?? 1,4 +?#?#????.????.?? 3,2,2,2 +?##???????##?????? 3,3,4,2 +??.????#????# 1,1,3,1 +.?.#??#?????#??????. 1,1,9 +???.???##.#.?##????? 2,5,1,4,3 +?#?????.???#?#?.?? 5,7 +?????##?????#????#?? 10,1,4,1 +??##?.#???.#?????# 4,4,1,2,2 +?#???.???.??.#? 3,2,1,2 +????#?#??#???? 1,2,6,1 +??.#??#???????.??# 11,1 +#?.???#..???##??? 2,2,1,7 +.???.#???????.# 1,1,1,2,1 +#????.?#???#???#???? 1,10 +????..#????? 1,1,3 +..?.?#?#??##??.?? 1,9,2 +?#????#?????.???. 1,9,1 +???????#?.??#?????# 1,2,1,3,3 +.??#?#????? 6,2 +?.???????????#?????# 6,3,2,1,1 +??????????# 4,2 +??????.????????#??? 1,10 +???#??#???.#???.?# 8,1,2,1 +?..#?.?.??.???.??? 2,2,3 +?#??????.?? 8,1 +??#??.?????#??#??? 1,1,1,2,2,5 +.#.?????????#? 1,1,4,2 +#?????.???#?? 1,3,6 +?.??????#??#??..#? 1,1,2,1,3,1 +?..???????#?????.??# 8,2 +????#?????..?#?#??.? 8,3 +#??#??.?????. 2,3,3 +..????#????????#### 5,1,1,5 +???##?#????? 6,3 +????..?..???? 2,1,1 +????????????????.??# 1,1,1,1,7,3 +???##?#??..?#?. 1,4,2 +????##???#.? 2,7 +?????##?#????? 1,10 +????..???????. 1,3 +?.???#?#?. 1,3 +?#?.???.??#????#?.?? 2,3,7,1 +??????..???????#?? 1,2,7 +?????..???#.?##?.#?? 5,4,2,3 +?.??#..?.???##? 2,1,5 +??.?????.????#.?#?? 1,1,1,5,1,1 +???#?##???.?? 2,5,1 +???.#??#?. 2,1,2 +?.?#?##??????.?##? 6,3,3 +?.?....#?##???#? 1,1,1,4,2 +????#.???##???? 2,1,4,1 +???????#?????##? 9,2 +?#??.#???? 2,1,1 +?#.?#?????????.???? 1,2,6,2 +??##...?#?? 3,2 +??..?#?.???#???.?. 1,2,3 +??#????##????? 1,1,9 +#???..?????#??#?##? 1,1,1,1,7 +#?#???#?.???? 4,2,2 +.???#?##????#?#?? 7,4 +??##?#?#????..?? 3,7,1 +?.?#??.#????? 1,4,1,3 +.?.???#.###. 4,3 +??#???.??.?.?.? 1,4,1,1 +?.?##?.????.???.#? 1,4,3,1,1 +?#?#.#.#?#??#?? 1,1,1,8 +.?..?#???.# 1,5,1 +??#??##?#??.. 1,6 +??#??????.#? 1,3,2 +?.##?????.? 1,3,1 +??.??.?#??? 2,1,1 +????.??#?###. 3,5 +?##.?##????? 3,4,1 +.?#??????#??#????#? 3,1,1,1,1,3 +?????#?????##??? 7,6 +.????.?.#?#? 2,1,1,2 +??????#.?? 2,1,1 +.???#???##? 5,3 +?#?.??#?##? 3,4 +#.?#???#?????#??#? 1,2,3,4 +#?.?#.?..?.#? 1,1,1,2 +?????#?#?#? 2,6 +?##.#?#?.???.?.??.#? 2,4,1,1,1,2 +?..?#??#??#?##??. 1,11 +????#.??#?.##?.#??.# 5,1,2,3,1,1 +#?##??#?##????#??? 1,13,1 +??#????????.?? 3,1,1 +#?.##??.??#? 1,4,2 +.?...???#???? 1,1,3,1 +?####...?##??. 4,5 +?.###?#??.?#??????. 1,3,1,1,6,1 +???#??#??. 3,3 +???????.?#???.. 2,4 +.?????#?##.?## 9,2 +#?##??#?..?#????. 7,5 +#?#??#??#?????? 3,5,1,1 +..???##.????.#? 4,1,1,1 +?#?????.?? 4,1,1 +.??????????#??.?? 3,1,2,2 +.?#??..#?#? 1,3 +???#????.??..???? 4,1,1,1,1 +??.#???#?? 1,5 +#?##..?#.?#? 4,2,1 +????#?..??????#???# 3,10 +??#??.##?##????.#. 4,9,1 +??##??????.?#??..? 3,2,3,1 +.??????.?#.?? 2,1,1,1 +??#.#????##?#?.????. 1,10,1 +??#?....???#????? 3,9 +????.#?#.#?. 2,1,1,2 +#???????###??#??? 3,12 +??????#.????## 1,2,1,6 +?????##??..???# 8,1,2 +#???.#????? 1,3,1 +???#???.???. 2,1,2 +?#?????????.? 5,4,1 +?..???#???# 1,4,1 +#?##??.?.?.?.?.?###? 6,1,1,4 +??.??.#????#??. 1,1,1,1,3 +??????????? 1,1,3 +????.????? 2,1,1 +.???#???????.??#??? 8,2 +.???#??#?#?##?##??? 3,10 +?.?#.??#.??#??##?.? 2,1,7 +#.?.#?#?#???????.#?. 1,6,2,1,1 +?##?###??#???????#?? 11,1,1,1,1 +#???.?.??#????. 4,1,1,1,1 +#??##?..??##????.??. 5,5,2 +..?#?#..?##??????? 2,1,4,1,1 +..#?????#? 3,4 +???#???#?????. 1,1,2,1 +#.??#???.?#??# 1,5,3,1 +????.??????#?#. 4,3,1,1,1 +??#????####?#???# 11,1,1 +??..?????? 2,4,1 +?.???##??.????#?? 1,1,4,1,1 +???#??.?###??#??? 1,3,9 +##?????????????. 7,3,3 +???.?#????##?#?????? 1,11 +????##????.? 6,1 +??.?.????#? 1,1,3 +???#??????#???. 4,4 +#???.????#??#???.??? 1,1,1,6,2 +???#?.????###?????. 3,3,8 +.??..????##?.. 2,6 +#?.??.???# 2,3 +.???#??##???? 2,2,4,1 +??#??#?????????##?#. 10,6 +??#.????###???#.#? 2,1,8,1 +?#????????#?#????? 6,8 +???.????#???? 1,1,5 +?.??.??..????#??# 1,1,4 +?#??..#..#?. 3,1,1 +#.??##?.???##????? 1,4,7 +.???#?.?..???#? 1,3,1,1,1 +#??#?#???????.##?### 6,2,6 +??##???#?? 2,1 +?##.?#??#.#????#??# 2,2,1,2,5 +??##?#.???.#?????.. 5,1,4 +???#??#????#.???? 6,1,1 +?????.#?#?????????? 3,6,1,1,1 +.????..?????#???? 2,3 +???#?#?##? 1,1,3 +??.??##?#?? 1,1,6 +##??####????????# 10,1,1 +?#?.?#?#??.. 1,5 +?#.?.??#??##??.# 1,1,7,1 +?????#??#?????#???# 1,1,6,3,2 +?.?#??#???#?..???# 1,1,4,2,1,1 +??#????????# 7,2 +.?.#?#???#?#???????# 1,10,1,1,1 +.??????.?? 2,1,1 +.??????##. 3,3 +?????##?.???#???#?? 3,3,1,2,1 +?.?.?#???#.???? 1,1,2,1,1 +.#..?.?#?? 1,1,4 +?##???????#??#??. 13,1 +##??.?????##?#. 4,6 +.?#??.#??#?#?##?#? 4,11 +##?#???.???#?. 2,1,1,5 +????#???????.## 1,3,4,2 +?.????#????##.?? 1,1,7,1 +??##?.#??#????? 3,4,1 +.??#?#??.?##???### 7,9 +###????#???#.??#?? 12,4 +??#????##?? 1,1,5 +?????.???.?????.?? 2,1,2,4 +#??##?.???#?? 1,3,3 +?##?.?.?##?????? 3,6,1 +??#??#???#..#??. 6,2,1,1 +#?#??#?#?...?? 3,4,1 +????#???????? 1,2,1,2 +??####??.???.?#.#??? 6,1,1,2,1,1 +...??#??#?? 3,2 +??.??????.? 1,4,1 +?.?##.#?????????#? 3,1,1,1,1,1 +.????????#?.???#.. 6,4 +#.#??.?????#??? 1,3,1,4,1 +?#????#?#?#??#?? 3,9 +?????#?#???#??#.?? 1,3,6,1,2 +?#?#????????#???.? 4,11 +?##?#??.?.??.?# 5,1,1,1,2 +.##???#..?# 6,2 +??????.??? 1,2,2 +?##????#?#? 4,4 +?#?.?????#?????##?? 2,5,5 +?#????..???.??##? 2,1,2,4 +.?????#???.?????## 2,4,1,1,5 +.??...??????.?? 2,1,1,1,1 +#?.????#??..?# 2,1,5,2 +??.#?????????#?? 4,3,3 +?????#?????.. 6,1 +?????.?????? 1,1,5 +.???.?????##??. 1,4 +??????.##?. 5,3 +.??????#??..???? 1,1,3,1,1 +??.?????#??..??? 1,1,4,2 +???.#???????..??#?.. 7,2 +??.??##????????#.?? 5,1,3 +???.??#???.?#. 3,3,1 +??###.????? 3,2,1 +.????#.?..?.?# 5,1,1,1 +???#??#???#? 3,1,1 +????.??.#...?#?? 1,1,1,1,4 +?????.??#??? 2,1,4 +???.????????##??.?.. 10,1 +?????.?????? 1,1,1,4 +##??????????##????#? 3,3,7,2 +??##???..#?? 4,1 +??##.?.?????##??? 3,2,5 +.?????#??#??.? 9,1 +?#?##??#???#? 1,6,2 +?.??????#???##? 1,9 +#????#?#??? 1,5 +??#???????#? 4,6 +??.#??????#.??.#. 1,8,1 +?.?.#?#??#????#..? 1,1,8,1,1 +?.?.??#?.##.?. 1,1,2,2 +.?#???##...???. 1,3,2 +??.????.#.#?#..??# 1,1,1,1,3,1 +?#.#?????.??? 1,1,4,2 +???#??..#? 1,1 +#??#??????# 1,2,5 +#?.#.#?.????##.? 1,1,1,5,1 +.????.?.#?? 1,3 +?####???????.?? 5,2,1,1 +#??????##? 1,3 +.??.???.#??????# 1,2,1,4,1 +????????#??##?#???.? 7,6 +.??.??#?#???.?????. 1,4,1,3,1 +#.?.???#??##??? 1,1,9 +???#????#?#?.?.???# 1,2,4,1,1,2 +???????#.???? 2,2,3 +.??#??.?#?#????.??#? 4,6,3 +?.?#?#?.??.?????.??. 1,4,2,1,1,1 +?#?##?.???. 4,1 +?????.??##?.???#? 1,1,5,1,2 +?#??.##???.???? 1,5 +?????#??.???#?.??. 4,3 +#?.?##?????????????? 1,4,4,2,3 +???.?##?.?.???? 4,1 +.????.???????. 1,1,3 +??#????#?.?????# 1,1,2,2,1 +????#..??###? 1,1,1,6 +.#?#??##?##?????? 11,3 +???????.????????#?? 2,1,1,2,1,6 +.??????#???#? 2,6 +.?#?.????????? 3,4,1 +??#?.??#????.??#??. 4,3,1,5 +..?#?..??##?#??#?? 1,11 +?????#???????.??? 6,1,1,1,3 +???#??##????????.?. 1,11 +???.?.??.####?##? 1,1,1,8 +#???#..???? 3,1,2 +??????????????##?#?? 3,11 +???????#????.??????? 4,1,1,1,3 +.?#???#???#?? 6,1 +?#??##???#????#?? 7,2,2 +??.????????..???. 1,4,3 +.??#??#????.??.? 6,1,1,1 +?.??#???.?.?.?.##?? 1,4,1,1,3 +????##???#?##?..? 3,7,1 +???##??.?#.. 7,1 +????????????#? 1,5,1,1 +..???#?#???##..#? 2,8,1 +?#####????#???## 7,7 +#####.??#??#?#?# 5,1,1,1,1 +.?.????#?????? 1,5 +.?.?.????# 1,1,1 +??.????#??? 1,2 +?????##??? 2,5 +??????.#??.? 1,2,1,1 +??#???.??#??? 3,1,3 +?.#?.?#?#.??#??#?? 2,4,3,3 +?.??##??????? 6,3 +##.?.??#??.?#????# 2,1,1,1,5,1 +??#..?.?#?#? 3,1,1,2 +.?????.???#? 1,5 +.?#?.??????? 1,1,1 +?????#???.???? 7,3 +.#?##???.??????? 6,3,3 +...????#?.?????###? 4,6 +??.#..#???#????? 1,5,1,1 +??...??##????.??? 1,4,1,1,1 +?#??????????? 6,4 +#???#?????.?#?#???? 1,8,1,4 +.??.?.???# 1,3 +?#.#?.????#??? 2,1,7 +??..?#???#.??.?? 1,6,1,1 +.?????.?.???#? 2,5 +?#???????# 4,2 +??#????????????..#.? 11,1,1,1,1 +?????#.?..####??# 1,2,1,1,7 +?#??..??.? 2,1 +????#???????#???# 1,2,1,6 +?#.#??#???#.? 1,8,1 +?#???#????#??????#?? 1,8,4 +#????????? 1,1,1 +??#??#????#.?#?? 9,1,3 +#????#?#?.????##??? 6,1,8 +?##??????#??#? 5,5 +????..???.. 3,1,1 +???#?????? 3,2 +?????#.?##??#??? 1,1,3,1 +?#???#?.?.??.#???? 2,4,1,1,4 +?.??#?#.?###?#?? 1,1,7 +??.???.?#?#??. 1,2,2,1 +.???????????###?. 3,3,5 +?.##????##?. 4,2 +????.?.#?#?????#.?? 1,9 +?.?..???#? 1,1,1 +?.???#?#?.???###??? 6,7 +?????.?###?.???? 1,1,5,1,1 +????.?????#? 1,7 +?#???#????#?? 6,3,1 +??#?..?###?????? 2,5,1 +????####??#???.#?#? 2,5,1,2,1,1 +???##???#??? 1,3,1,1 +?.?.?#?.???. 1,2,2 +?#?..??#???# 3,1,1,1 +??????#??#? 1,8 +.?????.???.?#.#.??? 1,1,3,2,1,3 +.??????#?#?? 1,7 +????##??#?? 2,2,2 +?.?#.##????????# 1,1,4,1,2 +??.??##??.?# 6,1 +?????????? 1,1,3 +.?#????...????##?? 2,4 +???##???????..#????? 10,1 +?.??.##?.?.??? 1,2,1,2 +???#????#????? 4,2,1,2 +???#???????????#?#.. 2,12 +???.?.?#?????? 3,2,3 +??.##??.?.#??? 2,2,1,3 +??#??#?????#?. 7,1 +??#????.#??.?.?.?# 6,1,1,1,1,1 +??##??????#? 7,2 +???#???#.?# 1,3,1 +??#.???#?# 3,5 +??##?.??#?? 2,1,1 +#?.??##?????.??#.?. 2,8,3,1 +??#?????#??????????. 8,1,5 +?.???.######?????? 3,9 +?...???.#? 1,1,1 +??.?.??#????## 1,1,2,4 +?????##?#??????..?? 12,2 +?#??#?.#??? 1,1,3 +.#.???#??# 1,2,1 +????#?.?.?????. 1,3,1,2,1 +.????.??.??# 1,1,1,1 +?.???#???????#? 1,5,4 +??.??##????#????.? 1,9,1 +?????#???#????##??.# 8,1,1,3,1 +?#???##???? 1,4,1 +.????#???#?##??.?## 1,1,7,2 +?.????#??#?????#. 1,5,1,3,1 +#.??????##?#???##?? 1,2,7,1,2 +?#??????..???????#? 1,1,2,5,1 +???.?##??.????#. 3,4,1,2 +.#??.????..??.???? 3,4,1,2 +.????.#?#????#?#?#?. 3,10,1 +?.??????..??.?#?.... 1,3 +?#??.??.?#. 2,2,1 +?#??#.?.????.?? 2,2,1,1,1 +??????#??#?.? 2,5 +?#.###???#??? 1,8,1 +.??.?#??#??.?.?.# 1,2,3,1,1 +?.???????#???.? 1,1,5,1,1 +??.#?##?#?#.?#???? 1,6,1,4,1 +?????#.???#?#???#? 1,2,6,1 +.??.???????????? 1,2,1,2 +.??.????#?#???.? 1,3 +#???#?#.#??#?#?#?? 7,1,6 +??#??????.??.??.?# 9,1,2,2 +.??#?.??.???? 4,4 +????#?.#??. 5,1,1 +#???#?##???#?#?#???. 1,14,1 +?????.????# 1,1,5 +?.?????.?..?##? 1,2,1,1,4 +.??#???#?.#???.?.? 6,2,1 +?..?#.?.??#????.? 1,1,3,3,1 +.#?##???#???.#.#.??. 8,1,1,1,1 +.???.??#??? 1,1,4 +?#??.?#?????#??# 1,1,2,4,1 +????????????. 3,1 +?.#?.?.???????.. 2,5 +?#??#???##????#.#?# 6,2,3,1,1 +?.??#??#??.#? 5,1 +?#???##?#? 6,1 +#??????#??.? 3,1,1,1 +??##??#??.??#? 7,1,1 +.??#??#???? 2,3 +.???.#?#????#??# 1,11 +?.#??##??????###?#? 14,2 +?.??????????.##?? 3,6,2 +???#??#.?#?.?. 7,1,1 +..??.#?.??#? 1,1,1,1 +.?#..?#??? 2,2,1 +...?.????#??.??.? 1,6,2,1 +???##?#??#????##?? 11,4 +.#??..?.??????.? 3,1,1,2,1 +??.????#??.# 2,6,1 +.?.?#.??####..#?#?? 1,2,1,4,1,2 +?##.#?.??#?##??#??? 3,1,5,2,2 +#???#?.??? 3,1,2 +??#?#?#.??. 2,3,1 +#..???.?#? 1,1,1 +??.?#??????.?.??? 1,1,5,1,1 +#??.??#????. 1,2 +?.?????..???# 2,4 +.???#.????.? 1,1,1,1 +???????.???.??? 5,3,1 +??.?##..??. 1,2,1 +.#??#?#?#?????.?#??? 1,7,2,4 +???#.??????.?.??? 1,1,4,3 +.?.???#??#???.. 1,3,4 +????????.##?. 1,3,2 +????#?#??#.. 4,4 +????.??#?? 3,1 +??###?##?.?#?# 7,4 +##?.???????.?.?## 2,1,4,1,3 +??????????#???#??#?? 1,4,5,2 +#..??????#.? 1,4,1 +???##?#????.??#.?#.? 9,1,1 +????#??.##??.?.? 2,3,4,1,1 +??##?#??????#.. 7,1,1 +????.????##?.?? 1,4 +??????#?????#?? 7,3 +.??#??#?.???#?#.?? 6,6 +.???#?.??#??? 2,5 +???.?????? 1,2 +???#?#????????#??? 5,1,5 +#????????.?.?????? 2,1,2,1,3 +#.???#??#??????#.?# 1,1,3,8,1 +?????????????#? 7,1,1,1 +?.?#??????##???#. 3,7 +#??..#.??#???. 3,1,5 +??#????...?#???#. 1,1,1,6 +??##??#??. 6,1 +?.???.#??.??##?? 1,1,1,1,4 +?????#???????? 4,2,1 +.???..?#???.#?? 1,1,4,1,1 +.???????????#.????# 7,1,4 +??##??.??#???? 4,4 +???#?#?#???#???#? 8,5 +????.##.??.?????? 2,2,2,4 +???.##?..??#?#? 2,3,4 +??#?????.?. 2,3 +#?..??.#.?????? 2,1,4,1 +?#####?#?? 7,1 +.#.?.?#?##??#?##?? 1,1,5,6 +??##?#?????##??#???? 13,1,1 +?#.???#??##? 2,1,1,4 +?..#?.#.???????#???? 1,2,1,3,6,1 +???????#.??.? 6,1,1 +?##??#??#?##?.??## 6,4,4 +????#...##??.?##??? 3,4,4 +..????##?.#? 1,4,1 +?#.??.??.#..???? 1,1,1,1,1 +??##????####???? 3,10 +.?#.#???##?#? 1,8 +##?.???.?#??# 2,1,5 +?.?#?#???? 1,3 +???##.#.??#??? 4,1,1,1 +????????#??????#??.? 1,1,1,1,7 +?????.???? 1,1,1 +??????#?#???#???#.? 1,13 +??.##?#?.???#.??#??? 1,5,3,5 +??#...###???????. 2,10 +??#?.?.????.? 1,2 +?.??##??#?..#? 4,2,1 +??#??.?#?##??.#.?? 1,1,7,1 +???#????#???..?.?? 1,1,6,1,1 +.????????? 2,2 +??#??##?#?.. 1,1,5 +?#?..??.???. 1,2,1,1 +#?????#?.???#???? 1,6,4,1 +.??#????.??.?## 4,1,1,2 +?.?.???.??# 1,1,1 +.???#?#?#?##???.???. 12,1 +.?????#?.?.????.. 7,2 +??##????????.??#?# 5,1,1,4 +?#??????#??####?.#? 15,1 +?.??#?..##?????.?#?? 1,3,5,1,1 +#??##????????#?#?. 1,5,2,5 +?.?#?#???.???#????? 6,1,1,1,1 +????????????#?? 2,2,2 +???#?????? 6,1 +??????????????#? 2,3,2,3 +??#?#???#??????..# 15,1 +?.?.??.???? 1,2,3 +???#??.????##?? 1,4,1,3 +???##???????## 1,2,7 +??##?.??#??#??#??#? 2,10 +??#???#????.???#. 4,1,1,3 +?#.??.??#?###. 1,6 +??#??##???## 1,1,3,2 +.##??.????#?#???#?? 4,1,7 +?.???...#??????..? 1,6 +#?.#???#??????#?.? 1,1,1,1,7,1 +?#??#??????#????.?.? 12,1,1,1 +??#??????????.???? 1,1,1,5,1,1 +??.?#.?#????.#?#?# 1,2,3,1,5 +#.?#.???#?????#????. 1,1,4,5,3 +?.?#??.??? 3,1 +??#???###.??? 2,4,2 +??#???.?#??#####?? 5,9 +?##??#..?## 5,3 +?.???.?.?.#?.??? 1,1 +.##????#?##?.#?. 10,1 +??.???#?.??????.? 3,3 +.??#????#?.?#..? 3,1,1,2,1 +.?.?#?????..?#? 7,3 +??.??.??#?#??..?? 2,7,1 +###???????##..#???. 4,3,3,4 +.??#???#??#??#.?#??? 4,1,1,1,5 +.#???????? 1,5,1 +##?#..???.###??? 2,1,1,1,5 +?????????#.?????. 9,2 +??.#??##???#????? 10,2 +??#????????????? 1,4,2 +??#?.???.???#??? 1,3 +????.????????? 2,2,1,1 +?.#.##?????.. 1,1,4,1 +??.??????.? 2,1,2 +.#?#??#... 3,1 +#??#?????.???#???? 1,1,3,8 +?????????#?????# 1,3,4,1,1 +??##??.??.? 3,1,2 +???..????.? 3,3,1 +??##??????...?#?? 2,5,2 +????.#?.??..#??#? 1,1,2,2,4 +??..#??????#??.#? 1,1,7,2 +?##??#?#??# 2,6 +?????#.???..???. 5,3,3 +?#?.??..?.? 2,1,1 +?..??#????.??. 3,3 +????#??#.?? 5,1,1 +??##????##??.??? 1,2,5,1 +???####???????#.# 1,10,1,1 +?#??.??#?#?????? 1,4,3 +.?????.?#?#???.? 1,7 +????##??####?????.? 11,2 +????#????# 1,2 +?#?..?????#???##?#? 2,1,3,5 +?????.???##?? 1,1,1,4 +#???????.#.?..???## 3,4,1,1,5 +????#????.?#...???. 6,2,1,1 +?.??????#??.###? 3,1,1,1,4 +?..???#?#???? 1,1,5,1 +????#??###.? 1,7,1 +????????#??.? 1,5 +.????#???#???#?.?. 2,10,1 +.?.??.????.#??##.? 2,4,5 +#??????#?.?? 2,5,1 +??.??#??????..??? 3,2 +???????.?? 1,1,2 +.??????.?? 1,1 +???????.?..?????#??? 1,3,1,1,1,7 +?#???#?????????? 5,3,1 +.#..??.???????? 1,1,1,4 +.#?#??###?? 3,6 +?????#??#??.? 1,1,2,1 +???????#???..#??.? 1,9,2,1 +??????#?.#?.? 5,2 +.?#????#????????.? 2,4,5 +??#????.????.# 2,2,1 +??????#??##??#?##??. 5,11 +.#?#??.???????.? 4,1,3,1 +????#.#????##???## 1,1,1,5,4 +???#???#?#? 1,2,5 +?.????#?#???#?#.#??? 8,4,1 +?..#..?#??????#? 1,1,3,1,2 +???##??#?#???????. 8,1,1 +??.??##??#?#? 2,5,2 +??#?#??#?????? 2,2,2,1 +????#?????#? 1,2,1,2 +??.??????#?#.???#?. 9,4 +??##???.?? 3,1,1 +..??#????.????.#??? 1,3,1,1,1,3 +??.?????#?#???...?? 1,10,1 +???#??##???#? 1,1,7 +????#????#?##?# 2,1,6 +?#????#..?#. 2,2,1 +.#???.????? 3,1,2 +??##?.?.?#??????#?## 5,1,2,8 +..???.??#. 2,2 +????????#??#????. 1,2,7,1 +??.??##?..??#? 1,3,4 +??????.???.??#? 2,2,1,2 +.?#???.???????.?? 4,4,1,1 +...?#???#?????##?..? 12,1 +????.??.??????? 1,4 +.?.??#???? 1,4,2 +???.?.?.?.???????.?# 3,1,1,3,1,1 +???????#??#?#? 1,9 +#.???#.??????#????? 1,2,1,1,4,1 +#?###?????.?#? 6,2,2 +??#?.????.?? 3,2,1 +???.???..??????. 2,1,4 +???..???#??.???? 1,1,5,1,1 +.###?.????#??????? 4,2,1 +..?????????#?? 2,7 +?#?#??#??????#.. 10,2 +?##???.?#???#????? 6,1,1,1,1 +?#?????#?#?#..?.??#? 6,1,1,1,1,1 +??????###??.. 2,5 +.????..??? 1,1,3 +.???#?.???? 1,4 +?#?#??#????.?#?? 4,5,1 +#????..??.???.??.# 5,1,2,1,1 +#??.????.???#??#??.? 3,2,8 +?????..#.?.????.?? 5,1,1,1,1,1 +??.??????.???#?#???? 2,1,10 +?#.????#?? 1,3 +?#??.?#????#?????? 4,1,1,1,1,1 +?????.?.?####? 1,3,6 +.#?????#?????#??# 4,8,2 +..????#???????? 7,2 +?#?????#?.???.?.? 1,3,2,1,1 +????#.??.???.????? 2,1 +.??#????##??# 1,3,5 +??#??#?#.???## 7,1,2 +??#???????.###.??.? 6,1,1,3,1,1 +????#?#?#??.?#?#?.#. 9,3,1 +?????#.????? 3,1,5 +#.??.?#??#??.?## 1,1,3,3,3 +..??.?#.#? 1,1,1 +???##..??#??#?.?#? 3,5,2 +?.#.?#????????# 1,1,2,5,1 +?#??##????#.????? 8,1,1,1 +.#??#???#??.#? 8,1 +..?#??#?##?????? 9,3 +..??##?.???##?#?##?? 1,3,7,4 +?.??#????#?#?? 1,4,5 +?????#??#???.????.?. 9,1,1,1 +????#?#??. 2,1,1 +.???###.?#?#???#.??. 6,8 +?#????????#????.?##? 2,6,1,3 +??.#??????.? 1,1,2,1 +?#.?????.?????#??? 1,1,1,1,1,5 +??..????##? 1,1,4 +?#????.?#???? 2,1,5 +???????#????#.#.??? 3,4,1,1,1,1 +??.?????.???? 1,4,1,1 +##??#??????.. 6,1 +?#?#.???.#?? 2,1,2,3 +??#?????##??#?..?? 5,6,1 +???????????? 3,1,1,1 +.?##??#???#??#??##?. 2,3,9 +.????????????.?#??.? 1,1,4,3,4 +??#?#???????# 3,3 +#.???.??#???? 1,1,1,5 +?????????#????##? 4,7,3 +????#????????.?# 5,5,1 +??#???#????##??#???? 13,4 +??#???#?..?# 7,1 +????????#?.# 1,1,1,1 +???.?????????#?# 1,2,1,2,1 +?.??????#?? 2,1 +??????##??. 2,3 +#??#.?.#???##?#?? 1,2,6,1 +??#????????#?????#. 8,5,3 +.???#.#??.? 3,3 +?????.???#?.????# 1,1,3,1,1 +?.???.?##?.?? 1,1,2,1 +??#???#?????#? 7,1,2 +???##???.???#?#?? 5,4 +???.??#???.???#?#.?. 3,3 +##?.?#???.##???#??? 3,5,4,2 +??#????#??#????? 1,5,1,2 +????????.?. 1,4 +??#??.??##?#???. 3,5,1 +?#??.??#??. 3,4 +?..?##???.??##?#?... 3,4 +.??.?#.????. 2,1,1,1 +???##?????.?????? 1,7,6 +??#??#??##???.????. 1,2,1,2,2,4 +.?????##??##?# 2,8 +.????##?.???? 1,2,3 +???????.???????.. 3,1,1,1 +?.????#?#???#??.??? 1,11,3 +#??????#?.???#??.# 9,2,1 +?#?##?#?##????? 1,11 +.#?##???#?#??.?# 1,2,1,5,1 +?????#??#?##???#? 1,14 +?.???????#???.??#. 1,2,5,3 +???#?####?? 2,5 +?###?##?#?#?#.??#? 12,2 +.?####.?..???.?? 5,1,1,1 +?????#????.????. 1,5,1,1,1 +#????.??#??. 4,5 +??????.??##?##?? 2,7 +??#.?????????#. 3,1,1,1,1 +#?????###??...?????? 1,1,4,1,3,2 +.#????.#?#.?#? 1,1,3,2 +.??.#?..???#.??#?#? 1,1,1,1,3,2 +????#?##.??.?? 7,1,1 +?#?.?.??#?#??#?#.# 1,1,9,1 +?.#?#???????###????? 1,1,1,2,7 +?????????.#?. 1,3,2,2 +.??.??.???.##?? 2,2 +#??#??.#?.????????? 6,1,8 +.??.??#???#??? 1,8 +##???.?.#..?#? 5,1,2 +?.??####????#?.?? 1,9,2 +?????#..#..#?#??.?.? 6,1,3,1,1,1 +??#??##?????.??? 8,1 +???#?##..??..???#? 6,3 +???#???.?#?.?? 3,3,1 +??.?#?????##??.?#? 1,3,5,1,1 +?.?#??.???????. 1,2,1,1,1 +????#?????? 2,1,1 +??##???##???? 10,1 +.???#????? 2,2 +#??.?????.? 2,4,1 +?????.??????????? 1,1,2,3 +.?????#?#??.?? 8,2 +.?????????? 3,2 +???##?##??#????.? 4,7,1,1 +????.?????????. 4,1,5 +#?.?#?#?###??# 2,1,8 +#??????#?..#? 2,1,2,1 +??#?..???? 1,2 +??###?.#.???? 4,1,1,1 +???.?##???? 1,7 +#??##??.??#?## 2,3,1,4 +.?##??????#? 4,2,2 +?.?#?#??.???.#??? 1,5,4 +??????#?#??# 8,1 +??##?#.???.? 3,1,2,1 +.???????##?????? 1,1,8 +??#???????.???# 4,1,1,2 +??####??#????????. 11,3 +?##?.?.?#??#?. 2,4 +???????..?#?? 4,2,1,1 +?.#?????.?#?#??? 2,1,1,7 +??#??#???##???????? 4,1,2,3,3 +??#???##?????#??.??. 5,4,3,2 +#???????#.??? 1,2,4,1 +##.???#???? 2,4,2 +?????#?#.????#?? 3,3 +?#???#??#?.#.????.. 5,2,1,4 +?????#?#?.???????# 1,1,3,2,1,1 +????????.# 1,1,1 +..?#????.??? 2,1,3 +.#??#??###???##?## 1,1,12 +.???#??#?#?#..?????. 10,1 +#?.???????.#?? 2,4,1,2 +??...#?#.?? 1,3,2 +?????#????#?#?#?#? 6,1,4,1,1 +????##?.?##??? 4,6 +#????##??.?? 2,4 +?#?????#.?? 8,1 +#.??????#??#?????? 1,5,2,1,2 +#.???#..#? 1,1,2 +??.????????#??????? 2,10,1 +?.#?.??#?#???. 1,1,3,1 +.???#??#???.?....?? 6,1 +#?..#..??.?? 1,1,1,1 +???#?????#??? 3,5 +???????.?####?? 5,6 +..??#?????????. 3,6 +.#??##.?#??##?#???? 1,3,1,8 +?#????#???#????###? 10,5 +??#?????##????###?. 8,5 +?#???#?#?#??? 1,9 +?#?.?#.???.?? 2,2,1,1 +??#.#...?.#????#? 3,1,1,1,4 +??.??#?????? 1,3,2,2 +.???#???.##???#?#??? 5,1,8,1 +.??.?..??.? 1,1,2 +?.#?#?????. 1,6,1 +#????#?#?.???.?? 8,2,1 +.?#??????.?#??.. 5,2 +????#?#??#?.?#????#? 1,7,8 +???#?.???#?##?#?#? 2,10 +??.????..#??#?.??. 2,2,4,1 +.???###??#??#?# 3,6 +??#?.##??#?# 1,2,2,1 +?.??.?????#???#?#?. 2,10,1 +?.????#????#? 1,1,6 +????..?.#??####???. 3,7 +.??#???##.?#??#.?. 5,2,2,1 +?..???#???????#? 3,3 +#??#??????##? 1,4,1,3 +.??.??????..???#? 1,6,1,1 +#.??.#?#????? 1,1,3,2 +????##???????. 6,5 +?????.???????##??#? 1,3,10 +.#?#???.?#.?#? 5,1,1 +??#..?????? 1,1 +.???????#.? 2,2,1 +??????#?#???.???. 9,2 +??#??##?#? 7,1 +.???.??#?. 1,2 +??????.?????#?. 4,6 +#?#?.?#???##?... 3,2,3 +?#??###????#???? 7,2 +#?.????#???.?##??# 2,1,3,1,4,1 +???????#??.????? 5,1,1,3,1 +?##?#?..?????#?????? 4,3,6 +#??#?.?#?##??? 4,7 +.??????.????. 4,1,1 +??.???#?#?.?????#?? 1,6,6 +.?????.??? 1,3,2 +#??????#???? 2,1,1,3 +??.?###?.?????? 5,4 +?????#.???# 6,1,1 +??????????????#????? 14,1 +???.?#???##?? 3,8 +?.#?.??.?.?? 1,2,1,1 +#?????#???#??.??? 12,3 +.??????#?.??. 8,1 +?..???#?.??##??###?? 1,1,3,4,5 +??##??##?#???????? 10,1 +#???.??????#? 1,1,2,3 +##???#?.???. 3,2,2 +??.??????#?##?#?#??# 1,5,1,4,1,1 +??#?##??..??????? 7,2,1 +#??#??#??#????? 1,10 +?????#?#????.??.# 8,1,1,1,1 +????????????#. 1,2,1,3 +?##??????????# 6,3,1 +???#?.??#???? 3,2,3 +???#??#?.??.??##??. 6,3 +.?###??.????.? 5,2 +.?.#??.??? 1,2,2 +????.????##???...??. 8,2 +??#?????##?#????? 1,8,1 +???#?.#.???????.?.? 4,1,1,1,1,1 +.?.?#.???????#??. 1,1,3,4 +???????..????##????? 4,2,5 +#??.?###???##.# 1,6,2,1 +??#?????.?? 3,3,1 +?????.????.????? 3,4,3 +?##??#???????.??. 5,1,1,2 +???????.?? 4,2,1 +?.?????..???????? 1,1,1,2,3 +???????##???#?? 1,1,5,3 +#??#?#???.#?? 1,5,1,1 +???????#??????#?. 2,2,3 +?#?#?#??????#.???#? 13,4 +##?.????###???.???? 2,10,1 +????#..??#?.?.??#? 4,1,1,1,1,1 +###??.?#?##??? 4,5,1 +?????#???. 1,2 +.??.???.????.. 1,2 +.????##?.????#?#. 3,5 +??#.#?.????????# 3,1,2,1,1 +#.?#?????????????? 1,1,1,5,1 +????????#? 1,3 +?#??#??..# 1,3,1 +?????.??##???.? 5,7 +??#????.??????? 3,7 +?###??#?.?????.# 8,4,1 +??????????????#???? 8,3,1,1 +.?##?.???? 3,3 +?.##?????.? 2,4,1 +????#??.???? 1,4,1 +.#?????.??????????#? 1,1,1,8,1 +?#?##?.??#???? 4,5 +.???????????#?????? 9,2,2,2 +?????.##???#??? 1,1,4,1,2 +??#?#.??..?????# 3,1,2,6 +?#????#??#???.# 1,2,1,2,1 +?????#??.#??#??#???? 6,1,1,2,1 +?.#?.?????.? 1,1,1,2 +?#?#?.?.???#. 4,1,1 +???????#???#??#??# 1,1,1,3,7 +??#?#?#..???? 5,1,1 +.???.??????.? 3,1,1,1 +?????#?.?.#??#?. 1,1,1,5 +?.??#.?.???.. 3,1 +.#.????##????????. 1,11 +?#?.??.???...?# 2,1,1,1,2 +.?..#?#????? 1,1,1,1 +??#???#.??????????? 2,3,4,1,2 +???..#????#?. 1,1,4 +?#?..#.??? 3,1,2 +????????.#?#?##?##?# 1,3,1,11 +?..?#?????.?.? 1,2,1,1 +???.????#? 1,5 +?.??##????.?? 1,5,1 +#??##?##???.??.???. 9,2 +???#?#???. 1,5 +?.????????? 1,1,2 +..???#???###????#?.? 11,4 +.??##???#???? 4,4,1 +?.#?.??.?#???? 1,3 +??????.???#?#?? 1,1,1,5 +###??.#??#??. 3,2,2 +..##.??#?# 2,2,1 +??#??#?..###?? 6,4 +???#.???#?.??.????? 1,1,1,3,2,5 +????????#?##?#?? 4,6 +.?#??????# 2,2,1 +???#.???.??## 3,1,1,3 +?##???.??#? 3,1,1 +?????.??#????? 3,4 +?#?#???.#??????.?? 6,1,1,2,1 +.#?#??????##??..? 3,8 +.??.?..????? 1,1,1,1 +?????..##.?? 1,2 +?#?#?...??? 4,1,1 +???.??#????#?. 1,3,2 +#??#???#??..???? 4,3,2 +?#?##?.??? 5,1 +?.?..#?.??? 1,2,1 \ No newline at end of file diff --git a/Day12_2/output.txt b/Day12_2/output.txt new file mode 100644 index 0000000..e69de29