Mercurial > lbo > hg > aoc22
changeset 63:f2355e1a8e8c
Day 12 Part 1
author | Lewin Bormann <lbo@spheniscida.de> |
---|---|
date | Sat, 23 Dec 2023 14:14:45 +0100 |
parents | 8cc44b7f597e |
children | c9010e9a5257 |
files | 2023/aoc23.opam 2023/day12.ml 2023/dune 2023/dune-project 2023/input/12.txt 2023/input/12_test.txt |
diffstat | 6 files changed, 1117 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/2023/aoc23.opam Sat Dec 23 14:14:34 2023 +0100 +++ b/2023/aoc23.opam Sat Dec 23 14:14:45 2023 +0100 @@ -14,6 +14,7 @@ "base" "core" "stdio" + "ppx_deriving" "odoc" {with-doc} ] build: [
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/2023/day12.ml Sat Dec 23 14:14:45 2023 +0100 @@ -0,0 +1,102 @@ +open Angstrom +open Base +open Core + +(* A spring is either working, broken, or unknown. *) +type spring = Working | Broken | Unknown [@@deriving show, sexp] + +(* A record is a row of springs, and a list of groups of broken springs. *) +type record = { row : spring array; damaged_groups : int list } +[@@deriving show, sexp] + + (* The input to the puzzle is a list of records. *) +type input = record list [@@deriving show, sexp] + +module Parse = struct + let parse_spring = + choice + [ + char '?' *> return Unknown; + char '#' *> return Broken; + char '.' *> return Working; + ] + + let parse_row = many1 parse_spring + + let parse_record = + let open Angstrom.Let_syntax in + let%bind row = parse_row <* char ' ' >>| Array.of_list in + let%bind damaged_groups = + sep_by1 (char ',') (take_while1 Char.is_digit >>| Int.of_string) + in + return { row; damaged_groups } + + let parse_all = sep_by1 (char '\n') parse_record <* choice [ char '\n' >>| fun _ -> (); end_of_input ] + + let parse_input (s:string) : input = + parse_string ~consume:All parse_all s |> Result.ok_or_failwith +end + +(* for each record, find the number of possible ways to group + the damaged springs according to the group specification. + + The desired result is the sum of all records' combinations. *) +module Part1 = struct + (* A group (during traversal) is either a not-yet-started group of n broken springs, + or a group of n broken springs that has already been entered. + In the latter case, it first must be finished before allowing the next working spring. *) + type group = Whole of int | Entered of int [@@deriving show, sexp] + + (* count combinations for a single record: row is the array of springs, ix is the current index, + and groups is the current list of groups. *) + let rec count row ix (groups : group list) = + let len = Array.length row in + match ix with + | l when l = len -> ( match groups with [] | [ Entered 0 ] -> 1 | _ -> 0) + | ix -> ( + match (row.(ix), groups) with + | Broken, (Entered c | Whole c) :: cs when c > 0 -> + count row (ix + 1) (Entered (c - 1) :: cs) + | Broken, Entered 0 :: _ -> 0 + | Broken, _ -> 0 + | Working, Entered 0 :: cs -> count row (ix + 1) cs + | Working, Entered _ :: _ -> 0 (* we're in a non-finished group of broken springs *) + | Working, cs -> count row (ix + 1) cs + | Unknown, [] -> (* assume ? = working *) count row (ix + 1) [] + | Unknown, Entered 0 :: cs -> + (* assume ? = working because previous group is separated by working spring *) + count row (ix + 1) cs + | Unknown, Whole c :: cs -> + assert (c > 0); + (* first assume ? = broken *) + let with_broken = count row (ix + 1) (Entered (c - 1) :: cs) in + (* then assume ? = working; i.e. skip group *) + let with_working = count row (ix + 1) (Whole c :: cs) in + Out_channel.printf "broken: %d working: %d (ix %d)\n" with_broken + with_working ix; + with_broken + with_working + | Unknown, Entered c :: cs -> + assert (c > 0); + (* forced assumption: ? = broken because we are in a group. *) + count row (ix + 1) (Entered (c - 1) :: cs)) + + (* count combinations for a single record *) + let count_combinations { row; damaged_groups } = + Out_channel.printf "\n"; + let groups = List.map ~f:(fun c -> Whole c) damaged_groups in + count row 0 groups + + (* a list of counts of combinations per record. *) + type combinations_counts = int list [@@deriving show] + + (* count combinations for each record *) + let count_all_combinations records : combinations_counts = + List.map ~f:count_combinations records +end + +let () = + let input = In_channel.(input_all stdin) in + let parsed = Parse.parse_input input in + let combos = Part1.count_all_combinations parsed in + let sum = List.fold combos ~init:0 ~f:Int.(+) in + Out_channel.(printf "%s\nsum: %d\n" (Part1.show_combinations_counts combos) sum)
--- a/2023/dune Sat Dec 23 14:14:34 2023 +0100 +++ b/2023/dune Sat Dec 23 14:14:45 2023 +0100 @@ -63,7 +63,6 @@ (name day08) (modules day08) (libraries base core angstrom) - (modes byte exe) (preprocess (pps ppx_let ppx_sexp_conv))) @@ -71,7 +70,6 @@ (name day09) (modules day09) (libraries base core angstrom) - (modes byte exe) (preprocess (pps ppx_let ppx_sexp_conv))) @@ -79,7 +77,6 @@ (name day10) (modules day10) (libraries base core angstrom) - (modes byte exe) (preprocess (pps ppx_let ppx_sexp_conv ppx_compare))) @@ -87,6 +84,12 @@ (name day11) (modules day11) (libraries base core angstrom) - (modes byte exe) (preprocess (pps ppx_let ppx_sexp_conv ppx_compare))) + +(executable + (name day12) + (modules day12) + (libraries base core angstrom) + (preprocess + (pps ppx_let ppx_sexp_conv ppx_compare ppx_deriving.show)))
--- a/2023/dune-project Sat Dec 23 14:14:34 2023 +0100 +++ b/2023/dune-project Sat Dec 23 14:14:45 2023 +0100 @@ -16,7 +16,7 @@ (name aoc23) (synopsis "A short synopsis") (description "A longer description") - (depends ocaml dune angstrom base core stdio) + (depends ocaml dune angstrom base core stdio ppx_deriving) (allow_empty) (tags (topics "to describe" your project)))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/2023/input/12.txt Sat Dec 23 14:14:45 2023 +0100 @@ -0,0 +1,1000 @@ +..???#??.?????? 4,3 +##??#??#?..??? 9,1,1 +.?##?#?????..? 5,1,1,1 +???#?##??? 4,4 +?.??#?????#???? 8,1 +.?#?.???##??##? 3,6 +??????#??? 3,2 +?##??##???.??.?#? 3,4,1,2,2 +#..#?#?.?????#.# 1,1,2,5,1 +#???.###???? 1,2,3,2 +???????#??????##. 1,3,2,1,2 +?..??????? 1,1,2 +.#????#??##?? 3,6 +.???##???. 2,4 +???.##??.#????#?.? 3,2,1,2,1,2 +.???????##??.???? 8,3 +#??????#????.?.. 1,1,5,1 +??????#??#?.?# 2,2,2,1 +.....??#??.?.???? 2,1 +?????.#?#?#??..?? 1,1,4,1 +.#?.?????? 2,2 +???#??.??????? 1,3,4 +?#??????#???..??.?#? 10,1,1 +???????.??. 2,2 +?????##??#?? 1,6 +?????#?##?????#? 1,1,6,1,2 +???#??????.? 5,1,1,1 +??#.?##?.#??#??.?.## 2,2,5,2 +??#?#??#?#.?.??.?.# 7,1,1,1,1,1 +.#??##????#??????#? 12,5 +?##???#?#??????. 4,6 +.?.??????????#????#? 1,1,2,7,2 +.?????????#.???????? 1,3,2,8 +??#?.?.?????? 3,1,2 +.????##????.??????? 7,2,1 +????#??.?????????? 2,4,2,1 +???.????#?#???. 2,1,1,2,1 +.#???.???##?????##?# 4,14 +??.?.?#??## 1,1,6 +#.#??#?????##??##?? 1,1,1,1,9 +.#.##????.#?#??#?. 1,5,1,4 +.???????## 1,2,2 +?.????.??.?. 3,1 +????.#?#?#.?#? 2,1,5,1 +????####??##??????? 2,14 +???????#??? 2,7 +#??.#?#?##??. 2,1,6 +???#?#???????#???? 2,9,3 +##???#???#????..# 3,3,1,1,1 +.?.????.?..??#???# 2,1,1,1,1,2 +?????.?????#??. 2,1,1,2,1 +?????.???? 3,1 +?????###?????..?? 1,8,1,1 +.?.??????#?.? 1,1,4,1 +?#?.??????#??# 2,6,1 +?.??..??#?..??#????? 3,2 +???#??????? 1,4,2 +#?.?#????#?? 1,4,2,1 +?.#?????.??#. 3,1,1 +#?..?#???##??#?????? 2,13 +????????.. 1,1,1 +?###??#????#?.#??# 6,3,1,1 +???.??#????##?#?#?? 2,2,7 +????????????.??# 1,4,1,3 +????##?..#. 2,3,1 +?.?#.?.??.#.#??? 2,1,1,3 +??#??#???.#??##?? 1,1,1,6 +???#?##?##?.??#??#. 2,1,6,5 +????#???#??.??#?. 1,5,1,1,2 +??.?..???????.?? 1,7 +?#???#?.????#? 4,1,1,2 +.?##???.????.? 4,2 +.#????.?????#??? 1,2,6,2 +?.???#???#.?#? 3,1,1,2 +???.????#? 1,3 +#.#??#??.?#.# 1,6,1,1 +.#??.????#?# 2,1,3 +??.?.##??#?#?????#? 2,1,5,2,1,2 +.?????.#??? 2,3 +???.?.??????????? 2,1,3,2 +????????????????? 2,2,6 +##.?#?#????.# 2,6,1 +??.?????????#?? 1,4 +?????????.??????? 5,1,1,1,1 +?#?????##?#????###. 2,2,4,5 +???.???????????? 1,1,1,4,4 +????..?.?????..#??.. 1,2,1 +?#?#????.??.????? 4,2,2,1,3 +.#??.?#.?#.#???#?.? 3,2,1,3,2,1 +.????#?#????#.#?.. 10,1 +#.??#??#?? 1,2,2 +?.?.??#??? 1,3 +??????#.??.? 6,1 +???.#.?????#?###? 2,1,9 +???##????# 6,2 +?#.????##?.??.????? 2,7,1,4 +?????.?#??.? 1,1,1,1 +?#???...?? 4,2 +?????.???#?? 2,1,1,3 +?#??.?.?.#?????. 4,1,2,3 +?#..?.?????#.? 1,1,2,2 +?????###????#? 1,6,1 +?.?#???#?#???.???. 1,3,6,1,1 +.????#?##????#?#.?? 1,3,3,5,1 +#???#.???# 2,1,2 +.?#???#???????.#??# 1,1,2,3,1,4 +.??.??.?##???#?##. 1,1,9 +?####.???? 4,4 +?#??##????#.?#? 9,1,1 +?#?..?#.##?#.?.?#? 1,1,2,1,1,2 +????????.#?. 1,4,1 +????#???#??#.?#.? 1,2,1,4,1 +?#?###????##?#??.# 15,1 +?#?#?.#???? 3,4 +..##???##??? 2,5 +???..??##.???#???? 3,2,1,1,1 +#.??????..???????? 1,2,2,2,1 +?????#????? 2,3,1 +.????..##????#? 1,1,7 +?.??????.??? 4,1 +????#?????...??..?. 1,1 +?.?.?##???#????.?#? 10,2 +??#???.??##?#??.??. 3,4,2,2 +?####?###?#??#.????? 11,1,1,1 +??..?????? 1,1,1 +?#???#?#?.??#? 2,4,2 +..????#?.??. 2,2,1 +?.?#??.??#????##?? 2,9 +???..????. 1,1,1 +??.??#.#.??.???#??? 1,1,1,1,1,7 +???????????#??? 2,1,6 +.?#??????? 2,1,1 +?#.??????#???????#? 1,10,1,1 +??#?????.?.???? 5,4 +#?.#???#??.??.## 1,1,2,1,2 +??????#??#??.# 1,2,6,1 +.?#?.?????????#???? 3,4,1,1,1 +..?.???#???.?? 1,1,1,1 +?#?#????#.??.?? 2,6,1 +??#??#??#? 2,5 +..??#??##?#?.? 3,4 +.???###?.#??#????. 4,6 +.??.#.?.#??? 1,1,1,1 +?#??##?##???#???.?## 2,12,3 +.#?????.???..?? 1,1,1,1,2 +?#?##???#?????#? 4,3,1,3 +?????.?####??.? 3,5,1 +????.??#?#?# 3,1,5 +???.##??#??# 1,8 +??.?#?##????#?.?# 1,1,4,2,1 +.?#????..?#? 4,2 +.#.????????? 1,2,2 +??#????.??#.??????? 4,3,7 +????#?#??.????#?? 5,5 +?#.???#???#..?##?# 2,6,1,5 +.?#?????????.??##??? 1,4,3,6 +.???#??#??# 1,5,1 +????.????###???#?#? 1,1,1,5,2,1 +???????#?#??##?. 1,1,10 +????#?..?????.? 4,1 +???.???#?#????#?.#?# 1,1,8,1,1,1 +??###???#.?. 3,1,1 +????#??.?#??##?#?# 1,1,1,10 +###??#???.?#???### 4,1,1,8 +#?.?????#??#?#?#? 1,13 +#.???.?.??#??#? 1,2,1,1,5 +?????#.???#??#?#... 5,3,4 +?#?#??#???.???#???? 4,3,1 +#???#??##??###?.?.# 5,8,1 +??????.????#???#?#.? 3,5,1,1,1 +??##?.?#?#. 4,1,1 +#??#.?????###? 4,1,5 +#?#???.?#??# 3,1,3,1 +?#?#?.?#????? 1,2,1,3 +.?????.##???#?.???? 4,7,1 +#?.?#?????????##?# 1,4,1,5,1 +?????#??#???.??# 5,3,1,1,1 +#?????????#??????.?# 1,1,1,7,1,1 +.???##???.???#??. 7,3 +#???#?????.??? 1,3,2,2 +????.??????? 1,2,2,2 +?.??????.??. 1,3,1 +???#?#????.??#? 6,3 +??????##?#?#?#????#? 1,1,1,6,6 +?#??#???#???##??. 1,2,8 +?????#??#? 1,1,4 +.???.#??#? 1,2,2 +???????????? 2,2,1 +?#???.???????? 3,1,6 +??.#..#?.?#?? 1,1,2,2 +?.????#?#? 1,6 +??.#?????#??###??? 1,1,1,9,1 +?#??#??.???????#. 7,3 +??#??.??.?. 5,1 +?????##??????#? 2,3,1,3 +?#????#?.?.#..? 7,1,1 +.#????.?.?????? 4,1 +#???#?????????.??# 9,1,1,1,1 +.???###?.????#??#??? 4,7 +?????.??????#.???? 1,6,1 +.??????#??????.???# 1,2,3,1,1,1 +?#?????.????.?????? 1,2,1,1,3,1 +???..????? 3,1,1 +.?#??.?..??##? 3,4 +???...#?#???.? 2,5 +??.???##?#.? 1,6 +??#.?????##?#?#?#? 1,1,1,1,6,2 +??#???..?#. 2,1 +#.??????#?.?# 1,1,6,1 +.?#?##?????#???? 8,5 +?.?.????#??? 1,1,5 +???###???????????# 8,3,1,1 +?#?.????????.#.? 3,1,1,1,1 +??..????????. 1,1 +.???#?..#?#??. 5,3 +.?.?.????. 1,1,1 +????????#...# 1,4,1 +?#????#.?##??. 1,1,1,5 +.?.??.??.?#?..? 1,1,1,3,1 +?#?#?.??.?????? 4,1,1,1 +??##???????? 5,2 +???#??#???.???.#? 6,2 +##?##?#??.#? 2,4,1,1 +.????.??#?????.??. 3,6,1 +?????#?.??##? 3,1,5 +.#????#?#???#?# 1,2,3,5 +??.????.?.???? 2,2,1,1 +.????.?.?? 3,2 +.?.?#????.????# 3,2,1,1 +??###.?.?? 4,1,2 +.???.?????.??? 1,4,2 +???.??#??????? 1,4,1,1 +?#.#..?##?????? 1,1,7,1 +?#???##??????? 1,8 +?..??#.????? 1,3,5 +??#??#..#???? 4,3 +#?#??.?#???.#. 5,3,1,1 +#???#?.#????.????. 1,1,2,1,3,1 +.?????????. 3,4 +???#??????????.#??? 1,9,1,2,1 +?.#?...?.?????.??#? 1,2,1,3,1,1 +.???#?.????#?? 3,5 +????.??.??.# 1,1,1,1 +???????#?#????#???. 10,3,1 +#????#??##???#?.?? 1,1,1,4,1,1 +???????????.#????? 7,2,1,1 +?###?#.?.???##?? 5,5 +?##?#????#?? 7,2 +??#??????#??#?#?# 7,2,1,1,1 +??????#?.????? 3,1,2 +?#????.?##??..#?# 5,5,1,1 +#?###?????????.##.? 9,1,1,2 +????????#?#?.?? 5,4,2 +??????##?.#. 2,1,4,1 +..?#.?#????.#? 2,6,1 +?##?#???#??#??#??#?? 8,5,2 +?#.?#??????.????? 2,6,1,1,1 +?.??????#???.#. 7,2,1 +??#?##?#..???? 6,1 +????#??..#? 5,1,1 +##??.?.??.?? 4,1,1,1 +?#?.??????#?# 1,9 +.????##????..#??? 8,1,1,1 +??????????#??#?#??? 4,9 +.###?#.?????# 5,1,4 +#.?????..?? 1,2 +?.???#?????? 1,1,5 +?##??##????? 2,2,1 +.??????#?#?#??? 1,8,1 +??#..?#???##?.#?# 3,3,3,3 +?#?#????.##?????#.? 3,1,5,1,1 +.???#?.?.??#?.#???? 2,3,3 +??????????.? 1,1,1,1 +##?#?###?????????.# 10,1,2,1 +.#.??##?#????#?. 1,7,2 +.?????????????#?.? 1,2,6 +????.#.???????? 2,1,2,3 +???.?????.?. 2,1,1,1 +?#??????#?.???.?? 1,7,1,1 +????????????? 1,4,1 +..?##?.?.????? 4,4 +????.#???? 1,1,1 +??#????#??.??.???? 1,6,1,2,1,1 +??#???#??.??? 1,1,2,3 +?.?????#??#???#?? 1,9 +#?.##?#??#??.?.??#.? 1,2,6,1,1,1 +...???????#?#?.??? 1,4 +?????#????.?#?.?? 6,2 +???????????? 1,6,1 +??..?.????##. 1,5 +#???##???#??.?. 6,2,1,1 +..??#.?#??#???????? 3,3,1,1,1,2 +?????????? 1,1,1 +???..??#?..? 2,4,1 +?.??#???#?##?##?#. 1,14 +#??????.?. 1,3 +###?.?.???.???.# 3,1,3,1,1 +??#???????#.?? 6,2 +.??????#??#???? 5,6 +???#.????.# 2,2,1 +?#?##...??####??.??# 4,6,3 +..?#?#?..#.???? 5,1 +???#?#??????? 1,4,3 +?????#???#??#???#? 1,1,3,1,3,2 +..??#?.????#???? 3,5 +###..#.???#??#???# 3,1,1,6,1 +##?????####.???? 3,7,3 +?#???##.????#?#???? 2,4,2,2,1,2 +.?.#?..#??.#? 1,1,3,1 +??.?##?#?????.??.??# 1,7,1,1,2 +?#??.#????#???#?.? 3,3,7 +????.?.??? 2,1,1 +.???.??.#??# 3,4 +?.???#????????# 5,1,1 +.??..?????. 1,2 +???.#.?.#?.?.??#?.. 1,2,2 +????###???.?#???. 6,2 +???##?#.??? 6,1 +???????.?#??.??#?? 1,4,4,4 +????..?##?##.??? 6,1 +#???????#?#? 1,1,6 +??#????#????? 7,2 +.?#??#???? 5,1 +.??????#?? 1,1,2 +.??#..?#?. 3,2 +?#??#?#??????## 2,4,5 +..???#???????? 2,2,1,1 +.#??##???#??#??? 1,9,1 +.???.?#??????. 1,1,3 +??#?????????????##?? 2,5,3,4 +??#???#????????.???# 1,6,1,4,1,1 +?????#?#?.???. 6,2 +.?????#?##??.????#? 10,6 +.???#??#??#?.#?. 10,1 +?#?.?##????? 1,4,2 +???..??#??#?.. 3,3,2 +?#????.???????#. 6,1,1,1,1 +?..?#####.??#? 6,3 +.#.?#???#???????.??? 1,9,1,2 +??#.?.????.? 3,1,1,1 +??.?#??????????#?? 4,5 +??.#??.????? 1,1,2,1 +?.#??##?###.???. 1,1,7,1,1 +#?#..#?..##?. 1,1,2,2 +???????.??#??.?.? 2,1,3,1,1 +.??#???#.??#??? 3,2,5 +??????.#.???#????? 2,1,8 +.????##?#?.##????? 8,4,1 +.???#?.#?#.?? 4,1,1,1 +???????#??.???.??#.. 4,2,1,1,1,1 +#?#?#???.??.?#???#?? 1,1,1,1,1,8 +.????..??. 4,1 +???#?#???#?#..? 1,5,1,1 +?.#??#????##?#??.??? 5,2,1,1,1 +??.?.??.??.?????# 1,1,1,5 +..??.???.??.?. 1,2 +.?????????#? 1,1,3 +.?????##???.?..?#??? 9,2 +??#??#??##?.?? 4,3,2 +???.?..????.? 2,1,3,1 +#..???#?#.??#.??? 1,1,3,2,1 +.??###?.??????#??# 5,4,1,1 +???#?#???.???????. 1,2,1,2,3,3 +.??#?##??????..#?#. 3,4,1,1,1,1 +...?#??.?.#??????##? 2,1,10 +????##?.#?#? 1,3,1,1 +???????????? 1,2,5 +.?#??#???.?.??#??#?. 5,1,1,1,3 +?#??##????. 6,2 +.?#?.??#??.????#?? 2,5,7 +??#??????#. 4,3 +.????.?.?????###???? 3,1,12 +##??#?#?#????#??.??? 5,4,2,1,1 +?#.#????.??.?#..??#? 1,5,2,1,4 +?.?#??#?.# 1,4,1 +.?#.???.#. 1,1,1 +#?##.????#?? 1,2,1,3 +.??#?#?.?????? 5,5 +..?????????????.???. 12,1 +??#?????????#?? 3,5,1 +.??????###?#?? 1,9 +#...?##??#? 1,7 +???..????.?. 3,2,1 +?.?#?.???????.#? 2,4,1 +?####?#?.??.??.#?? 6,3 +.??##??.??.#### 5,1,4 +.#?????.#???#? 3,1,4 +?#?##.?.??. 4,1 +???##?##?.?.???.?. 4,2,1,2,1 +?????#?#?.? 2,5,1 +#?#??.#??#?#???.?? 1,1,1,4,1,1 +???????.?? 1,1,1 +????#..??.?# 2,1,1,1 +????????.???# 1,3,1,2 +?#????#???#?#??? 6,3,1 +??###???????????? 3,2,3,2 +???????.???#??? 1,2,1,2,3 +??.?????.???.?? 3,1,3,1 +?###?.??????? 4,1,1 +??#??????? 3,1 +#..??#..??.???#?? 1,3,2,1,3 +?.??.#??#??##?????.# 1,2,1,3,3,1 +#.#?.?#??.?????# 1,1,4,1,3 +..?#??.??#?.?##???. 4,1,5 +#?##???.?#????..?. 6,6,1 +.#????#?#??? 1,2,1 +.#??#.#?????#?#??? 4,10,1 +##??.???.#?#?#? 4,1,1,1,1 +?.???.????#? 1,2,2,2 +??#??.??.? 4,1 +??#?????????.??.??. 4,1,1,1,2,1 +????#?.??? 2,2,2 +.??#.#?#?????????# 2,5,1,3 +##?????????? 2,1,3 +?.?????????#??#??. 2,1,7 +??????.??? 5,1 +???????#?..#?#?? 2,1,2,3 +.??#..?#??.??? 1,1,4 +?##.??#???#????#??? 2,1,1,4,3,1 +??#?????#????? 4,3,1 +#?##?#???#???? 4,1,2,2 +???.????????.? 1,6,1 +?..##?#.??.??? 1,4,1,1 +.?.##??#??#?????? 8,3 +?.?.??#??. 1,1,3 +#.???##?#???#???#??? 1,14 +???#??..???. 1,4,2 +?##???.?.. 5,1 +?#?...??#?. 2,1,2 +?#?.?#??#???????? 2,6,6 +?###..????????.?? 4,2,1,1,1 +?.#.?...#.?.? 1,1 +??##????.????##? 4,1,1,1,3 +?.#??.?##?.?? 2,4 +#####?????#.???? 6,2,2 +??#.?.??#????#???? 3,11 +?#.#?##?#???? 1,7,1 +?????????###?###.? 5,8 +?##?.?.?#???? 3,2,1 +#.####???#??#?..? 1,12 +?.?#?????#?.#. 8,1 +???.??#.??????#? 3,2,4,2 +???##??#....??. 2,5,1 +??#??.?#?.?????? 3,2,4 +????#.??#??#?## 1,1,1,5 +???????.#? 4,1,1 +?#?..???.??? 1,1,1,1 +?#????.??? 1,2 +??#???#??? 5,3 +?#??.????#?? 1,1,4 +????#?#.??#?.. 4,4 +????#???.??.?.? 5,1 +??????.#??????.# 1,3,7,1 +?###????????#?#???.. 9,5 +???#??????.? 6,1,1 +?#??????????###???. 9,5 +??????.#????# 1,1,4,1 +??..#??#.?? 1,4,1 +???????????##?#?.?? 1,2,1,3,5,1 +?#??..?#???.## 1,1,4,2 +?##?#?..## 5,2 +.?#?.???.#. 1,1,1 +.#?.????????..#? 1,1,1,2,1 +?#??.?????##?#?.?.# 2,1,7,1 +???##?.???..?.?? 5,1,1,1,1 +?#?#????.???##????? 7,8 +##??#?#..#???.??? 7,1,2 +??.??.????? 1,4 +??.#.???.?.???. 1,1,1,1,3 +..?#???#?.. 2,3 +#.##????????.?? 1,2,4,1,2 +???#.????? 3,3 +.????#??#?#?##??# 12,1 +.?#####?#?#????#. 12,1 +....#?#?????????# 9,2 +??????##?#?? 1,4,3 +?.??#??????##??#?#?. 4,9 +#????.???? 1,1,1 +#?#???.?.????? 1,1,2,3 +..???????#???####. 1,11 +??????##???. 1,1,7 +????????????#?????? 1,1,14 +.?#???#?????# 2,1,5 +??.???????..?? 1,1,2,1 +???????.?? 2,2 +.?.#?#?.?## 3,2 +#??????.#. 4,2,1 +?#????????#.??. 1,2,1,1,1 +##?.?.#??##??#?? 2,1,9 +?????####??#???? 1,6,1,1 +.#.#????#?#.??? 1,1,5,1,1 +??.?????.? 1,4 +.?.?.??..? 1,1,1 +?.??????.????? 1,1,1,3 +.#????????? 2,5 +??.?.?.#?? 1,1,2 +??.?#.???.???#?#?#? 1,2,1,6,1 +.???#.?.???#? 4,1,2 +.#???????##??##?? 1,1,10 +.????????#????.#?? 10,2 +?#?#?.#??????. 4,1,2,2 +?.##?..?#?#? 3,1,1 +.?..???#..??..?.? 3,1 +?????#?.?? 2,2,1 +????##????.?.???#.. 5,3 +.??.??#.#?? 2,2,1 +??#??#??#?##?? 2,10 +.??#..???#????????? 2,11 +.??????.??##???????? 5,10 +????.????#? 2,2,1 +?#.??.??.?#. 1,1,1,2 +??????#?#????#??? 2,13 +?#.?.#?#??#??# 1,1,9 +?..??..??????#? 1,5 +?#??????#??#?. 1,1,6 +.???#?#???? 1,5,1 +..##?#?#??? 2,6 +???????.???.??? 3,1,2 +#????##???.???? 7,2 +?#???????.?? 9,1 +???????????.#???#??? 5,1,1,1,1,4 +?.?##?##????.??? 1,10,1 +???#??#??????#?. 7,2 +??????.?.#? 4,1 +????..????????? 2,3,2 +.???.#?##???? 1,4 +??????.?#???#?. 1,1,2,3 +??.???????# 1,6,1 +??#????????##? 4,6 +.??#??.??#? 2,3 +?????.?.?..??? 3,1,1,1 +..?.?#?##.?#????#?# 5,8 +?#????..?????. 6,2 +?#?.??????#??. 1,7,1 +#??##.?#?#??#???.? 5,1,4,1,1 +.???.?????.? 1,2,2 +.?????.#?????????? 3,3,1,3 +#.????#?##???? 1,1,1,6 +..?#?#.??#.?.?.? 4,1,1,1,1 +.??#???????.??? 3,4,1,2 +??###...##??? 3,3 +?.?#????#????? 1,2,4,1 +..??.?#???.?#?#?. 1,3,4 +????.??#??.???##??? 1,1,1,6,1 +???#?????? 1,1,1 +?#???#??.?????#?.?? 6,6,1 +??????????????.##? 9,2 +.#????#.#??#?????? 1,2,1,1,4,1 +?.?#.??.??#???? 1,1,1,3,1 +.??#?#??#.??????.#? 5,1,1,2,2 +???#??#.#????. 4,1,1 +??....??????....? 5,1 +?#????#????#?? 3,2,1,2 +.#???????.?.?? 1,3,1,2 +##????#?#.##?# 4,3,4 +??..#??????#??? 1,1 +.#?.????##? 1,2 +???????????#?#? 2,3,4 +??.#??###?#.???.#.. 1,1,6,1,1 +???#??#??#???#???. 1,1,3,8 +.???##..?.#??## 4,5 +.##???##?..#??? 7,1 +????.???????#? 2,1,3,1 +?#?.##??#???? 2,6 +????#???#??#?????? 2,2,11 +?#?????#??#??? 1,3,5 +#????.?##???#?#??? 3,1,3,2,1,1 +#?????.?#????.???#?? 5,3,1,1,1,1 +????#?.?.##??# 2,1,3,1 +????#.???#??????##?# 2,2,1,1,2,4 +..????##???#?????#?# 4,10 +#???#?????.????#..? 5,5 +??????#?????????? 1,5,1,1,4 +.?#?????##?.#?? 6,2,3 +.?#.????#?#????????. 1,8,4 +?????#???#. 1,2,1 +.?#?#????#. 2,6 +?????#...???? 2,1,3 +?????.??????. 2,2,5 +??#?.????#????.?#?# 4,4,3,1,1 +.?#??#???#??????.?? 4,6,1 +.##?#.#???.??? 4,3,1,1 +?#??.?#??#?## 2,3,1,2 +#.??#??????#??#? 1,13 +.???.????#???#?#? 2,5,5 +###..??#.???.???.# 3,1,1,1,1,1 +??#.???##??#?##?#?. 3,2,8 +???????#???#? 9,1 +??????#?????#? 1,2,2,4 +?.####?.?# 5,1 +?.???????###??.?..?# 1,10,1,1 +#?#?#?#????. 3,7 +.?#???????? 2,1,1 +.????##..?# 6,1 +???.??.???.#?? 1,2,2 +#??#?#??..???.? 2,1,3,3 +###????#?.?.?????. 8,4 +??#??...?. 4,1 +?.?##?????#?#??#? 1,4,1,4,1 +.?.??????.?##??#?? 1,1,4,2 +?.#???.??##?#??#??# 1,1,1,1,10 +.?#??#?.?.??? 1,1,1,2 +??????#...?#?#?? 3,1,5 +?.????#?.#?###. 5,5 +?????#???.?? 1,2,4,1 +??.????#?????# 2,5,2 +?#????#?#?????. 1,9 +?#??..##?# 3,4 +?..???????#??.?.?# 1,10,2 +?#.??#?????##.?.??. 2,5,2,1,1 +#????#?????.?#? 1,1,4,1,1 +??.##??.?????????? 1,3,3,4 +?#??????.????##????? 6,1,1,4,1,1 +????##?#??? 7,1 +#???#?##???#?#???.#? 2,2,6,2,1,1 +?.#????????.? 1,3,1 +??????.?.???#???#? 1,9 +???#.#???###?????? 1,2,1,6,2 +#????#??###?#??..# 1,9,1 +?#?????#?.?..?.??#? 2,1,1,1,1,3 +?#.????.?#.##?#? 1,1,1,1,5 +??#??#???????.? 11,1 +??#?###?.?#. 5,1 +??#.?????.??? 2,5,1,1 +???.???.????#?##? 3,1,1,1,6 +????.??????.?.#???? 2,2,2,1,2,1 +???##??#?#??.??##?.. 5,3,5 +??#????.?#? 1,1,2 +?.?.????????#???. 4,4 +.?????....?#????#?.? 2,7 +?.?#??##???.#.???#.? 5,1,1,1,1,1 +????#?.##??????? 1,2,6,1 +??#??????#?#???#? 10,2 +..?#?#????###?.?.? 10,1 +????????.?.??.?.? 3,2 +#????????.?????? 3,1,2,2 +?????###????? 1,9 +.?#???.?#? 3,2 +.#????#.?##?#??? 1,2,2,1,1 +?????????#?. 5,4 +..??...?#######.. 1,8 +.???#??.????#.#?.??? 4,5,1,1 +??...?#??.????#?#. 2,2,2,3 +.?##.?#????.? 3,5 +#???##?..??.?.#.?? 3,3,1,1,1,1 +???????????? 3,1,1,2 +?????#?##..???????? 1,7,3,1,1 +???.??????#?# 2,4,1,1 +????#??.#????##??.? 2,2,8,1 +???#????#??#..?# 8,1,1 +????#?.?#.# 5,2,1 +.#.??#..?#? 1,2,1 +?..?.#?..???##? 2,4 +.????????# 1,7 +.??#?????.????? 7,2 +?.????#??????. 1,9 +?#.#?#?.?? 1,1,2 +??.#???#.?????..?.# 1,2,2,2,1,1 +??#.?.?#.? 1,2 +.##???#.#?##??.???# 2,1,5,4 +?????????#?? 1,4,1 +?????..??.#??????? 2,1,1,3,1,1 +.?#??.#.#??? 2,1,1,2 +..?.?##?????#.?#? 1,5,1,2 +???#.?.##???#??? 3,1,3,1,1 +???#????..#????????# 5,1,1,1,4,1 +???.??????#???#??# 1,1,1,9,1 +??#???.?.?#?.??? 4,1,2,1 +.???????###?#??#?.## 5,6,1,2 +?#??????????? 3,1,1 +?.????#???. 1,2,4 +?????#???#??... 1,2,5 +????#?#??#??? 1,5,1,1 +?.?????#.#.? 1,1,1,1 +#?.??????##? 1,1,1,3 +??#???????##????.#?? 1,4,5,3 +?#?#??##??.?#?# 4,2,1,1,1 +.##???????????#???? 4,2,4,1 +??#??.?????? 2,5 +??#???????.#? 6,1,1 +?.#?????#??#.? 7,2 +???????????#??? 1,3,4 +..?#???#???##??. 8,4 +??#?.#??#??????#??#. 1,14 +#??##..#.. 5,1 +???#?#????.?#..? 7,1,2 +#??#????.?#.???????? 2,1,1,2,6,1 +??##??..???#.? 5,1,1 +???????????#??.????? 1,1,1,7,1,1 +??#?#??.?#?? 1,5,2 +???.?.#.??.?#.#???# 1,1,2,1,5 +?.???#??????.?.?.?. 6,1 +??.???.??#?# 1,3,4 +?????..?.? 4,1 +#??##??.????????? 6,3,1,2 +?????.???#?#?????? 1,6 +????##?#?# 4,3 +..??#?????#. 3,3 +??????.??? 1,1,1 +????.#?#???.?#????? 3,2 +?#??#.?###?#?? 2,1,8 +?.??#???#?#?#?.#. 1,10,1 +?#??#??.?##?? 5,4 +??#?##?#?#?#??##??#? 6,3,5 +?.?.?.##?.??. 1,1,2,1 +?.?#??.#.? 4,1,1 +?.?#?#???. 1,1,4 +?#???????? 2,2,1 +????#?#?????#. 5,2,1 +????##??#?.??? 1,7,1 +????#?????##??????? 1,2,9,1 +???###?#.??. 1,3,1,1 +??????#????????? 9,3 +?.????#.?.????#? 1,1,1,1,3 +.?.??#??????##?. 7,2 +??#??#..?? 3,1 +..?#??#??????.??.??? 9,1,1,1 +????##??????###?#.?? 1,5,5,1 +.????#??#?? 1,2,4 +.##???????..???? 2,2 +##?#?.?#??#??#??? 4,4,2,1 +?#??#??.?# 5,2 +.????#.???? 4,1 +??????.??#?.. 4,3 +.??##?#?.????????? 5,7 +.?.???.??##?#??## 1,2,6,2 +.?###???????????.? 5,5,1 +?.#?#.??????? 1,1,4 +##??????#?? 5,2 +?.????????? 1,4,2 +##?###?????????.? 9,1,2 +??##??.##??. 3,1,2,1 +.#??#??#?? 4,1 +##??.?.???#?. 4,1,3 +???.??#?###..?.??? 1,7,1,1 +.?????.?#.? 1,1,2 +??..???????#..##?? 2,1,3,4 +.?#.?#?#?? 1,4 +?#?#???####????.???? 2,1,9,1,1 +?????#????.????#?? 3,1,3,4 +.?#??.?###???## 3,3,2 +??.??????.. 2,2 +??????.?.??.##???# 1,1,1,1,4,1 +?????##?.??.? 1,3,2 +.??.??.??#??.??#??? 2,2,1,1,2,1 +#??????#???###???? 1,1,1,7,1,1 +?#???.?#.?#??. 1,2,1,3 +?.?#..???????.? 2,7 +?#.#?#?#???? 1,3,1,1 +.#?????.??...#. 1,2,1,1,1 +???????????#?#??. 1,7,2 +??#???#???.???## 1,1,1,2,5 +?.??#..?#???#?????? 3,9 +???##??.#?#????####. 1,2,11 +.?##??.##?#?#?? 3,6 +????.??##?? 2,4 +??.?##?.???.?#? 1,3,1,2 +???#?.?.#?.? 4,1 +#????????# 1,3,3 +???#?#?#??#?.??? 4,1,2,1,2 +..?##??#?#.?????#??. 7,1,1,2 +???.????????. 1,1,2,2 +.?##?##?????. 2,2,2 +.?#???????????.##??? 1,2,2,2,2 +#??????.??#????# 6,4,2 +??.????#?#? 1,2,4 +??????.?????????? 4,2,1 +??????#??? 3,3,1 +.###????.?? 6,1 +??.???????. 2,1 +?##.#?????.? 2,1,1,1 +?.????#?.??#??????? 6,4,1 +.????.???##?? 1,5 +#?#???##??#??? 9,1 +???????????.?.??? 1,8 +???.#..???#????. 3,1,8 +?.?????#??????? 1,1,7 +?#??????#?#?????? 2,7,1 +?#?##?#??????# 1,6,1,1 +??#???#??#...????? 9,3 +#.??#??#?.#???? 1,2,1,1,1 +?##?.????? 2,3 +?#????##?.??###?? 8,3,1 +.????????.?.??.? 7,2 +.???#???#???.#?.? 6,1,1,1 +?##??????#??? 3,4,2 +???##?????#.??#???#. 3,1,1,5 +??.??????##?????.? 1,1,1,6,1,1 +?#??????#?#. 4,4 +????????#?????????#? 1,2,3,1,5 +????#????#???#??#?? 7,5 +?????#????. 3,6 +#?#??##?.?###????#. 3,2,4,2 +???.#???#?## 2,1,2,2 +??.?????????? 1,1,8 +?.?????#?????? 6,2 +#??.?#????#??.? 1,1,2,2,1 +???###?#??#?????? 8,4 +#??#.?.#???? 1,1,1,2 +????#?#???#?.?.?.? 8,1 +??????.?###?###??. 4,3,5 +??##???#???#? 3,1,2,2 +??.#.???#??# 1,1,4,2 +#????#?????#?????#? 1,1,1,12 +.??????#?#?? 1,6 +??#????#????#? 2,3,2 +?#?????#???...#???? 10,4 +??.?????#????#?.? 1,4,1,2 +???.????#?##?. 1,9 +????????????????. 1,5,1,3 +??#.?#?????.? 1,1,2,1 +????#????#?????? 1,2,1,3,1 +??#??..#??.?? 1,2,1,1 +.???.??#?..??. 1,4,2 +??.???#????#????#??? 2,4,1,2,4,1 +???.??????.??#? 1,2,2,4 +???#??.??#???# 1,1,1,2 +?????#.????????.#? 2,1,1,2,1,1 +#???#?#?#?#?????? 2,9,1 +?#?#?#??.#????? 1,5,3,1 +???.#????.##?##???? 2,4,7 +.?..#??#?? 1,2 +??.??????#??.??? 1,1,3,1,1 +?.???????? 1,2,1 +??#????????#??????.# 1,1,1,11,1 +?#?.???????##.?#??. 2,8,4 +.?#???.?#???????#?. 3,2,1,1,3 +??##.#?.?#??#.# 3,2,1,2,1 +##????.?#. 4,1,1 +???#?#?..?####??? 5,4 +##?.?#??#?????##??.# 2,8,4,1 +.#.?.??.????### 1,1,1,6 +?.??#??????#?? 1,1,3,4 +??.??.???.?#?? 1,1,1,2 +.#???#??????##. 1,1,4,4 +??.?????#?#???????? 1,12 +#????##????#??#???? 1,14 +???????.#.??? 5,1,1,1 +????.?#?????#?#.# 1,1,2,7,1 +?.#?.#?##????# 1,2,6,1 +.????.??#?..?#?? 1,2,4 +?#??###???.? 1,6 +?????..?#??#??? 4,6,1 +#???#????.#? 1,2,1,1 +?#?????##???#? 2,9 +?#?.#..?##? 2,1,3 +#.??.?????.???. 1,1,1,3,1 +.??.??????? 1,5 +..??.??##?####??#? 1,12 +##???#?#?????##??? 3,4,1,3,1 +?#????###? 4,4 +?.?.?????.? 1,1,2 +?.?????.????###?? 4,7 +?.?????#..? 1,1,1 +??.???..##? 1,1,3 +#??????????##??? 1,2,1,3,1 +.????#?##??#. 8,1 +??..????####? 1,4 +??#?#?#.??#???????.? 6,2,3 +????#???##??????. 8,2 +?#??#?????.?#.#?# 1,4,2,3 +?????#?#???..?????. 1,1,6,1,1 +???#????.?##????.?#? 4,1,3,2,2 +?????####?#?.??. 10,1 +?????..????????##?? 1,11 +##??#??#?.?#..? 3,1,3,2,1 +#?##?.?????#?????# 4,1,7 +.??????.??#?#.??# 6,3,1,3 +????#????#???? 1,6,2 +??###?????#.????.??? 10,1,2,2 +?.?##???#.?#?.# 1,4,1,2,1 +???.??#??#?#??.#.??? 1,1,6,1,1,1 +?.?.?..###??##??. 1,9 +#.#?#??#??##??#?? 1,1,8,3 +??????????###?#?? 2,3,3,1,1 +?#???#??##????.??? 6,3,2,1 +??.?#???#??? 1,1,3 +???#??.??.. 1,1,2 +.?#?#????#?#??.#?#? 6,3,3 +?##??#??#?#??.???? 13,3 +#.#??????. 1,1,3 +???#??????##?????? 1,3,6 +?.????????? 1,2 +#?#???????#?#????. 1,1,6,1,1,1 +.#?#?.???#.# 4,4,1 +?#?#...???.????##?? 1,1,3,1,2,1 +.#??????#?#.? 1,1,5 +...????.#?? 1,2 +.#????##??#.??.?? 1,6,1,1,1 +.##???#?????. 6,2 +??#??.??????#?####. 1,1,1,1,9 +#?????#?#?#??#??#? 2,1,11 +?????????#??#? 1,7 +??????#??.???#?? 9,5 +??????#?.?..#.?..? 1,6,1,1,1,1 +?#???#?.#??#?#? 2,2,6 +????###???.?##???? 2,5,1,2,1 +????#????? 1,7 +?.?##?#???.???. 1,2,1,2,3 +?##?#.????#?#??#??? 3,1,2,2,5 +??##??#??.?? 6,1 +#.???????##?. 1,1,1,3 +.?###.???# 3,1,1 +.??##???#?##? 1,10 +?.???.???.. 1,2 +.?#.#??##??? 2,5,1 +????????????????? 3,2,2,1,1 +.#?.???.?????#??#??? 2,1,11 +????#?????.??????. 7,1,1 +??..??##?#???#?? 1,9 +?????#?#????????? 1,12,1 +####?###????? 8,2 +?#??#??.?#?? 6,2,1 +????.##???????#??? 1,3,1,4,1 +??.????.?.??. 3,2 +#??#???.?#??##?##? 2,2,1,5,3 +???.????????? 1,3,3 +.???##?#?????? 2,9 +?##?#?#?#????.? 5,1,1,1,1 +??????#?#??????## 1,1,3,1,3 +.??????#??????#.? 1,1,1,6,1 +???#.???.???.?#??# 1,1,1,1,3,1 +????.???##??.??.?#.. 1,1,7,1,1 +??#.???#??? 1,3 +??????.???? 2,1 +???????.?#??#??###. 1,1,10 +?#?#?##?##.???? 2,7,1,1 +???..?#.??.#. 3,2,1,1 +.?...???????????#??? 2,11 +???.?.?????...??? 1,5 +???#???#??##???#??#? 2,6,3,1 +??#?.????.?.??#??##? 3,1,2,1,7 +?#?.?????#??? 3,1,4 +.#?##?.???????? 5,6 +.?.#???????. 1,5,1 +?..?#???#???????#? 6,4 +#????.?##???. 4,4 +????#.#??????? 1,2,1,3 +????.?#???##???????? 4,12,1 +?#..????#???# 1,7 +????#??#??????..#?? 1,3,2,3,1,1 +??.?##??#??... 2,3,3 +???.???#??#???..?? 1,8 +???????#?###?#?? 6,7 +?????????#?#????? 1,1,10 +?#.??.??##???.?#.? 1,4,2 +#?????##???#?.#??# 1,10,1,1 +?????????#???#??##. 1,1,1,1,7,2 +??.?#?..?? 2,1 +???#..?.??####?##??? 1,11 +?.?#????????? 1,1,2,4 +???#???.#??? 6,3 +..?????#.? 1,1,1 +?.??#?????? 1,8 +?#????????????? 4,1,4,1 +??.??##????????.???# 8,1,1 +#??.??????? 3,1,1 +????.????????????. 2,3,1,1,1 +??????#??#?. 1,4 +.?#.???.????? 2,2,4 +..???#?#??# 5,1 +..?????.?.?#?#?. 4,4 +.#?.???????.? 2,5 +#??????#??#?#?.#?. 1,3,1,2,2,1 +???..???##?????#?? 1,10 +?????..??????#?????# 1,1,1,2,3,3 +??#??##??? 7,1 +????.#?????#?#? 1,2,5 +??..??.?#? 1,3 +?????.?.???#?? 2,1,1,1 +?.#?#?#.???#?. 3,1,2 +#??.????#.?#? 1,3,1,1 +.?#?#???#?? 3,2 +.??##????#??#?? 12,1 +#??#??????? 6,3 +#?##.??#??#? 4,3,1 +#?????.???.????#??? 2,2,5 +???????.?.?..???.#? 3,1,1,1,1,2 +#?#?#.###???#?.??? 1,3,3,1,2,2 +.???##.??#?. 4,2 +??????????? 1,5 +??#.???????#?#????# 1,1,11 +???#?.??#?.???#?? 1,3,1,2,5 +?????#??????.???#?? 3,3 +??#?###????##..?? 13,2 +..?##???????#??..? 4,1,6,1 +.??????????#?. 1,3,1,1 +???????#?. 2,3 +???#.#..???? 2,1,2 +?.????.????#?? 1,1,1,5 +?#.????#??????? 1,7 +????#??????.?.?.# 1,6,1,1,1 +??.#.??#..?? 1,1,1,1 +??#????????.? 4,3 +????.?###??? 2,5 +#####??.#?.? 6,2 +?#..#??#???????? 1,1,6,1 +???#?#???##?.?#?.? 2,4,4,3 +??##??##?????#?? 9,4 +#????.#.#..?? 3,1,1,1