diff --git a/src/days/day10.zig b/src/days/day10.zig index dbab95d..93c79e3 100644 --- a/src/days/day10.zig +++ b/src/days/day10.zig @@ -1,7 +1,123 @@ const std = @import("std"); -pub const title = "Day 10"; +pub const title = "Day 10: Factory"; -pub fn run(_: std.mem.Allocator) !void { +pub fn run(allocator: std.mem.Allocator) !void { + //const input = @embedFile("./input/day10.txt"); + const input = + \\[.##.] (3) (1,3) (2) (2,3) (0,2) (0,1) {3,5,4,7} + \\[...#.] (0,2,3,4) (2,3) (0,4) (0,1,2) (1,2,3,4) {7,5,12,7,2} + \\[.###.#] (0,1,2,3,4) (0,3,4) (0,1,2,4,5) (1,2) {10,11,11,5,10,5} + ; + + var lines = std.mem.tokenizeScalar(u8, input, '\n'); + + var machines: std.ArrayList(Machine) = .empty; + defer { + for (machines.items) |machine| { + machine.deinit(); + } + machines.deinit(allocator); + } + + while (lines.next()) |line| { + const machine = try Machine.init(allocator, line); + std.debug.print("{f}\n", .{machine}); + try machines.append(allocator, machine); + } } +const Machine = struct { + lights_goal: []bool, + buttons: []Button, + + allocator: std.mem.Allocator, + + const Button = struct { + toggles: []usize, + + pub fn format(self: Button, w: *std.Io.Writer) std.Io.Writer.Error!void { + try w.writeByte('('); + for (self.toggles, 0..) |toggle, i| { + try w.print("{d}", .{toggle}); + if (i < self.toggles.len - 1) { + try w.writeByte(','); + } + } + try w.writeByte(')'); + } + }; + + const Self = @This(); + + pub fn init(allocator: std.mem.Allocator, line: []const u8) !Self { + std.debug.assert(line[0] == '['); + + var lights_goal: []bool = undefined; + var buttons: std.ArrayList(Button) = .empty; + defer buttons.deinit(allocator); + + var parts = std.mem.tokenizeScalar(u8, line, ' '); + while (parts.next()) |part| { + if (part[0] == '[' and part[part.len - 1] == ']') { + const lights_count = part.len - 2; + lights_goal = try allocator.alloc(bool, lights_count); + errdefer allocator.free(lights_count); + for (part[1..part.len - 1], 0..) |c, i| { + lights_goal[i] = switch (c) { + '.' => false, + '#' => true, + else => unreachable, + }; + } + } else if (part[0] == '(' and part[part.len - 1] == ')') { + var toggles: std.ArrayList(usize) = .empty; + defer toggles.deinit(allocator); + + var indexes = std.mem.tokenizeScalar(u8, part[1..part.len - 1], ','); + while (indexes.next()) |index| { + const toggle = try std.fmt.parseUnsigned(usize, index, 10); + try toggles.append(allocator, toggle); + } + + const toggles_slice = try toggles.toOwnedSlice(allocator); + errdefer allocator.free(toggles_slice); + try buttons.append(allocator, .{ + .toggles = toggles_slice, + }); + } + } + + const buttons_slice = try buttons.toOwnedSlice(allocator); + errdefer allocator.free(buttons_slice); + + return .{ + .lights_goal = lights_goal, + .buttons = buttons_slice, + .allocator = allocator, + }; + } + + pub fn deinit(self: Self) void { + self.allocator.free(self.lights_goal); + for (self.buttons) |button| { + self.allocator.free(button.toggles); + } + self.allocator.free(self.buttons); + } + + pub fn format(self: Self, w: *std.Io.Writer) std.Io.Writer.Error!void { + try w.writeByte('['); + for (self.lights_goal) |light| { + try w.writeByte(if (light) '#' else '.'); + } + _ = try w.write("] "); + for (self.buttons, 0..) |button, i| { + try w.print("{f}", .{button}); + if (i < self.buttons.len - 1) { + try w.writeByte(' '); + } + } + } +}; + diff --git a/src/days/input/day10.txt b/src/days/input/day10.txt new file mode 100755 index 0000000..9638687 --- /dev/null +++ b/src/days/input/day10.txt @@ -0,0 +1,198 @@ +[#...#] (1,3) (2,3,4) (0,2,3) (0,1,2) (2,3) {37,24,60,50,16} +[##...#..] (0,1,3,5,6) (0,1,5) (4) (5,6) (0,4,7) (1,2,5) (3) {23,18,2,26,14,36,25,7} +[.#..###] (0,1,4,5) (0,3,4,5,6) (3,5,6) (0,5) (0,1,4,5,6) (0,1,2,3,4) (0,1,5) (2,5) (0,1,2,4,5) {36,30,6,18,28,40,21} +[.###] (2) (0,1) (1,2) (1,2,3) {9,173,175,13} +[.###.] (1,2) (0,1,2,3) (2,3) (1,2,3,4) (1,2,3) (0,2,4) (1,4) {12,32,31,24,17} +[..#####.##] (1,3,4,6,7,8,9) (4) (0,2) (0,2,3,4,5,7,8,9) (3,6,7,9) (1,5,8) (0,1,2,3,4,6,8) (1,7,8) (0,1,2,3,4,8,9) (2,7,9) (0,1,2,5,6,8) (2,4,7,8) (6,8,9) {73,75,92,46,75,30,45,37,109,39} +[###..#..] (0,1,2,3,6,7) (3,6) (0,4,7) (0,6,7) (1,3,5,6,7) (0,1,2,4,5,6) (3,4,6) (2,3,6) (2,3,5,6,7) {39,23,31,81,38,28,100,61} +[##.#.##..] (1,4,5,6,8) (2,3,4,6,8) (1,3,5,7) (0,1,2,3,4,5,7,8) (0,3) (1,2,3,4,5,7,8) (0,3,6,7,8) (0,1,3,4,5,6,7,8) {44,47,31,59,56,47,39,40,58} +[####.##.] (2,3,5,6) (0,3,4,6,7) (1,6,7) (0,1,3,4,5,7) (0,2,3,6,7) (1,7) (0,1,2) (0,1,2,3,5,6) (1,4,5,6,7) (0,7) {57,60,27,40,31,42,75,72} +[.##.] (0,2) (2,3) (1,2) (1,3) (0) (0,2,3) {12,19,26,28} +[##.#] (0,2) (1,2) (0,1) (0,1,3) (0,3) {50,44,35,16} +[.##.#...] (0,4) (0,2,4,5,7) (0,1,3,4,5,7) (0,2,3,5,6,7) (1,2,6,7) (1,3) (0,6,7) (0,2,3,6,7) (0,7) (0,2,4,5,6) {265,33,227,40,229,215,224,76} +[.###] (0,1) (3) (2) (1) {7,7,16,13} +[..#...###.] (0,1,2,3,5,6,7,8,9) (0,2,3,4,5,6,8) (0,2,3,5,6,9) (0,1,2,3,4,5,6,8,9) (1,3,7,9) (0,3,5) (0,1,2,5,6,7,8,9) (1,3,4,7) {46,30,36,39,15,46,36,27,25,34} +[..##] (0,1,3) (0,1,2) (2) (1,2,3) {148,159,169,21} +[.#.#] (0,1,2) (1,3) {128,133,128,5} +[#...#..] (0,2) (4,6) (2,5) (0,1,5) (0,3,4,6) (1,2,3,4,5) {21,4,22,10,15,13,13} +[......#] (0,2,4,5) (4,5) (0,1,2,3,4) (0) (0,1) (4) (0,1,2,4) (0,1,5) (0,1,5,6) {74,58,51,19,67,41,8} +[#..##..#] (0,5,6) (0,1,2,3,6,7) (0,1,2,4,5) (4,7) (0,3,6) (4,6,7) (1,2,3,5,7) (1,5,6) (0,1,2,3,4,5) {55,53,44,38,62,51,53,44} +[###..#] (0,1,3,5) (3,4) (1,2,3,5) (0,2,4,5) (1,2) (0,5) (4) (1,4,5) {23,37,41,30,59,48} +[..#..##..] (0,2,4,5,7,8) (1,2,5,8) (1,4,5,7) (2,8) (0,1,3,8) (1,2,3,5,6,7,8) (3,4,5,8) {32,50,41,45,41,64,15,42,71} +[...##] (0,1,2,3) (1,4) (1,2) (3) (2) (0,1) {18,38,31,31,17} +[##.#..##] (0,1,4,6,7) (0,2,5,6) (3,6) (0,1,4,5,6,7) (0,1,3,6,7) (2,3,5,7) {30,27,7,24,23,20,46,31} +[####..] (1,2,4) (2,3,4) (0,1,2,3) (0,1) (0,1,3,5) (0,1,2,4) (3) (0,2,3,4,5) {56,48,39,27,34,20} +[.#..] (2,3) (0) (0,2) (1,2) (0,1,2) {25,14,194,175} +[.#.#..##] (1,3,7) (0,6) (1,2,5) (6) (0,1,2,4,5,6) (2,3,4,7) (0,2,7) (3,6) {18,26,14,31,9,8,28,24} +[.###...#] (0,1) (1) (3,4) (0,1,3,5) (0,1,2,3,7) (0,2,3,4,5) (0,1,2,3,4,5,6) (1,7) {31,34,9,14,9,12,0,4} +[##.#.##.##] (0,1,2,3,6,8) (0,2,3,4,5,6,8,9) (2,5,7,8,9) (0,1,2,3,4,5,7) (8) (2,6) (0,2,3,4,5,8) (1,4,5) (1,3,4,5,7,8,9) (4,5,7) (0,3,4,5,8) (0,1,2,4,5,6,7,8) {61,39,48,74,98,100,18,54,71,32} +[.###.#.] (4,6) (1,5) (2,3,6) (3,4) (0,5) (0,1,2,4) (1,2,6) (1,2,3,6) {34,49,56,171,181,28,52} +[.#...##.] (0,2,6,7) (1,2,3,6) (1,2,5) (4) (0,2,4,6) (1,3,5,6,7) (2,5,7) (0,1,2,3,4,6,7) {21,51,76,32,21,41,47,32} +[#.#...#.] (1,3,5,6) (2,5,6) (0,2,4,6,7) (2,6,7) (1,2,4,6,7) (0,2,6) {14,178,42,177,3,194,219,13} +[..#.##] (0,2) (0,1,2,3) (2,4) (1,2,3) (1,2,5) (1,3,5) (4,5) (3,5) {22,57,58,60,19,70} +[#....] (0,2,3) (0,4) (1,4) (0,2,4) (1) {29,22,15,4,34} +[#.#..##.] (0,1,2,3) (1,2,3,4,5,6) (1,5,7) (2,3,6,7) (1,4,7) (0,1,2,5,6,7) {18,36,44,41,15,21,29,17} +[......#] (0,2,4) (3,5) (1,3,6) (2,3,4,5) (0,1,4,5,6) (0,1,2,3,5) (1,6) {18,30,171,176,158,175,15} +[.##.#.#.] (0,6,7) (0,5,6) (1,3,4,5,7) (1,4,6) (5,6,7) (3,6) (2,5,7) {170,18,14,10,18,26,207,190} +[.#.#.] (0,1,2,4) (0,2,3,4) (2,4) {20,17,22,3,22} +[.###.#..##] (1,6) (0,9) (0,4,5,7,8,9) (4,6,9) (1,2,3,4,5,7,9) (3,6,7,9) (0,3,5,7,9) (0,1,2,4,5,6,8,9) (0,2,4,5,6,7) (0,3,4,5) (4,7) (1,6,8) (0) {71,26,22,19,63,41,53,53,26,61} +[.#.##.] (1,2,4,5) (1,4,5) (0,2,4,5) (1,3,4) {15,139,35,118,154,36} +[...###.] (1,2,4,5) (1,4,5,6) (0,5,6) (0,4,5) (3,4,5) (1,2,5,6) (3,4,5,6) (0,2,5,6) (0,1,3,4,5) {46,123,127,34,152,179,36} +[##..#.#...] (2,4,5,6,7,8,9) (0,2,3,5,6,7,9) (0,1,3,4,5,6,7,9) (1,2,3,4,5,6,7,8,9) (0,1,6,7) (0,1,3,4,5,6,7) (0,1,2,3,4,5,6,7) (1,2,4,6,9) (0,1,2,4,5,7,8) (0,2,3,4,5,6,8,9) (2,8) (0,1,2,3,5,7,8,9) {64,67,73,68,77,93,96,99,51,81} +[...###..#.] (1,2,4,5,8) (3,4,6,7) (0,1,2,3,6,7) (2,8) (2,6,9) (0,1,2,6,7) (2,4,5,6,8,9) (1,2,5,6,7,9) (1,2,7,8) (0,2,3,5,6,7,8,9) (0,2,3,7) (3,7) {39,30,72,54,35,30,55,66,28,25} +[..##....#] (1,2,5) (1,2,6,8) (2,4) (0,2,3,5,6,7,8) (1,2,6,7,8) (4,7) (0,1,3,4,5,6,7) (2,3,8) (0,4,8) {22,46,95,37,27,36,47,40,67} +[....#...#.] (0,1,2,3,4,7,8,9) (1,2,5,7,8,9) (2,4,5,7,9) (0,1,2,3,5,6,7,8) (0,1,4,6,7,8) (0,2,3,4,6,8,9) (0,1,5,6,7,8) (5,6) (0,1,2,3,5,6,8,9) {69,71,61,45,38,50,58,61,85,54} +[.#.#] (2,3) (1,2) (0,1) (0,3) {31,14,6,23} +[####.] (1,3) (0,1,4) (2,4) (0,4) {197,207,4,13,201} +[##.###] (0,1,3,4,5) (1,4,5) (0,1,2) (1,3,4,5) {33,53,13,27,40,40} +[#####.####] (3,4,6,7,8,9) (1,4,6) (0,3,4,5,6,7,9) (1,6,9) (0,1,2,6,7) (1,2,7,9) (0,1,5,6,8,9) (0,2,4,5,6,7,8) (1,2,6) (0,2,4,5) (0,3,4,9) (2,4,5,8) {77,74,65,34,72,62,103,59,45,69} +[#.##.] (1,2) (0,2,3,4) (1,2,4) (2,3) (1,3,4) {1,39,31,28,37} +[##.#] (1,2) (1,3) (2) (0,2,3) (3) (0,3) {10,19,11,39} +[##.#] (1,2,3) (0,1,3) (0,1,2) (0) (1,2) (2) {33,40,36,23} +[#...####.#] (1,2,3,6) (1,2,6,7,8) (2,5) (0,2,3,4,5,6,7,8,9) (0,7,8) (0,1,2,3,4,5,7,9) (4) (1,2,3,4,5,6,9) (1,4,5,6,8,9) (2,3,4,5,6,7,8,9) (0,3,4,5,6,7,8) {63,72,78,73,89,91,89,85,85,62} +[#####.#.] (2,7) (0,6) (3,5,7) (0,1,4,7) (0,1,2,4,5,7) (0,1,2,3,4,6) (1,3,4,5,6) (6,7) (0,1,2,3,4,5) {58,53,40,44,53,48,54,33} +[##..#.] (1,2,3,4) (4) (2,3,4) (0,3,4,5) (0,2,3,4) (2,4) (0,2,4,5) (0,2,3) {55,3,83,63,91,22} +[.####.] (0,3,5) (0,1,2,4,5) (2,3) (1,2,3,4) (0,3,4) (0,2,5) {54,8,39,65,28,34} +[###.#...] (2,3,5,6) (0,1,3,4,5,7) (0,2,5,7) (0,1,3,7) (4) (0,4,5,7) (0,1,2,3,5,6) (4,5,6) (0,3,4,5,6,7) (0,1,3,4,6) {74,34,27,57,60,85,61,53} +[..##.###..] (0,2,5,6,7,8,9) (1,2,3,4,5,6,7,9) (1,2,3,4,6,7,8,9) (0,1,4,5,6,8) (1,3,4,5) (1,4,5) (1,2,4,7) (0,3,5,7,8) (0,2,5,8) (0,3,9) {52,77,66,62,77,63,54,65,60,50} +[###.##] (1,5) (0,1,2,5) (0,3,4,5) (0,1,3) (2,3,4,5) {172,166,34,166,30,60} +[.#.##] (4) (0,3) (1,2,4) (3) (2,4) (1,2,3,4) {14,23,142,50,145} +[.#.#..#] (2,5) (3,4) (1,2,3,5,6) (0,2,3,4,5) (0,4,5,6) {22,9,22,28,39,42,29} +[#.#.] (1,2) (0,1) (2,3) (0,1,3) (0,2) {135,33,140,1} +[#..#.] (0,3) (0,1,3,4) (0,2,4) {40,18,13,27,31} +[#..###.] (0,1,3,4,6) (3,6) (1,2,3,6) (0,4,5,6) (4,5) {15,25,19,36,15,9,45} +[###.##] (0,1,3) (0,1,2,4,5) (1,2,3,4) (0,1) (0,2,4) {12,10,15,3,15,7} +[..#.#] (3) (0,1,2,4) (2,4) (1,3,4) (0,1,3) (2,3) {16,21,44,215,36} +[#..###] (3,4,5) (0,1,5) (0,2,3,4) (0,3,4) (2,3,4,5) (1,2) (0,4) (0,1) {63,33,44,53,63,24} +[..#.##] (4,5) (2,4) (0,4) (2,4,5) (1,2,3,4) (3,4) {1,3,19,17,45,13} +[####..##..] (2,3,5,6,9) (4,8) (0,1,4) (0,3,4,8,9) (8,9) (1,4,9) (1,2,3,5,6,7,8,9) (2,3) (2,3,6,7) (1,2,3,4,5,6,7,8,9) (0,6) (0,3,4,5,7,8,9) (3,4,6) {24,37,44,60,50,32,57,50,44,51} +[.#.###] (3,4) (0,1,3,4) (0,1,2,5) (0,1,3,4,5) (3,5) (0,4) {20,13,7,23,21,19} +[......#.] (0,1,2,3,4,6) (6) (1,3,5,6) (0,1,5) (0,1,2,3,5,7) (1,2,4,6) (1,2,7) {10,225,206,17,22,19,45,184} +[.##.#] (0,1,2,3) (2,4) (1,2,4) {9,199,214,9,205} +[###.] (1,2) (0) (0,2,3) (1,3) (3) (0,1) {167,28,22,28} +[#....#.#] (3,4) (0,1,2,4,5,6,7) (1,2,5,6,7) (0,5,7) (3) (3,5) (2,4) {16,202,213,52,36,229,202,210} +[#...] (1,2,3) (2) (0,2) (0,1,3) (0) {34,22,38,22} +[.###] (1,2,3) (0,2,3) {0,123,123,123} +[#...#.] (1,4,5) (1,2,5) (2,3,4) (1,2,3) (0,4,5) {7,16,17,16,10,9} +[##.######] (0,5) (0,1,2,3,4,5,8) (1,6) (0,1,3,4,5,6,8) (4,6,7) (1,4,5,7) (3,4,5,6,8) (2,5,8) (3,5) {27,35,9,37,35,76,34,15,29} +[.#####.##] (2,8) (1,3,4,6,7,8) (1,5,7) (3,4,5,6,7) (0,2,3,4,5,6,7) (1,3,4,5,8) (1,3,4) {10,47,11,39,39,33,26,44,22} +[#####] (3) (1) (4) (1,4) (1,3,4) (2,3) (0,1,3) {12,33,12,36,13} +[..##.] (0,1,4) (2,3) (0,2,4) (1,3) {17,26,11,20,17} +[#..###...] (2,6,7,8) (0,2,3,4,6,8) (6,8) (0,3,4,5) (0,3,4,6,7,8) (0,1,2,3,4,5,8) (0,1,2,3,5,6,7,8) (1,6) (1,2) {37,41,57,37,21,26,49,24,53} +[#..##...#.] (0,3,4,8) (1,2,3,4,6,7,8) (0,1,3,5,6,7,9) (0,1,4,7,9) (7,8,9) (3,4,5,7,8,9) (1,2,3,4,7) (1,2,3,4,5,6,9) {25,214,202,225,223,16,195,221,208,31} +[.##.#] (1,4) (0,3,4) (2) {19,12,132,19,31} +[#...#.#] (0,3,4,5) (1,3,6) (2,5) (2,6) (0,1,2,3,4,5) (0,3,6) (1,4) {34,34,32,35,43,28,24} +[###..#.###] (0,1,2,4,8,9) (0,2,8,9) (2,9) (1,3,4,5,7,8,9) (0,5,6,7) (3,4,6,9) (0,1,2,3,4,6,8,9) (8) (1,2,4,5,6,7,8,9) (0,4,6,8,9) (0,1,3,4,7,8,9) (0,2,3,4,5,7,8,9) (0,1,2,5,7,8,9) {92,70,78,56,93,45,51,56,115,136} +[..#..#.#.] (0,2,3,7) (7) (0,1,2,5,6) (3,4,5) (0,1,3,5,6,7) (1,6) (3,5,6,8) (1,6,8) (3,5,6,7,8) (2,3,4,7) {33,38,34,79,27,61,65,54,28} +[..#.#...] (0,2,5,6,7) (2,4) (0,1,3) (1,2,3,4,6,7) (0,2,4,5,6,7) (2,5) (1,3,4,7) {42,40,72,40,54,48,53,66} +[...#..#..] (3,6) (5,8) (2,4,6) (1,2,4,5,6,7,8) (0,2,6,7,8) (2,7) (1,3,4,5,6,8) (1,5) (0,5) (1,4,5,6,7,8) {37,53,60,30,53,83,86,52,68} +[...##.#] (0,2,4,5,6) (2,5) (1,3) (0,1,4,5) (0,2) (1,6) (1,4,5,6) {27,34,31,3,35,47,31} +[######.#.] (0,3,4,5,6,7,8) (0,1,3,5,7) (1,6,7) (1,6) (0,1,2,4,5,7,8) (1,2,3,4,5,7) (1,2,4,6,8) (1,3,4,6) {39,192,137,145,165,144,68,157,42} +[#####.] (1,2,3,4,5) (4) (0,2) (0,1,5) (1,2) (2,4) (0,1,2,3) {29,34,34,10,14,25} +[#..#] (0) (1) (1,3) (1,2,3) (2,3) (3) {5,49,24,58} +[.###.....] (0,1,5) (0,2,3,4,6,8) (2,4,6) (1,2) (0,3,4,7) (5) (0,3,8) (2,3,5,6) (0,1,2,5,6) {33,17,15,20,12,38,14,8,9} +[#...###.] (0,2,6,7) (0,1,3,6) (1,3,4,5) (0,5,7) (3,4,5,7) (0,1,3,4,5,6,7) (0,1,2,3,4,6) {70,51,32,65,55,50,55,54} +[..###.#.] (0,5) (2,7) (0,1,3,6,7) (1,4) (0,1,6) (0) (0,1,2) (0,1,2,5,6,7) (1,2,3,7) (5) {54,248,31,23,192,25,33,31} +[#.##] (0,2,3) (1,2) (0,1,3) (2) {154,152,33,154} +[###.] (1,3) (2) (2,3) (0,2,3) (0,1,3) (1,2) {23,54,44,51} +[#..##.#.] (1,4,5,6,7) (0,1,2) (3,4,5) (7) (0,2,5) (1,4) (1,2,3,4,6) (0,4) (0,1,2,4,5) {21,58,40,27,61,36,34,31} +[#.#..###.#] (0,1,2,3,5,6) (0,1,5,6,7,8,9) (0,2,3,6,7,9) (2,4,5,6,7,8,9) (0,1,3,4,5,6,7,8,9) (6,7) (0,8) (0,7) (0,3,9) (0,2,4,5,7,8) (2,4,7) (5,9) {80,22,34,39,50,48,37,66,61,59} +[#.#...] (0,1,5) (0,1) (1,2,3,4) (0,3) (0,1,2,5) (0,2) (0,3,4) {61,39,49,46,34,17} +[##.##.#..] (0,1,3,5,7) (1,2,3,4,5,6,8) (1,2,4,5,8) (0,2,7,8) (4,8) (1,2,3) (0,2,3,4,6,8) {47,63,80,69,45,43,34,33,63} +[..###.##] (0,1,2,3,4,5) (5,6) (0,2,3,4,5,7) (0,1,6) (0,1,3,4,5,6,7) (0,1,2,3,4,7) {58,52,24,40,40,32,36,32} +[.#.###] (0,2,3,4,5) (2,3,4) (1,3,4,5) (0,1) (0,1,4) (2,3) {126,131,34,52,162,31} +[...#...#.] (0,2,4,7,8) (0,1,2,3,4,8) (1,4,5,6) (0,2,3,4) (1,2,5,6) (0,3,5,7,8) (0,1,2,3,4,6,8) (0,3,4,6,7) (0,1,2,3,4,5,6,7) (3,4,5,6,8) (1,3) {90,84,60,121,101,74,94,55,58} +[#..###..#] (4,8) (0,2,3,4,5,7,8) (1,5) (0,2,3,4,6,7) (1,2,3,4,7) (0,2,3,4,6,7,8) (1,4) (1,2,3,4,5,6,7,8) (5,6) (0,1,2,5,6,7) {51,71,87,80,119,212,211,87,67} +[##.#.#] (0,2,4,5) (1,5) (2,3,5) (0,3) (0,1,3,5) {25,22,10,31,2,32} +[...#######] (2,5,7) (5) (0,2,3,5,6,7,8,9) (1,2,3,6,7) (1,2,4,7,8) (0,1,2,4,5,6,7,9) (3,5,6,8,9) (2,9) (0,4,5) (0,6,7,9) (1,2,3,5) {37,28,54,39,17,80,47,53,26,47} +[#.#..###.] (0,1,8) (2,3,6,8) (1,2,3,5,7) (0,1,2,3,4,5,7) (1,3,4,7) (2,3,4,5) (1,3,4,6) (0,1,2,4,5,7,8) {20,50,40,52,38,38,9,40,8} +[#.###] (0,1,2,4) (1,2,4) (0,2,3) (0,2,3,4) (0,1,3,4) {26,19,29,22,23} +[#..#.] (0,2,4) (0,2) (1,2,3) (0,2,3,4) (2,4) (0) {38,15,49,33,27} +[.##.###..#] (1,2,5,6,7,8) (3,7,8,9) (0,2,4,5) (0,1,6) (1,7) (1,2,3,5,6,7,8,9) (0,2,4,6,8,9) (3,9) (1,2,4,5,6,7,8,9) (0,4,9) {54,59,71,22,57,58,71,45,57,62} +[#...#] (0,4) (0,2) (0,1,2) (1,3) {40,25,31,6,9} +[##.##..] (2,4,6) (0,2,4,6) (0,4,5) (0,1,3,4,5) (1,3,4,6) (0,3,5,6) (0,3,5) {54,7,11,34,34,49,21} +[...#.] (0,1,4) (1,2,3) (1,2) (0,1) {145,172,27,8,143} +[#.......#.] (0,2,9) (4) (1,2,5,6,8) (1,2,7) (0,2,4,6) (0,5,6,7,8,9) (0,3,5,8,9) (3,6,7,8,9) (0,1,2,5,9) {238,49,63,23,20,238,207,206,223,239} +[..##.] (2,3) (1,2,3,4) (0,1,2,3,4) (0,1,2,4) {27,29,45,38,29} +[##.#.] (1,2) (1,2,4) (0,2,3) {4,15,19,4,7} +[..#.] (2,3) (1) (0) (0,3) {154,8,20,20} +[.#..###] (1,3,5,6) (2,5) (0,1,2,3,4,5) (0,1,2,4,5,6) (3,4) {193,195,211,184,201,213,21} +[#.#.] (0,2) (1) (0,2,3) {20,6,20,15} +[.###] (1,2,3) (0,2,3) {5,0,5,5} +[##..] (0,1,2) (1,3) (0,1) (1,2,3) (2,3) (0) {12,20,10,27} +[...#] (0,2,3) (0,1,3) (0,1) {46,29,17,36} +[...###] (1,2,4) (0,1) (0,1,2,4) (0,3,4,5) (0,1,2,5) (1,3,4,5) (2,3,4,5) {24,22,28,26,33,29} +[...##.#.#] (2,3,4,6,7,8) (1) (1,2,3,5,6,7,8) (0,1,2,5,6,7,8) (2,6,8) (0,3,4,5,6,8) (1,2,3,5,7) (4,5,6,8) (0,1,5,6,8) (1,4,5,6,8) (1,3,4,6,7,8) {35,48,52,49,48,60,89,36,89} +[#.####.##.] (1,9) (3,4,8) (0,2,3,4,5,7,8) (0,3,4,5,7,8,9) (2,6,8,9) (0,1,2,3,4,5,6,7) (0,4,6,7) (1,2,3,4,6,8) (0,5,6,9) (0,6,7,9) (3,4,5,8,9) {32,35,28,32,34,19,48,31,22,35} +[####...] (0,2,3,5) (0,1,3,4,6) (0,1,3,4,5,6) (4,5,6) (2,3) (0,1,2,3) {199,27,201,210,15,183,15} +[..##..] (0,2,3,4) (0,1,2) (0,1,3) (1,3) (1,2,3) (2,3,5) {136,35,140,152,118,2} +[#..###.] (2,3) (0,5,6) (1,4,5,6) (0,1,2,6) (1,2,5,6) {32,38,49,16,5,40,55} +[#...###..] (0,1,5,6,7,8) (1,3,5) (0,2,3,4,5,6) (0,2,3,4,5,7,8) (2,4,7) (2,4,5,7,8) (1,3,4) (0,1,2,4,5,6,7) (3,6,7,8) {44,54,43,75,57,76,49,61,54} +[##..#] (0,1,4) (2,3,4) (0,1,2,3) (0,1,3,4) {9,9,4,4,11} +[###.#] (0,2,3) (0,1,2,4) (2,3,4) {129,109,134,25,114} +[#..#.##] (0,1,2,3) (1,3,4,6) (1,3,5,6) (0,5,6) (0,2,3,5,6) (4,5) {29,16,11,20,20,45,31} +[#.#.#] (2) (0) (0,2,3) (0,1,3) (1,2) (0,3) (0,1,4) {45,33,35,34,10} +[.#..##..] (0,1,3) (3) (5,6,7) (0,4,5,7) (2) (0,4,6,7) (0,1,2,3,5,6,7) {46,10,8,17,36,44,42,61} +[.#..####.] (1,4,7,8) (2,5,7) (0,1,2,3,4,5,6,7) (0,1,2,5,6,7,8) (2,5,6) (0,2,3,4,5,6,8) (0,3,4,6) (1,6) (0,1,2,3,5,6,8) (0,3,4,5) {230,206,215,83,74,235,248,178,176} +[.###] (0,1,3) (0,1) (0,2) {152,29,123,16} +[#..#.] (0,1,4) (2,3) (0,3) {7,7,20,20,7} +[##.#.#...#] (0,2,4,5,6,7,8,9) (3,4) (0,1,2,4,6,8) (2,4,6,8) (0,2,3,4,5,6,7,8) (4,5) (2,3,6,7,8,9) (3,7,9) (0,1,3,4,5,7,9) (0,1,2,5,6,8,9) (0,5) (2,6) {53,19,47,37,50,50,47,49,44,49} +[.#..##.##] (3,5,7,8) (1,3,4,5,7) (2,5,7,8) (1,2,3) (3,4,6,8) (0,2,3,4,6,8) (4,8) (1,6,8) {14,17,41,45,22,37,28,37,68} +[#...##] (1,3) (1,2) (0,3) (0,1,2,5) (0,3,4,5) (0,1,3,4,5) {22,37,20,27,10,15} +[#.##.##..#] (0,1,2,5,6,7) (1,2,4,5,8,9) (2,7) (2,4,9) (1,2,3,4,5,6,7,9) (0,1,2,4,5,7,8,9) (5,8,9) (0,1,4,7) (0,1,3,4,5,8,9) (0,2,3,6,7,8) {58,58,75,30,69,55,17,68,62,66} +[.#....] (0,2,3,4) (0,2,3,5) (1,2,5) (0,1,2,4) (4,5) (2,5) (1,4) (2,3,5) {47,35,86,36,50,75} +[#.#.#..] (0,4) (0,2,3,4) (1,5) (0,2,4,5,6) (0,1,3,5,6) (3,4,5,6) (2,3,6) (0,1) {216,21,211,46,229,222,222} +[.#..#] (0,3) (2) (0) (0,2,4) (1,4) (3,4) {26,6,30,19,32} +[#..##] (0,3) (2,3) (0) (0,3,4) (0,4) (1,2) {32,17,37,28,12} +[#......##.] (4,7,8) (2,5,8,9) (1,3,5,6,9) (0,1,3) (0,1,3,5,6,7,8,9) (0,3,7,8,9) (1,3,4,5,6,7,8) (0,1,2,5,8) {50,62,25,57,6,59,34,28,53,49} +[.#...] (0,1) (2,3) (1,2,3) (0,3) (1,4) {21,13,9,21,1} +[.#..##] (0,3,4) (1,3,4,5) (2,3) (1,4,5) {1,19,2,11,20,19} +[.###.#] (1,2) (0,1,2,3) (0) (0,1) (5) (1,2,3,4,5) (0,1,2,4) {31,46,28,20,20,31} +[.##.#....] (2,3,5,6,7) (0,2,3,5,7) (0,1,4,5,8) (1,2,4,5,6,7,8) (4,6,8) (1,2) (0,3,4,6,7,8) (0,2,3,6,8) (1,2,4,6,7) (0,1,2,4,5,6,8) {44,161,169,27,174,37,182,146,63} +[.##.###] (1,2,6) (0,2,3) (0,1,2,3,6) (1,2,3,4,5) (0,1,2,5,6) (0,1,3,5,6) (0,1,4,6) (1,3,4,5) {194,48,197,188,8,18,44} +[#..###..#.] (1,3,7,8,9) (0,1,2,3,5,8,9) (0,2,4,8,9) (1,2,6,7,8) (0,1,2,3,5,6) (5,6,7) (2,7,9) (0,1,2,3,5,6,7,8) (2,6,8) (0,2,5,6,7,9) (1,3,4,7,8,9) (0,4,5,7,8,9) (1,2,3,4,7,8) {211,64,249,58,32,206,206,228,85,225} +[#.#.#...#.] (7,8) (0,1,3,5,6,7,8,9) (0,1,2,3,4,5) (0,1,3,5,7,9) (2,3,6,7,9) (3,6,8) (1,2,4,5,7,8,9) (2,6,8,9) (1,4,5,6,8,9) (0,1,2,3,4,5,7,8,9) (2,4,6,7) {70,102,91,94,83,102,90,110,115,110} +[#.##] (0,1,2,3) (0,2,3) (0,1) {41,21,38,38} +[###.] (1,3) (0,1,2) {11,27,11,16} +[##....] (1,2,4,5) (1,2,5) (0,1,2,3,5) (0,1,3,4) (1,4) (0,2) (0,3,5) (0,2,3,4,5) {190,63,182,47,41,54} +[####.#....] (0,3,5,7,9) (0,1,2,3,4,5,6,8) (0,2,4,5,6,7,8,9) (4,5,6,9) (0,2,5,7,8) (0,2,5,6,7,8,9) (3,4) (1,2,5,7,8) (1,2,7,9) (1,2,5,6,7) (3,8,9) {50,163,190,40,46,190,62,173,163,44} +[##..] (1,2) (0,1) (1,3) (0,3) (1) (0) {127,137,6,9} +[.###..] (0,1,4,5) (3,4) (0,1,2,5) (1,2,3) (2,5) (0,1,2,3,4) {52,59,60,40,48,50} +[#....#.#] (0,2,3,5,6) (1,5,7) (1,2,4,5,7) (0,5,7) (0,2,6,7) (0,2,3,4,5) {20,27,30,14,18,43,12,33} +[.#.#..] (1,3,4) (2,5) (0,1,2,3) (1,2,3,5) (2,3,4,5) (1,3) (0,1,3,4) {26,65,52,83,57,46} +[####.#.#] (1,4) (1,2,4,5,6,7) (2,3,5,6,7) (0,3,4,5) (0,5,6,7) (0,1,4,5,6,7) (1,3,6) (1,2) (0,2,5) (2) {48,64,63,27,63,73,51,50} +[#..##..] (0,1,2,3,4,6) (1,2) (0,1,2,5,6) (2,3) (1,2,6) {21,46,62,34,18,3,36} +[..##....##] (0) (3,4,5,6,7,9) (0,2,3,4,6,7,8,9) (3,4,5,6,9) (0,4,6) (2,3,6,9) (2,5,6,8) (0,2,4,8) (0,1,3,5,7,8,9) (1,2,3,5,8,9) {69,29,71,77,62,71,83,28,71,77} +[##..#...##] (0,2,3,7,8,9) (0,1,2,3,6,7,8,9) (0,1,6,7) (2,3,4,5,6,7,9) (0,1,2,3,4,5,6,7,9) (0,1,2,3,4,5,7,8) (2,5,7) (3,5) (2,4,5,6,8,9) {47,37,64,61,51,60,38,61,38,43} +[##.#....] (0,4,5,6,7) (1,3,4,5) (3,7) (0,1,2,3,6) (1,3,4) (2,7) (0,2,3,4,5,7) (0,2,4,7) {168,16,53,36,152,142,149,181} +[#..#.##] (0,2,3,6) (0,1,2,3,4,5) (0,1,2,3,5) (0,1) (0,1,2,4,5,6) (0,3,4,5,6) (1,5,6) (0,1,2,3,5,6) {232,205,207,220,176,208,45} +[..###..] (1,2,3,4,6) (0,1,4,5) (0,1,2,3,4,6) (0,5,6) (0,1,6) (0,3,4) (2,3) (0,2,4,5,6) {250,38,208,34,214,212,228} +[.#.#.###] (0,2,3,5) (3,5,6) (0,2,4,5,6) (0,2,6,7) (0,1,2,3,4,7) (0,2,4,5) (3,4,5,6,7) (1,6) {51,37,51,167,176,166,185,171} +[.#.##.##.] (2,3,4,5,6,7,8) (1,8) (1,2,4,5,8) (0,1,6,7) (0,1,3,4,5,6,7) (0,1,2,3,4,6,7) (1,2,4,5) {32,74,32,24,51,49,35,35,38} +[##...##] (0,3) (0,1,4,6) (1,5) (0,1,2,5,6) (0,3,5,6) (2,5) (2,5,6) {138,138,37,12,107,50,140} +[###..####] (0,1,3,5,7,8) (0,3,4,7,8) (1,7,8) (2,3,4,5,7,8) (0,1,2,8) (1,4,7) (2,5,7) (0,1,3,4,5,6,7) (1,3,7) (0,1,3,6,7,8) (6) {51,191,42,63,140,42,43,199,55} +[#####....] (0,3,6,8) (0,2,3,4,5,6) (1,4,5,8) (6,8) (0,1,3,5,7,8) (0,1,4,5,6,7,8) (1,3,5,6,7) (0,1,2,3,4,6,8) (2,5) {56,253,31,241,39,250,240,234,56} +[..###..#] (0,5) (0,3,4,7) (3,5,6) (0,1,2,4,5,7) (1,2,7) (2,4) (1,3,6,7) {55,24,38,38,53,51,18,44} +[..#.##.#] (0,2,3,4,5,6) (2,3,4,6) (1,3,5,6) (0,1,4,7) (1,3,5,6,7) (4) (0,1,2,3,4,7) (0,1,2,4,6,7) (0,3,4,6) {46,58,43,76,80,40,62,49} +[##...#] (1,3) (0,3,4,5) (0,1) (1,2,3,4) (0,1,5) {15,22,5,13,8,9} +[.....##] (0,3,4,5,6) (5,6) (2,3,4,6) (0,1,3) (0,4,6) (0,2,4) (0,2,4,5,6) (0,1,4,6) {50,15,23,33,47,23,35} +[....##.##] (0,1,2,3,5,6,7) (0,3,5,6) (1,2,3,4,6,8) (0,2,3,4,8) (0,4,6,7) (0,1,2,4,6,7,8) (0,2,5) (0,1,2,6,8) (3,7) (0,1,2,3,5,6,7,8) (0,1,3,5,6,8) {213,162,173,173,41,165,184,152,57} +[.#..#.#..] (2,5) (0,2,3,4,5,7) (0,3,5,6,7,8) (0,1,7,8) (0,1,4,6) (0,6,8) (0,1,2,3,7) (0,2,4,5,6,7,8) {74,9,44,36,36,52,51,50,47} +[##..#.] (0,2,3,4) (1,2) (0,1,2,3) (1,3,5) (0,2,4) (0,1,5) {131,157,46,36,13,124} +[.#..##.] (0,1,2,4) (5,6) (3,6) (0,1,6) (1,2,5) (1,6) (0,1,3,6) {167,187,169,13,154,23,34} +[..#..#] (1,2,3,5) (0,1,3) (0,1,2,3,5) (4,5) (0,2,5) (1,2,3,4) {8,19,24,19,13,19} +[#....#] (1,2,3,4,5) (2,5) (0,1,2,3,4) (1,3,5) {114,127,139,127,127,25} +[.###.] (0,2,3) (0,1,3) (1,3,4) (0,1,4) (0,1,2,4) (0,3) (0,3,4) {64,44,14,46,51} +[.#.##] (1,2,3) (0,4) (2,3,4) (1,2) {17,31,42,22,28} +[.###.#] (0,2,3,5) (4) (2,4) (1,4,5) (2,3,4) {17,16,41,21,239,33} +[#..##.] (0,1,2) (0,1,3,5) (1,3,4,5) (0,2,4,5) {30,23,20,13,13,23} +[...#..#..#] (1,7) (0,6,7,9) (1,4,7) (2,6) (0,1,6,8,9) (0,3,7) (5,7,8,9) (1,2,3,4,6,7,8) (8,9) {10,40,33,27,26,5,34,53,27,9} +[..#....#] (0,1,4,6,7) (0,1,2,3,4,6) (2,7) (0,1,2,3,4,5) (3,7) (3,4,5,7) (0,1,2,4,5,7) (0,4,6,7) {57,46,46,40,64,23,41,88} +[#.#..##] (1,3,6) (4,5) (1,2) (1,2,4,5) (0,1,4,5,6) (0,1) (3) (1,2,4) (1,5) {21,73,20,28,28,36,19} +[.#.#.] (0,1,2,4) (0,1) (0,1,3) (3) (1,2,4) (0,3) (0,2,4) {54,59,37,29,37} +[###.##..#] (0,1,2,3,5,6,8) (0,1,2) (0,4) (3,4,5,6,7,8) (4,5) (0,4,6,8) (0,1,4,5,6,7,8) (0,1,2,4,5,8) (4,8) {51,38,27,23,67,40,38,31,61} +[.##.##] (0,4,5) (3,4,5) (4,5) (1,2,3,4) (0,1,3,4) (0,1,3,4,5) {173,167,5,179,194,35} +[.#.######.] (0,1,3,4,6,8,9) (0,1,2,3,4,5,7,8,9) (2,3,4,8) (2,6,9) (1,7,9) (4,5,7) (0,3,4,5,6,7,8) (7) {19,20,18,26,26,10,22,23,26,27} +[##.....#.#] (0,1,3,4,5,6,7,8,9) (0,7,8,9) (0,7) (1,2,5) (0,1,2,3,4,6,7,8,9) (5,8) (1,9) (6,7,9) {59,32,19,29,29,24,31,61,56,49} +[....###] (1,2,3,4,5,6) (4,5) (0,2,3,5,6) (0,1,3,4,5) (1,2,3,4,6) (4,5,6) {11,26,15,26,55,46,29} +[#.####] (0,1,2,4,5) (1,4,5) (1,2,3,5) (2,5) {8,34,22,10,24,38}