diff --git a/AdvendOfCode.Runner/Program.cs b/AdvendOfCode.Runner/Program.cs index a332657..b92b2cc 100644 --- a/AdvendOfCode.Runner/Program.cs +++ b/AdvendOfCode.Runner/Program.cs @@ -7,9 +7,9 @@ InputReader inputReader = new() //IsDebug = true }; -inputReader.SetInputByChallange(3); +//inputReader.SetInputByChallange(3); -IChallange challange = new Day03(inputReader); +IChallange challange = new Day13(inputReader); Console.WriteLine($"Part 1: {await challange.GetSolutionPart1()}"); diff --git a/AdventOfCode.Core/InputReader.cs b/AdventOfCode.Core/InputReader.cs index c0ca95a..b4c27df 100644 --- a/AdventOfCode.Core/InputReader.cs +++ b/AdventOfCode.Core/InputReader.cs @@ -85,5 +85,27 @@ namespace AdventOfCode.Core return result; } + + public async IAsyncEnumerable> ReadToGrids() where T : Node, new() + { + Grid result = new(); + int row = 0; + string[] data = await ReadAsArrayString(); + foreach (string line in data) + { + if (string.IsNullOrWhiteSpace(line)) + { + yield return result; + result = new Grid(); + row = 0; + continue; + } + // create the nodes from the lines + result.DataGrid.AddRange(line.Select((c, i) => new T { X = i, Y = row, Char = c })); + row++; + } + yield return result; + yield break; + } } } diff --git a/AdventOfCode.Core/Shared/Grid.cs b/AdventOfCode.Core/Shared/Grid.cs index 65304bd..7f6c739 100644 --- a/AdventOfCode.Core/Shared/Grid.cs +++ b/AdventOfCode.Core/Shared/Grid.cs @@ -4,8 +4,8 @@ { public List DataGrid { get; set; } = []; - public int Columns => DataGrid.Max(n => n.X); - public int Rows => DataGrid.Max(n => n.Y); + public int Columns => DataGrid.Max(n => n.X) + 1; + public int Rows => DataGrid.Max(n => n.Y) + 1; public Grid() { } @@ -14,7 +14,9 @@ public Grid(IEnumerable data) : this(data.ToArray()) { } public IEnumerable GetRow(int rowNumber) => DataGrid.Where(n => n.X == rowNumber); + public string GetRowAsString(int columnNumber) => string.Concat(DataGrid.Where(n => n.Y == columnNumber).OrderBy(n => n.X).Select(n => n.Char)); public IEnumerable GetColumn(int columnNumber) => DataGrid.Where(n => n.Y == columnNumber); + public string GetColumnAsString(int rowNumber) => string.Concat(DataGrid.Where(n => n.X == rowNumber).OrderBy(n => n.Y).Select(n => n.Char)); public T GetNode(int x, int y) => DataGrid.First(n => n.X == x && n.Y == y); public IEnumerable FindWithValue(char toFind) => DataGrid.Where(n => n.Char == toFind); diff --git a/AdventOfCode.Solutions/2023/Day 12/Day12.cs b/AdventOfCode.Solutions/2023/Day 12/Day12.cs new file mode 100644 index 0000000..2475e21 --- /dev/null +++ b/AdventOfCode.Solutions/2023/Day 12/Day12.cs @@ -0,0 +1,139 @@ +using AdventOfCode.Core; +using System.Text.RegularExpressions; + +namespace AdventOfCode.Solutions._2023 +{ + public partial class Day12(InputReader reader) : IChallange + { + private InputReader _inputReader = reader; + + public async Task GetSolutionPart1() + { + long total = 0; + await foreach(string line in _inputReader.ReadAsStringLine()) + { + string[] splitted = line.Split(' '); + int[] groups = splitted[1].Split(',').Select(int.Parse).ToArray(); + + total += Possibilities(splitted[0], groups); + } + return total.ToString(); + } + + public async Task GetSolutionPart2() + { + long total = 0; + await foreach (string line in _inputReader.ReadAsStringLine()) + { + string[] splitted = line.Split(' '); + var joinedLine = string.Join("?", new[] { splitted[0], splitted[0], splitted[0], splitted[0], splitted[0] }); + int[] groups = splitted[1].Split(',').Select(int.Parse).ToArray(); + int[] groupsTotal = groups.Concat(groups).Concat(groups).Concat(groups).Concat(groups).ToArray(); + + total += Possibilities2(joinedLine, groupsTotal, 0, 0, 0); + } + return total.ToString(); + } + + private long Possibilities(string lineToValidate, int[] groups) + { + long total = 0; + if (lineToValidate.Contains('?')) + { + var regex = new Regex(Regex.Escape("?")); + total += Possibilities(regex.Replace(lineToValidate, ".", 1), groups); + total += Possibilities(regex.Replace(lineToValidate, "#", 1), groups); + + return total; + } + + MatchCollection matches = GroupMatch().Matches(lineToValidate); + + if (matches.Count == groups.Length && + groups.Where((g, i) => matches[i].Length == g).Count() == groups.Length) + { + //Console.WriteLine($"{lineToValidate} is valid"); + return 1; + } + else + return 0; + } + + private long Possibilities2(string lineToValidate, int[] groups, int readIndex, int groupIndex, int captureSize) + { + // if group index is 0 there are no captures and not captures ruynning + if (groupIndex > 0) + { + int[] splitGroups = lineToValidate.Split('.', StringSplitOptions.RemoveEmptyEntries).Select(s => s.Length).ToArray(); + + // something to validate! + if (readIndex < lineToValidate.Length && // not reached the end + lineToValidate[readIndex] == '.' && // possible end of capture + captureSize > 0) // in capture mode but with a . caputure has ended + { + for (int i = 0; i < groupIndex; i++) + { + if (splitGroups[i] != groups[i]) + { + Console.WriteLine($"{lineToValidate} is invalid"); + return 0; // group lengths do not match, reject + } + } + + // valid so far + // reset the capture size + groupIndex++; + captureSize = 0; + } + + + } + + if (!lineToValidate.Contains('?')) // no more variations + { + int[] splitGroups = lineToValidate.Split('.', StringSplitOptions.RemoveEmptyEntries).Select(s => s.Length).ToArray(); + for (int i = 0; i < groups.Length; i++) + { + if (splitGroups[i] != groups[i]) + { + Console.WriteLine($"{lineToValidate} is invalid"); + return 0; // group lengths do not match, reject + } + } + + // not invalid combos so valid + return 1; + } + + //if (lineToValidate[readIndex] is '.' ) + + long total = 0; + //go search for # or ? + for (int charIndex = readIndex; charIndex < lineToValidate.Length; charIndex++) + { + if (lineToValidate[charIndex] == '.') + { + readIndex++; + continue; + } + + if (lineToValidate[charIndex] == '#') + { + total += Possibilities2(lineToValidate, groups, readIndex + 1, groupIndex + 1, captureSize + 1); + break; + } + + if (lineToValidate[charIndex] == '?') + { + var regex = new Regex(Regex.Escape("?")); + total += Possibilities2(regex.Replace(lineToValidate, ".", 1), groups, readIndex + 1, groupIndex, captureSize); + total += Possibilities2(regex.Replace(lineToValidate, "#", 1), groups, readIndex + 1, groupIndex, captureSize + 1); + return total; + } + } + } + + [GeneratedRegex("#+")] + private static partial Regex GroupMatch(); + } +} \ No newline at end of file diff --git a/AdventOfCode.Solutions/2023/Day 12/day-12-input.txt b/AdventOfCode.Solutions/2023/Day 12/day-12-input.txt new file mode 100644 index 0000000..9533443 --- /dev/null +++ b/AdventOfCode.Solutions/2023/Day 12/day-12-input.txt @@ -0,0 +1,1000 @@ +.?????...? 1,1,1 +#????????.#?#?????? 2,1,1,5,1 +???##?###????? 1,2,3,4 +?#?????##????#?? 1,9 +?.?.??#?...????? 1,2,1 +.#.#???..??#???#?? 1,1,1,1,1,4 +?#??#??#..#?#???. 1,4,1,1,2 +??######???.??.. 7,1,1 +.?#???#?#?#??.?.?.#? 2,7,1,1,1 +.?#.???.???.#??? 2,1,1,3,4 +?????????#?. 2,1,3 +??.?.?.#??##?#?#?. 1,9 +?....?.?#?#???? 1,1,7 +?.??.????#?#??##??#. 1,9,2 +?.??#...#? 1,1,1 +?###??????#??#? 7,5 +??????##????# 1,7,2 +??????.????.. 1,2 +??##??#??#.. 5,2 +#????#?#???????#??#. 8,8 +???#..????###??? 2,2,3,2 +?##?#?#?????#?.#??? 2,3,1,1,4 +??#?..?#???? 3,3,1 +??#.?#??.?#????? 1,4,2,1 +???.?#????? 1,5 +.?#.???##??? 2,6 +...#.?#?##. 1,1,2 +????.?????? 1,2,1 +?#?????????# 2,2,1,2 +??##??????. 5,1,1 +???..??#???#????## 1,1,1,9 +??#??##??# 1,3,1 +??#????#??.?????##. 9,3 +??.?#??#??#.???#?.?? 2,2,1,1,4,1 +?#??#?#??#??#????. 11,1,1,1 +.#...??###? 1,5 +???#?#?#??????? 1,1,1,6,1 +.???#.??##?..#??# 3,4,2,1 +???#?.???# 1,1,1 +???#??###?#?#???? 1,12,1 +??.#?????? 2,2,2 +#?#??..#?# 5,1,1 +#?..?????##?#.???#?? 2,2,5,6 +????#?.??##?.??#?? 6,5,1,1 +.??.#?##????. 1,6 +#??#?####??#?.?? 1,1,8,1 +?#.??#?#?#??#???? 1,1,9,1 +.???????#?. 4,3 +.?.?#???#?#?#??#.? 1,10,2 +????#??#??#..?. 1,1,1,2,1 +.??#??#????.??? 7,2 +??#?#?????.?? 3,2,1,1 +???#.??#????#??# 2,3,4 +??.??#?.#??#??#?? 1,1,2,4,1 +????#.????.?#???? 5,3,1,1,1 +?????##??????? 1,1,9 +?????.???#??.? 3,6 +.?????##????. 5,1 +??????????. 3,1,2 +?####.??#???.? 4,5 +?.#??.??????.?#??#? 2,5,5 +?..#?????????? 1,1,5 +???????#.???? 4,1 +?.??.?????#????. 2,2,1,1,2 +????#..?????#.?? 3,5,1 +???????????#???# 7,5,1 +.???#..???? 1,1,2 +??.?.?.???#? 2,1,2 +??##???#?????. 3,4 +??.????..??###??? 1,4 +.??#????#?# 4,3 +???.????#.?#?##???# 1,1,1,1,1,8 +??????#?.?.??? 3,2 +?.???..????? 2,3 +?..??#??????? 1,2,1,1 +?.#???.?#??? 1,1,3 +??????#???.??????? 7,1,1,1 +???#?#???????#?. 4,3,2,2 +??###?.??#?#? 3,5 +?#???.??????????# 5,1,1,1,4 +???#.????#???.# 1,1,4,2,1 +???.#???#?? 2,7 +?#.?#?###??#?. 1,10 +.?..????#?#?? 1,2,2,1 +.??.?????# 1,3,1 +???#??.????#??? 6,1,3,1 +??#?#?#???# 3,1,3 +?????????????????? 3,4 +#????#????##?????? 13,2 +????#??.#?#?##?#??? 1,2,8,2 +.??#?##??.?#?????#?? 5,9 +?##..#???? 3,1 +?##.##???#??.##???# 2,3,4,6 +#?????????#? 1,1,3,2 +???#?????????? 2,2,1,1 +??#??##??#?.? 1,5,1,1 +?#??.??##???????.?? 1,1,9,1,1 +??#?##??##?.??#??? 10,1,2,1 +..??#..?#?.? 1,2 +??#?.?.????? 1,1,1,1 +#.?##??.?.? 1,2,1 +..?..??#????#..? 1,8 +.?#??.??????. 3,5 +??.????#???#????? 1,1,3,2,1 +??.#??..?? 1,3,2 +#?.#??????.?? 2,2,3,1 +????.???.? 3,1 +#???.??????# 1,2,1,2 +?.?.??.?#??.??? 1,1,1,1,3 +?.#????#.? 1,1,1 +.????#??.? 2,4,1 +???##??#?..#??#??? 5,1,4 +??#??##?.???#? 5,4 +??#??#???##????.? 3,3,6 +.?##??.#?..? 2,2 +?????#.?#?#???#??? 3,9 +.#.??#???? 1,3 +??????.??.? 5,1,1 +.??.???????????. 1,7 +??????##???#?##??.#? 2,13,2 +??#???????#?? 3,1,1,3 +?????.?#??? 2,3 +????.????????? 1,6 +#?#.??#?.#?? 1,1,2,1 +?#?????#?###?????# 4,7,2,1 +?????#???.?.? 3,1 +#?#?.#?##??. 3,6 +??#.????????? 1,1,3,1 +??????#????.?? 1,1,2,2 +??????#?.??##??? 1,3 +?.###???#???? 4,2,1 +??.????.??.#.#??#? 2,1,1,1,2,2 +??##.???##?##?.##?#? 3,2,5,4 +??.?????????#?? 1,2,5 +.##????????. 4,1 +??..?##.???? 1,2,2,1 +.?#?.????.#?##?... 2,2,1,3 +#?????.???#?#??? 1,1,1,7 +?#.#???.#??#???.???. 2,1,1,1,4,2 +??????????##???#??? 1,1,7 +???#?#???.##.. 3,2 +.??##?#.??#?. 6,1 +?##?.###?#?? 3,5 +????###?..???..? 1,6,3 +..#????#?#??? 1,3,2 +#?#????????# 4,1,4 +?#???????????#?? 2,3,1,3 +.#???#?..??#?????# 1,2,9 +??.?#.???. 1,1,1 +?#?#??.???.#? 1,2,2,1 +??##??#???#? 3,5 +?#???????. 3,1 +.#?????.??? 3,2 +.#?#?##??????#?? 1,4,6 +??.??.?##?.?? 1,1,3,1 +??##??.#.?.?# 4,1,1,2 +#???????#?? 1,1,4 +????#??.?#???? 1,4,1,3 +#?.?##???.? 1,3 +????#?????##?##???.? 8,6 +??.?#?.???.#??? 2,1,1,2 +??#??#.??.???. 2,1,3 +.?.?.??.?##### 1,1,5 +???#??.???#??#.?? 1,3,1,5,1 +..#????##??#?#?.? 1,10 +?#.????#??. 2,5 +#.????????#?#??#??? 1,1,7,2,1 +.?.?...?##?#?#?#?. 1,9 +???????????# 1,1,6 +??#???????#?..?? 9,1 +..?#?????? 1,3 +.?.???????? 2,4 +.??.#??.??? 2,1,1 +??#.????.? 1,1,1 +.#.??.????#???.???? 1,2,1,1,3,3 +??#??????.??? 5,1,2 +????????.??.?? 1,4,1,1 +???????#?? 3,3 +??#?????#???##. 2,1,2,2 +??#???????# 2,6 +?#?#??#??#.?.#?? 6,1,2 +##?##?#?.??#?? 8,1,1 +.?#??###?????#?? 8,3 +????#.#?#????? 3,6 +#??.????#??#.#??..?? 2,6,1,3,1 +??????.????? 2,1 +????.?????. 1,2,1 +???????#..#? 1,2,2,2 +????#??#?? 4,4 +???.?????##?##???? 1,14 +??#.???#.?#??.???? 2,2,1,1,1,1 +?.???#?.?. 1,5 +#.#?#.?##????? 1,3,5,1 +.?..?#???????#???#? 1,14 +.#?#??##??#?..??#?. 3,2,3,4 +.??#?#?.????.???.?# 6,1,1,1,1 +.?#.????.#.? 1,1,1,1 +?#?.??#??#?? 1,8 +??..?????? 1,5 +???.?????.? 2,4 +??#???.##?#?.??. 5,2,1,1 +??#???#?....???#?.?? 3,3,4,2 +?..???##..?.?. 1,5,1 +?#????????.?? 3,2,1 +?#??????.## 4,1,2 +.??.###.?#??. 1,3,3 +?.??????#?#??? 1,1,8 +?#.?.??????#?.???? 2,1,6,1 +.???????#?#???. 2,6 +???#????.?#??#??? 4,1,1,5 +??#???##???#? 7,2 +#??????.?? 2,2 +?.?#.?##???.?#?## 1,2,4 +.?#.??????#? 1,2,2,1 +#?#?#?#?##.??#?#.? 1,3,4,2,1,1 +???#?????#?#?? 1,6 +?????##?#?#?##??? 1,11 +#?????????##?.#??.? 1,2,1,6,2,1 +???#?.???????.?.. 1,3,2,2,1 +.??.#?????? 1,2,1 +??#?????#.? 6,1 +.????#??#??????. 12,1 +?.?...#??...?###??.? 2,4 +??.??.?##??..?? 2,1,5,1 +?#????.#??###? 2,1,6 +#.???#?.?#?#??.? 1,5,5 +#?#?????????#? 11,1 +#???#??#?#???.#..#? 12,1,1 +.??#?#?.????? 5,1 +?????.?????#????? 1,1,1,6 +.??#?.?????#???#??? 2,1,1,1,4 +?#???##????.#???? 7,1,4 +.?#?#??#.. 3,2 +..????????.#?????#.? 4,1,7,1 +??.????#.#??.?# 1,5,3,2 +?#??????.???##.? 3,3,2 +.#.?#???#???##??#?# 1,8,3,3 +??#.??#?..####?#?##? 1,1,4,4,5 +?#?????????#?# 5,5,1 +???????.?? 1,3,1 +???????..??.? 1,2,1,1 +.?##.#???? 2,2 +?#?.?#??#.#?? 1,5,2 +?.???.???##??????. 3,9 +?#.?????.?.???.??## 2,2,1,1,3,3 +???????#??.??#????. 5,2,3,3 +?????.???.? 4,1,1 +???????.?#?##?.? 1,1,5,1 +.??????.#??.??? 4,3,1 +??.?#??#?? 2,2 +?.#?.??#?.??#??.. 1,2,4,1,2 +??#?.??????? 2,1,1,1 +???????###????.#??. 3,9,2 +.#??.#??.###??#????# 3,3,7,1,1 +.??????.?? 2,2 +????#.#??#?##???? 1,1,11 +#???????##.? 1,1,4 +.?#?#???#?.???? 8,2 +?.??#?.#?.???..????? 1,3,2,1,5 +???#????#.#####?? 1,3,2,5,1 +??#?#?????? 6,2 +??.????#??#? 1,6,1 +#????.##?#. 2,2,4 +?#?#????????????? 9,1,1 +????##?#???? 6,4 +?????.?????? 5,1,1,1 +????????????????###. 1,8,7 +??.????????#??#?.?? 1,13,1 +????.#???.####? 2,1,5 +??#?#?????????#. 7,1,1 +??.#??##?? 1,1,5 +?.???#??#???#??#?# 1,1,9,1,1 +????#???#?#. 1,7 +???.???#???##.#?? 1,1,7,1 +??#.????#. 1,2,1 +.##.??#?#.? 2,4,1 +??#?.?.#.???? 3,1,1,2 +#???#??#?#?.???.? 10,1,1 +???..#??## 3,5 +.?????#??##???#. 6,2,1 +.???#???????????. 5,5 +?????#?.??? 1,2,2 +?#?#??..?.?#??.. 6,1,4 +???.?#.???? 1,2,1 +????.#??????##???.. 1,1,2,8 +.?????????.????##? 5,3,5 +?##???#????#?#??? 3,11 +?????##?.?#? 2,2,2 +?.????#????? 1,5,1 +???#.??#???.?#? 1,2,4,1,2 +##???#??..#?????? 3,1,1,5 +??????.??#.? 1,2,1,1 +?#????###??#?##? 2,9 +#.??#?.??####? 1,1,1,7 +?????#??.??#?????#? 5,9 +?#.??#.???##?? 1,3,4,1 +.#..??#???????.???? 1,4,1,2,1,1 +##?#.??###?## 2,1,7 +?#?#?#?.?? 3,1,2 +.??..???.???..#?? 1,1,1,1 +.?????????.?????#??? 2,3,3 +#.#?.???.????.???#. 1,2,1,4,1,2 +??????.?##?.. 4,3 +?.##?#??.#?###?###?# 6,9,1 +?.????.?.??????#??? 4,1,1,2,1 +.?.????.?#???. 1,5 +.?#????#??#.??#????? 3,4,5,1 +?#.#?##???#?????#? 1,9,1,1 +.???.??????#??#?. 2,7,2 +?????#??##?##?????? 2,1,9,1 +###?????????.?. 6,1,1,1 +??????????..#? 1,1,6,1 +????.??.?#.??.####?? 1,1,1,1,2,6 +?????#?#?##?#??# 1,13 +????#??#?????? 5,1,1,1 +..???##.#????#. 1,3,3,1 +??.?#?????? 2,5,1 +.??..??????#???#?? 1,2,3,3 +#?..?#?#??#??#?? 1,10 +?#??#?#?#???????? 7,5,2 +#?.??#??????.#.#? 1,3,2,1,2 +??#.???#.???????? 3,4,5 +..????..?##...? 2,3 +.??.??...? 2,1,1 +##...??#?.????## 2,4,5 +###.??#??#?#?.?# 3,8,1 +.??#??????#?#..??. 1,4,1,1,1,1 +????????#??##??? 2,1,1,6,1 +???.##?.??#. 3,3,1,1 +????????#????##??#?# 9,1,3,1,1 +??.??#??## 1,3,2 +????#?#??#?.???. 1,1,5,1,1 +??#???#.???? 2,1,1,1 +?????#???#??#??#?#.? 1,1,1,8,1 +??.?????.?.#??.?? 2,1 +??..?#???# 1,3,1 +.?##??????????? 7,1 +??????.??????.#.? 1,2,2,1,1 +.??????.??? 4,1 +?#????#.?.??? 2,1,1,3 +#.??#??#.##????. 1,3,2,2,3 +??.#?#?.?.??#?????. 1,1,1,1,1,4 +????#?????????#?.?? 1,3,7,1 +????????.?? 4,2,2 +.????????? 2,1 +#???#?#?.?????????? 1,5,2,1,3 +.?#??#??##?#. 2,7 +??#?.????#??###?.?? 1,5,4,2 +??.???.?##?? 1,3,4 +?.?????.???? 1,5,2 +??????#??? 3,1,1 +#..?#????????##? 1,12 +#???#?.??? 3,1,1 +????#?.?.????????? 1,1,2,1,4,3 +#?????#??#??.??????? 1,8,1,1,4 +..?#??##?? 1,3 +.#???.?##?##????? 1,10 +??#??#?..??#??.??#? 7,5,2 +??..??..#??? 1,1,1,1 +???.????##?#.? 2,7 +.?##???????.?#?.?.?# 2,3,3,1 +.?.??#??????#?#??? 1,1,1,3,6 +#?.???#?????#.#???. 2,4,2,2,1 +?#?#???.?#????#?? 4,6 +????.?????#?????#?? 1,2,2,9 +??.??#?#.???#??.?##? 1,5,2,1,2 +????#.?.???#??..? 1,6 +??.?.?###?#???.????? 1,1,6,1,2,1 +??#.###.#???. 3,3,1,2 +????#?..#?#???? 1,1,1,2,1 +.??#??#????????##?# 1,1,5,1,6 +#??##.??#???#?? 5,8 +???????#??? 3,4 +.??.#.??.??.???? 1,1,1,2,1 +??#??.?#?.?? 4,1,2 +.???????.???#?????.? 3,6 +???#????#????#??#??. 3,14 +????????..?????.? 3,1,2 +?????#?#?.#??? 1,4,1 +#???.??##.???? 4,2,1 +?.?#????#? 2,3 +?.?.???##???. 1,7 +...#####?.??##? 6,3 +?#???#?????? 1,3,2,1 +???.##?###? 1,7 +#?#???#????? 7,2 +.??#???.?#???.???# 5,3,4 +?#?#??#??#.?#???.#?? 1,5,1,2,1,1 +??????##??##??#??. 4,8,1,1 +??#????..??##???#??? 4,1,9 +?.??#?.?.? 2,1 +?#????#?.?? 7,2 +???????##?????? 4,4,2 +??##?.?#???.#?.????? 1,3,3,1,1,5 +.?.?????#????? 1,1,3,1 +?????.??#?????###? 5,1,2,1,3 +???#??.#??????.?. 1,4,1,5 +??#????????#.? 2,1,4 +?.??????#..? 3,3 +?????##..#.? 2,2,1 +.#?..????#####???#. 1,13 +.??.?????#?#?.#? 1,1,6,1 +??????????#??. 6,2 +???.?..??? 3,1,1 +??#???????#?????? 3,6,2 +?.???.????.??#? 1,2 +????.???????????? 2,8 +.#.??????. 1,5 +?????.???. 2,1,2 +??.??#???#..?###???. 1,5,1,6 +#????#.??##?.??# 3,1,3,3 +???#???.#?.?.?????.? 6,2,1,3,1,1 +.###.???.? 3,1 +???????..??#? 6,2 +????#??????#? 5,2,2 +????????.??#?? 2,3,1 +#?#.???.??? 3,1,2 +?###?###???.?? 8,2 +?#??.#..#?.?#???. 1,1,2,3 +?????.?#????? 5,1,1 +.?#??????.?.?.?? 3,1 +.#??##??.???#?#.. 7,3 +???#?.?????? 2,4 +???#.???.. 3,1 +?.???#??#.????# 1,1,1,1,2 +??????##.??#????#?? 7,1,2,5 +?????.?.?? 1,1,1 +#??#?????.????. 1,3,3,2,1 +?.???##????.??#?#.. 5,2,3,1 +?#.#?????? 1,1,1 +??????#?##?#?.?#?. 1,1,1,2,1,3 +??#????.##? 3,2 +??.?.#.??#? 2,1,1 +?????##?.?#??? 3,3,1,1 +???#.?#???? 2,3 +???????..?#??#??#??? 3,2,6,1,1 +.??#?#??.????#??#??# 7,1,7 +???#.?#?.# 2,2,1 +??.?##?#.??# 5,2 +?.????#?#.? 4,1 +????.???#.? 1,3 +?#????#??#???#? 1,1,2,2,3 +.?????#??#??#??. 1,10 +?#?#??#?????#?#?#??? 13,1,1,1 +?#??.?#?#.???? 1,1,3,1 +???#.???#?? 1,1,5 +#???????##???? 1,1,7 +?#.?????###? 1,1,6 +?..??.????# 1,3,1 +?.#??.????#? 3,1,3 +?.#?#??#??????? 1,1,4,1,2 +.???????..#.??????#. 4,1,1,1,2,1 +???#..?#..?.??##?# 1,1,2,1,5 +??????????.#. 1,1,3,1 +????..????????????# 1,1,1,3,1,2 +.#.??#???? 1,1,1 +??????????????????? 4,1,4,1,1 +??????????#??#?????? 4,8,1 +.???#?.??? 2,1,2 +???.???#???.?.??#? 2,6,4 +?.?.??????#?#?#? 8,2 +??#?.????? 1,4 +??#???#??????#???. 2,5,2,1 +?#???.#??? 2,2 +#??.##?####??#? 1,11 +#????##??.????.?##.? 4,4,1,1,3,1 +???...?#??#??? 2,6 +???????????? 1,1,3 +?#.????#??.#..?? 1,1,4,1,1 +.?.?????##??##???? 1,1,12 +????????..??## 1,5,3 +?????#?#..#??? 7,1,1 +.?##???.#?#.??#? 2,1,3,1 +.??##??#????#.???..? 8,2,1 +?#????.??.##???? 3,1,3 +#??#????#????? 5,4,1 +##?#?????#? 4,2 +???#??#??.. 2,3 +?#????#????.#.###? 2,5,1,3 +?.?????#?#??.????#?? 1,4,2,5,1 +#????#??.??? 2,2,1,1 +.?????#??.????.? 4,3,1,1,1 +?#..?#??.# 2,1,1 +#?.??#??.?##?? 1,4,5 +??????##??.? 1,1,4 +???..#?.????.? 1,2,2 +???#?.#?.?#??#..#? 5,2,3,1,2 +?.#?#????#?????????? 10,1 +??????#??.? 3,3 +????#?#??#??###?? 5,7 +?????.?.?.#?.? 3,1,1 +?????#?#####?# 3,9 +?#??.?..??. 3,1,1 +?#?????#?#??#.??? 4,6,3 +?????#?.??. 1,4,1 +????#?###???..? 10,1 +.???#??#?.??#?# 1,1,1,3,1 +#????#??#.? 1,6,1 +#????#?.#?#?.#.?? 3,1,4,1,2 +#.?.?.?#.??.???#? 1,1,2,1,5 +??????..?????#??.?. 1,1,1,4,1,1 +????..?..?????# 1,1,1,1,2 +??.#???.?#? 1,3,1 +????.??#?. 1,2 +?#??#??????.??? 8,1 +??????###??#.??.?? 1,6,2,1,1 +????..##??#?#??????? 2,11 +?.???##??????. 2,7 +.#??#?.?????? 2,1,4,1 +?.?#??#??##?#???#??# 1,8,8 +#????.#?????#??????? 1,1,1,7,1,1 +?...?#?.????##?? 1,1,7 +..???.???????#? 2,6 +#?#???#?????????? 5,5,1,2 +??.??????? 1,1,1 +..?.???.??? 1,2 +#.????.?#????###???? 1,2,2,7 +??.?..??????#???? 1,1,2,6 +.?#????##.#.??#???? 8,1,5 +#??##?.?#???# 6,3,1 +???#?????????????? 9,1,1,1 +?#????.???#??# 3,1,3,2 +????.??????????.? 1,1,2,1,3 +?..?#?????..?#?.??# 1,2,2,1,3,2 +??#???#?#??#??#??? 4,3,6 +.????#.???????? 2,1,1,1,1 +.??????.#?#.# 4,1,3,1 +.?#?#?#??#?????#? 1,6,1,1 +???.????#.????? 2,4,1 +.?.??#???? 1,1 +?.?#????#?##?#?? 3,7 +..???##??#.#.???? 7,1,1,1 +?.???#??????###??.#? 1,1,1,4,3,1 +????#???.???..# 2,1,1,1,1 +??????.?.#???. 4,2 +.??#??.?##.#??? 5,2,1,1 +?.?.???##?????#???.? 1,1,11,1 +??##??#?????.?????? 10,3 +.???#.??????????# 1,1,5,3 +??.#??##???##??##?? 10,3 +?#.???#??.? 1,5,1 +??????.?...??#??#?.. 3,7 +?.???????????. 2,1,2 +??????????..?###??. 5,3 +??????#?.?? 1,5 +.?##..#??? 3,2 +??#?..???#??? 3,1,2,1 +????????.#??## 1,1,2,2 +#??????#?..# 1,3,1,1 +??.#?.?????# 1,1,1,1 +???#?????.?. 5,1,1,1 +?????????#? 2,7 +?##?.##????? 3,2,1,2 +?#.????.?###? 2,2,4 +?.#?.?#???? 2,1,2 +??#???.???.??. 2,1,3,1 +.?#?#????? 1,1,2 +.???.???#?###?? 2,7 +?#?#??????????# 6,1,1,1,1 +??????.???? 1,2,1 +..??.?#???#.??#??#?. 2,5,2,3 +?????#?.???##??#?? 2,2,6,1 +???..??.??...#?#..?. 2,3 +#?.?#??#?? 1,2,2 +?????????.??#???.??# 2,5,1,1,1,2 +#????##?#?#?.?? 2,3,1,2,1 +#????????????#??? 1,2,11 +?????????..? 1,5,1 +???????..?????.#???? 1,4,1,1,3,1 +???.????????????#? 1,1,1,1,2,5 +??.????###?#? 1,8 +.?##???.??????# 5,4,1 +.????????.??.???? 2,2 +?#?#.????#??? 3,6 +???#??.#??#.?#?.?? 1,3,1,1,1,1 +??..?.??#? 1,1,1 +???..????#.?#? 1,1,3,1 +???#?????????.? 1,2,1,1,1 +?????.###?#?.???? 1,6 +??##???#####.??.?.? 11,1,1,1 +????.#?#??..??. 3,1,3,1 +???#????????????? 2,1,2,5,1 +?#????.?.#??? 1,1,1,4 +#?????#???#?#. 1,1,2,3 +????#????#??#???? 1,12,1 +..#.?#.??#?.?.#.??? 1,1,3,1,1,3 +???????##?# 1,2,4 +????????#????? 4,4 +#??...?#?.#.???? 1,1,2,1,4 +?#?.???.###?.#???? 3,1,3,2,1 +?#???????? 2,1,1 +.#???#?????###? 1,4,3 +???#?.??.?????#?. 4,6 +????##??#??#?##?. 1,3,1,4 +?.???#?##??#?? 6,1 +?????????.??????#?# 1,1,5,1,1,4 +??????#??##???.?# 1,10,1 +.?#...??.??.???? 1,1,1,4 +#?#.#?##?..#??#? 1,1,4,1,2 +.#??.????##?..?? 1,1,1,3,1 +??????#??#?? 7,1,1 +??##?#??.#?#. 5,3 +?...????.##??# 1,2,5 +.#?.???..? 1,1,1 +???.?..????#???. 3,5 +???????#???#??#??#?? 1,9,1 +??#?##???.#??.#.???? 4,1,1,1,1,3 +.?????..????##?? 1,7 +??????###??##?#????? 1,2,14 +???#???.#???.??? 1,4,2 +??.?#??????????? 1,11,1 +??.?.????..???##??.? 1,1,5 +#??????#??.??????. 2,5,1,3,1 +??#?.?.???#?##? 2,1,6 +.????..????? 2,2 +????##???..?##?..? 1,4,3 +..????.?.??????????? 1,2,1,6,3 +#??#?###??#????#. 4,6,3 +#?##?#???.????##???. 9,9 +.#?????.?..? 1,1,1,1 +???##??#??###?##?? 8,8 +??.????#??.?#..# 2,7,1,1 +??????#??????????#? 2,4,10 +??##?#?????##??.#?? 11,1,2 +??..?.#?#?? 1,1,5 +????###?#??.?#??.?. 6,4 +??.##????#?..? 1,2,5,1 +??????#??##??????. 8,2 +????##???.##??#???? 6,5,1 +???????##?.?..?????. 6,3 +#????##..?? 3,2,1 +??#??##??#?..? 1,5,2,1 +???#???.???#??? 1,3,5 +.??#.#???.?#?.#?.?? 3,4,3,2,1 +.???##...????? 5,1 +?#??.??#?.#???##.#?. 1,1,1,6,2 +.?#??#??#?#?##??# 4,9 +???#????.???.??#.?? 8,2,3,1 +.??#.?.?##.. 2,3 +????##?#?.? 1,5,1 +?.?.??????###? 1,2,7 +?#????????????? 3,1,4,2 +..#??#????????? 4,1 +???.?.??????#??#?? 1,1,2,1,5,1 +.???#??#?#????????#? 11,3 +.???#??.#??.? 3,2,1 +????#????#???#?# 1,4,1,3,1 +?####?#????.??##??? 10,1,5 +#???.??.?#. 1,1,2 +??####?????#? 7,1 +????????##?.#???.? 2,6,4 +?#????##.?????? 3,1,2,1,1 +??#?#??????.#? 6,1,1 +?????????.#.# 7,1,1 +??????????????? 6,5 +.?.?.##??? 1,3 +.##?.#??.???#? 3,1,5 +???#???#???????? 4,1,2,1 +..???????? 1,1 +???????????? 7,1 +..????.???????? 3,1,3 +???.???????#???##?? 1,2,1,2,4 +.?###?.???? 4,1,1 +?.?#?#??#?###???#??? 2,12,1 +????#??.?.?????.?? 2,1,1 +?????#???????#???? 1,6,4 +?.???.?#???? 2,4 +??###..????##???##?? 5,9 +??????????. 1,3,1 +#??????###?? 5,4 +#?#..?#??#?##??? 1,1,3,7 +??#?.?###?????##?. 3,5,4 +??#???????##.?##? 10,2 +#.??###?#? 1,5 +?...##??##?##??. 1,9 +.??#???#.???????? 6,2,1 +#??#?#??.#??#?##??. 8,9 +?..?.#???????#?? 1,1,3,4 +??.?#??#?.?.#??? 5,4 +?..???????#??##???? 1,1,5,3,2 +.?#?????.. 2,1 +???###..??? 4,1 +????#??????###???#?? 1,2,1,1,9 +??#????.????.#??#??? 5,3,4 +?#???#..?.??????.# 2,1,1,2,2,1 +??...??##?#???#?? 1,9 +???.#??.????#? 3,2 +?????...???.#???. 2,1,1,1 +???#???##???#??..?## 1,1,4,4,2 +??????#??..??. 2,2,1 +?????##?????????# 1,6,1,3 +.#.#.?#???.? 1,1,4 +?????.???.???? 1,1,3 +???.??#??.????#??? 1,3,1,8 +??##???????.?##??? 3,1,2,4 +???#???????.?#. 9,1 +????#.??????. 3,1,4 +.????.#?##??#. 1,1,7 +?.???????? 1,1,2 +.????#.?##?#?#???. 5,8,1 +?#??.??.?#?? 3,2,2 +?????????? 2,1,1 +#.??????##??????## 1,2,3,5 +?#??.?#?#?? 1,5 +.##???#?#?????#??? 8,1,4,1 +??.?????.??#?????# 2,5,4,2 +?..?.??.??#? 2,4 +???..??.???##? 1,1,6 +#??#?..???.???.#??. 5,1,1,2,1,1 +?????#?#??#?# 3,4 +#???.?..??##?# 1,1,1,6 +.#????.???#??? 5,1,3 +#.???#???? 1,1,4 +.?????..?????#? 2,1,1,1,1 +.#???#??.?#?. 1,3,2 +????.????#??? 1,2,4 +?##?#???###??..?##? 5,6,3 +??????#??#???. 1,1,1,5 +#???????????. 5,2 +#.??.????????.??? 1,2,7,1,1 +??#.??.?????###? 1,1,2,5 +.#?.?..#???????? 1,4 +?###?##.?? 4,2,1 +.????.?#?##.? 1,4 +?.##?.?..?? 2,1,1 +?#?.?#.???? 1,2,1 +.???##????????. 6,4,1 +.##???????##???#??#? 2,1,9 +#???????## 2,4 +#????#.#.?#? 6,1,2 +??#?#??#?? 3,2 +##.??.??.?.#?? 2,1,1,1 +?#????????#?##?#??#? 2,1,1,1,7 +?????#????????. 1,7,1,1 +??.???#???#?#? 5,4 +.????.#?####?#????? 1,1,11 +???.??.?????#????.?? 1,1,8,1,2 +??????.?.#?#????# 3,1,8 +#?.??????..# 2,2,1,1 +???#?????? 2,2 +?????#??.????##? 7,5 +.???????#??? 1,8 +?.???????.??? 5,1 +.????##???#???????? 1,5,3,3 +.?#???###?#???#? 1,8,2 +?##??#????#???#?.?? 3,5,2,1,1 +??#?#.???? 1,3,1 +?????????????? 1,3,2,4 +??#??.?????#??#? 3,9 +#.#????##?..? 1,2,5 +?#????#??????? 1,1,7,1 +.??#??#????###??? 8,3 +?.???#??#?? 1,3 +?#??.???#?????????? 4,6,4 +?.?.?#.?#???#??????# 1,1,2,8,1 +??#???????? 1,4 +.#????????. 3,1,1 +.#?#?#????????? 1,1,1,6,1 +???#???#?????? 3,1,1,2 +?.#??#???????#????.? 1,1,5,5,1 +.#????#.????# 4,1,1,1 +#.?.#?#?.??#?#?#? 1,1,4,7 +.?????.???. 1,2 +??.???#????#?#..??? 2,2,2,5,2 +.????.????##?? 2,6 +??#?.??####??. 3,5 +?#?#?????#?????# 7,4,1 +??.#????#?? 1,4,1 +?????##???#??.? 5,1,3,1 +????????.#??? 3,2,1,1 +???.???#?. 1,1,1 +#?.#?.?##. 2,1,3 +???#??.???#. 4,2 +?#?#????#.??#..????. 9,1,1,1,1 +?#??.??#??#? 2,1,3,2 +?##???#??????##.?.? 2,11 +????#?.?????. 5,4 +???#?.?????#???? 3,3,4 +????####??.??#????? 8,5 +???#??#??? 1,3,3 +???#?#????#??#??..# 14,1 +???..?.???? 1,2 +#...??????.?#??.? 1,5,3 +???#?#??????.??##?? 3,1,5,1,2,1 +?##??.?.?#? 3,1,1 +##?????#?#??????#.? 8,1,4 +.##???##??#?###??.?? 4,11,2 +###.???????.???? 3,1,2 +?...??????????#???? 1,5,3 +????.?.#??##???.? 4,1,2,1,1 +#??.?#?.#???. 2,3,3 +?#??#?#?..???????? 1,4,1,1,1,1 +.????.?#?#.?????.?# 3,3,1,1,2 +##?.???.#????#?#???? 2,2,1,1,8 +.?????##????#?.#.? 8,2,1 +?#??###???#??????#? 12,1 +.?..??.??????#??.#?. 1,7,2 +?#????#?...?#?? 1,3,1 +??????????????? 3,1,3 +??????.????##? 1,2,6 +.???.?##???? 1,3,1 +?####?.#????.#? 5,3,1 +?.#?#????????..# 1,3,4,2,1 +#?.?.????#?? 2,1,2,3 +??#???????#???##?# 10,5 +.???#?????.? 1,6 +?.#?.???##?????????? 1,2,6,7 +???????#?#??#? 1,1,1,7 +?#??#?#??..##???.. 8,4 +????????.#? 2,1,1 +#.#??..?.#???? 1,3,3,1 +#???.??#???? 2,1,4,1 +????.????? 3,1,3 +?????.##???.??? 1,2,2,1,1 +??#??.#?????#?? 3,2,3 +.??#???.??###??? 1,1,6 +?????.???.? 1,2 +?.?#?????#???. 8,1 +.???????#?#??????# 1,6,3 +????##?#????.. 1,4,2 +?.??.?.?????? 1,1,5 +?????.###.? 4,3,1 +???..??#.##? 1,3,2 +#.#??#??.?????#.?? 1,4,1,1,1,1 +.#?????.?##???.?# 2,3,4,1,1 +???#????.??????.??.? 4,1,1,1,2 +...???.?.#. 2,1 +???#?.##.???.????? 3,2,2,1,1 +??????#??.##???????. 4,9 +#?#????????? 5,4 +.#????##???.?? 1,7,2 +???#.?.?#. 1,1,1 +???#?##.??#??#??.##. 6,6,2 +???????#?#?#?###?#. 1,11 +????#.#??.? 2,1 +?.#??.?????#??????? 3,2,8 +?#.???????? 2,4,1 +??.?#??#??? 2,7 +.?????????#? 3,4,2 +?.???.???#.? 3,3 +.#?#??##??? 4,3 +?.?????????? 3,3 +?????.?.#????????? 1,1,1,1,5,1 +?#?.???????#?#???#? 2,3,3,2 +.?#?#?????.????..? 8,3 +.?#?#.?..???? 3,4 +?.?????.?.##.??.? 5,1,2,1 +??????#???.? 3,4,1 +#?.????.?####?? 2,1,1,4 +????#?????????#? 2,3,6 +?.#??#????##?????#? 1,2,1,2,4 +??..????##???? 2,8 +?##?####??# 8,1 +?.?#####?????#.?. 6,3 +###??#..##??.??#?. 6,3,2 +?????#??.???#? 2,4 +?.??????#?#?#?? 1,6 +????#?????? 5,1,1 +#??#?#.#?????#.???? 1,2,1,3,1,3 +??#?????##???.. 3,6 +???#??#?????? 4,2,1 +?.??###.??? 4,1 +???.???????.??? 3,3,2,1 +????????#?????#?.?? 4,2,1,1,1,1 +????.???????#?? 1,1,1,4 +##??....##??? 4,3 +.?#???#?????.?#???. 8,1,2,2 +?.?##?????.. 1,5,1 +##???#????? 2,4,2 +??.?.????##?????. 1,10 +?##???###??.?????#. 10,1,1 +???????#???? 3,1 +?.??..???#.? 1,1,2,1 +#????#.... 2,1 +?#?.?????? 3,1,2 +??.#?.??#?.. 1,1,4 +?.??.#???????#?? 1,7 +???#??#??#??#?? 4,2,2,3 +???..#?##? 1,4 +.???#??..??. 4,2 +?#?.????#???#? 2,1,2,2 +???????#.???#?#?. 4,1,2,1,1 +?????.??#??? 2,5 +??????.?####?? 3,6 +???##??????? 9,1 +????##?#?.??.#??.??? 1,7,1,1,1,1 +#????###??##?.?.?? 2,8,1 +???.??..?. 1,1,1 +.?#??#????#?#?#? 1,11 +?.???#.???????? 1,2,6 +?????##?.??#??## 8,3,2 +?.?????????? 4,3 +???.???#?##???????? 2,1,6,3 +..??????##?#????? 8,2,1 +.?.#??#???##..#??#? 1,9,2,1 +?.?#.??#?# 1,1,5 +.#.??#?#?#? 1,5 +.#??????.?# 1,2,2 +.?????????.???.# 1,4,1,3,1 +#?????##?#?????????? 1,1,8,1,1,2 +?##?#???.???????##? 7,10 +#.?.##.?#? 1,2,1 +?##??..???#? 4,2 +??#?#????# 6,2 +#?.##?#??? 1,6 +???#.?#???###.????# 2,1,7,5 +??????#?##??.? 3,7 +?#?#??#??????.. 3,1,1,2 +.??#??#?.?.??????? 1,5,1,3,1,1 +#??.#??.#??#??????? 3,3,1,5,2 +.##??????????????? 3,2,2,5 +??##??.#?####.. 4,6 +?.???###?.#..?? 6,1,1 +???????????? 1,1,7 +???#?#?#??????##??? 9,3,1 +??????.???. 5,3 +.????#??????##??? 6,8 +..?#??#???#?#?.??## 5,4,2 +?????#???###?.#?.??? 1,9,2,2 +#?.??#?#?? 2,3,1 +#?#???.???##? 3,3 +#????#???????.??#? 12,1,1 +#???.?????###?#? 1,2,2,5 +#?.?????#?##???##?? 1,1,11 +??#??#????#?# 1,1,1,6 +..#??.??#???? 3,1,1 +???##??????#?##?. 6,4 +.???????.#.??#?????? 4,1,1,8 +..??.????#?.?# 1,2,2,1 +.????#??.?#?.??##??. 5,1,1,4 +?#.??????? 2,1,2 +????#?##??#????? 9,2 +?????????#. 2,1,1 +?.?#????##????#? 1,9,1,1 +..?#??#??.???? 6,2 +?##??????.??????# 6,2,1,1 +????#??#??#?#?.. 5,7 +?#?#???.?###???????# 5,7,1,2 +??#?#??#???? 1,1,2,1 +?.?.?#???### 1,1,2,3 +?????.???????#?.??.? 2,1,9,2,1 +.??##???#.?.????#? 6,1,2,1 +??.?????????.??.. 2,4,1 +??#???#?##?? 4,5 +???#??####?.????? 10,1 +??????#????#??#? 1,10,1 +##?.????????# 2,3,1,3 +?#??.?.??###?.#?## 1,1,1,1,3,4 +???#?????##? 1,2,1,3 +?#???.?.##???.?????. 4,1,3,5 +#..?..?.?##?#?? 1,1,6 +?.??.?????..? 2,2 +???#??.?#??#? 5,2,3 +##??????#??? 3,3 +??#.?.??.#????#?#? 3,1,2,5 +?.?????????#???????? 10,2 +???.?#.?????????#. 2,1,10 +???#??##??????# 9,1,2 +??##?#?????###.? 8,3 +?##????.?.???#??. 2,2,1,4,1 +.?#?###???????????? 7,1,1,2 +#????#???#?#?.????# 1,1,5,2,1,1 +.??????.???????. 6,1,1,1,1 +??????.??#. 1,1,3 +??.??##??.? 1,2 +??????#???.?.??. 1,5,1,1 +???##.??#??? 4,1 +..???#??#? 4,2 +#????.#?.?????#???? 5,1,1,1,2,1 +?.??#???.#?.????. 4,2 +?.#.#?.?.??#??? 1,2,1,1,3 +?.???###??##?..???. 7,2,1,1 +?##?.????????? 2,3,3 +???????????????##??? 1,1,5,1,3,1 +?#.?????#????#??#??? 1,2,1,7,2 +###?.???#?#????????? 4,7,5 +.??#?????. 1,1,1 +..###??#??? 3,3 +???#???#?.#?.#??# 5,2,2,4 +??.???#.???????.. 4,3 +?#???.?????? 1,1 +??..??????? 1,3,1 +??#???????.??.?#? 7,1,2,2 +?????????.???#?. 3,1,1,3 +.????#.???##?? 5,6 +??????.??? 1,2,2 +?????????? 2,1,3 +?????.??#?? 2,4 +?.?.??#??????.? 1,4,3 +?#?#???????????# 12,1 +#?.?#????? 1,7 +????#?#?#????# 1,6,1,1 +...?#??????????##?# 8,4 +??????#??? 3,4 +??.????????????? 1,1,2,1,2 +?#??#?#??#.?#???? 7,2,3 +????..???#??#??. 1,2,1,6 +?????.??#?????.??. 1,5 +?#.????????? 1,1,1,3 +??##?.#?#??? 3,5 \ No newline at end of file diff --git a/AdventOfCode.Solutions/2023/Day 13/Day13.cs b/AdventOfCode.Solutions/2023/Day 13/Day13.cs new file mode 100644 index 0000000..e2bc8a5 --- /dev/null +++ b/AdventOfCode.Solutions/2023/Day 13/Day13.cs @@ -0,0 +1,94 @@ +using AdventOfCode.Core; +using AdventOfCode.Solutions._2023.Day_13; +using System.Data; + +namespace AdventOfCode.Solutions._2023 +{ + public class Day13(InputReader reader) : IChallange + { + private InputReader _inputReader = reader; + + public async Task GetSolutionPart1() + { + int rowMirrors = 0, columnMirrors = 0; + await foreach (Grid map in _inputReader.ReadToGrids()) + { + (List rows, List columns) = map.GetRowsAndColumns(); + int r = 0, c = 0; + r = GetReflectedRow(rows, false); + rowMirrors += r; + if (r == 0) + { + c = GetReflectedRow(columns, false); + columnMirrors += c; + } + } + + return (rowMirrors * 100 + columnMirrors).ToString(); + } + + public async Task GetSolutionPart2() + { + int rowMirrors = 0, columnMirrors = 0; + await foreach (Grid map in _inputReader.ReadToGrids()) + { + (List rows, List columns) = map.GetRowsAndColumns(); + int r = 0, c = 0; + r = GetReflectedRow(rows, true); + rowMirrors += r; + if (r == 0) + { + c = GetReflectedRow(columns, true); + columnMirrors += c; + } + } + + return (rowMirrors * 100 + columnMirrors).ToString(); + } + + private static int GetReflectedRow(List lines, bool derectSmudge = false) + { + for (var rowIndex = 0; rowIndex < lines.Count - 1; rowIndex++) + { + bool foundMirrors = false, foundSmudge = false; + for (var charIndex = 0; charIndex < lines[rowIndex].Length; charIndex++) + { + for (var smudge = 0; smudge <= Math.Min(rowIndex, lines.Count - 2 - rowIndex); smudge++) + { + if (lines[rowIndex - smudge][charIndex] != lines[rowIndex + 1 + smudge][charIndex]) + { + if (derectSmudge && !foundSmudge) + { + foundSmudge = true; + } + else + { + foundMirrors = true; + break; + } + } + } + + if (foundMirrors) + { + break; + } + } + + if (derectSmudge && !foundSmudge) + { + // continue to find the damn thing + continue; + } + + if (!foundMirrors) + { + return rowIndex + 1; + } + } + + return 0; + } + + } +} \ No newline at end of file diff --git a/AdventOfCode.Solutions/2023/Day 13/GridMirrorExtention.cs b/AdventOfCode.Solutions/2023/Day 13/GridMirrorExtention.cs new file mode 100644 index 0000000..6ccbc80 --- /dev/null +++ b/AdventOfCode.Solutions/2023/Day 13/GridMirrorExtention.cs @@ -0,0 +1,22 @@ +namespace AdventOfCode.Solutions._2023.Day_13 +{ + internal static class GridMirrorExtention + { + public static (List Rows, List Columns) GetRowsAndColumns(this Grid grid) + { + List rows = [], columns = []; + for (int rowIndex = 0; rowIndex < grid.Rows; rowIndex++) + { + rows.Add(grid.GetRowAsString(rowIndex)); + } + + for (int columnIndex = 0; columnIndex < grid.Columns; columnIndex++) + { + columns.Add(grid.GetColumnAsString(columnIndex)); + } + + return (rows, columns); + } + + } +} diff --git a/AdventOfCode.Solutions/2023/Day 13/day-13-input.txt b/AdventOfCode.Solutions/2023/Day 13/day-13-input.txt new file mode 100644 index 0000000..4a83c60 --- /dev/null +++ b/AdventOfCode.Solutions/2023/Day 13/day-13-input.txt @@ -0,0 +1,1387 @@ +.#..#...... +..#.#...... +..#...#.... +#.##...#### +.#..#..#### +#.#.##.#### +###..#.#..# + +.#.##.#.### +..####..##. +#########.. +.##..##..## +.##..##..## +#########.. +..####..##. +.#.##.#.### +#.#..#.##.# +..#####.### +...##.....# +..#..#..#.. +...##...#.. + +..##.#. +#...### +#...### +..##.## +..#..#. +....##. +#.#.#.. +.#...## +##.#... +###.### +###.### +##.#... +.#...## + +#.#.### +..##.## +...#### +##....# +##....# +...#### +..##.## +#.#.### +#.##### +....##. +.#...#. +#.##### +#....## +#..##.# +#..##.# +#..#.## +#.##### + +###...#...#.#.. +.#.##.#.....#.. +..###..#..#.... +..###..#..#.... +.#.##.#........ +###...#...#.#.. +###..#..##.#.## + +##.#..... +##.#...#. +..#.#..## +..##....# +#..#....# +#.#..##.. +#.#..##.. +#..#....# +..##....# +..#.#..## +##.#...#. +##.#..... +#.#..#.#. + +#..#..#..#.## +..........### +..........### +#..#..#..#.## +###....####.# +....##......# +##..##..##..# +###....####.. +....##.....## +.#......#.#.# +.##....##..## +..#.##.#....# +####..######. +.##..#.##.### +..##..##...#. + +..#.###..#. +####.#..... +..#.##.##.. +...##...#.# +###.#...... +#######.### +..#.#...### +###.###.##. +###..#...## +##....##.#. +####...#.## +..###...... +.###..#.#.. +##.##..#.#. +##.##..#.#. + +#.##.###......# +.#..#.#..##..## +..##..#.#..#... +#....##.#.#.#.. +#....##.######. +######....###.# +#.##.#...##.##. +..##..#####.### +..##..######..# +..##..######..# +..##..#####.### +#.##.#...##.##. +######....###.# +#....##.######. +#....##...#.#.. + +......#....#... +.####...##...#. +######..##..### +######..##..### +......##..##... +.####.######.## +.#..#.######.#. + +#############..## +.########...###.# +.########...#.#.# +#.##..##.###..##. +..#.##.#....#.#.. +..#....#...####.. +#.#....#.##.#.#.. +.#......#......## +.#......#......## +#.#....#.##.#.##. +..#....#...####.. + +...#.###.#. +....##.#.## +..##..#.### +..##..#.### +....##.#.## +...#.###.#. +#.#.#.#.#.. +...##.#..## +.#.####...# +.#.#.##...# +...##.#..## +#.#.#.#.#.. +...#.###.#. +....##.#.## +..##..#.### + +.#.##.#.#.#..#. +.........###### +###..####.#..#. +##.##.##....... +..#..#..##....# +.#.##.#...####. +##.....#..####. +..####..#..##.. +##....##...##.. + +....####.####.. +.#..####.####.. +#.#.##..#####.. +##..#.#.####### +.#.#.##.##.##.. +..##..#.##..#.. +####....#...#.. +..#.#....##.#.. +#..#..#..##.#.. +.#.......#.#### +..........##... +#.....####.#.## +##....##....### +.....#.##.##### +.#..#.##....#.. +#.....###...#.. +#....##........ + +#..##..#....### +#..#.#......### +.....#..####... +.##.##.##...### +.....##.###..## +.##..##....#.#. +.##...#.#.#.#.. + +.###.....## +..#......#. +..####.#### +#.##...#.#. +#..#...#### +##.#.#..### +##.#.#..### +#..#...#### +#.##...#.#. +..####.#### +..#......#. +.###.....## +.#.##.#..#. +..#...###.. +..#...###.. +.#.#..#..#. +.###.....## + +###..## +...#### +.#..#.# +#.##... +#...#.. +#...#.. +#.##... + +..#......#..... +#.#......#.#..# +.#..####..#.... +.#.#....#.#.##. +..########..##. +..#.####.#..... +..###..###..##. +#..######..#### +.#####.####.##. +#..#....#..#..# +##........##..# +.....##.....##. +.##.#..#.##.... + +...#.## +...#... +#..#### +#..#### +...#... +...#.## +#.###.# +.##.#.# +.#.###. +.##.##. +.##..#. +.#.###. +.##.#.# + +..#...##. +..###..## +...##.#.. +###.#.##. +..##..##. +###..###. +..#.#.#.. +####..#.. +...#####. +##.####.. +###.#..## +..####### +..####### +###.#...# +##.####.. +...#####. +####..#.. + +.##...##. +#..##..#. +###..#### +#..##.##. +.##..##.. +#..###.## +.##.##.## +....##.## +.##.##..# +.##.##... +.##.##... +.##.##..# +....##.## + +#...#.##.##..#.## +##..#.###...##### +##..#.###...###.# +#...#.##.##..#.## +...#.....###..##. +..####.#.#.####.# +..####.#.#.####.# +...#.....###..##. +#...#.##.##..#.## + +.##..####.##### +.##..####.####. +.##.#.##..#.### +#..#.######.#.# +.#....##..##... +##..#.####..##. +.....#......##. +##..##..#.#.### +...##..#.#.#.#. +...#..##.###... +...#..##.###... + +#..##.#.#.# +######..##. +#..#...#..# +#..#...#..# +######..##. +#..##.#.#.# +#..#..##..# +#...##.#.## +######.##.# +....#..#### +####..##.#. + +##.##..##.#.##.#. +....##.###..##..# +.##.#.##..######. +.##.#.##..######. +....##.###..##..# +##.##..##.#.##.#. +#####..#...####.. +..##....###.##.## +.####...##.#..#.# +.####....#......# +##..#...#........ +.##.#..#..##...#. +#####..#.##....## +#.#.#.#..#.####.# +##.######........ + +....#.#.. +....#.##. +##.##.#.. +##...#.#. +#.##..### +#.##..### +##...#.#. + +##....###.####..# +##....###.####..# +.#.##.#.....##### +.######..#.#..#.# +.######.##.###### +..#..#....####.## +.######.#.#.###.# +###########.#.##. +........##....#.. +##.##.###..#.#### +#......##....###. +#.....#####...#.# +###..###.##...##. + +#..#...## +........# +....##... +....###.. +........# +#..#...## +####.##.. + +.##..#. +##....# +##....# +.##..#. +...#.#. +#####.# +#####.. +...#.#. +.##..#. + +.##....#.#.## +#..#.....#... +.##.....###.. +#..#...##.... +#..#...#...## +..#.#.#...... +.....#.#..### + +#.....###....#.## +#.##.#.....#...#. +....#####.#...### +#...#..#...#..... +....#...#...####. +....#.#.#...####. +#...#..#...#..... +....#####.#...### +#.##.#.....#...#. +#.....###....#.## +.##.##....#..##.. +...#.#.#..#.#...# +####...##.##...#. +.###.....###....# +.###.....###....# + +..##..#...##... +##..##..#....#. +......#.#.##.#. +..##..#.#.##.#. +#.##.###.####.# +.####.....##... +.###..#........ +.#..#.####..### +##..###...##... +#.##.####.##.## +######....##... +######.##.##.## +.####.#.#.##.#. +######..##..##. +.#..#..######## +#.##.##...##... +#....##.##..##. + +#..#..##.##.....# +....###.#...##.#. +##..#.#...###.##. +##...#..#.#..##.# +..#.#.....#.##### +..#.#.....#.##### +###..#..#.#..##.# +##..#.#...###.##. +....###.#...##.#. +#..#..##.##.....# +#..#..##.##.....# +....###.#...##.#. +##..#.#...###.##. +###..#..#.#..##.# +..#.#.....#.##### + +##.########.####. +......#...#.####. +#.##..###.####### +##...#.###.##..## +##...#.###.##..## +#.##..###.####### +......#...#.####. +##.########.####. +..#####..#.###### +#..###.#.#.#....# +..#.#....##.####. +......#.###..#... +..#...##...#....# +#...#....##..##.. +.###.#.##.##.##.# +..#...##.##...... +.##..#.##....##.. + +.###...#...#.#. +.###...#...#.#. +#...#.###..###. +##.##.#..#.#### +.........#..### +..##.###..###.# +.......####.... +####.#.#.#..### +####.###.#..### +.......####.... +..##.###..###.# + +.#..#.. +.#..#.. +#.#.#.. +.##.#.# +#..#.## +..###.. +.#..... +######. +#####.# +#####.# +######. +.#..#.. +..###.. +#..#.## +.##.#.# + +#....#.#...## +######....#.. +..........### +########.#... +#...###...### +##..###....## +..##...##.... +#....##...#.. +......#.#.#.. + +##########.#.#.## +..........#.#.##. +#..#..#..#..##..# +..........#.###.# +..........######. +.##.##.##.####.#. +#..####..#####..# +#..####..##...##. +..#.##.#...###..# +#..####..#......# +####..#######..## +#..####..##.##.#. +####..#####..#### +....##.........#. +.............##.. + +.#..#.####..#.#.. +####.#...#....... +#.##.#.#.##..#... +.........#..#.### +......#..#.#.##.. +######.#.##...#.. +.####..##.#...### + +...##.##. +.....#.## +##...#..# +...##.##. +..####### +..####### +...##.##. +##...#..# +.....#.## +...##.##. +..####..# +....##### +.#.##.... + +..##....### +######.#..# +..##..#.#.. +#######.### +...#.####.. +##..#.###.# +##..#...#.# +###.##..##. +###.#.#.#.# +...#...#..# +###.#.##### +###..##.... +...#.#....# +...#.#....# +###..##.... +###.#.###.# +...#...#..# + +##..####.#. +##..###.### +......##.#. +######...## +##..##..#.# +##..###...# +##..###.### +#.##.#.#### +......####. + +..#.##.##.# +#.##..####. +#....#.##.# +.##....##.. +#..##...... +##.#....... +#####...... +#.#.#.#..#. +##..#.####. +#.#...#..#. +#.##..###.. +###........ +###.#...... +..###..##.. +..###..##.. + +####.###.##.# +......#...... +....##.##.#.. +....#..#.#..# +#####..#.###. +.....##...##. +#####.#.#.#.. +....#......#. +.....#..#...# +####.#####.#. +#####.#..#... +.##...######. +.....#.###### +####.#.##...# +.....##..#### +....###.###.# +####.####...# + +..###....###... +.##...###...... +#.#..#..###.... +##.##.#...#..## +#.####.#.##.### +#.####.#.##.### +##.##.#...#..## +#.#..#..###.... +.##...###...... +..###....###... +#.#..#......### +....#..##.#.### +...#.##..#.###. +.#.####.#.##.## +.#...##.###.### +###..#...#...## +###.#.#........ + +...##..#.## +..#..###..# +##.##.##..# +..#.#.#.... +##....#.##. +..#####.... +##..#.##..# +###...#.... +...#.#.#..# +...######## +###..##.... +..##....... +###..#..... +###.##..... +###.#.#.... + +.#.#..# +#..#..# +.#.#### +#...##. +..#.... +##.#..# +.#..... +#...##. +#...##. +.#..... +#..#..# + +###...##.##..#.#. +..#.####...#....# +....#..######.... +....#.....#..#.#. +....#.....#..#.#. +....#..######.... +..#.####...#....# +###..###.##..#.#. +###..#......#..#. +##..###.##..##### +...#...###....#.. + +.#.....####..##.# +#.####.##.##..... +##..###.###.##..# +...###.##.##.#... +##.#.#.##.#..#... +#..#.##.#.....#.. +.#..#...##....##. +.#..#...##....##. +#..#.##.......#.. +#..#.##.......#.. +.#..#...##....##. +.#..#...##....##. +#..#.##.#.....#.. + +##..##..##..# +..##.#..#.##. +##...#.##...# +###..####..## +..##..##..##. +..#...##...#. +.....####.... +....#....#... +..###.##.###. +###........## +..###.##.###. +##..######..# +..#..#..#..#. +##..##..##..# +..##.#..#.##. + +#....######## +.#....#..##.. +#.##...##..## +..#.#.#.####. +##...#..####. +###.#...####. +.#.##...#..#. +.#....#..##.. +..#...#.####. +..#...#.####. +.#....#..##.. +.#.##...#..#. +##..#...####. + +#.#......###.##.# +#.#...#..###.##.# +#..###..#.#..##.. +###.#..##..##..## +.#..#..##........ +#.###.....###..## +##..#.#.##.###### +##.#.....#.#.##.# +##...#.##..#....# +...#.##.......... +.##.#.#..#....... + +..#####.# +....##.## +..#.##### +#..###.#. +###..##.# +.#...#.#. +.#...#.#. +###..#..# +#..###.#. +..#.##### +....##.## +..#####.# +.###..##. +...#.#### +..###...# +..###...# +...#.#### + +..#...#...##.#. +##.....####.### +##.....###..### +..#...#...##.#. +##........#.... +..#.##.###.#... +####.###.#####. +####.....###..# +....#.....##### +##....#.#..#..# +....##..#..#.#. +...##.###.....# +###.#.##.....## +##..###.#..#### +##..####....##. +##.###....#.#.# +###..#.#.##.#.# + +...#.##.. +..#.####. +####.##.# +###.#..#. +##.#.##.# +..#..##.. +###...... +....#..#. +.....##.. +####....# +...#.##.# +..#..##.. +##.###### + +#.##..... +..#.#..#. +..#.#..#. +#.##..... +.##.....# +##.##..## +..###.### +.##..##.. +.##..##.. +..###.### +##.##..## +.##.....# +#.###.... + +#....#.##.####... +##.#...#..#..#.#. +####..####.###### +..#...#...#...##. +###....#.#.#####. +###.#..##.....#.# +##.####.##.##..## +....##...##..#..# +##.....#.#.#...## +###.#.##.#.##..## +..##..##....#.### +##.##..#...###... +...###.#...####.# +...#....##.....## +##########...#..# +##....#.#.#...... +##....#.#.#...... + +###.##.#### +.##.##.##.# +#####.####. +#.#.##.#.#. +.#..##..#.# +..##..##... +#...##...## +#.#.##.#.## +##.####.##. +####..##### +..##..##..# +.##....##.# +.##....##.# +..##..##..# +####..##### +##.####.##. +#.#.##.#.## + +.###............# +..#..##......##.. +###....#....##... +###..####..####.. +.....##.#..#.##.. +..###.###..###.## +.##....#.##.#.... +..#...#......#... +#..#.###.##.###.# +#.##...#.##.#...# +..#.##.#.##.#.##. +####...#....#...# +####...#....#...# +..#.##.#.##.#.##. +#.##...#.##.#...# + +#..##.# +.##..## +.##..## +#..##.# +.#...## +..##### +....#.. +.#...#. +.#.###. +.#.###. +.#...#. +....#.. +..####. + +##....... +##..#..## +#####.... +.#.#..#.. +.....#.#. +.##.##.## +.##.##.## +.....#.#. +.#.#..#.. +#####.#.. +##..#..## +##....... +##....... +##..#..## +#####.#.. + +..###....#.#.###. +#........###.#### +..#...##.###.#..# +.#.##.##....#.... +#.##.###..#.##### +##..###.#.....##. +##..###.#.....##. + +..##.#.##.#.##..# +.#.##.####..#.#.# +...###....###...# +#....#....#....#. +####.#....#.##### +.##..........##.. +.##..........##.. +####.#....#.##### +#....#....#....#. + +..##...## +.....#.## +.###.#... +..###.#.. +..#.##.## +...#.#### +...##..## +##.##...# +#####.#.. +###.####. +.......#. +##.#.#### +##.#.#### +.......#. +###.####. + +#..#..### +#####..## +..#.#.... +###..#..# +##.###... +...###.#. +##.###.#. +...#..... +...###..# +....#..#. +##.#####. +###.#.### +###.#.### +##.#####. +....#..#. +...###..# +...#..... + +...#... +...#.#. +##..... +....##. +...#.#. +..#.#.. +#.#.#.# +#.#.#.# +..#.#.. +...#.#. +....##. +##..... +...#.#. +...#... +##..#.. +#.#.#.. +#.##... + +#..#...##.#.... +#...#....###..# +.#.##.......##. +##..##..#..#..# +####..##..#.... +###..#......... +#..##.#.##..##. +##..#.#.#..#..# +.###########..# +..........#.##. +###....#.#..... +##...##.####..# +##...##.####..# +###....#.#..... +..........#.##. +.###########..# +##....#.#..#..# + +####.##.###.. +###########.. +....##...##.. +########.#### +####.####.#.# +....##.#.#### +####..#.##.#. +######.#...## +#..#..#..#... +........#.... +....##...##.# + +.###..##. +###.#.#.. +.######.. +###.##.#. +###..#.#. +....#..#. +....#..#. +###..#.#. +###.##.#. +.######.. +###.#.#.. +.###..##. +..#.##..# +..#.#...# +..#.#...# +..#..#..# +.###..##. + +###.#.. +.#.#### +#.##.## +...#### +.#.#..# +##.#.## +#####.. +#####.. +##.#.## + +..##.###..##.##.# +#.#....##.#...#.. +#.#....##.#...... +..##.###..##.##.# +..##.###..##.##.# +#.#....##.#...... +#.#....##.#...#.. +..##.###..##.##.# +##.##.##....##.#. +.#.#.###.###..#.. +...##.#.#.####### +##..#.#..###.#### +#.....##.###.#..# +.####.##..#.##... +###.#.#...##.#.#. + +#....###.###..# +#######.#...#.. +######.##..###. +#....#..#...#.# +##..##..####.#. +#########...... +.#..#.####....# +######.##....#. +######.##....#. +.#..#.####....# +#########.....# +##..##..####.#. +#....#..#...#.# +######.##..###. +#######.#...#.. + +##.##..##.####. +.#........#..#. +.#..#..#..#..#. +###.#..#.###### +##........####. +##.#....#.####. +..###..###....# +.#...##.#.#..#. +###.####.###### + +#...#..#. +#.#.#..#. +#.#..##.. +###.#..#. +#.###..## +#.#..##.. +##..#..#. +####....# +.#.#....# + +##.....##.... +.#...##..##.. +#..##.#..#.## +##.###.##.### +.#.####..#### +....########. +.##..######.. +#.#..#....#.. +.##...####... +#.###.#..#.## +..###.#..#.## +.##..######.. +##.###....### + +#.#.###.. +#.#.#.#.# +#.#.#.#.# +#.#..##.. +#..##...# +....##... +#.#..###. +##...#.## +##...#.## +#.#..###. +....##... +#..##...# +#.#..##.. + +.....##..###..# +##..#..##.##... +.##...##..#..## +.#..###.##.##.# +.#..###.##.##.# +.##...##..#..## +#...#..##.##... +.....##..###..# +#.###.......#.# +##..##...#.#### +##..##...#.#### +#.###.......#.# +.....##..###..# + +#........ +..#.####. +..#..##.. +##....... +####....# +##....... +...###### +..##.##.# +#####..## + +##......##### +#.######.##.. +#..####..##.. +..##..##...## +##......###.. +.#.#..#.#.... +##..##..###.. +.#.#..#.#.### +##########.## +..#....#..#.. +.##.##.##.... +#..####..#... +#.#.##.#.#... +#.#.##.###... +....##....### +###....###... +##.#..#.###.. + +....###...####... +.##.#.#..##..##.. +......##...##...# +#..##.####.##.### +.#...#..#.#..#.#. +.##.#.###......## +#..##..###....### +.##.#..###.##.### +.##...#..#.##.#.. +........#.####.#. +####.###.#.##.#.# +####..#.########. +######...######.. +.....###...##...# +#..#.##.########. + +###..####.. +......##... +......##... +###..####.. +...#..##..# +#..#.####.# +##.#.####.# +.##.#.##.#. +..#........ +#..##....## +..#.#....#. +..#........ +#..#....#.# +.#....##... +#.#...##... + +###......###. +####....##### +..#..##..#.#. +....####....# +#.##....##.## +.##.#..#.##.. +...##..##.... +#.##.##.##.#. +#.##.##.##.#. +...##..##.... +.##.#..#.##.. + +.##.....#..#. +....####....# +.#.####.#..#. +##.#...#....# +##.....#....# +##.##..#....# +..#..#...##.. +..#..#...##.. +##.##..#....# +##.....#....# +##.#...#....# +.#.####.#..#. +....####....# +.##.....#..#. +.#..###..#... + +...#...###### +.###....##### +..##....#.... +#.#.#.##.#..# +##.##..#.#### +##.....#.#### +..#.##...#..# +.#.......#..# +##..##.#.#### +##...#.#.#### +.#.......#..# + +.#.###..#.##. +.#.###..#.##. +..#...#...### +##.....#.##.. +#.#.#....#..# +###....#..... +.#.###.#...#. +########..#.# +##.#####..#.# + +#.#....#....#.. +######.#....#.# +.#####.######.# +##....#.#..#.#. +.##...####.###. +....#..######.. +#######.#..#.## +.......#.##.#.. +.###....#..#... +#..##.#..##..#. +.#.##.###..###. +...##..######.. +...##..######.. + +.#.####.#.....#.# +...#..#...#...##. +###....###.#.#.## +#.#.##.#.#.#.#... +##.####.#####..## +##.#..#.####...## +#######.##.#..##. +##..##..####.#..# +#..####..#....##. +#.######.#.##..#. +##########.####.# +#.#.##.#.##.##..# +..#....#..####.#. +#........#..####. +..######....#.### +..######....#.### +#........#..####. + +#.#..#..##..# +#.#..#..##..# +.###...#..#.. +.#.##..####.. +.###.#......# +...#..######. +...###.#..#.# +###.....##... +###.##......# +#...##.##.#.# +..##..#.##.#. + +.#....#.#.#..#. +##.####.##.#..# +.#..#.#.##..##. +.#..#.#.##..##. +##.####.##.#..# +.#..#.#.#.#..#. +...#..#.###..#. +..##....#.#.#.# +##.#.#..##..##. +..###.#..##..## +#.#..##.##.#... +..#..###...###. +#..#...####.### +...#.#.#.###.#. +...#..#...##..# +...#..#...##..# +...#.#.#.###.#. + +..#.#.###...#.##. +#####...###...#.. +#...#..#.#..##.#. +#...#..#.#..##.#. +#####...###...#.. +..#.#.###...#.##. +.#.##......#.#... +.........#..##... +####.#...#....#.# +.#..##.###....##. +.#..##.###....##. +####.#...#....#.# +.........#..##... +.#.##......#.#..# +..#.#.###...#.##. + +#..#.#.#..##..##. +.#..#.##..##..##. +#....#.#....##... +..##..#####.##.## +#....#.###..##..# +..##..#.#..####.. +######.#.#.#..#.# +#.##.#..#...##... +#.##.#....##..##. +..##..###.######. +##..####..#....#. +##..##...#..##..# +##..###..##.##.## +##..######.####.# +..##......#....#. + +##..###.# +..##.##.. +###.#...# +####.#### +###..###. +...##.... +...##.... +###..###. +####.#### +###.#..## +..##.##.. +##..###.# +######... +....#..## +######.## + +..###.####....... +##..####.###.##.. +#.....#..##.####. +#.##.##..#.##..## +.#####.#.#.#.##.# +##....##...###### +####....##.###### +#.#####.##.#.##.# +...#.###..#..##.. +....##.......##.. +....##.......##.. +...#.###..#..##.. +#.#####.##.#.##.# +####....##.###### +##....##...###### +.#####.#.#.#.##.# +#.##.##..#.##..## + +.#.##.#.##. +.#.##.#.##. +#.#..#.#### +.######.#.# +##....###.# +.#.##.#.##. +#.#..#.#.## +#.####.##.# +..#.....### + +..#####.... +..###..#### +..#..#.#... +#..#..##..# +..##..#.... +#..#..##..# +.####...... +..######..# +...#.#.#### +#.##.#.#..# +..#..#.#..# +..#..#..##. +..#..#..##. + +#....##....## +###......#### +#..#....#..## +#.#.#..#.#.## +#.###..###.## +###.#..#.#### +.#........#.. +##.######.### +#..##..##..## +.####..####.. +#.#..##..#.## +#.#.#..#.#.## +#.##....##.## +##.######.### +..#.####.#... +###..##.##### +##...##...### + +.#.####...### +##.###.#.##.. +#...##..#.### +#...##..#.### +##..##.#.##.. +.#.####...### +#.#...#.##... +...#.......## +####.##.#.#.. + +..#.#.. +##..#.. +##..#.. +...#### +####.## +....#.. +#####.. +#..##.. +.....## +..##... +....#.. +##..### +...##.. + +.##..#...#.#. +.##..#...#.#. +.....#..####. +.##.#.#..###. +.##...#..#..# +#####.##.#.#. +#.##.#..#.#.# + +#....##...#.##. +#....#...###..# +.####.##.##.... +..##...######## +##..##..##.#..# +#.##.#.....#..# +..##..#.....#.. \ No newline at end of file diff --git a/AdventOfCode.Solutions/AdventOfCode.Solutions.csproj b/AdventOfCode.Solutions/AdventOfCode.Solutions.csproj index a83b1d1..63f719b 100644 --- a/AdventOfCode.Solutions/AdventOfCode.Solutions.csproj +++ b/AdventOfCode.Solutions/AdventOfCode.Solutions.csproj @@ -12,6 +12,12 @@ + + Always + + + Always + Always @@ -33,7 +39,7 @@ Always - + Always diff --git a/AdventOfCode.Solutions/day-00-input.txt b/AdventOfCode.Solutions/day-00-input.txt index c5bec3a..f226414 100644 --- a/AdventOfCode.Solutions/day-00-input.txt +++ b/AdventOfCode.Solutions/day-00-input.txt @@ -1,6 +1,15 @@ -???.### 1,1,3 -.??..??...?##. 1,1,3 -?#?#?#?#?#?#?#? 1,3,1,6 -????.#...#... 4,1,1 -????.######..#####. 1,6,5 -?###???????? 3,2,1 \ No newline at end of file +#.##..##. +..#.##.#. +##......# +##......# +..#.##.#. +..##..##. +#.#.##.#. + +#...##..# +#....#..# +..##..### +#####.##. +#####.##. +..##..### +#....#..# \ No newline at end of file