diff --git a/2023/.gitignore b/2023/.gitignore new file mode 100644 index 0000000..a221ac1 --- /dev/null +++ b/2023/.gitignore @@ -0,0 +1,2 @@ +target/ +.vscode/ diff --git a/2023/Cargo.lock b/2023/Cargo.lock new file mode 100644 index 0000000..ecc5e80 --- /dev/null +++ b/2023/Cargo.lock @@ -0,0 +1,101 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aho-corasick" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +dependencies = [ + "memchr", +] + +[[package]] +name = "aoc" +version = "0.1.0" +dependencies = [ + "array2d", + "itertools", + "linked-hash-map", + "nom", + "regex", +] + +[[package]] +name = "array2d" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b39cb2c1bf5a7c0dd097aa95ab859cf87dab5a4328900f5388942dc1889f74" + +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "itertools" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" +dependencies = [ + "either", +] + +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + +[[package]] +name = "memchr" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "regex" +version = "1.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" diff --git a/2023/Cargo.toml b/2023/Cargo.toml new file mode 100644 index 0000000..dc3674a --- /dev/null +++ b/2023/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "aoc" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[dependencies] +regex = "1.10.2" +nom = "7" +itertools = "0.12.0" +linked-hash-map = "0.5.6" +array2d = "0.3.2" diff --git a/2023/day10.input b/2023/day10.input new file mode 100644 index 0000000..30784a7 --- /dev/null +++ b/2023/day10.input @@ -0,0 +1,140 @@ +FF--7-|7F--7F--|7F77-.FJF7F-7-F|7.77.FF7-F7---7-FJ7.|J--FJJ-FF-.JJ7LF7.J7F-7-F77L7.7-7.7FF77FF7..F--L7JF--.FF.7F|JFL7.7FL77.-7|7.F7-7FJ.FJ.- +FL-JF-L-JJFFJJ.7-JLL.7JF-J---7JLF7|LLF--.LJ.F7.LJL7--JJLJJJ.||JF|.F7LJ7.JJL7-FJ7L|-JL..LJJF-FJJ-|7|||F.|7.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J|FJ7|FJL7L-7L||||F7F-JL7LJF7|||FJ|L77|||FJJL-7FJ||F7F--7||||F7|L7J|F-JF7JF7||FJF7F7L-JFJ|||FJL7|LJ +LFJ|FLJ7L--7L7L----7L-7F-J||FJL7|L7FJL-7L7||F7||F7|F-JFJ||||||F-7L7FJ||||||L7|FJ||L-7F7|L7|LJ|L-7||||LJ||FJFJL--JL7|LJLJFJLJL--7L7|||L7F||.L +LLJ|F|7|.F-JFJF7F-7L7FJ|F7LJ|JFJL-J|JF7L7|||||||||||F7|FJ||||LJ7|FJL7|||||F7||L7||F-J||L7||F-JF7||||L7FJ||FJF-7F-7LJF---JF7F7F7L-JLJL7|-LJ7. +L7F|J.FF-JF7L7||L7|7|L7LJL-7|FJF7F7L7|L7|||||||LJ|||||||FJ||L7F7|L7FJ|||||||||FJ||L7FJ|FJ||L7FJ||LJ|FJL7|LJFJJLJFJF7L----J||LJL-----7||7||F7 +F77.|F-L-7|L7LJL-JL7|FJF---J||FJLJL7LJLLJ|||||L-7|||||||L7|L7||||FJ|FJ|LJLJLJ||JLJ||L7|L7||FJL7|||FJL7.LJF-JF7F7L-J|F7F--7LJF--7F7F-J||J7LFJ +LJLF-JL|LLJJL-7F--7LJL7L---7|LJF7F7L----7LJ|||F7|||||||L7||FJ||LJ|FJL7|JF7LF-JL7F--JFJL-J|||F7|||FJF7|F--JF7|LJL--7|||L-7L-7L-7LJLJ.LLJJLFJ| +LL.7.||LF-----J|F-JF-7L7F7FJ|F7||||F---7|F7||||LJ||||||FJ||L7|L7FJ|F-JL-JL7L7F7|L7F7L---7LJLJ|||||FJLJL---JLJF7F7FJLJ|F7L7L|F7L---7-JL|F||JL +FF-L7-J-L---7F7||F7L7L7LJ|L7||||||LJF-7LJ|LJ||L-7LJLJLJL7||FJ|FJL7|L-7F---JFJ|||FJ|L7F--JJF7-LJLJ||F7F7F----7|||LJF-7LJL7L7|||F---J7FJL7J.7J +7J--F7||F|7FJ|||LJL-JF|F7L-JLJLJ|L--JFJF7L7FJ|F-J.F7F-7FJ|||FJL-7||F-JL---7L7|LJL7|FJL----J|F---7|||LJLJF--7|||L-7|FJF-7|FJLJ|L--7J-L7J||-|. +LLF7JFLLLJFJFJLJF-----J|L7F7F7F7L---7L-J|FJ|-|L---JLJFJL-JLJL7F-J||L-7F7F7|FJ|F--J|L7F7F--7|L7F7LJ||F7F-JF-JLJ|F7LJL-JFJ||JF7|F7FJJFJL----|- +7F77LJ7||LL7|.LFJF7F7F7L7LJ||LJL7F-7L-7FJL7|FJF----7FJF7F---7|L-7LJF-J|LJ||L7|L7F7|FJ||L-7LJ|LJ|F7|LJLJF7L---7LJL-----JJLJFJ|LJLJFFJJ||LJFF. +|7||FL-|J-LLJ7.L-JLJLJL-JF7LJLF7LJLL-7LJF7LJL7L---7LJFJ|L--7LJF7|F-JF7L-7|L7|L7||||L7||F7L---7FJ|LJFF--JL----JF---7F7FF7F7L7|F7F77J|L|-77FFJ +--J7JF|J|JJLLF7F7JF7FF---JL---J|F---7L-7|L--7L7F-7L-7|FJF--JF7|LJ|F7||F7||FJL-J||LJ7||LJL7F7FJL7L7F7L-7F---7F7|F--J||FJLJL-JLJLJ|F--7LLLL-J7 +FJ.L.FJ.LF7F7FFJL-JL7L----7F--7|L--7L--J|F-7|FJ|FJF7LJ|FJF7FJ||F-J|LJ||LJ|L7-F7LJF7FJL-7.|||L7.L7||L-7||F--J|||L---JLJF---------J|F-J7|LJL7J +FL|7|.LL7LFJL-JF7F-7L77F-7LJF7||F7.L----JL7LJL7|L7||F7|L7||L7|||F7|F-JL-7L7L7|L--JLJF7FJFJ|L7L7||||F7LJ|L7F7|||F---7F7L7F-7F7F---JL-7-|7-LJ| +|JJLJ.FL|JL---7||L7L7L7L7|F-JLJ|||F---7F-7L-7FJL7||||LJFJ|L7|||||LJL7F7FJFJFJL---7F7|LJFJFJ.L7|FJ|LJL--J-LJLJLJL--7||L7LJFJ|LJF7F7F-JLF77J.J +F.FJ|LF.J.F---J||FJ7L7|F||L7F-7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|-FF-. +7L77F7JJ.F-JF7L7L7|FJLJF--7F-7L7F---------JL-7||L-7|L-----77FF77||JJ-LLLJ.|-|L7FJL-J||F7F7L-7L--7LJLJL-J||LJ7|LJF--J|FJF7|L-7|F---JL--JFF|J. +J-|J-F7L-L--JL7L-JLJF7FJF-J|-L-JL--------7F7JLJ|F-JL7F----JF7||-|..|-FJLJ-L-L7|L-7F7|LJLJL-7L-7FJF-7F7F7LJ7F-JF-JF7FJL-J||F-J|L---------7-7| +.L|JFL-7L||F-7L-7F7FJ||7L--JF7.F--7F7F7F7LJL7F-JL--7|L7F7F-JLJL7F7--.LJ-|.FLLLJF7LJ||F-----JF7LJFJ.||LJL---JF7L--JLJF-7FJ|L7LL7F-7F-7F--JF7| +7.JFJLF|LF7L7L7FJ||L7||F----JL-JF7LJLJLJL---J|F7F7FJL-J|LJF7F7FJ||LL7L7FF-----FJL7|LJL--7F7FJL7FJF-J|F7F7F7FJL7F7F--JJLJ-|FJF7|L7LJFJL-7.|JF +F.FFJFLJL|L7L7|L7||FJLJL--------JL-----7-F7F7||LJ||F7F7|F-JLJLJ-|||.L|F|7-|-|.|F7L7F7F-7LJLJ-FJ|FJF7||LJLJLJF7|||L------7LJF||L-JF7L--7|777| +LFJF-L-|FL7L-JL7LJLJF------------------JFJ||||L-7LJ|||LJL-7F7JF-J|77.|-|LF--|FLJL7|||L7L----7L-JL-JLJL------J|||L7F--7F-JJF-JL---JL-7|||7.7J +F|LJ7-FJFLL--7FJF7F7L----7F-7F7F7F--7|F7L7LJLJF7L-7|LJF---J||7L7FJJL|J-|F|..|F7F-J||L7L7F--7|F-7F-----7F7F7F-JLJFJL-7|L7-FJF7F-7F---JF|L7-7| +-JF.|-J.F7F--JL7||||F7LF-JL7LJLJLJFFJFJL-JF7F7||F-J|F7L----JL--JL77-LLFJ-.--FJ|L-7||FJFJ|F-JLJFJL----7LJLJLJF7F7L---JL-JFJFJLJ|LJ-J-L-L-J7.L +LF-7||LF||L---7LJLJLJL7L7F-J|F-----J7|F---JLJ|||L--J||F7F7F7F7F7FJ7J7|FJL77FL7|F7|||||L7|L7F-7|7F--7LL------JLJ|F7F7F7F7|FJF7|F-7F|77.L.F|7. +F||FF|-FJL7|F7L------7L-J|F-7L-------JL7F---7LJ|F-7FJLJ||LJLJLJ||JJ-L-J||F||FJLJLJ||L77LJLLJFJL7L-7|F-----7F7F-J|LJLJLJ||L7|L7|FJF77F777FF-- +.J.L-J7L-7L-JL----7-FJF7FJL7L-7F-------J|F--JF7LJ7|L-77|L---7|FJ|.|F|7|FFFF7L----7||FJF7JF7FJF7|F7||L----7||||F7|F-----JL7||FJ||L|L7F7FL7L|J +FLJF--JJFL-------7|FJFJLJF7L-7LJF-------JL---JL--7|F7|FJF-7FJFL-JFFF7LF-F-JL7F---J||L7||FJLJFJ|LJLJ|F7F7FJLJLJ|||L--7F-7FJLJL-JL-JFJ|L7JJFJ. +F.L||FFFLF------7||L-JFF-J|F7L--JF---7F-7F7F7F-7FJ||LJL7L7|L7F-7-L-LJLJLL--7LJF--7|L7|||L-7FJFJF7F7LJLJ|L7-F7J|||F--J|FJ|F--------JJ|FJ.F--| +FJ-L7-F7JL-7F7F7LJL7F-7L-7LJL--7.L--7|L7||LJ|L7|L7|L-7FJFJL7|L7|.L7||-7LLF7L--JFFJL7|LJL--J|FL7|LJL7F-7L-JFJL-JLJ|-F-JL-JL---7F7F7F7||F7J-|| +F-77JJF----J|||L7F7|L7|F7L----7|F---J|FJLJF7L-J|FJL7FJL7|J-LJL|L7J7FJ|-LL||F-7F7L-7LJF--7F-JF7LJJF7LJ7L---JF-7F-7L-JF7F---7F7LJLJLJLJLJ|F-J7 +-7F7|.L-7F7FJLJFLJ|L-J|||F----J|L---7|L--7|L--7|L-7|L-7LJF-77L|FJ-F-7F7..||L7LJ|F-JF7|F7||LFJL7F7|L--7F---7L7|L7L--7||||F7LJL--7F------J7||| +FLF-77LLLJLJF7F7F-JF-7|||L--7F7L7F--JL7F-J|F--JL7FJL--J||L7|F7|L-7L7|||F7|L7|F7||F7|LJ|LJ|FJF7LJ|L--7LJF-7|FJL7L--7LJ|L-JL7F--7LJLF7F7||.-F- +F--JL|F7|JJFJLJLJF-JFJLJ|F7LLJL7|L---7LJ-FJL---7|L-7F---7FJ||LJF-JFJLJ||LJFJLJ||LJLJF-JF7|L-JL-7|F7JL-7|FJLJF7L---JF7|F--7LJF7L--7|LJL777L|J +|.L|7F-JJ|-L7F7F7|F-JF-7LJ|F---JL----JF-7|F----JL-7|L-7FJ|FJL7FJ.FJF--JL-7|F7FJL7FF7L--JLJFF-7FJLJL---J|L---JL--7F7||LJF7|F-JL--7LJF--JL7FL7 +.JLFFF7.LFF-J|||LJL--JFL-7|L---7F--7F7|FJ|L-7F--7-LJF-J|FJL7FJL-7L7L-7LLFJ|||L7FJFJ|F--7LF7L7|L7F-7F-7FJF------7LJLJL-7||LJF7F7FL--JF-7.F--J +..F-FJL7||L--JLJFF-------JL-7F-J|F-J|LJL-JF-J|F-JF-7L-7||F-JL7F-JJ|F7L7FJFJ||FJL7|FJL7FJFJL-JL-J|FJ|FJL7L--7F7.L--7F-7LJL7FJLJL-7F7FJFJ-LJ.L +--LJL7FJF----7JF7L-7F-7F-7F7|L--JL--JF7F-7L--JL--JFJF-J||L7LFJL7F7LJ|FJL7L-J|L7FJ||F7|L-JF7F---7|L-JL--J|F7LJL---7|L7|F-7LJF---7LJLJFJF7JFJ7 +|.|||||-L---7|FJL7FJ|FJL7||||F7F-----JLJFJF--7F---JLL-7|L7L-JF7|||F7||F7L--7L7|L-JLJLJF-7||||F-J|F--7F---JL-7F---JL-J|L7|F7L--7L7F7FJL||.|-7 +|7.-FJL7..F7||L-7|L7||F-JLJ||||L------7.L7L-7|L---7.F7||FJF--JLJ|||LJ|||F7FJFJL---7F7FJFJ||L7|F-JL-7|L-----7|L------7|FJ|||F7FJLLJLJ||||-7|| +L-7-L-7L--JLJL7FJL7LJ||F-7FJLJ|F7F---7L-7|F7||F---JFJ|||L7L7F7F-J|L-7LJ|||L7|F7F-7|||L7L7|L7|LJF---JL-7F---JL-------JLJ-LJLJLJF7F-7F7FJ|-JF7 +.LLFJJL7F-7F-7LJF7L-7LJL7LJF-7LJ|L--7|F7||||||L---7L7|||FJFJ|||F-JF-JF-J||FJ||LJFJLJL-JFJ|FJ|F7L-----7|L----7F-7F7F-----------J|L7LJLJFJ7F-L +L.L.L7LLJFLJLL7FJ|F-JF7FJF-JLL-7L---JLJLJLJ|||F7F-JFJ|||L7L7|LJL-7L-7L-7||L7||F-JF7JF-7L-JL7|||LF----JL-----JL7||||F--7F-------JFJF7F-JJJLJJ +|7.FLF7F---7F7LJFJL--JLJFJJF-7FJF7F-------7|||||L-7L7LJ|7L7LJF7F7|F7L7FJ||FJLJ|F7|L7L7|F7F7LJ|L7L--7F7F7F7F---JLJLJL-7|L--------JFJ|L--7|FL7 +LL-F7|LL7F7LJL-7L---7F-7L-7L7LJFJLJF------JLJLJL--JFJF7|F7|F-JLJLJ|L-JL-J||F--J|LJFJ-||||||F7L7|.F7LJLJLJLJF7F7F--7F-JL-7F7F7F--7|-L7F7|JJ-| +77--JJ-LLJ|F7F7L----J|FJF7|7L7FJJF-JF7F7F--7F7F7F7LL-J|LJLJL7|F7F7L-----7||L7F7|F-JF-J||LJLJL7||FJL--------J|||L7FJL---7LJ|||L-7|L7LLJLJ7LF- +|-7JL|.F|JLJLJL7F7F7FJL7|LJF7LJF-JF-JLJLJF-J|||LJL-7F-JF7F7FJFJLJ|F-7F--JLJFJ||||F7L7FJL--7F-J||L----------7LJ|FJL--7F7L-7|||F-JL7|.LLL-|.|J +JJF7JFLJ||F----J|LJ||F7||F-JL-7L7FJF----7L-7|||F---JL--JLJ|L-JF--JL7|L--7F-JFJ||||L-J|F-7FJ|F7||F7F7F-----7L-7||F--7LJL-7||||L7LLLJ--7|F-7L. +||L7.|7|FFL-----JF7LJ|||||F--7L7LJFL---7|F7LJLJ|F-7.F7F7F7|F-7|F7F7||F7FJL7-|FJ||L--7||FJL7|||||||||L----7L--JLJ|F-JJF-7|||||FJ77-JF|77|LJ7J +7-FJFF-LLF-------JL--J|LJLJF7L7|F7F----JLJL----JL7L7|||||||L7|LJ||LJ|||L-7|FJL7||FF7|LJ|F7||||||||||F---7L--7F7FJL---JFJLJ||||F-77.JJL|7LJ7. +L7|F-F--LL7F-7F-7F-7F7|F7JFJL-J|||L----7F7F7F-7F7L7LJ||||LJFJL--JL-7|||F7|LJF-J||FJ||F-J|||LJ||LJLJ|L--7L---J|||F---7FJ7LFJ||LJFJ7FL7L||7JL- +|FL.L|.F-|LJLLJFJ|FJ||LJL-JF--7LJL-----J|||||FJ|L7|F-J|||F-JF7F7F7FJ||LJ||F-JJFJ|L7||L--J||F7|L---7L7F7L---7-|LJL--7LJF7LL-JL7FJJ.LFFF-JL... +FJJ77LF--7F|LLLL-JL-JL-7F--JF-JF--------J||LJ|FJFJ||F7|||L-7||||||L7|L-7LJL7F7|FJ7|||F---JLJ||.F77|FJ|L---7L-JF7F-7L--JL-7-LL||L|7F-|LLL7..F +LJJ||JJLJ|F7.|F-------7LJF7FJF7|F--------JL-7|L7L7|||||||F-J|||LJ|FJL-7L-7FJ||||F7|||L7F7F7FJ|FJL7|L7|F7F7L---JLJJ|F7F---J7.F||F|LF-|7JF---7 +.|LFJJFLF|-|7LL--7F7F7L--J|L-JLJL--7F7F-7F7FJL-JFJ||||||||F7||L-7|L--7|F7||FJ||LJ||||FJ||||L7LJF-J|FJLJLJL-------7LJLJ7FF---7|L7|F|-FJL|JF|| +F-L|J7F--|F77-|F7LJ||L7F-7L7JF7F7F7|||L7|||L---7|FJ|||||||||||F7||F--J||||||FJL-7||LJL7|||L7L-7|F-J|F7F7F-7F-----JF7F7F7|F--JL-JF---L7|.||F7 +|F7-7F|L|L-L7-FJL7-LJLLJ.L7L-JLJLJLJ||-||||F7F7||L7|||||||||||||||L-7FJ||||||F7J||L--7||||FJF7||L-7|||||L7|L------JLJLJLJ|LL|FL--.F-L-|-LJ|J +.||F-||-FJ7L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L-7.LF|-777.|J77|J.F|J.7J-F7L|.F|..FJL-7J.|.7.LLFJ-|FJFJFJ7L-7.|.7-JJF.FFL7-LJ-F|77JF7-F|L-777.F +77JF.||77.J-.|--J77|L7.F7J7|LFLLF|7J7.|F|.J7.L|.-|J|JFFJ.||LJ7FFJ-7L7FFF.L7F-F7L-7FJ77|.LJ.FJ77LJ-L7L7.LL--J.|7F7L.FJ||.|L7-L.JFJ77|LJL--L.L +|F-|FFL7-.|F7-7.LL|-J|LLJ-F-FJ7-LJJF-7FL7.FL7F-7---J--.LLL-7F7L||.|JFLJJ.|--.|L7.LJF--J-7.FF--7.L|FL-J7.LLL-FLL--7F7LLL-JFJ7|.|FLLJ7|LLJJJ.. +|JJ|LL7JF--LJ7LF7|L|||JJ|-7J|7L.LJ-7.-7FL-LJ-7JJ.LFJ.LL-|FF|LJF---JF-7.7JJ..7-.J-FL|J-J.FJ--7JJ-7||-JJ---L|.LJ|.F|L77J||LJ.FL--J.FJLF7.|F7FF +L|L|.LLL-JL|.|-777-L77J.L-LL|7L|.L7J-L.FL-J.LJL7J-7J-L.LL-77.7-JFJL--|7L|J.--J.LJL-JJ.F7LJ.LJ.L----JLJJ.FJ|...7J-L-L7L|-7L7-LFJJ-|J--|7JLL-L diff --git a/2023/day11.input b/2023/day11.input new file mode 100644 index 0000000..fb45346 --- /dev/null +++ b/2023/day11.input @@ -0,0 +1,140 @@ +..............................................#......#...............................................#..........................#........... +.....#......................................................#.............................#................................................. +............#...................#........#....................................#..............................#...........#.................. +...............................................................................................#............................................ +.#....................#...........................#......................................................#...........#.....................# +............................................................................................................................................ +...................................#.......................#...........................#.................................................... +....#...................................................................#......#..................#.............#...................#....... +..............................................#............................................................................................. +...........#.............................#......................#........................................................................... +...................#.........#..............................................................................................#............... +.....................................................#.....................#...................#..........#...............................#. +...............#................................#.......................................................................#................... +....#..............................#......................................................#...........#..........................#.......... +..............................................................#............................................................................. +...........................#.................#...............................................................#.....#..................#..... +.......#...........#..............................................................#......................................................... +..............#...........................................................................................................................#. +...............................#..................#......................................................................................... +..#............................................................................#............................................#............... +.........................#..........#.....................................#.................#...................#........................... +.................#......................................#............................#................................#................#.... +.......................................................................................................#.................................... +.....#................#........................................#............................................................................ +........................................................................#................................................#.................. +...........................................#...................................#..............................#............................. +..........................#..............................#..........................................................#.....................#. +..#............#......................................................................#..........................................#.......... +................................................#..............................................#............................................ +.......................................#..............................................................................................#..... +.....#......................#.................................#............................................................#................ +................................................................................#..........................................................# +#.........#...........................................................................................#..................................... +.....................................................................................................................#...........#.......... +...........................................................#..............................#................................................. +..............#.......#.........#........................................#...........................................................#...... +......................................#.....#.....................#..........................................................#.............. +...........................#............................#.........................................#......................................#.. +...#...............#...........................................................#.....#..........................#........................... +...................................#........................................................................................................ +............#....................................#.............#..........................................#..........#..............#....... +.......................#................................................................#................................................... +......#...............................#...............#.................................................................................#... +#..............#...........................#................................................................................................ +............................#.............................#................................................................#................ +..........#........#..............................................#...................#........#...............#............................ +.......................................................................................................................#.................... +.........................................#..............................#.....#............................................................. +.....................................................................................................................................#...... +.....................................................#...................................................................................... +........#.....#....................................................#..................................#..................................... +.....................#.........................#.......................................#...................................#................ +...#.........................#..........................#..........................................................#............#........... +............................................................................................................................................ +...........#...................................................#.............................#.............................................. +..................#.........................................................................................#............................... +..........................#................................#..........................................#..................................... +................................#.....#...................................#............#.................................................... +..............#............................#.......................#............#............................................#.............. +.....#..................................................#.........................................#............#.....#.....................# +............................................................................................................................................ +........................................#...............................................................#................................... +.....................................................#......#.................................#............................................. +..........#............................................................................................................#........#........... +............................................................................................................................................ +.#................#.......#.......................#...................#.....#.........................#................................#.... +...............................#..................................................#..............................#.......................... +........#....................................#....................#......................#.................................................. +............................................................................................................................................ +.........................................................#...................................................#.........#.................... +..............................................................#..............................................................#.............. +......................................#...........#.........................#........................#................................#..... +.....................#......#...............#............................................................................................... +............#.......................................................................................................#...........#........... +...................................................................#......................................#...............................#. +...#................................#..........................................................................#............................ +.........#.....................................................#............................................................................ +..............................................................................#....................#........................................ +.................#.....................................#.............................#.............................#....................#... +........................#......#.............#.............................................................................................. +.....................................................................#.....................................#...............#................ +............................................................................................................................................ +#..............................................................................................#............................................ +.................................#......................................#..............#.................................................... +.................................................#.....................................................................................#.... +...#...............#.....................#......................................#........................................#.................. +........................#......................................#...........................................#.......................#........ +....................................................#.....................#................#.........#...................................... +............#............................................................................................................................... +...........................................................#.........................#.........................................#............ +.....................................#............................#......................................................................... +......#.............................................................................................................#....................... +....................#...........#.............#...............#.........................#................................#...........#...... +.........................................#.....................................#............................#............................... +...........#............................................#................................................................................... +.................................................................................................................................#.......... +...#..............................................................#.............................#.................#.........#............#.. +......................#..............................................................#................#................#.................... +.........#.....................#......................................#..................................................................... +.........................................................................................#..................#............................... +.................#.........................#..............#...............................................................#................. +.....#...............................................#............................#......................................................... +....................................................................................................................#....................... +..........#..........#.......#................#......................#........#............#.......#........................................ +...................................#.....#.................................................................................................. +.............................................................#.........................#.........................#......#................... +.........................................................................#.......#.......................#........................#......... +.......................#.........................................................................#...........................#.............. +........#.........#.........#...................#........................................................................................... +#.........................................................#............................................................................#.... +........................................................................................#............#...................................... +..................................#........................................................................................................# +..............#.....#.....................#..............................#.......................................#.......................... +...#..........................................................#............................................................................. +.........#.......................................#............................#...............#..........................#........#......... +...........................#.................................................................................#.............................. +.........................................................................................#...........................#...................... +.....................................................................#.................................................................#.... +.....#..................#.......#.........#.................#................................................................#.............. +.....................................#................#....................................................#.......................#........ +...............................................#............................................................................................ +...........#........#.......#...................................................#........................................................... +................................................................#........................................................................... +................#............................................................................#.............................................. +#......................#...............................................................................................#.................... +.................................#...............................................................................#............#..........#.. +.....#..........................................#..........#..........................................#..................................... +...........................................#...................................#.................#.......................................... +..........#.......#...........#...............................................................................#............................. +.......................................#............................................................................................#....... +...................................................#.....................................................................#.................. +#......................#........................................#..........................#...............#................................ +.............................................................................................................................#.............. +.............................................#.........................#..............#..................................................... +.......#.............................................#.......#...................................................................#.......... +............#.....#.....................#..............................................................#............#.....#................. +...#.........................#................................................................................#............................. +...............................................#..................#......................................................................... +...................................#....................................#.......#........#.........#..........................#............. +..........#.....#......................................................................................................#..............#..... diff --git a/2023/day12.input b/2023/day12.input new file mode 100644 index 0000000..491665c --- /dev/null +++ b/2023/day12.input @@ -0,0 +1,1000 @@ +..?????#??.?##? 1,1,2,3 +###?.#???.?#.# 4,2,2,1 +?????##???#? 7,1 +??????#.?#####?? 1,1,1,6 +????#?#.??#?# 3,3,3 +?????#?#.? 2,2,1 +..???.??#??? 3,3,1 +????.??????##??#?#? 2,2,9 +??.#??##??.#?? 2,5,1,1 +.???????????#? 5,1,1 +???.????#??? 2,6,1 +?#???.??#?##??#?.# 2,8,1 +?????.???? 2,2 +????#?#??.?#?.? 1,1,5,1,1 +..?#??#???#?????. 5,6 +??.#..??#??????#???? 2,1,10 +????.????#.??.#??? 1,1,5,1,1,1 +?????????#?##?.. 1,6 +.??.??.??#????? 1,4 +?????.??#????#? 1,8 +?.???????##????#?.?? 14,2 +?#.????#.????.? 1,2,1,1,1 +?#??.???????? 1,1,7 +.????.??????.# 3,3,1,1 +???#??#?.?...? 5,1,1 +.???#???.##??? 2,2 +???#???..?#?? 6,1 +#??.???.#? 3,1,1 +??#???.###???#?.?? 4,3,2,1 +?.?.?????????. 1,1,1,2 +.?.??..???????? 2,5 +?#?#???????.?.?.? 5,4,1,1,1 +??#?#????##??.???? 5,6,2 +???.#?###????.? 1,6,1,1 +.???.??.#?#??? 2,4 +##?#?????#?.#?# 5,2,3 +.##????#?#??#?#??. 3,9,1 +???????#???.??#??? 7,4 +?????..?#??#?#??###? 1,1,1,5,1,5 +.????.??????.##???. 3,2,1,5 +????.#????#?.# 3,7,1 +.???????.?# 5,1 +.???.?#??.???##??#?? 1,1,1,10 +??#??????? 1,3 +##.???.????#? 2,1,1,4 +.?#..??.????? 1,2,3 +??????????#?.?? 5,4 +?#?????????.?## 7,1,2 +??#?#?#????????.?#?. 14,2 +????.??????..??# 2,1,2,3 +???.?#?#????????..?. 1,1,8,3,1 +.??.?#?.?#? 3,2 +??????????.?? 1,2,1,1 +?????????. 3,1,1 +#?.?#?#?.###??#??. 2,2,1,7 +??.??#???? 1,4,2 +???#?????????#?? 4,1,1,3,1 +??..?#?.??.??.#??#?? 2,1,5 +??..???#??.?? 1,4,1 +.??#?.???.????#??. 3,2,7 +#.??????????#?? 1,3,1,2,3 +?..????????# 1,1,1,1 +????????#? 1,1,2 +????##??#????#..# 12,1,1 +?#?##???.??## 1,2,1,4 +.###???..??.? 6,1 +.?#??#?#??.?????.#. 8,3,1 +?#????#???????.. 7,1,3 +??.##???.?. 1,5 +?.??##???.?? 7,1 +#????.#????? 3,1,1,1 +#????????????.??. 7,2,2 +?#???..?#??#?? 4,2,2 +??##??.?.#?#. 6,1,1,1 +#.?.???.???#??#???. 1,1,2,1,7 +????#?????????. 1,4,1,2 +??#??????????.????. 5,3,3 +??.??#####?#???.?? 2,11,1 +??#.????.?. 3,1,1 +.???.##????.. 2,6 +?????#?????#??. 2,3,5 +??????.?.?#???#. 2,2,1,2,3 +??????#??? 1,1,1 +???????????###?#?? 7,9 +????#?##??????? 2,8 +??#??#.#???????#?? 3,1,7,1,1 +????????#??##.? 1,1,6,1 +.????????.? 3,1 +##.??#?????# 2,1,3,1 +???????????#?????? 1,1,10,1 +?????.#??..?????? 2,2,6 +?.###?.???????? 1,4,1,1,2 +.?##?????????. 6,3 +?#??.#??#????#??#? 1,1,1,10 +.????#???? 3,2 +???.#?#???? 2,7 +??#???#?#?#?.?.? 1,5,1,1 +#????.?#??????#?#? 1,2,1,9 +??###????##?#? 5,5 +??##??#??????????? 5,8 +.????.??????? 3,1,2 +??##???????.##?#? 4,3,4 +#?#?????###??##????. 1,2,13 +??#.????#??. 1,1,1,1 +.?#?##?.?#..?? 6,1,1 +#?##??.?.???????#??. 4,1,9 +???#?#?.???#??? 2,2,1,2 +..#????.????#. 2,1,1 +.???.???#?????.? 2,1,3,1,1 +?#????.???.???## 2,1,2,4 +#?#?#???#?##??#?. 1,3,3,2,1 +??#??#???..? 1,1,2,1 +???..##.#?????.. 2,4 +#???#?.?#?#?#????? 5,1,1,1,1,1 +???.??.???? 1,2,2 +????##?.#???.??????? 5,2,1,2,1 +.#???.?.??????#?#?.? 2,1,2,3,2 +??.????????? 1,1,1,1 +???##???????#??????. 9,2,3 +?#?#??#????..?#.. 9,1 +??#.???????#?#???# 1,4,1,1,2,1 +?#?.??###?##????.?? 2,8 +???#????#?#?.? 2,3 +.??##???..?? 3,1,1 +##.#?#.??#?????. 2,1,1,6,1 +?##???.#??? 4,3 +.?##?#?????##???. 3,1,6 +.????#??#???.?# 1,7,1,1 +?????????#.?.?#?. 2,1,2,2 +??..?.##?#??##? 1,8 +??????#??? 2,3 +???#???.#??.#??# 5,1,1,1 +?#?#???.?#.?????#?# 3,1,1,1,1,3 +?????????? 1,3 +?#??##??????????.?? 9,4,1 +??#????????.? 3,1,1,1 +??#.?#??#?#.??.?#.? 3,5,1,2,1,1 +??##??????.?#?#????? 3,6 +???.?#?#???.??. 1,1,3,1,2 +????.???.??????#?#?? 4,1,1,8 +????##?.????#??.?? 1,4,5,1,1 +???#???#?#?..??. 10,1 +###???##?#?#####?# 4,12 +.?.??.???# 1,1,3 +??#?#?.??.? 5,1,1 +?#??###???#???.????? 13,5 +.????#?#????#??# 5,4,1 +.???#???.??#??#.?. 6,5 +.?????..?????????# 4,7,1 +????????????# 1,3,3 +???..?##??###????? 3,2,4,2 +???#???????#?? 1,1,1,3 +?????.?.#####... 1,1,1,5 +????.?##????# 4,3,1,1 +?#???#?#????#???. 1,11,1 +.??.????#?? 1,5 +???#.?.#?#??#?##?# 1,1,1,6,2,1 +?.?.#??#???? 1,1,7 +??????##?#?## 1,7,2 +????????#?..??? 1,1,3,1 +.?.????????.?.? 4,1,1,1,1 +#?.???.??##?.?# 1,3,3,1 +#?.???????? 2,3,1 +???.??.??#???## 1,2,3,3 +????????????#. 3,3,1,1 +.#??..##??.??#?????? 1,1,4,1,3,1 +??#.??.?#???#?? 1,1,7 +???#?#??.?????#?? 7,1,1,2 +...?????#? 1,2 +.?#???#.#???? 5,2 +?#???#???.?#???.? 7,1,1,2 +????#?????#? 1,3,2,2 +?..#???.?##. 2,1,2 +?.?#.??#?? 1,1,1 +?.##??##?##????#?? 1,12,1 +?????#?#..? 1,6,1 +?##?????.??? 3,2,2 +.?.???????. 4,1 +????#???###???? 1,3,4,2 +???.#???.??? 2,1,1,2 +??????##.#.???? 2,2,1,2 +??.????#.??#???????? 1,1,1,7,1 +.??#?#?##.?#? 1,1,2,2 +.?#.???#?#??. 1,6 +..??##?#????.##?. 10,2 +..??#??.?.??.???? 3,1,1,2,1 +..????#?...?.?#??.. 1,3 +..??##..?.#????. 4,1,2,1 +?.????##??? 1,6 +?.???????#?? 3,2 +????.??????? 1,1,3 +???????.?#?##?.??#?. 4,5,4 +?.?#?...?##??. 1,2,3 +?#?#.??#??? 4,2,2 +???##..??????? 3,1,1 +?###??????? 7,1 +?.#????###?????? 1,1,5,1,1 +##?????????????.# 5,1,2,1,1 +.???????.?????.#??#? 2,2,1,5,5 +.?#??#????.???? 2,5,1 +????.??#?#????? 1,9 +.?#???.???? 3,4 +?#???#??.???? 6,1 +#????????##.??. 1,2,2,3,1 +????????#???## 1,3,4,2 +??###?????#??????.. 3,6,2 +???????#?.#??##? 5,1,3 +??.??..?.??#.? 1,1,1 +??##??????.??#???? 1,2,4,1,5 +?????#?.#??###?.??? 1,1,2,1,4,3 +??#??.#??????#. 3,5,2 +??.??????. 1,1,4 +??.????#?????.. 1,9 +?..??..??? 1,1,2 +?.?.?????##?#??#???? 1,12 +????????.? 1,2 +??#??.?#?##.? 1,1,1,2 +.???###?????? 6,1 +.???????????# 2,2,5 +.??????#?#??.?#? 1,1,4,2 +???#??.??. 1,3,1 +.#??#?????..#???# 8,5 +??#?.?.??#??. 1,2,1,2 +??.????##???? 1,1,4,1 +.???#.?.???????? 2,1,5,1 +???????????????#??#? 3,11,2 +???##????????.??? 10,2 +?##??#???#??????? 10,3,1 +.?###????#???.??. 11,1 +???????.?#?????#???? 6,9 +?#??#??.???????# 7,1,1,1,1 +?##??.#?????????? 4,1,5,1 +.????..#??##??#??..? 3,10 +??????????#???#? 2,8,1 +???.??.?#?? 2,1,4 +?#???#??#???#?# 2,4,2,1 +?.#??.#..??#. 3,1,2 +??.???#???.???.?.?? 1,1,4,1,1,2 +????????????.??#. 6,1 +?#??#?#??#??#?????? 2,3,1,8 +?.?????????#??? 6,2,1 +????.?#?#??#??? 1,8 +.?.???.???#. 1,1,4 +.?#?..????? 2,3 +.??#???????? 5,1 +???????????. 1,1,1,1 +.##?....#? 3,1 +???.#?#????? 2,3,2 +#??#..??.?.???? 4,1,1,1 +??##.#??.#?. 2,2,1 +?????????? 2,1,2 +.?.###???##?#???? 1,3,8 +?.?????.#???## 1,1,1,3 +?.???#??#?##??????? 11,2 +.#??.???.???? 3,1,1 +??.?##??.?????.???? 1,4,4,1,2 +???#????.?#? 1,3,1,3 +.???#????##?????. 8,2 +????#.?.???? 2,2,1,1 +??##??..???????##.?. 5,9 +.??????#?? 2,2 +???#??#??#??#.. 1,8,1 +???#????.#.???. 1,4,1,1 +???.????.??#???#?#?? 2,1,9 +?????????..?? 1,1,1,2 +????#.#???..? 4,1,1,1 +#?.??#?##??#???.?#. 2,9,1,1 +?##??.#??.? 2,2 +?#?.??##?? 2,4 +?#??.?##?????????? 3,8,1,1 +?#??...????? 4,2 +?#?...?????###??#..? 1,8 +???.#????? 1,3 +#????.?.?????##??? 1,1,4,4 +??##?.????..# 3,1,1,1 +???#????#?#. 2,8 +?#?#??????? 5,3 +??#???.??????#?#? 3,1,1,4 +????#??#????.?? 1,8,1 +?#????.?????#??? 4,1,2 +???.?#??#??#????#? 2,13 +??.???#???#??. 1,1,1,3 +.???#?#?.?. 3,1 +.??#???????.#?. 9,1 +?.??#?#??.?? 2,1,1 +?.?#??..?#?..?# 1,3,1,1 +.?.#?#?.??????????? 3,2 +?#??.??##??? 3,5 +???#?????. 1,4 +???#?#??????##????.? 9,2,2 +.?????#?????# 7,3 +??#####??? 6,1 +??#??..###???? 5,6 +.???#??.?#?????. 5,2,2 +????#?.???###?#?? 2,1,9 +??????#.?#?# 4,2,1,1 +.?????.#????#?? 1,1,3,3 +??#???#.?.??.? 6,1 +?????#?????##??? 5,7 +#???.??.???.?????? 3,1,1,1,1,2 +??.?????##????#..? 7,3 +.???.????###.#? 1,2,4,2 +?.?.#???.????????.?# 1,1,2,2,2,1 +##?.????.????#????. 2,3,7 +#?#?####????.??..?? 1,9,1,2 +?#??#...#?.. 4,2 +.???.?#???#.???.??? 2,2,1,1,1,2 +???????.???????##?. 1,4,1,2,5 +??..??#?#????#?? 1,1,10 +??#?..?#?#??##?. 2,8 +##?###??????.#??# 12,1,1 +?#???.?.???? 2,1,1,1 +?#??.#???#???. 4,1,4,1 +?#?##??????? 2,2,2,2 +???#?#?##??.#??? 1,7,1,1 +???#???#??#? 2,7 +?###.#?#?? 4,4 +??.???#????.#? 2,6,1 +????#.?#????#?#?#?#? 2,1,1,10 +?#?..???????#?.? 2,9 +?.#?#?...#???##??.?? 4,1,3 +.?????.?.???#?#.? 3,3 +.??#??##??? 2,4 +.?.??.??.?#? 1,1,1,1 +#.????#?#. 1,1,4 +.?.?????#?????.? 6,2 +.????.???????.#?##?# 1,1,1,5,4,1 +.?#??..#...?##?? 3,1,4 +####?.??????.???.?? 5,4,1,3,1 +?#.?#?##?#????????? 1,11,1,2 +#??????#??#????.# 12,1,1 +.?##???##???#?#?? 4,3,4 +?..??.?.???? 1,1,1,1 +?????.?????????? 1,1,2,1,4 +?.#??????.??##?## 1,1,1,1,7 +?.??.?????#???? 1,1,1,2,2 +??????????? 5,3 +????.???#??? 1,6 +.?##????????.# 8,1 +?#???...?#??? 2,2 +?????.#?????. 2,1,3 +??????#??? 5,1,1 +#?#?????????? 10,1 +??????????#?? 1,1,2,1 +???#???#??????????? 14,1,1 +.?..?#??...#??. 1,1 +???.#?#?#? 1,1,3 +???????#?#??.?#??? 3,2,2,2 +..???..#??#. 3,4 +????#?#??#.??..?###? 1,1,1,4,1,5 +?#??.????#???#. 1,9 +?.??.?#??.??#????.?. 2,3 +.????.???#?.? 1,4 +.???#?#?##???#???#? 9,2,2 +?#????##.? 2,4 +?.?#??##????.??##? 1,7,1,5 +????????????##??#?? 6,6 +?.??#?##?.? 1,1,4 +??##??#???##??? 11,1 +??#???????# 2,6 +??#?#???..?.???# 7,1,1 +.??????#??#?????? 1,1,8,1 +????#???.?#?#???? 2,1,2,7 +????#???###.??? 1,1,4,1 +????#??.??? 1,1,1 +?.??###??#????.? 6,1 +??#????###?#?? 3,7 +???.??#?.??#?#???.. 2,3,7 +?????.?.????.. 1,3 +???##?.?.??? 1,3,1,2 +???.#????.??? 1,1,5,1 +????.????## 2,6 +#?.?#?????..?##..? 1,6,3 +?.????#?????#?? 3,3 +?#.??#?#?#????.#? 2,9,1 +??????.??. 2,1,2 +?.????#??.?? 1,1,3 +.?.##???????? 4,3 +??#???????###?##??? 1,1,1,1,7 +??#????.??#.?#?? 3,3,1 +#?..???#????? 2,1,7 +?.?#??#????? 1,1,1,1 +..??#?????#???? 6,4 +.##???#???????. 8,1 +???????..?#??? 1,2 +????????????????? 2,1,9,1 +?..????????#???#?#. 1,1,11 +?#?.?????#??????#?? 1,5,5 +??#?#??#?#??? 1,3,1,3 +?#.?##??????..#?.#?? 1,9,1,1 +??.?.?#?.??? 1,1,3,3 +?#?##?????#? 1,2,6 +?#?#??#?#?..#. 4,5,1 +??#????.?? 2,1,2 +???#.??????##???..?? 4,7,1 +#??????????????? 1,6,5 +?#?#????.#?#??.??? 4,1,3,1,1 +.?##??.???? 3,2 +????#?????##.#????? 4,2,4,1 +?.?.??#?#??? 1,8 +?????#?#?#????? 2,10 +???????##????.#? 1,1,1,6,1 +.#?#?.???????#??#??? 3,10,2 +??.#..#..??? 1,1,1,1 +.??#??##??.?????#? 6,1,1 +..???????????#. 1,6,2 +???????#??. 1,5 +???????##????????? 1,1,5,2,1,1 +??#??.????? 3,2 +???##?#????? 1,8 +??.?.??#..?##?????.? 3,7,1 +??????####??#.?.##?# 1,1,4,1,2,1 +????#???#?????????.? 7,7 +??#?????#??? 2,1,2,1 +.??.??.?.?.?...?? 2,1 +???#?#?????.?.?? 9,1,1 +#?....?.????.?.?.?. 1,1,4,1,1 +..??#?#???.. 1,3 +#????#.#???.?? 1,3,3,2 +???#???#??? 4,3,1 +.???#?#?#??.#???#? 2,1,1,1,2,2 +?#?..#?#????##?? 3,3,1,5 +?..???#?#? 1,5 +???#??#?????#???.. 1,2,1,1,1,4 +????.????#??. 2,2 +???????#?.??? 5,2 +#?#?????###?#?#??? 1,3,1,8 +.#????###??? 3,3 +#.??##??#??#?.?? 1,1,9,1 +..??#???#?.??? 7,1 +??#???????.# 3,4,1 +?????#?#???.?????.?? 4,1,2 +?#?.?...#?#??#??? 2,1,1,7 +??..??#..??.???.? 1,2 +???#?##??#?? 1,7 +??#?#??###?????.#?? 1,1,7,1,3 +.?#???#..?#?#??? 1,1,1,3,1 +??????#?##??## 1,4,2 +???#??#.?? 2,1 +.??????##?? 1,1,3 +#?.???###??#????#?? 1,14 +???#?.?????.??. 1,1,1,1,2 +?#???###.?##????. 4,3,4,1 +????.?##???##.?#???# 1,1,8,2,2 +?.###??????#?????? 3,6 +?###?????#?#.?? 4,5,1,1 +?######?#??# 6,4 +???#??????#.? 2,1,2,1 +??.??????. 2,1,1 +??###???.??#.# 7,3,1 +#..?????.# 1,4,1 +?.#?????.?..? 6,1 +???????.???#?? 1,1,2,1 +?.?..????.? 1,1 +?#????..??.?#? 1,3,1,3 +.??#.??.?...# 2,1,1,1 +.????.??##? 3,4 +????.???#??. 1,1,4 +#??#???#?????????? 12,2,1 +.??#???????????? 1,3,1,2,3 +.???....#??.? 2,2 +???#???#..? 1,1,1 +????....#??##?????? 4,9 +?.???#??#? 1,2,4 +???.?.?.#?????.?. 1,6 +??..#??##.#.????. 1,5,1,1 +??#??????? 2,1 +????#??..#.#. 1,2,1,1 +?.#????##??#?.? 1,1,7 +.??##???#??.. 1,4,1,1 +??#??????#?..??#???? 8,2,1,1,1,1 +???.??.?##?.?..? 3,1,4,1,1 +#??##??.##????? 2,3,5 +?????##?#?.???#??. 8,3 +???#??????#?#??#???# 6,12 +??#?.?????? 3,5 +?.?#??????#? 1,7,1 +.??##?????????#? 3,9 +.??#???????.?#.?.. 7,2 +??????#?????#??# 1,2,1,1,1 +?#???#??#?.##??.. 6,1,3 +.???#?..?.???.. 3,1,2 +.###?###?????.? 7,1 +.?#?#?#?#????..? 2,9 +.?????.???????? 1,7 +?##???..?#??#??##?#? 5,12 +.#???.?#?#..?#?????. 4,1,1,7 +?.#????..?.?????#?.? 1,6 +..#?##?????#? 1,2,1,3 +???.????????#.?. 3,1,3,2,1 +???#.##??#?.?# 1,6,1 +?#.?#?.??#?#? 1,3,3 +.?##??.???##????? 3,1,4,2 +.??????#?? 1,1,1 +#???#..?.## 5,2 +????.?###?? 2,4 +??.?.#????? 1,6 +????#???????#.?#?.? 1,1,3,1,2,1 +???##??##???..?? 9,1,1 +?#.???##?. 1,1,2 +?.??#?#?.?.?####.?? 1,1,1,1,5,1 +?????#???###????? 2,2,3,1 +?##????.?#??.#???? 7,1,1,1,2 +???.??#??? 1,3 +..#???#???.?#?.#???? 1,1,4,2,4 +?##.?##.?. 3,3 +????#???.?#?##????. 4,1,7,1 +?????#..??? 4,1,2 +??#????#.?????????? 3,4,5,1 +???????.?? 1,1 +????#???#.#??? 1,6,1,2 +??#?.???#?#?.??#? 3,7,1,1 +???.#?????### 1,9 +##...??#??? 2,1,4 +.?.?????????..??? 3,1,2,1 +?#??#?#???? 7,1 +????#??.??? 4,1 +.?????.#????#??# 1,1,1,1,4 +?..??.???????#?#???. 1,1,1,1,5,1 +?.???.????. 1,1,3 +??????????? 1,1,2 +.#.??#.??..??? 1,2,1,1 +.#???#?????. 6,1 +????.?..?# 1,1,1 +.??##?.??????? 2,1,2,1 +?.???????? 2,1,2 +??#?#????##???#?? 11,1 +?#.?????#? 2,1,2 +.#???#????.?.?##? 6,1,1,4 +??#?#?#????#. 7,1 +#???.#??.#??????#?.? 4,2,9,1 +??????.??#?. 4,1 +?#??.???????. 1,4,1 +????.??.??.?# 2,2,2,2 +????#??.?#? 7,2 +..?#???.?????.????? 5,1,1,2,1 +.??#????.#?#?..? 4,4 +??#????#?.???. 2,4,1 +??????????.? 1,2,4,1 +?..#..#?#..??## 1,3,4 +#??????#?#?.#??????? 1,1,5,1,6 +?#.?.#???. 1,2 +?#?##.?#.#?.???#? 4,1,1,1,3 +?..?.?.#?.?? 1,2,2 +???#?????? 2,4 +?.#????#???#???##. 1,13 +..???#?#??##?..#?##? 6,2,5 +.#?.??#.???# 2,1,1,1 +??#??.?????. 3,1,1,3 +??#?#.?#??#.?#?#. 1,3,1,1,3 +.?..?.??????.? 1,1,5,1 +.?????##??? 1,1,3 +??#...?.??#?#???#? 1,1,1,3,1,1 +?#??.?#?##??.? 1,1,5,1 +?..#???#?????. 1,2,3 +?#??##????#?#??? 6,4 +?#?????#?.?? 1,5,1 +?.#???##???...? 2,5 +??.???????? 1,5 +??????.??#.? 3,1 +?.#???#?#????#??#?? 1,1,4,6 +?.#?##????#?? 4,3 +??##??#??????#? 11,2 +??#????#????? 3,6 +.????#..?? 3,2 +?..??#????#? 1,1,4 +.??#?#?????? 7,1,1 +?????.????????# 2,1,4,4 +#??????##???? 1,1,5 +?????.???##?##?#???. 4,9,1 +?#?#???????? 8,1 +???????#??#?#?## 1,1,10 +?..?.?#.?#?#.???? 1,1,4,1,1 +??.??..??. 1,1,1 +.?.???.??#? 1,2,2 +.?.?#????##?##. 1,5 +?.??#####???#??#??.. 5,5 +.??##.?.?#. 3,1 +?##???.?#. 5,1 +??##???.??#?#??#.?.. 6,7 +???#.??.???# 3,3 +?.?.???##?????? 1,6,1,1 +#????#???# 1,2,1 +??.?.?????#???# 1,1,1,1,1 +?#???.???????.#? 4,1,1,2,2 +.??##?..?##?????#.? 1,3,9 +????#?????#? 2,1 +?.?##??????? 1,6,1 +.###??#?.?#??# 3,2,4 +????###??? 1,3 +??????#??????????? 1,7,3,2 +??#.?##?#. 2,4 +?..??????. 1,1,1 +???.??#?#??#?????# 2,1,8,1,1 +?.#???????.????. 7,1,1 +.#.?#?###.##??????.? 1,1,3,2,4 +??.???.??#??##?#?. 1,8 +..?#??#?????#?.. 5,1,1,2 +?.??????.??????? 1,4 +????????#.??#?##.# 1,2,2,4,1 +?.??.?.??##?.. 1,5 +..?.??.#????#?? 1,2,1,4 +??#?.?.###?.??#?? 2,3,3 +????###????#???#? 6,1,1,1 +??#?.?##????????? 3,7 +???????.???? 1,2,1,2 +??#????##?.???#??? 1,7,2,1,1 +.?.?....???###?...?? 1,6 +.?#???##????? 3,7 +???????#??? 1,4 +#?#.?#??#. 3,5 +.?#?????.?.??# 1,2,1,2 +????.#?#???#??#?? 1,11 +?##????.##???? 7,3,1 +#???#?????#?#?#??? 1,3,1,9 +..?????#?.?????? 7,1 +???#??#??##????#??? 1,1,2,8,1 +????????.???? 6,2 +.????#????????#?? 4,4 +.?????##?? 2,4 +.??.???.?????.#? 2,1,2,1,1 +???.##.##..##? 1,2,2,2 +??###.?????????????? 5,1,2,1,5 +?????#?###??.. 2,1,3,1 +?.????#?#??.?.?? 1,3,2 +??#.??#??. 1,5 +?#?..???#?## 3,1,5 +?#..?#????? 1,1,2 +.???#????#. 3,2 +?????????###? 2,4 +.?##??#????.? 8,1 +.#???#.??#? 5,1,1 +?#??.??..??????? 2,2,6 +#?##???#???? 5,5 +?.?.??#????#??#??. 1,1,7,1 +.##??..#?.?? 2,2 +????##.????.? 3,2,1,1 +?..????#?#?#.???.??? 8,1 +???#??.????..?.? 1,4,1 +.??.??.#????####?? 1,1,9 +??#?.??#?.??? 3,4,2 +??#?????##. 3,4 +??#?#..??#??? 1,1,2,1 +???.??##??##???#? 1,10,2 +.#??.?###?.#????#?. 3,4,3,2 +?#?..???????.?#?? 1,5,2 +????????#?????.? 4,4,3 +????.#??.?.?? 4,3,1 +..##.?????. 2,2 +.???????#??? 2,4 +?.????#.??###?# 1,1,1,3,1 +#?#??????.#?#.?? 5,1,1,1,1 +##???.#?????.???#?# 2,1,4,1,4,1 +.##?#?..??## 2,2,4 +?#?????.??#??#??#?. 1,1,1,8 +#????????#????##? 1,2,7,3 +#..#??.??? 1,2,3 +???#??#?#?# 4,3,1 +#?.?##???? 1,4,1 +??????.??.. 3,1 +???????#???..?? 2,1 +?##????..??# 5,3 +???#..??#? 1,1,3 +???...???? 1,1,1 +????..???.???.. 1,1,1,1,2 +??.??##??# 1,7 +??????.???#???? 2,1 +?????????.#??.?? 6,3 +??.????.?. 1,2,1 +#####?????# 5,1,1 +?????#.?##?#?#????#? 6,5,1,1,2 +??#??##???? 3,6 +?????.??.?.????#??. 1,2,2,1,7 +??????#??.#?.??? 3,2,1,1,1 +??#????#?#? 3,1,4 +??????#.?????#????? 1,4,6,3 +#???.?#??.#???? 4,2,1,1,1 +?..?.##?.?.??.??#??? 2,6 +?????????.???? 1,4,1,1 +.?.??#?#??????????? 8,2,2 +#.#?????..??????#? 1,1,1,1,1,3 +??.??#??????? 2,3,2,1 +??.?.???????? 1,2,1,1 +.??.?##????? 1,3,1,1 +?????.?????? 2,2,2,2 +?????#.???#.?# 4,1,1,1 +??????#??.?????? 1,6,5 +#?.?.??#?##??#?#? 1,12 +??#?##??#?.???? 5,2,2 +#???#??..????#??? 7,1,3 +????????#?#??#???.?? 12,1 +??.?????..????? 1,2,1,3 +?.??#?????#?#????# 1,15 +.??????#?##?.??? 1,8,1,1 +.???????#.?# 5,1,1 +?#?##???#????#???#?? 8,3,3 +????????#???#. 3,2,1,1 +#???#.?#??? 1,2,5 +??????.??##?. 1,1,1,2 +?#.??#?#???? 1,4 +#????#???? 2,3 +?.#?#.?##?#????.?? 1,1,2,2,1,1 +???????#?#.#??#.??# 1,8,1,1,1,1 +?#.#???###?? 1,1,5 +.??.#????#??#?#????? 1,1,12,1 +?#??.???.?. 2,1 +?#.?#.?#??? 1,1,2 +?#?#?.???? 3,1 +?#??#?????#. 3,1,3,1 +???#?##?##??? 1,7 +#.?????????????? 1,1,8,1 +..??.????.?? 1,1,1 +???.???#????.???? 1,6,1,1 +?????#???? 1,5 +.?#.???#???. 2,1,1,1 +???#???.??#?. 6,1,1 +.????#???#??.?.??#? 6,1,1,2 +?????????? 1,3 +.?###?#???. 6,1 +?????.#????#????#?? 1,1,2,1,8 +??##?#??#?.#?#?. 7,3 +???#????#?? 2,1,1 +.?.#??#????.??.??.?. 4,1 +??.??.????.?? 1,1 +???.???#?.??????? 1,3 +???.?.??#????. 1,1,3,1 +#????????? 3,1,2 +.???###.?.???? 3,1 +???###??????#..??? 6,2,1,1 +???##???????? 9,2 +#.???#?.?# 1,2,1 +#.?#.?##???#????# 1,1,7,1,1 +????????#???#??? 2,6,5 +???##.??#?#?#?? 2,7 +???????.?.???.# 2,1,1,1,1 +??.??#?###?##???#.# 1,14,1 +??#?##????? 1,7 +???????.?#?????#??#? 3,1,11 +.??.???#????.??##??? 7,4 +????#??.?? 1,3 +????#???.??.???..? 6,1 +.?.#..#??.?# 1,1,3,1 +.??????.?? 6,1 +##????#??.# 7,1 +.???#?.??????.#? 4,3,1 +?#????.#?.##?? 1,1,1,3 +????.??#???? 2,5 +#??#??????? 6,1 +??????#???.????? 2,6,1,1 +????#???????????# 7,1,1,1 +?.##?.#???.# 3,2,1 +?.????.?.#?? 2,2 +???#????#????. 1,2,7 +?????.??#????#? 4,3,2 +????..??#??.?#??. 4,3,3 +#??.??#???#???#????? 1,1,4,9 +#????????? 6,1 +????????#.?#?? 1,1,2,4 +.?#?.#???.???#?#? 1,4,5 +??#??#???#?.????? 8,1,1,2 +???.??##?#?#???# 1,10 +???.?????. 1,1,1 +??..?#??????#?#?#??? 1,11 +#???#.?#?. 3,1,3 +??#?##?#??##??.?.?? 11,1 +??.?.??.???#?. 1,1,1,3 +.?#??#???.???. 2,1,1,2 +?#?..??#?? 2,5 +??#???#???#???. 3,8,1 +..????????. 3,2 +?????##.?#??#? 1,3,2,1 +?????.???.?#????? 2,2,1,6 +.??#?.???#??????..? 3,5 +????????###.?. 4,3 +?###???#??????????#. 8,4,5 +?#?.#?????????? 2,7,1 +???#????#??.?.??? 6,1,1,1,1 +??????????.#? 8,2 +???#?.??#???. 1,3,1,2 +?.??.??#.?#??.?? 2,3,1,1,1 +#????.??#.?#?????.? 1,2,3,6,1 +#???????#???# 6,1,1 +.?#???.?#? 5,1 +??????.????????????? 3,4,7 +.#.??.?#??#????.??? 1,1,9,3 +?.???#?#??. 1,1,4 +??#???##?..??#?? 9,2 +??.??.?????##?.??. 1,1,1,5,1 +??.??#??.#?????#?#?. 1,5,2,5 +.?##???##??.?? 3,5 +?#??#???.?????.??? 7,1,2,1 +????.?#???. 1,5 +?#????#????.#??? 10,1,1 +#.?####?.?. 1,6,1 +?#.??#?.??? 1,3 +.??????#?.?##? 2,4,3 +??##?????????????? 3,10 +.?.???.#?.?#????. 1,1,2,1,2 +.????.?##?.????##? 4,3,7 +?????????? 1,3 +?.#????.#?.??? 1,2,1,1 +????.?#.?. 1,1,1 +###?.?##?####?????? 4,3,7,1 +??.?????#.#???? 1,4,1,1 +?.?..#??#??? 1,5 +#??#???.?#? 2,2,1 +.?.?#?.?..?. 1,1,1,1 +#?..?#???##????? 1,7,1 +???#?????.#??# 9,1,1 +?#????????.??. 6,1,1,1 +???#?##???.???#??? 1,7,1,4 +#?#?#???????????#? 1,3,2,2,1,1 +...#?.???#..#? 1,2,1,2 +??#????.??#???#?#?.. 7,3,5 +???###.??#??#?? 6,4,1 +.??????#.#????.#. 6,1,1,1 +??????####????#.?.? 5,4,1,1,1 +##??#???#?##??#???? 15,1 +?#?.????.???.#.? 3,1,1,1,1 +??.??#????#?.?? 1,3,3,1 +?#???????.???#?#???# 5,1,8,1 +#?.???.??#? 2,1,4 +????#??????? 2,2,2 +.????.#?#?##??. 1,1,1,1,4 +????.????????#?#? 1,2,9 +??????#.##??? 2,2,3 +.?????#???.??? 2,4,1 +.?????#???#???# 3,10 +???##????#.??.? 5,1,1,1,1 +??#?.#??#???.####?? 1,1,1,4,6 +????#????.?.??#?? 6,4 +??..?.?.?..# 1,1,1,1 +??????????#? 1,1,1,1 +??##????#..?.????##. 4,3,1,1,2 +.?#?.?.??.#???????# 1,1,1,1,1,4 +?.?#..?#?#?#?#? 1,8 +.#...??#??##?#???? 1,11 +??.#???.???#??##?? 1,5 +???????????? 1,1,5 +?????????#?????.?. 3,1,2,3,1 +?#?????#...? 2,3,1 +??.????#??????????.# 1,6,1,1,1,1 +?.?#???#?#.?#?.. 3,3,2 +?##???..##? 5,2 +??.?.??#??? 2,1,5 +??#???.???.?#. 2,2,2,1 +???#??????????.?? 5,1,1 +###?.???#?? 4,4 +??.??#?#?????.???? 1,5,1,3 +??#??#?.??# 6,1 +?.#?#?##?.####.??.# 1,3,3,4,1,1 +?#???.????#?#?###? 3,12 +????..?????? 1,1,1,1 +?.?#?.#?#??##???# 1,2,7,1 +????..??????#?. 1,1,3,1,2 +??##????.??#?.??. 4,1,1,2,2 +.????.????#???? 3,1,3,1 +?.?????##?????.??? 10,1 +?#??#??#????#???#. 1,5,1,3,1 +#?.?.????###?.#???# 1,1,7,1,1,1 +.#??#??????#???# 1,2,7 +??.###?????? 1,3,3,1 +???#?.????#??.?.??? 3,4,2 +??????###?#???#??#?. 1,13 +#?.#?????#??????? 1,1,1,1,6 +#??.???..?? 3,3,1 +.???#??#??????.? 1,5,3 +#?#??#???##?.???.# 11,2,1 +?#???.#?.??#??? 1,1,1,3,1 +?#??##?##?.?? 2,5,1 +?.##???.???#?? 4,5 +?.?##??#???? 1,6,1 +?#?###.???#????#?#?# 6,10 +##.?..??.?? 2,1,1 +??.????????????. 4,1,2 +???..#????#??????.? 7,2 +#.?#??????##? 1,2,1,3 +.??#????#...#?.? 7,1 +?.?#????####???.?? 1,1,10,1 +?#??#?#???..????? 8,5 +???#?.??????# 5,1,2,1 +.??.?##??? 1,3,1 +??.????????? 1,2 +??#.???#?##??#.? 1,1,8 +?????.#??#???###?.? 1,1,4,5 +#??##?????.#??#?? 7,1,2,1 +##?#?.#.??????????? 5,1,2,1,1,3 +?##?#.???????.?#.??. 3,1,6,2,1 +.??.???????#?#?#?# 1,1,1,5,3 +???????????.??. 4,1,2,1 +?#.????#????#?.?.? 2,10,1 +.?#.?????? 2,1,4 +.??#?#.??????..? 5,3 +??????#???????..??? 5,2 +???????##??#??????. 8,1,3,1 +#?#..?#?????#?#?#?#. 3,12,1 +?????#???#?..#??? 5,1 +???#?#??#??.??##???? 1,2,1,3,8 +??#.?.???????.#???.# 3,1,5,1,1 +?????????. 1,1,1 +??.??????#.#?#?#?#?? 4,1,3,4 +?#?#.???????.?.???? 4,1,4,1,1,2 +?#?..?##???#.? 1,3,2 +??#.#.?#??.?? 1,1,2,1 +#?#????..???.?#.? 7,3,2,1 +?#.?##??##?? 1,8 +??????#?#??... 2,7 +?????#?.??#?. 7,1,1 +#?.?????#???..?.??? 1,4 +?#?#??##??????????? 15,1 +??.#?#??#.????????? 1,6,1,1,1 +????##??#.?#?? 7,1 +?.##.????##??????? 2,7,3 +?????.?.##??.? 2,3 +??..????#???????? 1,1,3,1,4 +?.#????..??????#?. 1,5,5 +??#?#????.?#?? 1,3,1,2 +?#??????#??#??????? 3,1,5,1,3 +?.???.?.#??.????.? 2,1,3,2,1 +.?#????.??.#?.#?#?? 3,1,1,2,1,3 +???#??#???????? 1,12 +??????.#?#???##? 1,5,2 +??????##?..??????? 3,4,1,2 +?#???#??.???.#?#?? 3,3,1,3 +???#????.??.. 2,1,2,1 +#??###??##??? 1,7 +??.??.?#.???????.?? 1,1,1,4,1,1 +??????????#??? 2,1,7 +???.??#????#? 1,7 +??????????#? 1,2,2,1 +?##???##???????#???# 3,3,8,1 +?.#????#??????.# 2,3,3,1 +?.?#??#..?.?.??? 1,2,1,1,2 +???#?????. 4,1 +..?#.??????##??# 1,1,5,1 +????#?##??.?? 8,2 +?#.?.????????#??? 1,1,1,3,6 +?.?..#???#???#..??? 9,2 +?#?.???.?????.???? 2,5 +?###????#?#???#?? 4,5,1,2 +???.??.??????...# 1,2,4,1 +#???#.????#?#??##? 5,9 +??.????.?#??. 2,1,1,1 +#.?#???.??????? 1,1,2,1,5 +#?#??..?.#??#? 5,1,5 +?#?????#???. 5,2 +??.????????#?#?. 1,1,1,1,3 +#???????#??##?#?#?. 1,9,1,1 +????.#?#.#?##?? 1,1,1,1,5 +??.?#???????#?? 3,8 +???#??.???.? 4,1 +?#????????.??? 1,1,1,3 +??..???#.?.? 2,3,1 +?#???#????#?????. 3,11 +?.??.???##.?#? 2,4,1 +?????.?#.???????.? 1,2,1,1,2,1 +.????.?#.?.?.#????.? 2,3 +.#?###??#???. 6,4 +??#?#???.? 6,1 +?.???##?#?. 1,5 +???????????.??##?. 1,6,1,1,3 +?.?#?.?.?????#??? 1,2,1,1,3 +??????#??##?.#. 2,2,2,1 +.??#?#?.#??.??? 4,2,1 +.????.?#???.????.??. 3,3 +???#.????#???? 3,4,1 +?????#????#???..??? 10,1 +?#???????#?????? 1,1,4,1,1 +?#?##?#?????###? 9,5 +?.####?###???#?? 12,1 +?#??#?#?..?# 5,2,1 +????#??.?##? 1,1,1,2 +??????????? 2,1 +??.?##.????##?? 1,3,6 +.????#?.##???#??. 1,4,3 +?.???????#?##??#? 1,10 +##??.??#???. 4,5 +????##???#??????. 6,2,1,1 +???.??#??..??#??.?## 1,3,5,3 +????.#?#??.?? 2,5 +#???..???.#. 1,2,1,1 +???.??#.??.# 1,2,1,1 +???#??????. 4,1 +?????#???#????#.?. 1,9,2,1 +??#??#?????#?.? 8,1 +??#??.???#??#?????.# 2,10,1 +?????#?##?#??.#?#? 11,1,1 +?#???.#??##??##??.? 1,2,5,4,1 +??.???#?#??#?.? 1,6,1 +?#..???????.?????.#? 2,7,2,2,1 +??.???????##? 2,1,1,4 +???######??.??. 8,1 +?????#????# 1,5,1 +#?###?.??. 1,4,2 +?????????????.? 1,1,2,1,1 +#??.????.?##??? 2,1,3 +.???.#????.????#? 2,5,3,2 +?????????#?? 2,2,1 +??##?.?#?.?? 2,3,1 +??####??#??.#?.??? 8,1,1,1 diff --git a/2023/day13.input b/2023/day13.input new file mode 100644 index 0000000..86cb1be --- /dev/null +++ b/2023/day13.input @@ -0,0 +1,1420 @@ +#..###..##### +###..#....... +.##.#.#.###.. +#####....#### +#####....#### +.##.#.#.###.. +###..#....... +#..###..##### +#.##.##.....# +#########.### +#.##.#..#.### +#.##.#..#.### +#########.### +#.##.##.....# +#.####..##### +###..#....... +.##.#.#.###.. + +.....#########. +#.#..#...#..#.. +.####...#.#.#.. +#####...#.#.#.. +#.#..#...#..#.. +.....#########. +###..#....####. +.#...###..#...# +...#########.#. +##.##.##.#####. +##.##.##.#####. +...#########.#. +.#...###..#...# +###..#....####. +.....#########. +#.#..#...#..#.. +#####...#.#.#.. + +#.####..##### +.##..##...### +...##...##### +##..#.##..... +..##.#.#.#### +.##....###### +.#...###.#### +##.##..#.#### +#...##.#..... +...#.###.#..# +#.#...###.##. +....#..#..##. +##.......#..# +.#.##..#.#### +.#.##..#.#### +##.......#..# +....#..#..##. + +####.#. +##.#.## +#..#... +.#.#... +######. +...#.#. +...#.#. +######. +.#.#... +#.##... +##.#.## +####.#. +###..#. +##.###. +.....#. +.....#. +##.###. + +....##... +..##....# +...#.#.## +...#.#.## +..##....# +....##... +##...#..# +..#.#..#. +...###..# +##.####.# +..#...#.. +.#...###. +...#..#.. + +.#.######.#.... +##.#....#.##..# +#.##.##.##.#### +#.#...#..#.#### +############..# +...#.##.#...... +...#....#...... +###.#..#.###..# +..########..##. +.##########.... +.#.##..##.#.##. + +##..#.# +....##. +##...## +#...### +..#.### +.##..#. +...#.#. +...#.#. +.#...#. +.#...#. +...#.#. +...#.#. +.##..#. + +.####..###... +..##.......## +##..##..#.#.. +........##### +#.##.####..## +#.##.###.#... +##..##.#..... +#.##.######.# +..##..##.#.## +#....##..#.## +##..##...#... +########.##.. +#....####.#.. +..##..#..#### +######.###.## +######.#.##.. +..##...#..### + +...##.....#..## +..#..#.....#... +##.##.##.#..#.. +..#..#...##..## +..........##... +..#..#..##..#.. +#......###.#... +#..##..#..#.### +........#.#.... +##....##.#.##.. +##.##.###.#..## +##....###.##.## +#.####.#.#..#.. +.######...##... +...##..##..#.## +.##..##.#.###.. +.#....#.##.##.. + +.#.##..##.# +..##.##.##. +##..#..#..# +.#..####..# +#.......... +..##....##. +..##....##. +##..####..# +.########## +#....##.... +..##.##.##. +#.......... +#####..#### + +#....##.... +.#....#.#.. +..#...#.### +###...###.. +....#.#.### +#.#.##.#### +..#######.. +.##...#.#.. +.##...#.#.. +..#######.. +#.#.##.#### +....#.#.### +.##...###.. +..#...#.### +.#....#.#.. + +.#....##..# +#.#..###..# +#.##...#..# +#..#####..# +####.#.#..# +.#.###.#..# +####...#..# +.##.#.#.##. +#....#.#### +#.##...#..# +##..####..# +.###..##..# +.#.#..##..# +##..####..# +#.##...#..# + +#..##.#.#.#.. +#..##.#.#.##. +.##..#.....#. +.##..##...... +#####..###### +#.###.##...## +...##.#..##.. +#.##...#..#.# +...#..###..## +#.#.##..#.#.# +.....#..##### +#.#...#.#...# +#.#...#.#...# +.....#..##### +#.#.##..#.#.# +...#..###..## +#.##...#..#.# + +#..#.##..#### +####...#.#### +.##..#..##..# +.#..#.#.##..# +.###...#..... +#.#.###.##### +#.#.######### + +#.##.##.##.##..## +...#....#...#.... +.....##.....#.### +#...####...#.#... +..#.####.#..#.#.. +#....##....####.. +#...#..#...#.#### +.#.######.#..#.## +##.#.##.#.#####.. +.##......##.#.### +..###..###....### +............##... +###.####.###..### +#..##..##..#..... +.#..#.##..#...#.. + +.......#..##.## +..##...#.##.#.# +##..##.##.#..#. +##..######...#. +######..######. +..##..#.####..# +#.##.#.#.#..##. +######...##..## +##########...## +##..####.##.... +######...##.... +..##..####.##.# +..##..###.#.#.# + +#####.#.######. +#.##.#####.##.# +...#...#..##.## +.#......#..#.## +.#......#..#.## +...#...#..##.## +#.##.#####.##.# +#####.#.######. +....#.####.#### +...####..#.###. +...####.#.#.### +...####.#...### +...####..#.###. + +###..#### +....###.# +....###.# +#.#.##... +..#.....# +..#.....# +#.#.##... +....###.# +....###.# +###..##.# +....#.#.. +##....##. +.#.#..... +.#.#..... +##....##. + +....##. +.##.... +..##..# +#.##### +##.#### +###.... +##..... +##.#### +#.##### +..##..# +.##.... +....##. +.#..##. +#.#.... +.#..##. + +..#..#....##..# +..#..#......##. +##....##..#...# +.######.##..##. +##....###.##..# +.#.##.#...#.... +#.####.#.##.... + +.#.#...#.#.#..# +...###...##.##. +.##.....#...... +.##.....#...... +...###...##.##. +.#.#...#.#.#..# +#..##...###.#.. +..#.#.#.#..###. +..#.#.#.#..###. +#..##...###.#.. +.#.#...#.#.#..# +...###...##.##. +###.....#...... + +..#..#.#..# +..#..#.#..# +###..##...# +######.#.## +##....##### +..##.#.##.. +..##...###. +...#....### +..#.##..#.. +##.......## +##..##...#. +##..####.## +##..#.....# +.####..#..# +..##.....#. + +##..########... +#....###...#... +.......#.#...## +#....##..#.##.# +#######.#..#.## +..##...##....#. +#.##.#.#.###..# +#.##.##.#.##... +#.##.#.####...# +.#..#..#.#...## +.#..#..#.#...## +#.##.#.####...# +#.##.##.#.##..# + +##.##.###.....# +.....###.###.## +...#.#.##..##.. +..#.######..#.. +...#.#..#.##.## +..#..#.###..... +..##..#....##.. + +.#.###..##. +.#...#####. +#..##.###.# +..####.#... +#..#...#... +####.##..## +..###...... +..###...... +####.##..## +#..#...#... +..####.#... +#..##.#.#.# +.#...#####. +.#.###..##. +.#.###..##. + +##..##..#####.. +#.##.##..#...#. +#....#.##.#..## +##..######..### +..##...##..##.. +..##...##..##.. +##..######..### +#....#.##.#..## +#.##.##..#...#. +##..##..#####.. +....#.##..##.## +#.##.##.##..##. +.#..#.#..##.### + +.#..########..#.. +#...#......#...## +.#....####....#.. +######.##.####### +...##.#..#.##.... +#....######.#..## +###....##....#### +##.###.##.###.### +##.#..####..#.### +#..##......##..## +#.##...##...##.## +....########..... +.###.##..##.###.. +.##..##..##..##.. +##...#.##.#...### + +..#.##.#....# +##.#..#.####. +.########..## +#.#.##.#.##.# +..######....# +#..#..#..##.. +#.#.##.#.##.# +.#..##..#..#. +...#..#...... +#...##...##.. +#.##..##.##.# +#.######.##.# +##.#..#.###.. + +..#.#####.. +###..#.#.## +..##..##.#. +..##..####. +###..#.#.## +..#.#####.. +....##.#### +..##.#..... +..#.##.#### +#####...#.. +#####...... +###.#.#.#.. +..#...##### + +.##.#..#.#..##... +..#..##.......#.. +###..###.#..##.## +###.#.#####....## +....#.###.###.### +##.#.#...##.##... +###.#.####.#.#... +..#.#.###.##..### +##.#.#.....#..... +.....##.##..#.### +..#.#..######.### +..#..##.#####.### +##..##.##..###.## + +...#...## +.#....### +..#.#.#.. +.#.###.## +.##...... +#..#..#.. +#...##### +#.#.###.. +#.#.#.#.. +.##...### +.##...### +..#.#.#.. +#.#.###.. + +....####.##..## +#..###.#.#...## +#..###.#.#...## +....####.##..## +...##..##.#..#. +##.##.##....##. +#.#...##...#.## +..###.....#.#.. +#.##.#..###.#.. +...##.#....#..# +#...##.######.. +##.###...#....# +##.#.##...##..# +####........### +####........### +##.#.##...##..# +#..###...#....# + +..#......#..#.. +..#......#..#.. +##..####..##.## +.##########.#.. +.#.#....#.#.### +##.######.###.. +##.######.##... +..########.#.## +.#........#...# +....####......# +############... +####.##.####.## +.#.#....#.#.#.. + +##..###.#..## +#.##.#.###.#. +#.##.#.###.#. +##..###.#..## +.....#.#.##.. +........#.... +..##.....#..# +#.##.#.#..#.. +.####..#.###. +.####..#.#.## +.####.#....#. + +#..#..#.#.### +#...#.##.##.# +..##....#.... +####..###...# +####..###...# +..###...#.... +#...#.##.##.# +#..#..#.#.### +###.##...#... +.##..#.###.## +..##...##..## +..#.#..##...# +..#.#..##...# +..##...##..## +.##..#.###.## + +##.##.. +...#..# +...#..# +##.##.. +#.##### +##.#... +##.#.## +..#..## +####.## + +..#......#.#... +.##......##...# +##..####..####. +.....##.....### +##..#..#..##.#. +.#.##..##.#...# +#...#..#...#..# +#...#..#...#..# +.#.##..##.#...# +##..#..#..##.#. +.....##.....### +##..####..####. +.##......##...# + +#.#..#... +#.#..#... +...####.# +.##....## +###....## +...####.# +#.#..#... + +...#.#.##.#.#.. +.#..#......#..# +#.##.#.##.#.##. +#.##.#.##.#.##. +.#..#......#..# +...#.#.##.#.#.. +..#.#.#..#.#.#. +.#.#...##...#.# +.###.######.### +####.#....#.### +...#..####..#.. +..#...#..#...#. +#...#.####.#... +#..##########.. +#...##.##.##..# +#...#.#..#.#... +##.#.######.#.# + +####....### +###.####.## +....#..#... +....####... +..#......#. +##...##...# +..########. +..###..###. +..##.##.##. +####.##.### +##..####..# +###..##..## +..##....##. +####.##..## +##...##...# +####....### +##..#..#..# + +.##.###.### +.##.##..### +.##.##..### +.##.###.### +...#.#..#.# +..##...#... +##.#.#..#.# +#.##..#..#. +...###...#. +..#..##.... +..#.##.#### +......##... +##.#...#..# + +......#..#... +...#.###.#... +##.#...###.## +##.#...###.## +...#.###.#... +...#..#..#... +###.####.#..# +###.#.#..##.. +#######.#.### +##.##..#.###. +....##.#.##.# +###.###.#..#. +...#####...## + +#.##...#.#..### +##.#..#.#....#. +#..#..#.#....#. +#.##...#.#..### +##.###.##..#... +...#......#...# +.#.....#..#.##. +.###..#...#.### +.#...#####..##. +.#...#####..##. +.###..#...#.### +.#.....#..#.##. +...#......#...# + +...###..##..# +..###..###..# +..####.###..# +...###..##..# +..#...#.###.. +..#...###.#.. +..#..#.#..... +##..###.###.# +...##..#..#.# +...#..#..##.. +###.##...#.## +..##.#.#..#.. +..##.####.### + +##.##.##...##.. +#.#.#..###.##.# +#.#.#..###.##.# +##.##.##...##.. +#..###..#..##.. +##..##.###.##.# +.#..###...####. +.#.#####.#..#.# +#..#...##.#..#. + +######. +..#.... +##..#.# +.###.#. +#.##### +....#.# +....#.# +#.##### +.#.#.#. +##..#.# +..#.... +######. +######. + +##..#.#.... +##..#.#.... +..#.#.#.... +#######.##. +#.###...##. +###.##..##. +..#........ +.####.#.... +#.##...##.# +####...#### +..##.#..##. +..#.#...... +..##.#..... + +.##.##... +#...#.#.. +.##....#. +........# +#..##..#. +.##.#.#.# +....#..#. +####..##. +####..#.# +####..#.# +####..##. + +##..##.#..#.##. +####..#.##.#..# +..#.#...##...#. +.#..##.####.##. +#.##..##..##..# +.##.##.#..#.##. +.##....#..#.... +#..#####..##### +#.############# +.#..##.####.##. +.#..##.#..#.##. +#..#..#.##.#..# +.######.##.#### + +.#..#...#####.... +#.#.#.#.###...### +.#..##..#.#.#.#.# +.#######..#.#.### +...#.......###### +.##...##.#.##..## +.#.##...###.#.### +.#.##...###.#.### +.##...##.#.##..## + +###..####.# +###..####.. +#....##.#.. +#.....#.### +.#.##..###. +.#.##....#. +.##.##..#.# +.#..##.#... +...#.##.##. +...#.##.##. +.#..##.#... +.##.##..#.# +.#.##....#. +.#.##..###. +#.....#.### + +.#.##.# +#...... +.##..## +...##.. +...##.. +.##..## +#...... +.###### +.#....# +#.#..#. +###..## +..#..#. +#...... +##....# +.###### +##....# +.#....# + +.#..#.#.##....# +.....#.##...#.# +.....#.##...#.# +.#..#.#.##....# +.####..#..##..# +...###...##.##. +..##.#..##..#.. +##..#.#####...# +#.###.#.....#.# +#.#.##.##..##.# +#.#.##.##..##.# +#.###.#.....#.# +##..#.#####...# +..##.#..##..#.. +...###...##..#. + +..#.##.###.#. +#..##...#.#.. +#.##...#..##. +#.###.##.#... +.#.##....#... +#.##.###..#.. +......#.#.#.# +......#.#.#.# +#.##.###..#.. +.#.##....#... +#.###.##.#... +#.##...#..##. +#..##...#.#.# +..#.##.###.#. +..#.##.###.#. + +.##.#.#.##. +.##.##....# +.##.##....# +.##.#.#.##. +.##.##.#.## +#..#..#.#.. +.....##.##. +.##.##..... +....###...# +.#####....# +#####.#...# +#####...#.. +#..#.#.#### +.##.#####.# +.##..##..## + +...##.#..#. +.#.##.####. +.#...#.##.# +#.######### +..######### +##...#....# +##...#.##.# +..######### +#.######### + +###..##..######## +....#..#.#..####. +#.#..##..#.#....# +..#..##..#..#..#. +##.#....#.####### +###......###....# +.#.##..##.#.####. +#...####...###### +.#.#.##.#.#...... +###.####.###....# +#..........#....# +..#.####.#..#..#. +...##..##....##.. +.#.##..##.#..##.. +...##..##........ +.#.#....#.#...... +..##.##.##...##.. + +..#.#....## +......#.... +...#...#.#. +.###..#.#.. +.#.#.##..## +#..####..## +#..####..## + +....#...# +###.#...# +#####..## +#######.. +..#.##.#. +##..#.... +###..##.# +###..##.# +##.##.... + +..##.#...#..# +..#..###..### +###.....#.#.. +..##..#...#.# +##....#..##.. +##....#..##.. +..##..#...#.# +###.....###.. +..#..###..### +..##.#...#..# +####...#..### +..#.##..#..## +..#...##.#... + +..#..##.##..#.# +#####....#.##.. +.#..##..######. +#####...##.#### +..##.#.##....## +...#####.#.#### +..##..#...#.### +.###..#...#.### +...#####.#.#### +..##.#.##....## +#####...##.#### +.#..##..######. +#####....#.##.. +..#..##.##..#.# +.###..###.#.#.# +.###..###.#.#.# +..#..##.##..#.# + +#...#.#.. +#...#.#.. +..##.#... +##..##... +.#...##.. +#..###.## +#.#####.. +.#....##. +.#..###.. + +#..##..#.#...##.# +......#....####.# +.##.####.######.# +........####.#..# +#####.#..##.#.... +#..##..#.###..#.# +#..####.########. +#..####..#######. +#..##..#.###..#.# +#####.#..##.#.... +........####.#..# + +#...##.##.#.. +##.##..###.## +#.######...## +##.#.######## +.#....#...... +#.#..##.##... +.##.#.##...## +##..###.#.... +..####...#.## +.##.####..### +#...##.#.##.. +#...##.#.##.. +..#.####..### + +#....#. +#.###.. +#.###.. +#....#. +..###.. +.####.. +.....#. +...#.#. +####..# +..###.. +#...#.. +......# +##...#. +##...#. +......# +#...#.. +...##.. + +#..#..#.####.#. +..#.###.#####.. +.....#.###...#. +..#....#.#.##.# +..##..##.#.#### +..#####.....#.. +..#####.....#.. +.###..##.#.#### +..#....#.#.##.# +.....#.###...#. +..#.###.#####.. +#..#..#.####.#. +.#####.##.#..## +.#####.##.#..## +#..#..#.####.#. + +......# +..##... +......# +.#..#.# +##..### +#....## +##..##. +##..### +##..### +##..##. +#....## +##..##. +.#..#.# +......# +..##... + +#....##.# +.######.# +#.#..##.# +.#.###.## +.#.###.## +#.#..##.# +.######.# +#....##.# +#..###... +..#.#..#. +#.###.##. +###.##### +.###..##. +#.###.##. +#.###.##. +.####.##. +###.##### + +.#.##.#.#..#. +.#.##.#.#.... +##.##.##....# +..###...##..# +...##....#.## +.....##.##.## +###.....#.### +.##.###.#..#. +.##.###.#..#. +###.....#.### +.....##.##.## + +######.###### +.##....#...## +#####.#.##... +.##.#.###..## +.....#...#... +#..#####.#.## +#######.#.... +.##...#..#.## +....##..###.. +##.###...#... +.##.##....... +.....#.###... +#####.##...## +.##.......### +.##..##..##.. + +#......#..#....## +#..##..##....#### +#.####.##..#.##.# +..#..#..#..#..#.# +.#....#..#.##..#. +##.##.###.##.#### +........#.#...#.. +.#....#.##.....#. +...........##..## +##.##.#####...... +##..#.##.#..#.##. +#..##..#.#.####.# +#..##..#.#.####.# + +.#..#..#..# +.###....### +#..#.##.#.. +####....### +####....### +#..#.##.#.. +.###.##.### + +....#..##..#..... +.##.#......#.##.. +.######..###.##.. +.......##........ +##.#........#.### +#..#..####..#..## +.##...####...##.. +####........##### +..###.#..#.###... +.####.####.####.. +.#..###..###..#.. +.###..####..###.. +..#.#.####.#.#... +..#.##.##.##.#... +##....####....### +#.##..####..##.## +###..#.##.#..#### + +.##.##.....## +#.#..#...#.#. +..##...##.### +..##...##.### +#.#..#...#.#. +.##.##....### +##..#.....#.# +.#..#..#.#### +....#####.##. +....#####.##. +.#..#..#.#### + +#..#..######..#.. +.##.#.#....#.#.#. +#.#.#...##...#.#. +.....##....##.... +.#.#..#....#..#.# +#.....##..##..... +#.....##..##..... + +.####.##.##.##. +..##...#....#.. +.####.#.####.#. +.......######.. +..##........... +#....#...##...# +.####...####... +.......#....#.. +......#.####.#. +##..########### +######.##..##.# +.####.#.#..#.#. +......##....##. +#.##.########## +.......#.####.. + +#.#....#.#..# +.###..###.#.. +.##....##...# +...#..#....## +#........#.#. +####..####... +....##....##. +....##....##. +####..####.#. + +.###.#.###..# +.....#####.## +.#.##.##..##. +...##..#.##.. +######...#... +######...#... +...##..#.##.. +.#.##.##..##. +.....#####.## +.###.#.###..# +###...##.#.#. +..#..##.#.#.# +###.#..#...#. +#.##.##.#..## +#.##.##.#..## +###.#..#...#. +.....##.#.#.# + +...#..#.#.# +#...#.#..## +...#.#.#.#. +#.###...#.. +....#...##. +....#...##. +#.###...#.. +...###.#.#. +#...#.#..## +...#..#.#.# +.#...###... +####....#.. +####....#.. +.#...###... +...#..#.#.# +#...#.#..## +...###.#.#. + +.#...#. +.#...#. +#...#.. +##.#..# +#####.# +..#.... +##...## +##...## +#.#.... +#####.# +##.#..# +#...#.. +.#...#. + +.....###......# +.##...#...#.... +#..##..##.###.. +....##.#....#.# +#####...###.... +.##..##....#.#. +#..#..#..#...## +####.#.#####.#. +.##...##....#.. +....#.##.#####. +....#.##.#####. +.##...##...##.. +####.#.#####.#. +#..#..#..#...## +.##..##....#.#. +#####...###.... +....##.#....#.# + +.##..##..#. +.######..#. +#.####.##.. +#.#....#.#. +.######.##. +#..##..#..# +###..###.## +#..##..#... +.#.##.#..#. +#.####.#... +.######..#. +#########.# +#.####.#... +.#.##.#..## +.######.##. +.######.##. +.#.##.#..## + +#.#....###....# +#.#.####.###### +.####.#...#..#. +#....#..####### +##.#.#....####. +#####..#.###### +#####..#.###### +##.#.#....####. +#.......####### + +.#..##.## +#.....### +.##.#.### +#..#.#... +#..##..## +...##.... +#...#..## +.####.#.. +##..##### +.#....#.. +.#..#.... +......#.. +......#.. +.#..#.... +.#...##.. +##..##### +.####.#.. + +...############## +..##.....##...... +#.....###.##.##.# +#.#.##.#####....# +##.#....#.....#.. +#...#..##.#.####. +.##.#..#.##.#..#. +#...##..#..#....# +#...##..#..#....# + +.##.##### +#...#..#. +#.#..##.# +##....#.. +.#..##.#. +.#..##.#. +##....#.. +#.#..##.# +#...#..#. +..#.##### +.##.#.##. +..#..#.## +#####..#. +#####..#. +..#..#.## + +.#.#......#.#.. +#..########..## +.####....####.. +#..###..###..## +#.##..##..##.## +..#........#... +.############.. +#..#.#..#.#..## +##.########.### +.##.###.##.##.. +.#....##....#.. +###...##...#### +##..##..##..### + +.##.#..#..#.. +.......#..#.. +.###.#.####.# +..####.#..#.# +......######. +.#####.#..#.# +.##..######## +..##.#.#..#.# +....###....#. +#...#..#..#.. +#...#..#..#.. + +##..#..#. +##..#..#. +#.###.##. +#..#...## +.#.#...## +.##....## +....##..# +....##..# +.##....## +.#.#...## +#..#...#. + +##.##.#.. +..#....#. +######.## +..####.#. +....#.##. +###.###.. +..###.#.# +##...#.## +..##.#.## +##..#..#. +..#.###.# +....#..## +..#...##. +..###.##. +..#.##... +###.#.### +###.##### + +##..##..# +.##.#.#.# +...#.##.. +#..#.##.. +.#####... +..##.#### +..#..#### +..#..#### +..##.#### + +...####.... +##......### +#.#....#.## +#.######.## +#..#..#..## +#.##..##.## +##..##..#.. + +.....##.###..###. +#....##.###..###. +.##....##.####.## +.#.##.#####..#### +#.....#.###..###. +##..#.#..#.##.#.. +##.#.....#....#.. +#.#.#.##..####..# +####..###.#..#.## + +.#..##.#.#####. +.#..##.#.#####. +#..#.#.###.#... +.#.#.#.##..#... +..#...#.#...##. +......#.####.## +###...##.#..### +##....##.#..### +......#.####.## + +#.###.# +####... +.#....# +.#....# +####... +#.###.# +#.###.. +###.### +.....## +.##..## +###...# +##....# +.##..## +.....## +###.### + +#.##.##.##.#..# +..##....##..### +.####..####...# +.####..####..## +#.##.##.##.#..# +############.#. +############... +#.##.##.##.#... +############... +#.##.##.##.#.## +.####..####.##. +##..####..##... +#.##.##.##.#### +#....##....###. +############.#. +............### +..###..###..##. + +.#..#.#.#.#.#.... +#########.##.#### +#########.##.#### +.#..#.#.#.#.##... +#.##.#.#..#.#.... +..#####.#.#..#... +.##.#.#...##.#... +...###.#.##..#... +#.....###....#.#. +..#..####.##..##. +#.#..#...####.... +#.#..#...####.... +..#..####.##..##. +#.....###....#.#. +...###.#.##..#... +.##.#.#...##.#... +..#####.#.#..#... + +.##.##.##..## +...####..##.. +#..#.....##.. +.##.##.#.##.# +####.#...##.. +#..#####.##.# +.##.#.#.#..#. +######.###### +....#.##.##.# + +.#######..#.. +...#.#.#...## +...#.#.#....# +.#######..#.. +.#######..#.. +...#.#.#....# +...#.#.#...## +.#######..#.. +.#..#.#.##.#. +....####..... +#..##.#.##### +##...######## +.##.#...#..#. + +..#..##..## +..#..##..## +##...#.#.#. +#.#.#.#.... +.###..####. +##.#.....## +..#.#.##..# +...#...##.. +#########.# +#####.###.# +...#...##.. +..#.#.##..# +##.#.....## +.###..####. +#.#.#.#.... + diff --git a/2023/day13.test b/2023/day13.test new file mode 100644 index 0000000..3b6b5cc --- /dev/null +++ b/2023/day13.test @@ -0,0 +1,15 @@ +#.##..##. +..#.##.#. +##......# +##......# +..#.##.#. +..##..##. +#.#.##.#. + +#...##..# +#....#..# +..##..### +#####.##. +#####.##. +..##..### +#....#..# diff --git a/2023/day14.input b/2023/day14.input new file mode 100644 index 0000000..5ad82d9 --- /dev/null +++ b/2023/day14.input @@ -0,0 +1,100 @@ +.O.....##O.O#..O#....##O#.#.#..##O#..O.....#.OO..O.O.O.O...O....#O...OO....##.O..OO.O......O..O..... +....O..#O....#...#OO..#..#..O.....#O......O.O.#..OO..O....#..#.OO....##O...O..##...#.O...O.#...#.O#. +.O.O#.O...O...O....O...O#....#.#O#...O...#.#..........O#...O#O..O..#.OOO..O.O.....O#.........#O...O. +.O....O.OO.#.....#.#O......##O..O.O.##.#..O##O.O.#OO....O.O..O#.OOO..O..#..##.#...#.O.#O.#.#.....O.. +..O......O..O.O.#.OO.OO...#.O....#...#O..OO.#.O......O....O.O.....O.#.OO..O.OOO.......O.O...##O...O# +.O.O.........#.O#.#OO##..#OO..OOO#....#....O.O..#.O......#.OO..#..O.O..O.O..#....#.O#..OO###.....#.. +.O..#.#.OO.#...........#..O#....O..O.O#.......#.OO.#OO....O.#O.#.....#.OO.#...#..O..O##.O.O##..#.#.O +..O..#...#..OO.#O.#.O.O#O...O.O..O..O#..#..#..O..........O.O#.....O...........O.###..#.#..O#.#.O...# +#..O...#.O..O.O......#O.O##...##...OOO....#.O.O#OO.##...OO.OOO..#.O..##.....O..O.O.#O.O..#.O#O...O.# +OO....#.#...O...O.#...##O..###O.......OO...#.#...O.#..#.O......O....#.O#..#O..O...OO...#..O#..O....O +O#..#O...##O.....#.O.#.O...##......#...#OO#...O.......#.#.OO#.#..#..O#OO...O.......O.#...#.##....O.. +#............O#....##.O.O..#O.#.OO.O...OOOO#.......O#O..O.......O#OO#...O.O....#.....#O.#.#..#.OO.O# +#O.O.....O....#O..OO.#O.#....#.##O.O...........O.##.#O##O...O#..O.O.O#......O...O.#....#OO#.#..O..## +.O..#O.O.#....O.........#.....OOO.......O.#O.....#OOOO#.O##O.#.O...O..#OO...O.....O..#.#......OO.O.# +O..O...O......O.O...#..#...#.OO.#.OO.O..O...#...#...O.###....#O#.O..O..#O..#.O.##.......O#..#O...... +#..O...#...#OOO.#.###.#....#..O.O.#.#......OO.#.#...#....#.OO.O..#.O...#.#.....O.#O.O.#O..O....O.O.. +OOO.#...##.OO.O....#.O.###.#.....O.OO#..#....OO...O#.#.O..#O.#..#.O..O....#O.OO#...O..#.....#O...O.O +.#.#...........#.............O.#..##.#O.#.O......#..O..OO.##O.O##.....#..O.O..O.OO..OO.#O.O.##O.O... +..O......O..##O.O...##......##OO..#O.#..#..OO...#...O.O..O..O.O.O##.#O.O#.#.O#....##.O.....O..#.O... +.#...#O.#.#....O..O..O#.O.....O..O.#.O....O.O...#.O#......O..O.O...#.#...O..##O...#.#...O.##..#..O#. +.O#..O.#....#.OO.#.....#O....O#O.#..#.O.....#......#O....O.........#.#O.OOOO#O.OOOO.#.....O.#.O..#OO +#..#.....O.....#.....##.O....##.O.O#OOO..O....O...#....O.O.....#.O#.O....O.O....#..O....O###.#..O#O. +...O...#..#O.O.O.......O.....O#O....#.#OO#......#..OO.....#.#...#...OO.O#O#O.#.#O....#..O....O...OO. +..#.##.#.#..............#O...#O#..##O.#.....O.#.#......O.....O#..O.O.O.#OOO####O.....O..##.O.OO.#..# +O...O#.O....#.O...........#......##.O.O#.....#.O..OO#...O#.##O..##.....#.O.O.....O#.#O.O..O...OO#... +OO.........##....##.O.O.OO.....O...........O.....O..#..#.OO........#O...OO.....#.O.........#........ +#..#.##O#.O#O..#..O...#.#.O.OO...##O..#..O.O........#.#O#..#..O..#.O.....O...O..O.O....#...O#....#.. +O.#.......O..O#O...OOOO#OO..O..#....#O..#...OO..#....O......#..#....O.O#.#....O.OO..O....O....OO..#. +O.OO..........#..O.#O#.#.#O...##..#..O##..##O#.OO......O..#.O.O.O.OO....#.....OOO#.O.#.O.#O##.#OO.#O +#..O....##...#.O.OO.O.O......#.OO...#......O........OO.#O..#.......OO..O..O...#.O......O.#O#O#...#OO +#...#..#OOOO#.#O#O.O#.O.#.###...O..#.....O..............O.....O.#.O....O.O....#...........O...O#.O.. +.#O.O.OOO.....O...O...#.........#..O..O.#..#.O#....O#O..OO.........OO#.........#..OO.O.......#...O.. +..#...O...#O...O..#.....O..O.#.......O...O.O.O.....O......O...#.....##.O.O#..O.#.O..#.O..O..OO...... +.O.O..O..#O..O#OO#OO.#....O...#.O#.O.#...###........O.....O..O.OOO.O...#....O.O....O..OO.###...O...O +.#.....O..OOOO..#...#.#.O......O..O..#.##.#...O#..O.#.#.O#.....##...##O.......##..O.O.O.......#..OO# +...O...O...O..O...#..O#....O....#......O..OO#...O...#.#O.##.#..O..#.##O..#.#...O.....#.#O.O..O.O##.. +.#OO#.....#O...O.#.OO......OO...O..O..O...#............#.OO##..OO..O.O......O..O...O...O...O...O.... +...O....O..#.O.O###..##.O..O.O.#...#.OO.O..O.O.O.O.#.O..#.O##.......O..#......O.O..O.OOO..##O....#.. +O...O.#..........O..OO.O#...#OO.OO..#O#.......O..#....O.......O.#OO.O.O.O.O##.OO..##...O#..OO#..#.#. +.O....#.#O............OOO.......#.O..#.#...#O......#....#.##..O.#.##OO..OO.#.#......O.O.....#.OO...O +..O...O#...O..O..#..#O..O#..O#..O.OO..O#.#...O####..O...O#..##......O#....O....O..O...O........O..O. +O.O.#..#.#..##..#.#....#..#..#.###.O#.O....OO...#....O#.....#.........#.###..#.#OO..#O...O...O.#.... +..OO.#.O.....O.O..#.......O...O..##.#.#O..#....#OO.O....O......#.OO#....O..#O.O...#.OO#O.#....O..O.# +#...O#.O...O..O..O.O#...O.O.......OO....OO..O#.O..............O..O#.#...O#....OO..OO..O....#.#O.O..# +O.O.##..O#...#O......O...O...OOO.....#....O#...O#.#.#........O..##..##.O..##O.O..O..#............O.# +.....#....O..O.O...####...#.O.#..#.#..#....#...#.OO.#..##...OOO.#..#......O.OOO.....#O#.......OO.... +...#.O#.O...#.OOO#.......OO.#..O..O##.#OO.O.#.O.O.O#.....#.O.........O...O....#.O#....#.#O..O..#..#. +...#..O......O..#.O...#.....#....O.....OOO..O..O##O#...O...O.#...O....#OOO##..........O....#O....... +...O.O.#.#...O.O#O#.#O#O....#....O..O....#.O.O#.....#....O..O..............O...##O.O....O..#....#..O +O.....O..#O....O..O##O..#..#.O.OO..#...##........#.#.#.O..###...#O.##..##..#O..O.OOO...O.O.....O.... +..##.......#...O.O.O#O.#...O..OO#OOO.#..O....#...O..#....#.....OO..OO.#....O.....#.##...O.#..O...#O# +O##....O.O..##OO.#.#.O#..##............OO.O.O.#.....#..OO...#...O..##O..........#.......O..OOO...O.# +#OO.......O.O..O...#...O#.#...O..O.....O..OO.O...#OO...O....O...O.O...O....O......#.#.O.OO.....#.... +...#..#OO..#..O.OO.#..#.....O..#O..#....#..#...O...O...OO..O#..O...O.........#...OO.O.#OO#.#.O..OO.# +..O#.O.O.#.#.....#...O..O#O..#..#..#.#...O..O.#.O.OO..OOO.#..OO.#.#.....OO...OO#O#.#..........O.##O. +...O#..O..O..O..#OO.###..O.........O#...OO.....O..O#....#O.O.O..O#.#...O#OO.O..#..O.O.O...O.OO.....O +.....O.#.O..O...##..#.O#O.#.......#O.OO#...O...##.OO#...OOO....#..#..#O...O.O#O.O..O.#OO...#..#.O#.O +....#...#O.O...##.#...#...##.O....#.#.O.O..##.O...#O...O#OO#..#.O.....#O#O.O.O#O...#.#.O.O..#...O..O +.O...O....O.....#.#O.#.##.##..O#..OO#O..#..O.#..O..O#....O#..#..OOOO.#.O..OO.O.##......#...#......#O +O....O.O...O#.OOO.#..O.......#..#....O#O........###..O..#.O.O.O.......#....O.O.O.##.O..#..O....O..#. +..O..OO...................OO...#........#.#...O..#.O.......#...O.......O..O#...O.#.O#....O#.O...#... +.O..#......O#O#..#......OOO........OOO........O#....O#.OO.#.......O#.OO.......##.....OO.O......O.O.. +.#O..#O#O#..###.............##....#..O...#.O#O..O###.O..##..#..#OOO#.#...O.#.O.....O.#...........#.. +.....O..O..OO.O.......OO.O.....#..##.##OOO#.#O..O.#....OO#OO...#...##...#.O...O....OO.O.##..O#..###. +OOO#.....#..#.O......O...O...#O..#....O.OO.#...O..........O.....O..O.....OO...#..O..O.#OO.O..OO.#... +O.OO.#...#.#...#...OOO.......O#....O....#....O.#...O.#.##.#OO.O..##......O.##OO#.......#.O...O.OOO.. +.....#.........#.............O##.##..O..OOOO....#....O..#..O..#...O...OO.#O....#O.....O#O#......#..# +.#.O#O#.O#OOO.......O.O......O.#.#....#O..O..#..#.......#O.O#.....###..O.#.O......#.#.O#......#O.... +..#O#.#.O.#O.OO.#O.O####.#..##.O.....#...#O#..#O#O#....O....OO#....O#.O...O.........#O##.O.O....#... +.OO..#O..O#.....OO....#O.O.....OO#...O.....OO.......#..O#...OO.#.O..O.O.#O.OO#.#O.....O...O..O.O.O.. +..##OOO.O.....##..O.#.#.##..#...##.O..O....OO...##O..#.OO....#.O#.......O..O..O.#.#.#....O.O.O#O..O. +O#.#..#.##.O..O.O.....OO#....OOO.O.O.OO.....O...###.......#O...#....#.OOO.#O..OO...O..#..O.O.O.....# +OO#.....OO.O.#OO...#O...O.....O..O.#....O............#O.O.O....#.......O.O..OOO...#...#...#......... +......#..O.#.....O....OO..##..##........O.#O..........#OOOO......O......O.O##..O#O#O.O..#.#O.....#.. +..O..OOO.........#.O..O..#..O..O###..O..##...O..#.O.O..#.............O.....##O.OO..#.#..O.##O.##O.O. +..#...#..O........O.O.#..##.O.#O......O.O.#OO..O..#..#O.O.....#.##..##..#......OO..#.O...#..#.O.O#.. +..#...#..O......#......#..O.##.#....OO..#...#.....O.O.O..#.##...##..OO......#.OO....O..O..O.O.#.O... +......O...#O......O.O..OO.O...#O..##..#...#..#....##........##O.O......O.O...#O....OO............... +.....O..#.##....OO.O...O..O..O.O...#....O.#.O....#.#..OO......OO#...#.###..#O...O....O..##O.#..OO.O. +...OO...#...##.##.#..#...#.O..#OOO.....#.#..O...O.##O.#.#..#O.#O.#......O#......OOO.O#.....#......O. +OOO.O.O...###...#...#.#...OOO.O...O..O...#....O.OO...O..##..O........#.O.#....#......##.#O..#.#O#O.. +....OO#.#.....O..O..#......OO.........O....O.....O..O#.#..##O.....#.#.#....#..O#..#OO.O...#.OO##O.OO +O.O..#..O.......O.O....O..OO.O...OO.O.......O###OOO##.O...O...#O#OO......O..O..O...#....##...O..O... +O#.O#.....O...O.O...#.##.#.......###....O.O.##......O....O..#O..#O#.O..##OO..O.###..O.OO#...#....##O +O..O..O............OO.....O.O..O...#............#O..O..O#...O..O.O##........#.#.....#....O#O.......# +............O....O#.OO...##..OO#O...#.....#OO..O#.......##O.O#...OO....#..O.....#..O...O.OO#O.O...O. +.#...#...OO...###.OO.OO....#..O...#...O.O...O....#........O.#..O#.OO..#....#O..O##.......O...#..##.. +#.O.O#.O..#....#...#O#...OO..#...O.O#.OO.##...............O.#......O.....#..O..#..O..#O..O..##.##.O. +O..##.....OO.O##.O..#.O........OOOO...#..##.........#.#..O.O.OO#..O##O#....O.O#.....O.....O#..#...## +O......#.O...#...O#.#...O#........O..#....#..#.O.......O.......#.....#..O......#..O#..O#...#.#O.O... +..........OO###.#.O.O..#...##..##.#.........O#O..O.#O.......O..O#...#..O.O..#.O....#..O..OO.O......O +.OOOO..O....O.....#.....#.#.O.#O.#.O....##...O.O#O.OO.....O.O#.#...#..#.#O.O.##...O...OO..O....OO#O. +O...###O...###O...#...#O...#....#..O#..#O#....O.##..#.....#.#OO#.O...O.##O#...O.....#.......#.O..... +O...#.OO.O##.O.....#.....O..O...#.O...O.#.....#.O....O.#...#OOOO..#.#O...O...##..##..........O....O# +..OOO..O..#...OO....##....O....O...O....#..O..##.O...O.O.....#.#.O.#.#..O#O.#.....#.O.#.#.....O.O#.. +#....O.OO##OO....#...#.....#....###.#..O..O.O...#.....#..O.........#O#...#............OO....#.OO..O. +.O.O#.#O#.O..O........#..O#...O.#..##O....O#O..O#O...#.O...#.....#.#......#......O...#...#..O..#.... +.#..O..O..#O..OO....OO#.#...O.....O....#....O..O#...OOOO#.#...#..##.O.....O.....#..O.O..#...OO#OO..# +....#O.##.O.....#..O..OOO.#.O..#.O.....#O.O.##..#OO.......O..##...O#.#.OO..O..#...#......#...O.O.... +#......#.#.....#O...O..#..#..###..O...##.OOO.O...#.O..#..##.O...#..O..O....O.......#OO.....#....OO.. diff --git a/2023/day14.test b/2023/day14.test new file mode 100644 index 0000000..5a24dce --- /dev/null +++ b/2023/day14.test @@ -0,0 +1,10 @@ +O....#.... +O.OO#....# +.....##... +OO.#O....O +.O.....O#. +O.#..O.#.# +..O..#O..O +.......O.. +#....###.. +#OO..#.... diff --git a/2023/day15.input b/2023/day15.input new file mode 100644 index 0000000..f302922 --- /dev/null +++ b/2023/day15.input @@ -0,0 +1 @@ +zm=6,hxq-,cvfc=7,mpq-,mz=5,gt=1,rxvs=9,zf-,tk-,rfn=1,mmlb=4,jqtg=6,ptmh-,thkv=3,mfz-,vc=8,rgf=7,mvr=6,qq=1,qrc=6,nb-,bd-,brs=6,pg=2,mfpb=9,rj=5,qj=8,npfj=2,hp-,tv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lkk=3,xx-,vc=6,gxs-,vzn-,mx=1,vls-,nld=1,grxtq=5,mllbp-,hlp=1,jknvzj=6,dkr-,qtj=5,rh=5,hkv-,st=2,vp-,vkkq=9,spf-,zd-,mjj-,zn=6,gg-,pg=1,br-,lsqt=7,jq=9,kvzdm=4,mp-,mzh-,tkc=2,bc-,nnl-,zjqx=3,cz-,rq-,qcrl-,nz=6,kh=2,mpq-,pcqrx=6,cp=9,zqgf=1,kvzdm=5,bd=8,jknvzj-,kd-,zrgnf-,mbv=4,zlvv=1,hcbf=3,zh=5,zc-,jknvzj=9,bsmzc=7,hdj-,hkv-,nxp=8,bv=7,vdf-,xrvgf=5,mllbp=1,jr=6,csc=7,nchvv-,mjc=3,lqmm=7,fql-,jp-,dcqjr-,bjrlf-,zqrv=9,tn-,nxql=8,bkp=7,vjjv=4,mmlb-,ffsdlq-,mbv-,hs=6,glkqf=6,rftlqk-,tml-,vqq=1,grxtq=7,fzkj-,fzkj-,pdnq=8 \ No newline at end of file diff --git a/2023/day16.input b/2023/day16.input new file mode 100644 index 0000000..23cf91c --- /dev/null +++ b/2023/day16.input @@ -0,0 +1,110 @@ +\..............................................................-......-.............-........\-............... +./.........................-..-............................../..........|..|.-\..|.|.../.................-.... +|......|...\./|....\............./-..........\|............./..../.....|....\.......................-....../.. +.......-.....\.........\../............-.-.................|....-\.....\..\......|./.......................... +................................./..-.................-\............/......|..../..|.....\|................... +.....|......../.....|...-.............../......\................................\........|.....\......./...... +............\............|..........\......\...../......................|.........................\........... +...........................\.......-..|..../.............\........//.................../..-............|...... +..................\......................./....-..../........./\.......|................./............/.\..... +.\......./..........\.......\./..--...|..............-..........\.\...../.../....../.-./........./....\....... +..../......./.........|...........................\....................|.............../|.../.../...\..\...../ +...-.\|\.....-............................-........................\...............\....-..................../ +........\....|.....-...-..|..\..-./..........|.............|..............................\................... +.....\......................................./...........-.........................-....................../... +....\...............................-...........\............\.........-|..-..|........../..-.....|.../......| +........\.......-./...-.../...................................-.......|........./............|.\.............. +............\...........-.....\..|.......................|.......|.............\......./...........|.......... +.|.....|...................-...|.................................../\....../..../..........|.............|./.. +...............|......./......................../......................./.....-.............../.............\. +...\..-/.........-........................-............................/\.\.......-..|..............-......... +...-........./......\..\..............-............/.............-......-.........|................/........-. +............\..\...|.........|..................../\........../..\.....................\............../....... +........\.................................../..../..................|........-................................ +...|.../............\-..-....\..|....|........-./.............................\............................... +......-.\.-......\......../.|..........\.|..../..\....................../..\/./...../--...................|... +.......\|............/...|...|.........../........../...........|........./................................... +\........\...........................-/.......................-............-..|......|..............\......... +......................../|............\.............../......|.-\..\.......|../...........-..............-.... +.............................\.....-..............|...........|/...../.....-..................../.....-..-/.-- +.|...........................-.........|....-/.-.....\.........../.........|......\..../.\.\...............|.. +...................\.........................\...................|..../...........-..............-............ +...............-.....-.......\.............|........../-.........../..........\.....|............|.../.....-.. +..........|.-...................................-............|../.............................|../............ +...|..........\.......\....\..........|........./.........-|-............|.................................... +./\..../.......|........|....|......../............/............/................................|............ +..........................\........................../........|.........................\\................-... +....../....|.../..\.-..|....././|-.....|........................................-.....................-....... +.\.-............./...|..../|........./|...........-\..|.................|.../......................./......... +.........|........../.........\.........../............../..............\....\..............-|................ +....-...../...\...........................\.-......|........\...-...|..............|......|.\.....-........... +...-.............................-\.........-..../.\..........-..../......--............................\..... +.................-........|..................-.|................|....-....\...|....../....\................... +...\.........\..........|................/..........|....\./..................../-............./.............. +/........\....-......-.-|...........|../........\.|.......|...........|.................-.............|....... +......../....../.......\...............\.......-....................../..................|.../.........\...... +.\....../.........|...................................|-.|../.../...........-.-.............\................- +/-..\/.......-........\../.....-..|..................\................|......./............................... +......../.................-..../.................-...-|.........|............../...........|.................. +..|......../.....\......................|.....|/...../.............-.|-...-...|......................-........ +......|........|.\.........\............-........-/......./.............../......./......................|...\ +....|...............\...../.............../......|......../............|/...|........./...../..........-.\.--. +..|.........|......|.............................|...........-....|...-.............../................/...... +.....................|........./............./........................................../.........|........... +.....\........................|../.....................-.......|.-........................../../......-....... +..........................-....../.......\.............................-....\................/................ +................................-...../.........//.........-...|../....\..................................-... +...........................-................|/|.||............................................\...\.....|..... +..|..........-................/...................-.......|..................................-...............\ +../....-.........-...............................................\.....\...........|-............./.......|... +......\...|......../........................./...........................................|.................... +.-..................../...-..|.-..\...../.........-............./..........\.................................. +....-....-...........-........-........|......................\................................./\....-....... +..........|...................................\.../....../...-......|../............|......|................\. +.-.|.|.|.........-........-....\.........|......../..-.........../............\......-\.......|.......|....... +........|......../.............|...\.\......../...-........\.......\......-........-......./.../.............. +..../..........-............/././.........|.-...........|.........../.........................\-....|......... +........\......................../................-................|..\........./...\.......\.\............... +.............\........|....\....../..........|..\................./...||......./|..\................\.....\... +./.|.................................../...|....................|...................|...../.\............../.. +.../....................\..........|.-...............................\.........|....|\./.../.\.\.............. +\|........./.\...-......\..............\..........|...........\.|\............/...........-................... +....................../..\...\..........................|-..........-\................\......./.-............. +................................/.....................|././......../............/.\...|....................... +.............................-./............|.............|.-.............../..........|.../................./ +...............-........................//........././............/...../...-......-\\........................ +-././.........../..-....|.......-......./..................-...........|......./......./....|................. +........../.............................\...-............|.............\..-........../......./.\.../.........\ +..................|\..........................|..........|....................|...\...........\............... +.....-.....\../....|.|....|.|........|.-..-........................../.........................-........-..... +.....\......\............./..............-.....|........................................\......|...\........|. +..|......../..................................\..........-.............\..............\......|.....-.......... +.\....................................|.|.././.-../-..............................|.|........\........./...... +....................-.../.../...../......\....|........./........-../...................|..................-.. +\...........|...\....-...-..\....................................-.|./..........................\............. +.........\..........\.................-...........-........-....-.-..................\.-........|.-....\...... +..........................................|........|..........................\......\......\.-.|...\../...\.. +..-..................\.\..-........................................\.........-..|...../......|................ +.../....../......\./.\|.../.-........-............-../...........-.......-.........\.|................-....... +..|\..../.|........................|........-/.........-..|......|..........-.....|.......\.../..-......-..... +............................................................../.................\..|...-./............|...../. +..\.|.....-............-/\.............|.............\...............|....../........../....-/..\../......\... +............................/....-.../...................|.....-........|.../....\........-.....-...|...|..... +../..../.............|..\...||......-..-...................-...........\...-.....\.....|.........||..//....... +............................/.....\..\....-................/..../........\....\.................-|............ +...-........-..../..........|.......-...|........|....-.......\...|....../...//...|...........\.......|-...... +......./.........|../.........../...\............\................/..|..\.\.....................\...|......... +....-.............../.|.../............\..........--...........................|........./......|............. +............./.................\............/......-................/|.............\./........\..|....\....... +............\.............|..|.|\....-...-|/|...\...........................-....../.......|.................. +./...../|...\........\|....-...............\\.........../........-../................................-........ +-......-.\...|...\..|.|..../.........-...........|...................-.|..............-../............../..... +..|..........|/......................................\.........|............./.................-..|-.......... +..\.......\................\...\....................\............................-......|......\....-.....-... +..||................................-...\.-.....|................./......|..............|.....\............... +..................-......../.....|..\.......--.../...../.\-.............-........................../.........\ +-.......\............./............/...|...-.../...........\.................|.....\....\.\....-..../..-...... +-............/.......\........................................................\..-.....................\...... +.../................................................../.........../....|.........\.....................-...... +...................|.......\......././................|..-......\....-.....-|...|.....-....................... +..........................-.......................-.....-......-............\.....\....\.-.................... diff --git a/2023/day16.test b/2023/day16.test new file mode 100644 index 0000000..d6805ce --- /dev/null +++ b/2023/day16.test @@ -0,0 +1,10 @@ +.|...\.... +|.-.\..... +.....|-... +........|. +.......... +.........\ +..../.\\.. +.-.-/..|.. +.|....-|.\ +..//.|.... diff --git a/2023/day17.input b/2023/day17.input new file mode 100644 index 0000000..b088fb6 --- /dev/null +++ b/2023/day17.input @@ -0,0 +1,141 @@ +112211323123313231221322424444241114332223124451424553135231525524415314331423354424151142512532322133331244112344412431332132122133112212211 +122223123113132112231214112341424142422134142231351412332345532123322123241131151432434144322125551312414133341314131233422322322132111232121 +221122112112311332233321231113341442341431433433123255542341432521344514231533554131332544154431243333341241244434322431231213223221323312122 +122311112332123113214214443411114431243245541442442314425124453113434525224551243115454313325131424435543442211434142111214432312313213111231 +221131232332113113124214432212132144441514344335332253221455141515253422334534111522444433122415241343353534244432442321124124232132131123331 +123131223112232321314232231314122241534352424515445222251215213441353512511514442325231214135114551233123312331211414122342233321331312323112 +122321323122232121231114233242221411123453351115411115521555542134333144112252155243544542352114554341151155313414313131212242123231133131131 +122323331323211212211232114341143323514135243431225323132111341433662544454663353424334313125555454251424133451423232441231332132331131212231 +222312113122222242431121412432545314512223332313345534235644563566325643465425426634331434523532122242223524444413123334241424332411231113231 +122111111332321341242222431344331155241453421311115451244562222343566245662244532443532552311451453221331553512532222443312121122131221331131 +211112131321313111213243243115514145143125122211515433365535622426654345624525525234333246354433551121522213135512524142431133421223331222332 +332221332241423422413324423251414212133134121523644263544446664256365263643446536566245642362633154125433441135234311423242224312232212322313 +322323122114334111322321112133243524454254222442253662263536542553533455632423423662562465342346232155314152412341311443243332433123212111222 +223123214141212134414231144425414224513354165255424433646234654556464344256336654362234463335364654652233143453553512525243111124344232322323 +213211243341111323431154353411543152544114566356254543323665266522655544252426533335633356252633326332225111121341255122114112331311114431132 +321111133133423124333523224122255151152362664366345662554442255265462634225563346243426326635555345552621535241451231321214222432412334233122 +322131122243433432334245413421243332514636532444226456652223656624236423653254266363654464224665633425665432331215551141241132331333234321313 +322142131414211441452131422143253154442444526635535325223465364425322255626656553255652356556532442226522643425453345144534132232413243413232 +323313332322212432215521523322422333566252326463452625452252265477455474744736554443552364566256366243652242243433452552113321114441412444132 +211241313133333345251225251344243266223462444332326222455444336333345357774335456467633423225336224664332536563552244433523421214314321222312 +331131434221313455323134414424214223363223442425266545535435664754373537566677646563343633245645342326343263243515333332211422522413423213342 +141423344331424434352345424543126636633355225645544377767764545645563546446436677657467757725226534444623542456614522433111114322324412223333 +211143233223222215413143353434536626545433623235365343334536533643743767466434567767457566466463445632565435222345522144324535233222233213434 +134331321433255133242124133522423443624562335224465333374447475665356644645334736456367773363437356365455332264662335132313344324222334442124 +113431331144311133155213431642246556524244635646437466637656636743753537333345464443734355565447766443455623653426452442155134534142322433113 +144321334314413325242124246436432632623464223355644544536344567743756353746447773774344745746545655424465655566542336311535153443112232331112 +442113343112442234143334142456454633225564436443353363374763377664567374467766334757563464567736666766242546524645246622112155431244114311323 +334121314222313521523432434232425625426254744464373777736653635463447756663433364565635635543755463465242452522335542563532412215323133113212 +332243241225152422452326666555664342644734757467474663356536756745456385576374375575673565365765474675546462234555662246554132131252431313424 +241434234133454125134424432562436334325737464475635676335437655754644488676447657743633644654664776446763552252322355365453131115532513323143 +232412224422454121522224455353232363277737555633364564334748574665565857774556865588766774746675573473745522345444343326515425342113535242213 +212212431113325533545245444652334426337553477677437353436874785658686576746456678685858774733363344333766363645462245346265115142215543321242 +342231211352533113535232636332643364434746636346544648784588756665757845678656754477847668655577567734377375735652334322264441331234152322223 +413221534254544111345265534543323644734777344646547874685858478467768454666848475886678848843474373544536547446645244563355452341212121311214 +442324445331341151356453424233425446347566777443738764877674687688477845668857688866556456644753457374537655767435644454424441513455332152331 +213342321411224345463464324633427347473336336767665777486586858885774576444574757446766465465477343535457435465554566635553552513153454453112 +123315124111152146326446662353377776474755676666686876566554875884745788588656678884784486657658733334366577334445336436542232532322552354323 +441113215251343153426426355634374537755334545776467446786774455866885557577884656487867578876758653433747433376574454365556365112245152344444 +211255332155135545632653625633463755635755457578648685888484885588755888477675457788665447658445576756663537345535643662623424655345213323433 +331353445441324556525523564467444337544653767465556784487474846556898587558767778878655456644666488437677667435555444526244334231424451445221 +123333154152451252534543252573566753575635545458687876848857466786858675656567767488888844674688657546536753636757726232236245343151233513334 +142423552143344564523236363644376756674538658774548874866855686597579656756556966678676578867845878565456553335376553233423364463352251415113 +335421224353356425542355567644454434343347888886454557764659788777578578588798675757867585778576587657745656475645636265226556256135234222443 +235215225545235654446222343773445476466874647586557558596989765968898988568669669867867865654576667467476637433566656535452243344623134515423 +414452445555465634242634666746365536577848667457766745575596958689779988579598689878668986466746687557858537446677363535246652563433411122352 +135212532214534364622663665744565654456844586754747598698866959597756766968585679786589577977665755868878664567336466552236556343421141214335 +444325512232245254452324463436535374558485686757754785756767557765779666699675577786699659766667465658485565663476674445422633535423525414331 +424342423225534235262333733646577777478846477467659555887858957756878889585955786785695768976687578786765775346545645435522535654632234232535 +245353153523564566552333477364357554777646776448785965576789868677979559556996898895796865676958787678686747674356434473352554632245434523444 +344345313213624544332334765537566355648844668574958989597776999558797656775875875799668596975574567546884646536436456563644253623633252111222 +121445142165245656355263636557463464646886547689666556677887878587987767989977779595857889896757875456645574847657764756456564635625215123433 +314313354554255363333554565377367877777885554759755859657958868999787997686896868595598785699585984555864648787645536545645625546266541445542 +531232355253524565246657747555433867475457478965959876997886999897788689978678898999785968779798665748455846753565754367333656434253453314411 +511314543156362655424674334736635885475887786787686667957676869689766969999696998898559776756787877468477877846376467663346534642263241214111 +313522211662634443664765565675634566656646756988767768567787898686697687768687667687688759668785865844658844855656676563577536252656525533242 +414225114645642253554576663335367644765867686566666955966798899896999699986878768988869989799776686965675846647647656776767636424636222433535 +214434515256533563364667747733476876475687495668595977766697679678866968886769966877887777878858889586548666656464476545444325453342531314313 +224543454656536553343777767656458566655464859566965669579779868986998796669779868686867856786758786784686556886544573473457556426433626215424 +334411416624456532666353546663685777878766996696969657766769767696868668969688789988886897886889855954647667676453364455446365456524654552354 +132542354442364222464337356374664556466576685659859769788879899979788678878886976667887786667879856896568448876576634333767562242335446522333 +345543315626333265573536777536455856686877896786669858996878897789867788789988776666997866557676668978784854568674637445436722234622665545515 +145132224446323562245565734463864447486547796578577796977786696986878779798988767697677697965678899559555776576853343473474345456534424145554 +441343216322662453437635733647755656847877968558855789786679998787979988778778796768986999879656587657475765445785344543366662452345232222444 +552253142442342424355557676445587448565486656769586677679977699687987979888888966678877698667577759688977455456775657634546665333543426433312 +112153336343643463353474737736567475458895678887967996776866799798799997788778887997686897695978675768558665775867676446564464433426632345155 +353433555265552343563746656548788557764576879775586798786696667998799978777889896686997899775699766556757777857885433367737743245656535653131 +221321126366552432647653655558566564884886557959897699879967687999799779887997897886988966995868867966765846666878573673365544644436334351351 +232532436265523532546744767758477885654797999896666879987666767798777798789778998986869889668959875958866855775774766557746436464365653633333 +414411446354244635556474336377766678746599685896597668678968798778879799979888978797767789988797579597676477878477556544467436635225646452355 +114213465232332525737676445445675747745888567659566989797979778987899997877999888899966676996679795795565555756887643777745774225365464344154 +352154442653636535653537747467465675778867985597897877867688798878899778889789978879969767887589567577858457678845476547656536353534253334111 +352443126524636554745637345445847845645877856665679986967799678879977898898778798987979769868858688968784586754445743436463365256622435451243 +252322546342242363373346764376674475766779755789868788978986697797799779787878897986877987696666766655975888855478576534774476456253325441443 +143143144533345326575754566455886447775757758788676889779688689989877977878978899999698667878859767959567685776486547743737375435236424232522 +331432126625563465644337534674565647546858578695577898878989797878877877889878898768966768996669665795654466884484445777337754436264553413543 +244112533533634355775437376565475754548599666667557686976889867787899998779777899979668978787997969969574686676747457674666545232242233222441 +214541243424626343573546465465756585454797785889989988889687798779778898998989889999879979988595757897946657864875365356564366626556624645413 +522121434542522663645546346367586645865568956766685977999697977989878778879997776788788788968667686678855657854765757644457633223325535341451 +154255452664246252753354676566685657854469789987968776689788698879988979899797777776978979668956689897945586585548774434574644245634665445112 +222512466225335446335467647544876884476685569759978768968696969887999797787999896978898967677767887875547854687775755437676732433354525643143 +524552212452546532667656346446658585674579585857786887868686998896989987778898976686899766765775567898885674564477654645435436245444655234222 +442121455443625662475466664444665654585549686889885867897998668787879788997997766696989778968665768765487576444475467735773354233352524425215 +531525326234354266667366737535576648756876959668756789676868799767986678887696868988796886859965695877785784884555776745346433662365443454113 +352334515336352543363455645347586744887554687798569555866677697869987897977678998899896976779686986558458548868775766665377444345663345224453 +231332234556653334256766635664776647565586878877959595698787976776999878988678866867989798675987677878846645576563366637754722253233646454442 +553552145444452646336457677653554755664555579569865699976889996986698889969678777779878986985698778654568584866673333376665232233452244421134 +213522351235464554255367674744445657575585779697776789977977976766789769689897997786987698696575565944587644558875765474375446333632232541321 +352241334544262333325476574573337754585765499657858895785878996779668686996689986676998569859668987845446484868357544366675664663442351324222 +514534332326346534266533337563667585755748446756667958857768998668688896966968767666669875579687859688676665648463444444655543653332324131414 +254524451566362624264564375565767478686858467669698865865575898766676897869866776978655896585895587577464548666357647444773363626463543525243 +442535342553232452324766737733766654766586446599998558759986696789999986888979678786958675767587564885768644685773746647744236523263621123125 +132353435163463253362437347555447775466875668878957699895866896696797688776976755665688979767558946855664655664647735673646363642224332234215 +544411434126645644532365346776547476665575484447675858959657969557988666686658885687985675696697687857447885537753747464443555663264411513321 +522453242522424234536564676343337437448477676655965589955877786885599977869999665667978558896778875578745485357756766665654466243252135245544 +311335321514544526266363346373737468584456447588878588685665585898775698968888765776865665965888544465544676463675653766545262336263313434353 +133114532551333246364267774777533335788744547488889779897798969997956687865758995966597998666867484456657666377665464544455365522251421334541 +543235341241342556255363464437454673848747446558646966696685696976969767677589995959577868565644886875665443466763455644344563523234552524551 +124253533423343324646465344644577745458576568445854899956987975689676666958758576897696678575874846744586776577557457564345354245232215514132 +123143222524245222633563334735767547575674654484855864999669757599766759857965656665985687448677855645867737777776457354422332365545121333544 +423115121112156626223535444734444774644747477768864568759997695997867587779776568686866655585748544565864665554445445436443243222421555334113 +114345315331322553245525633333373437445658478555657477547688959889675898769769878567964654785448784678557655545377433534366336533152321333352 +311443411311433243325364245765545746633764647646756486667774868867685966669656888787654468488788775874573777563346754326542566466122433122511 +422123135533133553456244366573345664356457566685766674576746644799659898679788957654544874654678577675363664574364725332664243435455345311154 +441112341151122365536244345353477645756577787867666748456648444888558766678677848578778864764845674756665556547533365266255225464531323122554 +421225214342535246262445462245765754636566578574845768874576474465746868576468556774664867757766568564665363465675453563455536622122214423113 +211124134315442145434426353534573777474747637754887466754544854648854655877548467866875455745586786656463737565434663332553464253311444551311 +431231522213423432666636546645345667667457576646647845646466877447487867868654568488575447757888633355455676356533342226426463135342132232122 +344243535312553554443366352244624563434477356763555684665765665665848758657685574545666448587576336737653566343242432654566244125323551452123 +413311554351521241146336335653527357444467566664344664887755576574868664646875566474877578746467445675633656455366365353545515141153325531321 +141214542545313421156663465566426547465676337347737478888676885866665848556558585874585485686667473676667645573236365346443553151232552252223 +241431141325215323114446553553536575354367375343756535886854864675444767488847886874488688757477335774536743446335662645654352352232152224112 +124221344354514445151456322242526533465366443367436753335674866464677676476774564485466633475566774535665345262245346356444221534212523223221 +214322331253522525123243526253225233676444553736454745676756847655776777748657565455634667735737743367653732242362362546325541512135524412122 +412323211532344125133335623443325453244655577737666343377347356486484665665554868374347735564643443677374626536624433542223454132545131444142 +434231124424232443512526324336442433264335557347457634645666653644364484674567677455465746536647777334545636656256644566213512215152432344324 +243242421244311354452343336566646463264466634646344465377454457777767455337336334334764766764544375566352356626663655324435242314231312443322 +113213443233242433321325343642243354654623563375554363434333555373363377757337663544734573443647757474243343445242536552145322235531344233312 +123332214422533544122215455432323635324654423776733766656475344773367444673343634345563335564654373424435355525252265224454311451252314123121 +124313431134252125531353523523245644652634365564553377577637465354777365334336443466765665773334564336326623334552442254153411121524342241413 +234324143433241545353443255346223552364424226666356436536574356757435656577764476764767655344767565446532332225665214342552442555433211341334 +312323144344311435133532221324563665456456432563447547763577536643763673653447437573345475675425245254323343426355554132351435222144312134143 +121422144423412521223324215122265633635454566364565366535446467655573535564477446465776433626445633352226455435321523344433455334333411441331 +314242331324342255423255531333125246365225326434654462357545643457646364647344546457633444443566652235426422623514332245521311342141442241144 +232121214231313214141313552531551622645436432453333462365646543644544575564345743543646232564226455462445552332451224145554321413222422244223 +321134421122441142331552453113433245545536443344642626462242456346465377456744344364433365625322665533563423135253323142212454233342323411323 +323113142331114413254321222442532254465336243522542465624423346344232362254433243566535333235255455332222464445122544135354412214323124144123 +323224442342133212211313422153542511212223664434646665244366332354456255443634334664354626453543454553562315512455242352344244241323224212223 +333332321114241114232313332525141254343352435424534465566442432343346324266622262544442366366252544222624112152112221532453242132424111221312 +331223141441442234231351151535553122255526435235552466364462556554426336544663344333632324566254654234533214425312432431111324123422311132312 +311212323441413234411113254244521541242425323664645246422464562665623562334624345445342423555662444633532122253435515321141333322143221211132 +131133332423142222222424415341342113531412455456522426335443654265423455265256553532642356464446455235143343544414251434424231431443112113313 +312322333111142211432122312512144535525154421251523223243462524664363534663652224565534434532261322212114514555142512413112214342234122211323 +312231123221323441121422312345231312323511521515234233634432652526242262364425625265355633444445555532444122531325211422221412224242232112332 +121221233233443134434313212343514235445545412523315111355342546665463562226345365663452363315453325253332242122143141112144432112112122331112 +122312212122221312121144212412252142515541124225512344425352646354324644536324534363624535325155523143223355344253144132434413211333332131322 +331331223321132222224243414122234453551313424323342524314344151224542263353555352114221425341344144112114234133143411324124441234231312111122 +311221211232312141311314241344442343511534523112424323233522342355244225144235541441233133323142435355554122222431124331123323443223111223323 +112232332313233332344411211212423432212423143212112153351353325435413125241111535125131514325342342215225323143134422244142323223211322321113 +121332333321322114144121241334314444222424354411224234121555221211444345144332155324325554514442234213151142132114321321231324212212332232331 +212332332122311233232144222314232411222234524534114233421351225511124345212225254141552443333145115143533131314323233434442412333333132123221 +211212322131311231132322134223411213222122134314131213545541433115144333341122311253343145513421442314131434121434213141443133322212211323122 diff --git a/2023/day17.test b/2023/day17.test new file mode 100644 index 0000000..f400d6e --- /dev/null +++ b/2023/day17.test @@ -0,0 +1,13 @@ +2413432311323 +3215453535623 +3255245654254 +3446585845452 +4546657867536 +1438598798454 +4457876987766 +3637877979653 +4654967986887 +4564679986453 +1224686865563 +2546548887735 +4322674655533 diff --git a/2023/day3.input b/2023/day3.input new file mode 100644 index 0000000..d0b2a50 --- /dev/null +++ b/2023/day3.input @@ -0,0 +1,140 @@ +........897.......839...........651.399.............236...............................343...986...........308............................... +........*................*404......*............134.....953..508=.....................*....*..........325*..........744......392............ +...350..847..403...-..541.....622.................*....................356.......%..95...793....................830...........*.....163..... +.....&.......@...105.............$..745............42...785.............*..443.412............922..............*...........663........*..... +.253....../..........696.............*..................*..............817.$.....................*...........62........................373.. +...........244...419....*189....=........*...871.74...797...353.737................227..626.....429.726%...9......*956...803/.......*....... +.793...........=.....-...........119..683.18.*...............@......+.....182..372....$.&...................*..756...............945.610.... +....*.........496.....395.....................929.746................76..*.....*..............673-...*.....47........591..271............... +.....964..................241...........*............+.....+....590.......129.6....$.....@...........680....................*............... +..........523*448...........&....136.759.356............789.......*.................367.330..397.............483....354......354...869...... +...488................920........*...........................652...802....$.......*............*..............-.....................*....... +..../.........986....*......*....550.995......376...............+......641.....567.315.........887..66...863....552.936..........277........ +.................*.800...354.464.......*.533......................20.......704..........918........*.....*...........*....214........&434... +........%.....589...................596..*.......373...-..........*....785.@......941......*....521.......908...897..610.................... +........384..........827*101....698......978....*......947.614.571....*..........@.....+...1.......................=......#73...734......... +122%..........*...................*..........993............./.....260.........+.....466...............%........................*........... +...........938.992........246......305...449......335...739................588..681.........920.....164.........................431......... +..558....$........................................@.....*.....................=............-............847.....879..51................624.. +.....*.104....*818.......505.785.10...................161....210....................723..........55......*..424..&.....*.........723..*..... +...44......542.....975..................437...............51....*686.....*....../..*.........990*......708.....@....715...&....#.......997.. +...............801..@.............-....*.....702....&....*............238.236.706.183..+................................842.545............. +...........202*...................906..204...*...990......212....380%..................208...................66............................. +......./........../....878............................266.......................278...............920...................144.........423..... +....494..*.....976........@.....&.......*287...553-..*.............731...................649..247*........703......@....%....817....*....... +.........856.......592...........708.404............707.......274...*........-............#.....................%.567.........*......431.761 +.............663.........974...............%...446.............*............751....793..........811....225.&...48.....860..887.............. +................&...........*.......673..536......-.........447.....@...............@...$..................816..........*................... +....822................@....251....$............................413..306.164.............540.....313..476..........@...586./65....840....... +.....*......@.950.....266............$.........1...+...............*..........373..................*.............885.................*...... +......157.529....*.........341.....480.............60......765....122...633....+............$182....963.....................587..976.824.... +................172............685.....480....#........831*................*......747......................262..................-........... +....*......+438.....@......332./.......=...739..815...............356.....119.273.&.....317*674.......=...*....561..........192..........89. +....867..-........179..............319........../....74@..952*374...*.........*....................125....578...*...........*......652...... +..........549.............873.........*...=........*...............695.*.....126.........821.....................697.$......806.52....*54... +....792...........-...646*....770.....163.637....941........884.........744..............................#............800................... +.......*.......181............@.............../........92..#...................518...654.......421*995.310....450...............771......... +...+................./48...........968.........269................904.......=...../.....................................266.....*........... +.211....636.................630.17*.....%581........./843.....%..*.......878...............829.....119.33........211.........247............ +.......*......................-...................%..........559..873.............*138.439*....687*..........130....*681.................... +....522.................792........896.........471...480*321...................125..............................*...................291..... +........616.......818.....$..858.............................659*826.....109.....................................10.564=.331...156...+...... +........*.......@...*..29....*...@......546.............907.............*.....965.......217.808.....802..212...............*................ +....607.976..641..852.@...330...158....../.......630........247.......503........$.335+....*.........*..*....618...423&.335...803........... +......=..............................502........#........-..*.....923......664....................421...395.-..................#............ +........*.................625....646..@...99............901.59......*.....*..........517.$747.*....................315..............79...922 +.....289.789..............%......*.........*......................762....388..189.....*........277.........*222...*.................$....... +.................................738....406.....462...........................*.....915..............505/.......61.....+.......202*......646 +..749..............163............................*.....963..........907.......979....................................223..716.....265...... +.......&....741............362.......117.......837..96../.................#..............786.256.....942..=970...983........*............... +......133......*486.725.......*....../...............%................930.310...................*733.-.............$.....198.........189.... +....................*........256........68.......267...873........418*.....................573.................................219..*....... +......+.....439..525..187........495..............*...=.......923..........327..988..300........447*59..702../..840......40.....*........... +......731....*........*..........*..............547.......453.....6.$.........*.......*................-....447....@.......*.737............ +.907#.......375........195.....707..17.................9..........%..119...147..594.22.......81.........................485......446........ +.....................................*....#............*.....62...................*...........*....569...935.868....-...............*528.... +...#..........209........229.......787.470..............403........892.........816.....923..811...$.........*......104.907.849....*......... +..154.346.....*...361.........................10/...237................-................*.............600..............*.......998.606...... +.........%...216..*.......*.........*368.869.........#................6..98...........53.............*.....850@...102...751................. +....550............727...383.....818.....*...913.............879...........*.....420.....150.........708.................................... +705*.......@688.......................289.....*.........................431........*...+....*50.....................698...668*144........... +..................501..70.520....$32......562..458....170......279$............504......883............/...44........*...................... +..450..107@........*..................586*...........*.........................*....510............788.274............589...-26......&...... +...................342.........&.551+.................302...............286.....931....&....-649..$.............575................185...199 +............602..............470.........243*......@............818.690*.......................................*....863..793*............... +......934.....*......200.936.....46..........137.72.........377*......................443*372........498....320..#...........553......598... +........-...451./952..*...*....*.......................804..............305......700............675...&.........611......................... +......................393.......708....957........*697......808.....138*.........%......186....*....%...162*...........624........244.%..... +.....220*.........872......*...........*.........7.........................................=..6....391......562...880.....*......#....120... +...+.....608.........*...74.568........193.........379.........$682......933.927&.....&............................./..984.................. +93..553........*768.739...........421.........880.....*....737.............*.........69..................................................... +.........334...............................40*........910.................................+465..682.............141*.......248..80.......... +.........=..................323...172.............506..............503........568....785+.......%.......940*734.......#573....*...*.....130. +...163@........%17..42..108*.......*...$......700..*..81...../...............+....%.............................#285.........499.523....*... +.............-........*..........305.706.....*....942.....843........*.............378.861.......573.859.173............522............544.. +..........974.......517.756..762.............480.....................289................*...........*......*.228%..........*......628....... +....567........&274......+..../..........................................926.............391............214.............270...230..-........ +...........=...............52...../......155*150.......180&..*......482..&...884................-125...........................@............ +..........332..................318............................123......%......*...............=........................310.................. +....................856.154........@............161....192..................=..387.............384..*827................*..&400......588.... +.......283.............*....@.......12.....309...*...$...........643.......885..........862................210.......449.................... +.......*......937.........98.....&........*....560....884.......$.................866#.../.............622..*..901.............462.......... +.....279............273......896..17.661..880...............138...632......66...%.............93......*....349...*........./......=......... +..............430....*....+.....*.....*............350...............*..........226.......621*......312........=..266....574..111........... +..339........../.....770.451....122........990.....................811...780........*448.................325.249...............+...$...441.. +......................................$......%...........793..............@..787.766....................................64..+......252.*.... +.........556........../.....256/...267...336.....897..........524*417.........................950...930$.452........164......713.......592.. +....759....*...........672.................-.868....*....613......................401.....742..*..............560........=.........939...... +.....$...780.......195......578...............*...%...+....*.....=.....&.............*......#...645...636.797..........652...........*...... +......................*......................77...97.988.821...882...977.......127.609.914...............*.................................. +..........+...195&.....930.....872.......................................79..............&.....14...................-.......150..274........ +..........473................9*.............951&................./...827*.............46......-...13....751.........640.......*.....*504.... +898................-.............56*....378..............291..310..........58............937.....$.......*.../.............840..714......... +............-321.128.157............549..-....130....478*.........*.....................................123...164..............*....631..... +..516..989@..........*.........*670............................204..577.......&817....@514........790...............816.........148.*....... +.....*................233...........*838.....*951.....-954..........$.......&.................110.........99...........*..@187.......671.467 +224...205.....552................823......343................490*...........377..................*.......$...........779.......408.......... +............./..../.....................................166*..........120...........452.........148...=.......................*............. +.562..............768.........#.267.29...806*......476......214.........*....*......*...............867.211....248.$870....@...829...*...... +...*..826@...................1.....*.........251....+.....#...........211.893.403....702.......44.......*........+..........75......977..... +..368.........861$......867....=.......................834.....................................=.........507................................ +.......721*............*.......912.#497....................87-.....231...894.......968..........................659$.......@..........564... +...........690.......432....@..................332................*.........*756..*................302..214*.........803..855............... +..................26.......943...........633...*.....299.150....639.................796.....440.............428......+...........538.647.... +........31........*............................260.....-................=..261.............*............................644.303..%.....-.... +227..........#.161....*....&.....305...............345........328....639...*........$.......802....612.185................%../.............. +.......683.953.....224....58.....*.................*....799...............944.964....245.............*.%................@......28.19.242.97. +....93*........../.............908.........$249..480.......*......978..............................58........=209......373.802*.........*... +467...........201..........932.....997......................548................/.....-904.....796.....3+............................915..... +...................#......@.......*......748*965.................922......451..169..............$.945....372#..979........%..436...*........ +........&.....880&..789........14.805..............571....222/.....*.70......*........./958..........%.........&.../....61.....*...73....... +.......280.................................=.861......-.........144...........950................%.......907......910.......396............. +.....+.........592*149.820*511...........298....&.......*264..........-..527..............-.....679.......*...............@......50*270..... +...901......=....................@483.............$..936......625%...619....%..........748...............785...860......26..181.........747. +.........85..640...#........=.=.......49.......216.............................268*.............................#...........#.....53....*... +...........+.......744...933...766....*.................%...............*714.......909................................999...........*...311. +.............783....................947.................352...765..............897.....+430..869.................121.%............236....... +...45....*......*..752......617..................332...........*...236...........*..........*....@.528..........&......530.................. +..../.134.713.871..*.............*...........#.....%.930...........*....323....377........678.544..*........542.........$.......470.629*786. +..................259...&.....959.225......177.......*.....912*..........$.........................306..996.*....*.........*681...*......... +..........250*768......598.........................850.........598..............3*.........904*648........=.372...197...410......152...=.... +............................................507@.......960..............362.164...131...................................................115. +.....746.......117..678=........952...303*.......+......................./..*...........$636../...597......37................351...=........ +.......*.281...@...................*......337.258..814...687.....#922.=....772..611.153.......573....*.......*..............*.......518..... +....144.....*.......396...........240................+......*.........45.......+.......*...........479.&293..126.....784-...783............. +...........843...@....*..918*.............................986.....542...................117.....................................578.707..... +..984.............251........258....597$.650.........................*..................................928.409.684...547.......*....%...... +....&..489....931...........................$....356........................489..............302...............*............./...259.../996. +......./........*.................................*......385........63*911...*.........%........*578...633.175.........@804..421............ +..98...........188..........226....+...............909....*...................535.....798................$....*.796......................... +....*.....%...................+....531...563...........426......617*202.........................929-.......439....%..332.....+.23&.347...... +...364..149..............425............*.....662.481.......................788..$844..................506..........@.....693......&........ +..........................*....408...772....+.......-.......232*......*......*.............#.+294.....*.....706................435.......... +......566*972........631=.425.*...........14............984.....667..7.236....195..9.....222........757......*.....865..604&..*....344.&.... +.................439..........710..............477*714..............................*544........368............395*...........435...*..204.. +..........229......+..596.179........../................165.542*47........147..............653..*...................466...........119....... +.....690...@............@.......467..626........&......*.................*....=42.....724....+.816....262*.....237.@....549.383............. +......*.........750..............*..............202....967.914......279..................*........./......147.@...............*........480.. +...444.......84...#....+..........527......*351..............*......*................225..888.......806.............7......#...518.....*.... +.............*........628...............749......*976.200.....852..354...23....=........*...............................138............833.. +..........964.................................211...............................578.....986.............879......59......................... \ No newline at end of file diff --git a/2023/day3.test b/2023/day3.test new file mode 100644 index 0000000..b20187f --- /dev/null +++ b/2023/day3.test @@ -0,0 +1,10 @@ +467..114.. +...*...... +..35..633. +......#... +617*...... +.....+.58. +..592..... +......755. +...$.*.... +.664.598.. diff --git a/2023/day4.input b/2023/day4.input new file mode 100644 index 0000000..2c60116 --- /dev/null +++ b/2023/day4.input @@ -0,0 +1,204 @@ +Card 1: 9 39 27 89 87 29 54 19 43 45 | 9 80 29 20 54 58 78 77 39 35 76 79 19 87 45 89 23 31 94 34 67 43 56 50 27 +Card 2: 89 59 76 2 60 83 21 37 92 45 | 79 5 41 92 45 59 72 50 89 37 64 65 60 54 57 22 66 21 25 76 1 39 83 2 33 +Card 3: 40 25 13 65 86 5 35 87 9 30 | 87 76 30 93 5 45 16 40 48 89 78 59 18 12 71 85 66 21 80 28 50 60 49 72 27 +Card 4: 21 34 70 83 66 44 90 68 76 12 | 46 80 70 73 44 99 32 98 66 68 76 28 85 74 17 38 27 22 83 16 12 90 33 34 21 +Card 5: 5 67 90 43 26 31 17 47 14 1 | 83 64 47 24 33 5 90 20 19 61 14 56 67 26 1 70 31 9 17 57 43 95 82 91 49 +Card 6: 8 1 42 80 94 21 15 89 60 73 | 53 23 64 63 15 89 29 93 78 80 62 52 21 40 94 4 42 61 22 1 73 97 28 60 8 +Card 7: 67 32 20 69 40 22 35 44 86 72 | 84 53 39 52 43 46 41 16 25 77 32 5 7 29 13 31 22 98 58 82 2 85 34 89 79 +Card 8: 94 12 71 3 2 93 87 18 83 67 | 89 80 82 62 88 64 24 45 54 84 2 7 43 37 16 49 67 13 95 53 50 42 6 83 68 +Card 9: 64 68 80 83 33 1 93 66 8 73 | 51 61 20 32 39 3 8 65 21 56 6 25 86 85 76 95 14 28 62 71 69 12 83 1 22 +Card 10: 60 88 52 64 87 34 93 37 56 78 | 16 57 87 20 68 98 93 63 12 96 29 51 14 10 45 52 64 83 85 72 49 82 31 44 35 +Card 11: 36 78 85 63 79 86 20 6 24 28 | 55 86 79 32 84 97 22 20 25 6 29 75 41 24 38 78 23 33 63 50 56 11 85 36 28 +Card 12: 51 48 95 84 65 40 54 47 35 24 | 41 91 86 2 5 19 54 83 13 98 39 44 47 33 82 48 6 58 87 88 16 29 99 38 40 +Card 13: 1 3 96 69 86 76 88 24 58 27 | 19 22 25 3 89 88 71 27 76 85 15 45 96 80 70 24 34 61 83 69 47 86 44 7 1 +Card 14: 64 16 68 57 10 25 51 26 36 59 | 78 27 81 61 21 57 94 41 85 68 77 4 9 56 66 2 42 15 25 7 10 93 36 59 34 +Card 15: 41 42 5 37 99 19 65 27 44 35 | 99 38 1 9 72 43 84 67 7 44 79 5 29 60 41 98 30 23 27 82 35 97 74 25 90 +Card 16: 8 72 53 75 61 67 78 54 1 3 | 32 41 81 86 1 95 50 20 58 92 97 60 26 23 27 67 78 53 83 75 7 66 3 59 8 +Card 17: 39 50 34 66 54 19 30 37 33 24 | 34 62 27 89 49 80 67 50 20 46 4 72 74 85 45 69 40 16 73 57 79 76 95 41 56 +Card 18: 67 32 84 12 50 44 5 42 69 22 | 67 64 77 83 5 85 50 84 17 7 23 78 97 76 94 39 81 44 96 37 79 61 13 3 49 +Card 19: 66 39 62 2 47 63 18 19 85 26 | 60 68 9 18 59 24 47 80 86 87 56 48 54 72 16 51 26 23 95 15 38 91 79 31 27 +Card 20: 48 8 91 42 64 81 16 90 82 30 | 9 65 92 3 49 68 67 52 53 47 56 54 22 10 15 86 72 88 46 75 73 6 55 80 37 +Card 21: 89 35 21 61 33 44 52 83 51 79 | 64 62 14 54 72 38 80 18 67 65 56 91 94 26 92 96 88 34 81 60 25 9 28 10 55 +Card 22: 98 19 57 87 65 12 80 18 48 29 | 70 56 81 95 51 48 76 68 73 21 26 67 92 46 54 58 72 45 75 34 25 8 79 55 86 +Card 23: 50 94 84 86 64 67 26 72 46 96 | 11 98 97 74 47 71 88 93 3 89 2 53 57 54 66 85 52 14 31 38 24 81 44 41 68 +Card 24: 53 60 37 93 49 98 89 70 72 6 | 83 21 37 94 78 7 44 34 30 58 16 84 8 10 72 48 42 27 79 6 99 67 88 64 25 +Card 25: 13 18 29 62 44 92 19 58 63 6 | 97 78 16 56 19 62 18 58 63 29 14 44 40 25 70 90 13 82 98 89 51 24 92 55 83 +Card 26: 75 2 35 21 74 27 45 66 3 91 | 11 8 28 74 26 23 93 2 47 3 25 7 35 6 22 27 58 96 21 75 61 15 94 65 45 +Card 27: 11 35 97 64 30 50 5 90 2 19 | 7 92 18 68 95 22 86 65 91 1 6 80 66 93 27 77 90 40 45 48 89 38 32 26 78 +Card 28: 89 67 61 81 98 64 49 54 70 79 | 78 81 66 70 30 49 79 10 59 67 98 61 99 43 1 77 50 90 64 89 75 85 16 71 54 +Card 29: 4 94 51 84 70 21 76 55 35 66 | 68 52 61 75 50 37 71 72 14 78 19 18 93 20 79 60 86 2 59 8 47 1 90 33 30 +Card 30: 84 90 5 67 66 27 3 89 41 63 | 65 66 63 32 5 97 68 13 95 12 39 27 67 25 89 90 3 1 75 40 41 19 51 9 71 +Card 31: 99 88 64 27 71 97 30 47 32 11 | 73 8 7 61 45 29 62 74 49 11 80 14 75 68 63 43 4 40 72 84 82 44 96 69 87 +Card 32: 49 22 35 33 44 77 24 18 74 10 | 79 68 81 31 88 33 10 74 49 30 44 35 22 23 42 73 77 55 67 13 61 25 24 53 18 +Card 33: 11 54 66 33 51 59 82 24 3 88 | 70 28 24 89 66 42 22 59 88 33 99 54 31 63 47 11 98 39 3 51 82 38 87 16 68 +Card 34: 26 7 38 74 20 89 78 79 73 47 | 88 64 13 18 99 9 37 61 60 97 22 67 48 95 19 76 40 31 6 90 42 2 41 1 68 +Card 35: 67 65 8 4 84 62 69 66 46 36 | 27 30 2 16 45 99 65 50 37 19 78 87 49 64 12 84 11 8 4 69 44 62 48 71 17 +Card 36: 80 77 50 31 90 59 75 74 37 24 | 34 64 37 90 97 75 63 50 3 95 55 94 77 52 80 24 19 32 84 59 60 72 74 8 31 +Card 37: 6 60 75 78 10 71 32 91 77 97 | 60 88 71 81 74 78 32 97 1 48 91 53 4 89 13 21 67 90 56 44 77 18 46 76 61 +Card 38: 48 51 53 36 99 73 3 39 70 5 | 42 25 54 98 50 68 73 77 47 33 49 99 57 70 48 5 78 22 7 39 51 2 3 36 44 +Card 39: 26 4 65 75 52 54 88 37 50 49 | 23 62 60 58 90 57 33 80 29 9 86 34 56 53 42 84 12 18 24 98 72 54 50 51 45 +Card 40: 48 99 71 68 21 56 90 34 28 18 | 4 34 61 62 48 98 28 65 18 90 77 88 47 68 55 92 99 70 78 14 36 93 84 21 27 +Card 41: 73 27 13 41 98 47 85 33 59 84 | 15 47 50 75 40 69 12 92 14 21 68 97 87 45 56 37 84 74 3 88 35 36 24 46 54 +Card 42: 99 58 27 10 18 29 4 91 93 81 | 94 15 73 50 36 49 62 68 57 5 75 42 37 41 79 60 25 86 67 35 45 70 72 34 46 +Card 43: 26 17 11 50 37 5 47 67 28 31 | 12 44 81 84 48 96 97 90 21 6 10 35 77 20 4 62 76 99 64 19 18 55 43 17 30 +Card 44: 14 25 88 84 83 58 54 11 80 93 | 50 20 68 16 65 59 41 26 7 13 33 18 60 72 74 55 28 2 66 42 98 78 27 63 40 +Card 45: 11 24 20 22 78 26 91 54 16 29 | 32 70 83 77 22 63 89 58 68 42 2 87 50 1 95 99 98 55 80 38 76 90 93 54 31 +Card 46: 35 46 37 90 8 36 12 63 97 89 | 45 18 47 92 9 11 2 79 89 61 88 77 23 33 44 28 36 22 50 52 94 15 84 38 57 +Card 47: 27 16 35 8 99 21 45 89 64 23 | 42 53 11 57 9 13 75 66 62 88 36 30 49 95 59 7 63 71 34 43 92 55 29 61 52 +Card 48: 10 1 11 53 97 64 24 49 52 65 | 3 28 40 92 81 58 5 35 46 33 82 77 59 78 87 85 71 61 8 70 74 18 84 56 19 +Card 49: 37 40 57 47 53 77 25 94 13 58 | 15 76 56 22 35 10 12 77 72 25 27 51 88 3 13 30 26 48 63 19 84 95 34 97 7 +Card 50: 64 47 51 46 54 93 94 3 53 52 | 48 61 31 96 67 88 68 7 98 87 23 37 77 73 65 83 2 4 27 76 45 97 58 1 75 +Card 51: 50 84 17 72 35 66 31 40 73 53 | 84 61 74 26 33 38 75 43 53 44 39 79 50 49 65 99 62 85 46 83 21 2 29 36 10 +Card 52: 9 81 53 22 58 92 90 33 30 59 | 45 12 33 83 59 96 11 65 9 52 32 30 58 77 98 19 22 84 99 92 14 76 90 49 71 +Card 53: 69 13 67 60 89 50 26 68 29 55 | 29 82 86 36 50 76 69 64 60 61 6 26 42 99 89 98 96 55 68 33 45 10 79 13 67 +Card 54: 49 15 51 41 75 25 42 47 50 70 | 55 44 57 41 74 25 70 26 82 85 87 67 63 34 69 75 51 49 37 28 95 59 96 83 14 +Card 55: 74 2 69 5 95 93 90 47 75 14 | 51 28 82 32 49 95 15 61 33 9 58 56 68 64 46 21 99 98 38 44 7 39 36 29 86 +Card 56: 68 18 77 6 53 43 91 3 57 23 | 52 47 40 96 2 8 59 28 39 74 36 72 32 89 70 92 73 46 85 43 84 5 67 38 77 +Card 57: 42 9 71 63 30 16 70 77 29 54 | 39 27 24 66 76 72 93 83 47 50 37 67 52 90 11 18 19 56 99 84 41 74 59 32 48 +Card 58: 28 38 63 96 31 30 18 6 82 9 | 82 9 20 91 43 60 46 52 78 67 96 28 39 92 89 8 57 31 87 84 10 75 37 23 88 +Card 59: 93 89 66 99 10 9 92 65 50 12 | 48 28 46 58 38 65 2 30 8 35 6 95 97 98 10 5 44 78 37 68 32 71 72 29 83 +Card 60: 43 46 57 73 75 24 56 39 23 81 | 22 57 51 96 60 44 34 94 88 10 84 67 32 7 97 68 78 56 21 95 55 59 8 92 76 +Card 61: 63 66 83 81 76 40 47 97 22 26 | 28 87 16 64 12 85 89 2 45 13 39 21 31 18 24 20 96 32 3 54 56 34 52 92 5 +Card 62: 71 63 44 3 88 24 79 70 82 53 | 30 96 68 25 92 39 86 75 21 98 93 17 62 28 35 8 54 12 36 7 33 91 13 85 40 +Card 63: 20 89 99 39 61 91 44 45 3 38 | 26 68 88 63 69 84 16 55 60 19 50 14 2 41 6 30 98 29 65 43 4 7 67 80 37 +Card 64: 70 64 27 51 11 81 8 56 2 19 | 19 27 49 80 66 86 20 39 70 73 98 2 10 81 64 33 47 88 51 11 37 8 40 56 74 +Card 65: 61 1 79 74 23 88 29 52 58 31 | 11 17 89 60 98 15 12 75 52 85 93 41 88 30 2 18 79 92 40 26 29 73 94 70 34 +Card 66: 91 8 53 34 43 38 89 99 79 27 | 15 67 34 70 97 74 9 11 73 49 14 54 50 47 71 91 23 18 84 65 35 5 63 46 66 +Card 67: 61 42 21 34 57 12 74 52 72 88 | 61 5 72 24 16 95 2 38 42 94 21 18 12 37 57 66 34 48 88 69 52 47 74 62 96 +Card 68: 78 46 10 30 2 47 92 16 64 72 | 72 65 30 17 84 88 16 41 92 45 46 11 51 2 10 81 55 47 3 18 36 97 60 12 78 +Card 69: 14 91 68 42 6 4 50 98 89 90 | 6 28 76 83 68 7 88 53 27 16 98 74 5 63 48 89 40 30 50 4 85 91 92 64 20 +Card 70: 86 64 33 35 36 24 67 39 77 6 | 81 74 59 25 98 48 69 80 16 47 13 8 84 50 37 2 54 51 27 15 31 26 93 45 9 +Card 71: 18 12 95 25 85 56 99 13 82 77 | 88 26 44 77 73 43 14 37 35 13 21 15 45 99 86 97 54 98 38 27 42 53 93 95 83 +Card 72: 7 96 8 50 63 39 46 82 43 44 | 89 2 42 65 78 7 16 73 43 72 39 1 25 58 64 50 67 46 23 87 18 82 30 24 95 +Card 73: 77 97 99 54 49 48 58 24 6 73 | 68 10 89 53 50 22 14 28 83 59 18 25 2 8 92 76 70 75 85 74 4 7 3 36 72 +Card 74: 24 96 56 90 46 21 1 62 94 29 | 16 78 21 97 39 4 79 65 22 24 67 69 6 86 82 5 91 51 1 87 60 32 13 77 42 +Card 75: 95 26 80 37 34 43 46 62 60 24 | 54 16 68 3 55 29 18 53 79 90 14 45 41 67 21 78 8 64 72 66 40 82 73 47 94 +Card 76: 8 72 87 55 75 36 86 70 45 52 | 28 76 19 5 71 17 92 64 42 80 70 91 43 29 74 47 94 21 66 35 56 88 51 63 78 +Card 77: 5 62 3 77 9 54 29 12 68 86 | 58 64 7 90 65 78 36 4 29 17 13 87 40 20 83 91 41 96 39 94 80 69 84 42 74 +Card 78: 4 31 22 18 53 97 42 21 72 57 | 77 1 6 45 17 52 33 15 34 5 84 29 2 23 75 50 27 39 38 70 98 89 19 69 80 +Card 79: 28 64 2 71 89 44 76 34 55 67 | 28 97 44 64 48 40 76 2 66 56 15 11 92 83 34 53 71 67 89 54 41 43 60 10 55 +Card 80: 97 58 41 88 57 26 14 71 83 2 | 26 73 57 55 8 97 54 58 63 90 37 98 60 66 41 2 25 87 83 95 71 46 31 14 88 +Card 81: 76 20 17 38 58 30 87 96 28 12 | 40 47 52 37 48 17 35 8 77 45 21 46 80 69 57 94 50 12 55 81 70 58 25 4 28 +Card 82: 50 56 9 28 78 8 6 5 45 96 | 83 64 89 39 68 29 99 81 8 45 96 53 20 62 78 9 31 23 34 46 93 50 28 71 56 +Card 83: 16 9 29 27 89 35 97 6 63 48 | 29 49 6 89 44 42 63 76 21 16 27 97 37 46 31 36 23 66 35 1 33 79 9 48 45 +Card 84: 24 84 32 55 59 57 70 6 43 38 | 23 26 20 69 83 6 68 47 57 27 75 28 1 56 43 48 95 98 24 51 94 88 19 45 5 +Card 85: 43 56 46 52 92 64 89 39 8 7 | 25 46 37 70 52 8 68 36 85 66 43 65 10 38 56 49 15 64 12 34 79 39 98 13 90 +Card 86: 59 43 34 99 39 4 90 66 33 35 | 59 98 81 4 86 95 66 92 22 35 28 80 5 90 21 11 19 33 71 15 57 68 99 75 30 +Card 87: 3 73 93 21 35 97 61 84 47 58 | 11 57 63 54 73 65 67 47 9 43 31 3 68 82 58 97 35 25 84 13 24 61 21 8 93 +Card 88: 99 34 88 58 37 54 50 49 53 87 | 88 61 50 75 3 33 57 37 53 54 87 8 99 34 89 74 46 44 91 72 77 49 22 96 58 +Card 89: 45 94 20 23 83 82 3 39 90 48 | 47 87 80 65 49 29 63 24 1 59 3 73 25 69 32 12 9 15 33 35 82 22 46 48 43 +Card 90: 11 69 91 38 51 79 15 16 22 26 | 39 80 17 24 1 21 70 82 73 84 87 46 97 94 72 68 89 66 14 65 4 64 88 10 58 +Card 91: 11 27 2 95 84 13 48 24 89 54 | 6 68 56 98 70 38 95 79 89 83 39 48 17 99 57 51 67 7 28 23 13 50 2 32 93 +Card 92: 26 1 2 20 16 94 13 60 11 6 | 19 99 92 58 40 82 27 74 32 59 57 86 4 53 73 98 69 48 72 65 62 61 89 56 42 +Card 93: 69 7 80 87 66 64 89 75 79 53 | 54 9 93 88 36 44 45 63 68 78 22 62 82 70 73 3 98 34 1 52 28 56 55 81 67 +Card 94: 55 89 2 72 16 12 63 71 41 43 | 83 60 74 68 98 18 73 75 20 87 49 94 32 22 25 6 90 31 9 95 71 11 42 88 5 +Card 95: 41 72 14 56 75 35 8 3 12 78 | 20 77 80 96 61 86 35 17 95 70 41 6 54 1 79 31 11 38 39 40 4 44 64 63 49 +Card 96: 18 55 72 59 30 10 58 43 66 57 | 33 46 25 71 30 9 78 88 83 95 11 75 6 20 76 15 74 92 35 61 45 87 99 94 41 +Card 97: 3 73 83 39 40 63 7 94 35 2 | 64 6 26 28 36 59 98 95 21 93 18 69 42 12 55 79 15 11 70 32 60 61 87 78 4 +Card 98: 11 99 6 13 40 26 94 46 58 88 | 63 2 5 17 9 72 79 31 37 59 28 95 39 62 97 4 55 83 12 76 68 33 65 10 89 +Card 99: 31 83 81 22 34 12 55 92 58 29 | 68 66 74 50 91 85 33 81 87 86 98 84 96 48 6 90 70 62 1 38 59 76 16 41 25 +Card 100: 64 11 22 20 53 7 10 75 9 21 | 35 78 92 88 74 51 91 84 96 25 34 83 46 4 54 81 43 87 47 44 23 59 33 73 67 +Card 101: 37 87 86 41 1 91 81 29 14 72 | 6 72 1 86 44 87 41 88 3 21 29 97 89 95 64 56 20 91 99 16 14 81 37 13 71 +Card 102: 4 36 32 61 26 12 85 42 60 77 | 14 40 92 7 66 89 52 54 19 6 49 35 67 46 80 27 30 56 97 83 47 82 87 78 5 +Card 103: 99 3 67 24 61 34 80 43 54 68 | 34 32 54 67 80 22 24 5 82 30 36 3 69 85 61 68 21 10 99 98 52 42 53 43 26 +Card 104: 7 9 77 84 53 5 81 32 13 3 | 78 84 94 20 8 56 38 82 76 41 91 90 99 74 25 70 45 32 97 77 67 3 5 13 63 +Card 105: 85 77 48 14 98 3 67 89 57 43 | 56 21 26 11 81 15 46 68 36 72 50 40 31 37 23 92 24 25 99 35 29 4 12 10 45 +Card 106: 30 25 66 4 40 43 99 21 89 68 | 32 6 66 25 64 58 78 30 23 35 12 21 4 99 43 89 83 20 61 71 68 16 40 84 45 +Card 107: 5 74 89 62 52 80 43 42 13 40 | 36 25 84 13 73 56 57 62 46 54 18 89 26 66 28 72 11 61 35 42 14 3 67 39 2 +Card 108: 79 34 81 43 98 33 24 7 22 13 | 34 98 94 93 81 84 63 17 79 44 13 26 15 18 43 6 22 91 56 33 74 7 24 30 58 +Card 109: 3 50 79 55 5 30 41 20 52 91 | 33 41 19 50 86 75 91 24 60 1 30 64 52 77 95 58 22 5 70 73 3 59 20 79 55 +Card 110: 49 42 83 46 84 87 64 89 95 1 | 96 64 97 1 27 79 83 42 21 25 72 59 4 89 23 45 46 71 84 87 49 52 81 95 56 +Card 111: 64 62 66 74 1 73 8 29 31 19 | 13 62 64 31 78 73 1 41 19 8 80 29 39 70 77 84 40 15 66 68 56 46 94 74 48 +Card 112: 55 74 88 67 3 58 87 16 97 60 | 36 17 78 66 19 85 59 28 37 24 90 7 97 95 71 27 54 87 77 44 91 64 80 31 46 +Card 113: 45 76 46 7 60 24 27 21 95 87 | 67 93 12 81 24 72 83 7 60 95 75 2 47 90 46 33 1 70 21 42 16 63 27 45 76 +Card 114: 71 8 4 96 98 62 69 65 5 46 | 25 43 37 45 34 39 95 24 22 68 32 88 72 73 36 89 54 8 56 35 6 51 81 85 60 +Card 115: 62 69 28 91 24 53 51 89 99 95 | 74 94 86 36 27 67 69 6 76 35 16 10 18 24 12 28 4 44 15 65 80 14 51 54 88 +Card 116: 52 94 9 1 51 90 36 3 81 2 | 4 88 90 15 32 35 18 86 89 45 97 5 81 69 1 22 10 57 61 3 42 37 9 93 46 +Card 117: 63 77 23 81 78 83 92 48 85 25 | 73 31 12 8 34 42 21 29 26 14 75 69 37 16 11 72 41 60 7 80 3 19 95 98 89 +Card 118: 86 93 55 54 20 66 88 63 94 64 | 23 33 43 35 1 91 48 82 41 55 66 32 52 96 50 54 38 47 70 84 3 11 12 86 58 +Card 119: 80 69 3 77 33 30 31 99 76 44 | 55 47 57 89 22 26 37 34 23 96 86 94 79 2 38 8 68 4 91 25 97 48 52 43 98 +Card 120: 9 78 59 93 74 70 66 26 61 11 | 29 95 24 96 97 77 23 42 80 53 86 51 31 92 8 55 32 43 10 56 84 72 28 6 7 +Card 121: 7 51 68 86 42 96 88 39 94 75 | 22 4 46 5 20 78 94 89 31 92 85 37 41 27 97 32 21 42 2 83 49 79 17 52 69 +Card 122: 71 79 63 55 2 28 36 45 29 17 | 91 34 88 83 99 92 26 9 70 64 81 98 12 35 74 47 80 82 87 23 2 90 72 52 97 +Card 123: 31 54 44 21 47 64 62 65 92 10 | 98 32 71 97 66 46 99 20 3 72 76 75 40 81 30 43 61 4 82 87 7 37 36 27 91 +Card 124: 14 49 77 61 15 41 27 57 29 38 | 23 38 49 41 15 27 16 90 14 50 28 29 94 91 19 2 43 98 66 57 77 71 99 74 61 +Card 125: 64 46 99 34 80 85 68 73 48 10 | 43 85 98 46 37 5 34 81 49 63 9 50 30 44 64 68 10 73 66 99 97 96 52 48 80 +Card 126: 89 74 85 14 66 45 55 21 86 18 | 96 13 15 18 76 39 55 27 75 87 45 74 32 49 64 21 66 86 14 89 85 77 92 82 59 +Card 127: 87 31 54 37 78 58 14 36 96 71 | 10 40 77 36 41 71 84 78 32 18 8 37 87 22 58 16 26 55 43 54 25 14 96 31 38 +Card 128: 62 43 69 74 5 40 3 89 59 22 | 77 52 88 59 69 74 32 96 43 40 86 16 85 62 5 70 80 89 1 2 94 22 31 18 3 +Card 129: 88 10 75 71 22 8 34 15 49 61 | 59 98 85 25 88 15 10 57 8 34 74 94 4 41 72 90 71 73 75 1 9 49 61 22 95 +Card 130: 46 51 4 25 45 50 47 57 35 23 | 50 63 74 10 46 4 17 35 2 11 87 26 99 84 92 65 45 57 85 51 25 47 54 23 62 +Card 131: 13 73 45 63 15 43 19 11 52 55 | 38 79 21 52 91 53 69 96 13 9 48 58 43 44 46 39 32 85 31 63 73 1 15 82 37 +Card 132: 89 53 76 33 18 42 23 27 43 80 | 20 53 74 86 76 27 36 75 43 93 88 65 54 68 45 29 64 3 80 37 66 69 87 90 39 +Card 133: 76 92 70 84 90 5 64 26 16 41 | 97 54 56 79 31 26 82 41 58 76 68 77 13 15 90 50 29 69 60 64 10 84 87 14 67 +Card 134: 9 21 86 14 37 61 69 98 88 31 | 98 58 18 65 35 6 15 33 43 54 8 82 19 87 76 78 38 20 62 86 21 57 11 3 75 +Card 135: 50 10 16 57 63 24 32 29 56 88 | 16 1 98 10 45 51 50 69 47 49 21 43 29 87 85 5 73 32 24 37 57 26 61 3 7 +Card 136: 77 16 62 61 73 52 3 25 6 69 | 13 70 77 94 28 17 45 67 25 22 29 10 72 16 65 73 85 79 62 90 1 6 56 74 49 +Card 137: 94 91 68 5 36 88 26 37 3 15 | 68 3 7 6 20 26 99 39 44 78 88 40 53 27 1 50 36 15 79 67 37 2 5 91 84 +Card 138: 98 63 62 27 71 65 88 81 55 49 | 97 96 25 88 23 92 85 49 30 76 98 40 45 67 61 24 66 91 27 37 84 18 5 75 55 +Card 139: 44 27 57 99 24 80 66 34 71 12 | 60 96 78 25 15 86 74 98 7 27 62 29 80 82 65 47 32 95 99 66 92 63 2 24 37 +Card 140: 73 69 45 14 70 80 2 33 71 95 | 96 59 56 63 98 32 74 97 3 78 91 99 19 39 81 2 10 25 72 65 55 87 24 48 4 +Card 141: 72 35 1 53 12 78 32 61 68 87 | 93 35 29 64 82 76 37 36 4 40 53 42 63 85 87 31 1 6 32 81 55 94 11 26 10 +Card 142: 39 65 95 25 34 46 73 4 23 99 | 33 78 22 6 55 67 17 35 7 94 53 64 13 69 11 75 83 82 40 23 58 61 85 10 46 +Card 143: 46 15 60 76 32 10 83 47 22 1 | 23 6 51 85 12 90 35 39 21 7 53 57 27 96 80 78 70 79 25 26 56 62 17 73 41 +Card 144: 28 76 1 63 66 95 81 36 94 10 | 86 59 21 46 65 66 64 38 84 14 56 52 74 33 88 13 9 39 16 32 12 29 83 85 47 +Card 145: 12 77 54 56 67 90 37 76 32 46 | 12 49 58 45 19 36 98 40 77 16 17 68 73 44 30 24 2 75 35 86 65 70 50 10 47 +Card 146: 63 35 23 56 96 37 14 24 18 52 | 81 1 53 86 37 68 11 10 83 78 32 2 50 3 71 15 19 17 25 29 67 8 45 61 22 +Card 147: 55 94 5 53 92 87 63 56 2 23 | 34 13 93 42 1 11 31 51 41 24 95 72 57 35 9 61 90 43 75 67 10 97 7 46 89 +Card 148: 80 10 79 30 5 37 25 73 81 91 | 81 79 52 72 56 69 26 24 63 65 12 25 37 71 80 32 4 38 77 5 2 10 73 43 91 +Card 149: 53 46 42 20 89 16 11 60 57 2 | 68 20 53 6 2 16 61 11 54 70 91 3 8 82 57 93 79 60 92 73 89 76 56 14 78 +Card 150: 87 33 53 21 26 77 28 49 51 17 | 48 6 65 61 72 77 16 94 12 57 79 75 87 34 63 52 8 88 28 85 33 41 29 31 35 +Card 151: 42 82 89 14 16 28 7 77 23 54 | 89 71 14 6 15 16 82 33 28 4 78 80 54 77 53 8 7 42 50 30 23 58 76 34 74 +Card 152: 89 87 91 5 37 80 81 82 70 11 | 92 50 54 78 19 71 12 45 73 82 72 18 28 62 21 1 79 35 84 56 17 95 98 76 69 +Card 153: 50 2 27 20 92 34 10 63 75 89 | 75 52 5 63 50 69 89 51 2 86 10 57 28 74 34 95 92 27 84 77 46 85 4 93 20 +Card 154: 52 86 12 69 88 43 2 89 66 7 | 25 2 88 39 6 42 69 17 86 97 18 26 16 43 22 51 89 32 34 66 98 46 28 21 47 +Card 155: 20 53 2 15 95 77 19 4 73 96 | 32 70 75 54 4 26 76 83 30 7 44 97 39 96 25 46 15 10 67 95 77 41 35 53 71 +Card 156: 91 16 30 70 87 84 19 55 21 92 | 17 41 78 7 67 50 51 34 93 59 80 47 92 32 62 82 31 24 90 97 46 5 43 40 4 +Card 157: 69 16 12 19 28 89 35 43 91 11 | 68 97 45 52 38 18 20 9 34 67 6 35 28 1 94 23 25 19 73 89 76 95 21 12 57 +Card 158: 54 21 50 62 96 94 43 86 30 33 | 91 57 7 11 92 20 12 89 58 36 56 6 42 71 64 47 32 88 29 67 63 97 55 98 48 +Card 159: 12 90 89 88 46 40 83 27 7 95 | 65 98 71 26 21 78 42 18 91 1 82 5 86 2 53 72 41 85 73 16 35 14 52 11 74 +Card 160: 92 89 2 29 25 53 65 30 38 71 | 11 53 6 63 15 50 41 37 27 96 73 57 64 85 59 1 22 49 25 52 29 80 72 58 28 +Card 161: 36 66 57 82 10 1 28 25 56 83 | 23 58 38 35 97 66 55 14 85 79 54 77 93 62 67 4 11 99 94 90 32 22 12 36 63 +Card 162: 61 19 76 17 81 18 87 44 45 74 | 37 15 31 67 24 4 77 81 63 68 27 94 3 62 12 90 69 2 8 34 60 53 97 43 73 +Card 163: 61 97 73 13 88 93 19 75 47 89 | 68 79 15 25 59 16 78 5 40 69 92 20 4 58 22 30 67 21 76 44 81 98 65 74 46 +Card 164: 3 45 59 47 12 65 8 57 98 53 | 77 96 12 8 22 63 59 88 61 43 66 39 90 45 55 47 10 73 53 34 25 3 6 99 38 +Card 165: 79 54 12 6 67 92 99 15 41 72 | 37 77 1 51 55 49 92 21 71 76 5 69 74 45 23 44 83 56 66 94 96 86 79 12 97 +Card 166: 33 18 55 57 68 79 35 40 17 53 | 93 26 55 97 80 84 44 21 15 75 11 79 83 9 50 35 78 43 39 18 17 53 42 68 86 +Card 167: 80 75 74 26 44 41 42 88 83 12 | 26 88 53 44 97 42 75 25 16 61 1 81 58 41 98 11 93 74 91 94 90 73 83 36 46 +Card 168: 59 19 45 25 64 75 70 90 84 80 | 54 19 70 89 13 92 76 26 56 80 86 64 40 8 36 25 90 59 85 47 82 45 43 75 84 +Card 169: 69 95 88 94 67 36 57 79 11 56 | 53 79 94 69 56 36 57 54 73 26 86 88 10 62 12 95 39 11 28 77 98 14 83 1 67 +Card 170: 64 24 9 85 57 16 91 77 29 28 | 54 43 4 16 79 6 57 47 61 13 12 91 63 77 9 29 33 64 10 98 86 28 24 85 31 +Card 171: 65 54 4 35 68 81 7 47 87 92 | 50 33 42 29 81 21 1 40 93 19 95 86 28 32 16 85 58 80 4 30 79 60 71 34 27 +Card 172: 26 49 46 88 71 32 58 12 42 54 | 54 26 58 10 85 12 32 88 49 70 80 68 75 42 28 61 40 79 46 3 95 45 71 11 98 +Card 173: 76 39 1 91 73 44 41 66 33 96 | 47 85 53 56 88 84 23 41 68 22 71 75 66 34 72 59 45 81 38 6 70 65 40 63 11 +Card 174: 1 75 14 32 81 27 38 71 45 49 | 64 52 21 1 83 22 45 84 49 53 33 27 88 70 42 43 8 14 17 75 32 38 2 81 99 +Card 175: 58 22 39 11 42 60 65 46 80 27 | 10 96 22 86 60 23 47 58 17 93 5 11 90 46 39 94 77 66 67 85 33 25 80 65 82 +Card 176: 22 70 83 88 99 34 38 77 71 51 | 19 96 83 4 70 94 38 64 36 99 49 71 7 15 51 68 77 95 34 6 2 88 21 59 12 +Card 177: 46 6 50 30 40 75 8 72 95 56 | 86 93 49 95 87 19 80 90 78 56 76 16 92 18 27 37 94 70 59 43 1 72 44 40 81 +Card 178: 81 79 65 34 71 66 4 53 85 39 | 23 50 10 59 56 60 27 24 5 70 52 67 41 30 99 75 3 37 17 62 12 22 19 93 73 +Card 179: 80 74 16 31 33 81 55 85 29 53 | 47 53 79 77 2 8 10 41 27 94 28 96 69 63 22 43 90 50 99 86 34 14 5 80 84 +Card 180: 24 47 72 12 42 34 76 14 15 41 | 18 11 94 82 59 12 15 29 30 9 35 61 87 7 64 95 43 37 6 26 98 78 33 48 92 +Card 181: 75 31 15 54 44 21 32 8 22 72 | 87 4 24 71 38 32 14 54 44 64 67 55 7 20 74 21 93 6 76 61 91 97 18 17 52 +Card 182: 17 53 25 76 48 60 80 56 39 50 | 23 5 61 46 97 72 62 55 6 66 9 87 51 7 68 79 92 65 47 26 58 18 36 90 93 +Card 183: 70 41 69 74 39 43 33 7 79 48 | 51 87 28 93 15 66 58 96 44 29 26 38 94 95 80 71 2 61 32 16 47 77 90 72 3 +Card 184: 27 69 74 77 85 59 62 87 31 54 | 22 57 12 18 49 26 50 4 84 28 5 67 34 16 86 9 13 42 41 76 77 37 46 98 64 +Card 185: 33 1 29 47 81 36 87 93 8 99 | 95 57 34 40 35 15 66 51 3 75 53 43 11 25 80 90 48 60 89 70 85 94 14 17 78 +Card 186: 93 98 37 44 96 61 56 99 52 60 | 87 89 22 61 96 50 93 56 41 30 98 42 60 52 44 37 75 28 99 65 57 88 91 86 20 +Card 187: 19 84 39 68 48 5 65 93 4 71 | 1 66 81 63 25 28 75 54 86 61 38 37 17 27 32 45 12 31 33 97 34 87 58 24 3 +Card 188: 58 83 80 19 52 78 43 97 87 44 | 88 73 43 97 84 55 35 9 87 65 16 93 52 40 58 80 44 41 53 19 32 83 26 78 6 +Card 189: 82 2 67 87 5 55 43 40 66 80 | 88 8 3 92 78 79 65 54 2 80 66 82 75 41 55 5 40 32 25 94 98 64 99 43 76 +Card 190: 12 61 25 96 98 33 70 86 5 36 | 68 29 33 71 95 72 90 46 63 77 53 88 76 22 61 73 99 75 87 20 16 47 13 89 66 +Card 191: 3 21 23 71 56 65 50 75 45 15 | 81 44 25 39 83 75 60 15 71 59 2 37 86 45 47 65 55 88 91 77 54 42 76 16 21 +Card 192: 61 46 82 28 59 17 8 94 36 53 | 94 59 61 20 5 23 10 66 17 64 46 68 49 28 90 79 36 53 19 81 8 55 82 89 18 +Card 193: 70 22 45 35 51 12 90 29 83 61 | 70 78 11 22 4 96 66 85 51 90 69 45 29 35 23 36 61 21 27 42 91 12 72 83 5 +Card 194: 33 56 96 67 75 44 71 20 24 98 | 20 80 24 26 33 8 44 4 96 23 65 57 29 98 50 61 59 55 77 28 86 71 75 67 56 +Card 195: 9 1 79 39 24 95 91 4 45 93 | 39 91 18 35 96 45 58 92 7 79 9 98 67 95 30 60 10 62 54 26 25 1 93 99 50 +Card 196: 43 53 38 7 78 41 57 98 89 83 | 46 38 94 81 3 56 16 41 87 68 52 95 77 92 88 72 36 17 80 58 43 97 27 99 7 +Card 197: 73 49 37 31 85 45 78 46 48 97 | 73 36 82 30 3 84 15 69 45 53 37 29 85 96 91 61 78 70 71 34 62 79 22 57 64 +Card 198: 52 67 30 11 88 68 96 84 48 89 | 38 66 64 88 95 27 62 46 3 16 20 48 76 97 91 74 70 73 17 75 52 30 21 58 77 +Card 199: 30 15 96 2 41 56 50 81 29 60 | 42 56 5 50 40 1 6 77 61 73 60 74 79 8 53 3 75 80 36 64 89 43 81 70 90 +Card 200: 86 29 15 97 91 10 62 68 19 75 | 8 12 68 18 36 62 37 16 41 97 5 64 81 80 75 6 24 59 23 33 79 1 22 63 89 +Card 201: 16 72 24 22 23 44 67 3 27 85 | 54 78 25 59 87 6 98 81 49 77 83 33 82 99 90 32 65 57 30 36 28 95 92 17 71 +Card 202: 69 11 38 33 26 39 84 57 98 36 | 46 35 45 80 94 26 52 92 76 90 55 31 18 73 30 15 7 39 4 34 19 47 21 29 54 +Card 203: 62 87 19 82 3 28 64 9 93 80 | 50 11 71 78 36 25 66 40 43 51 81 48 44 27 75 73 14 26 99 49 69 6 55 33 67 +Card 204: 82 64 58 18 73 13 2 71 24 49 | 9 61 47 31 5 89 78 99 40 54 23 68 38 95 69 84 53 27 45 33 87 90 93 44 60 diff --git a/2023/day4.test b/2023/day4.test new file mode 100644 index 0000000..9bdb874 --- /dev/null +++ b/2023/day4.test @@ -0,0 +1,6 @@ +Card 1: 41 48 83 86 17 | 83 86 6 31 17 9 48 53 +Card 2: 13 32 20 16 61 | 61 30 68 82 17 32 24 19 +Card 3: 1 21 53 59 44 | 69 82 63 72 16 21 14 1 +Card 4: 41 92 73 84 69 | 59 84 76 51 58 5 54 83 +Card 5: 87 83 26 28 32 | 88 30 70 12 93 22 82 36 +Card 6: 31 18 13 56 72 | 74 77 10 23 35 67 36 11 diff --git a/2023/day5.input b/2023/day5.input new file mode 100644 index 0000000..111babe --- /dev/null +++ b/2023/day5.input @@ -0,0 +1,224 @@ +seeds: 3136945476 509728956 1904897211 495273540 1186343315 66026055 1381149926 11379441 4060485949 190301545 444541979 351779229 1076140984 104902451 264807001 60556152 3676523418 44140882 3895155702 111080695 + +seed-to-soil map: +2122609492 2788703865 117293332 +751770532 1940296486 410787026 +2652142963 2905997197 464992562 +3442443139 3721315963 573651333 +3117135525 2356966701 133002244 +742051533 3370989759 9718999 +2239902824 720032349 393589935 +1162557558 58715335 661317014 +1823874572 2489968945 298734920 +2633492759 2351083512 5883189 +4016094472 3442443139 278872824 +58715335 1256960288 683336198 +3250137769 1126389299 130570989 +2639375948 1113622284 12767015 + +soil-to-fertilizer map: +1839905294 2992775329 34548650 +266781855 3027323979 163164353 +1874453944 1681649719 388228515 +671359508 847997583 161400465 +0 2547368955 266781855 +3203005759 3207454799 385245393 +832759973 813886658 34110925 +3671840261 3598096086 304246395 +1377823717 351805081 65559824 +1443383541 417364905 396521753 +3985931590 3902342481 309035706 +2954410911 2069878234 236077421 +2262682459 2814150810 19476781 +429946208 2305955655 241413300 +3981482550 3203005759 4449040 +3976086656 3592700192 5395894 +1026018636 0 351805081 +2282159240 1009398048 672251671 +866870898 2833627591 159147738 +3588251152 4211378187 83589109 + +fertilizer-to-water map: +2408925737 4214441342 80525954 +1405678964 176700146 234310964 +2103148712 0 114754845 +289811242 411011110 140151672 +19025194 1085844786 2698717 +2799367899 3104502118 25793488 +3686730518 3130295606 74796096 +628099810 1273935988 19704264 +1112219380 661022482 39037869 +467844674 876473087 160255136 +1356562401 1036728223 49116563 +0 2195479548 19025194 +1778400105 1801270370 10408868 +3201290155 3772851666 86331548 +1795901930 1713284032 67001953 +1151257249 1907547144 205305152 +4156855349 4121566803 26796069 +160254887 2112852296 19696655 +1788808973 114754845 7092957 +1639989928 1780285985 20984385 +3990635607 2938282376 166219742 +2864292987 3316407580 74613579 +3761526614 4148362872 26946870 +2048296368 121847802 54852344 +3054903767 3975180415 146386388 +21723911 737942111 138530976 +647804074 1811679238 95867906 +3580274539 3391021159 106455979 +2489451691 2628366168 309916208 +1049288783 2132548951 62930597 +4183651418 3205091702 111315878 +3360834108 2408925737 219440431 +743671980 1293640252 305616803 +3287621703 3699639261 73212405 +2938906566 3859183214 115997201 +429962914 700060351 37881760 +1775001290 2214504742 3398815 +3788473484 3497477138 202162123 +2825161387 4175309742 39131600 +1660974313 1599257055 114026977 +1862903883 1088543503 185392485 +179951542 551162782 109859700 + +water-to-light map: +2182426048 2230942562 75597875 +3871195410 3518497934 102047632 +2258023923 1068663414 38503018 +1376483871 1748535271 120845081 +3267723970 3442138354 23090394 +3687599530 4146748183 69194895 +1687874044 1117179928 229976398 +1024656105 0 9213951 +2036492700 1503963494 145933348 +1339060619 127856209 37423252 +3600067928 3079307704 87531602 +3778928632 3171781100 38997592 +485121354 165279461 136305184 +1266011073 1649896842 73049546 +1917850442 9213951 118642258 +2296526941 1107166432 10013496 +3973243042 2847069441 75895604 +3177917323 2989501057 89806647 +136410837 1347156326 156807168 +4049138646 3166839306 4941794 +3817926224 3465228748 53269186 +2631950731 2587548926 259520515 +478937106 2064525337 6184248 +3756794425 2922965045 22134207 +621426538 487303746 242996590 +3299937194 3372641330 69497024 +1240422190 1722946388 25588883 +1497328952 1873980245 190545092 +2587548926 2945099252 44401805 +864423128 2070709585 160232977 +1033870056 1869380352 4599893 +2891471246 3629668396 286446077 +1158126414 866711173 82295776 +4054080440 3210778692 62083789 +1038469949 949006949 119656465 +0 730300336 136410837 +4116164229 3272862481 99778849 +3290814364 3620545566 9122830 +3369434218 3916114473 230633710 +293218005 301584645 185719101 + +light-to-temperature map: +2047881931 2133163196 61773729 +2768352591 2658645540 147815435 +663892205 789634091 62723057 +962320572 2260439344 13990400 +4174477469 3668516433 35699725 +3949428604 3175207948 225048865 +2918680909 3704216158 118365848 +976310972 47881164 71382440 +736841121 215530327 84565848 +1481137268 593966122 45807826 +3406939292 2891251077 174249820 +2916168026 3907788997 2512883 +854252812 1457767969 108067760 +2658645540 3065500897 109707051 +0 1842095595 291067601 +821406969 119263604 32845843 +2182554848 897903253 121629531 +1047693412 1565835729 166620621 +3847603798 3400256813 16617815 +1259860138 152109447 53195021 +3581189112 3424865230 243651203 +1470195525 1364566318 10941743 +653613314 30205504 10278891 +1430142037 1324512830 40053488 +291067601 1773419829 68675766 +2109655660 2194936925 65502419 +1856219803 2274429744 191662128 +359743367 300096175 293869947 +3398948690 3416874628 7990602 +3864221613 3822582006 85206991 +2609164425 1750403060 23016769 +1707010741 2466091872 49002444 +1756013185 1732456350 17946710 +1214314033 852357148 45546105 +1313055159 2515094316 117086878 +2175158079 40484395 7396769 +3824840315 3910301880 22763483 +1526945094 639773948 149860143 +2304184379 1019532784 304980046 +3037046757 3933065363 361901933 +1773959895 1375508061 82259908 +726615262 205304468 10225859 +1676805237 0 30205504 +4210177194 2806460975 84790102 + +temperature-to-humidity map: +2704404081 3383155981 190240562 +3678765766 3078657339 304498642 +2894644643 2740175301 304339717 +3375985319 2704404081 35771220 +3198984360 3840405770 142858638 +3341842998 3044515018 34142321 +3411756539 3573396543 267009227 + +humidity-to-location map: +3843755612 3461421206 53203349 +3797023193 2837279508 46732419 +1328442859 1820435049 165058603 +2358032500 2069263501 110029787 +776537476 129658954 20092280 +2041812400 3514624555 271685061 +4004991793 2179293288 239800545 +1813819309 1372459189 171674343 +890079235 609776153 19282104 +129748073 629058257 107944033 +2472688430 2519585064 209661612 +1039983756 866750363 166281406 +3896958961 2729246676 108032832 +1004757286 149751234 35226470 +850718450 90298169 39360785 +3150066893 4231246292 63721004 +0 737002290 129748073 +909361339 1154885545 95395947 +2682350042 2911243637 44822034 +318816223 1586615093 233819956 +796629756 531466240 54088694 +705961941 460890705 70575535 +3669300252 2884011927 27231710 +4244792338 3015820858 50174958 +3352063456 3786309616 317236796 +552636179 0 75876832 +3213787897 4103546412 55695414 +294595004 585554934 24221219 +2799176542 3110530855 350890351 +1691965533 1033031769 121853776 +2468062287 2956065671 4626143 +2727172076 4159241826 72004466 +1493501462 262426634 198464071 +280173667 75876832 14421337 +1986683356 2960691814 55129044 +628513011 184977704 77448930 +2313497461 3065995816 44535039 +1206265162 1250281492 122177697 +3269483311 1986683356 82580145 +237692106 1544133532 42481561 +3696531962 2419093833 100491231 + diff --git a/2023/day5.test b/2023/day5.test new file mode 100644 index 0000000..172cb84 --- /dev/null +++ b/2023/day5.test @@ -0,0 +1,36 @@ +seeds: 79 14 55 13 + +seed-to-soil map: +50 98 2 +52 50 48 + +soil-to-fertilizer map: +0 15 37 +37 52 2 +39 0 15 + +fertilizer-to-water map: +49 53 8 +0 11 42 +42 0 7 +57 7 4 + +water-to-light map: +88 18 7 +18 25 70 + +light-to-temperature map: +45 77 23 +81 45 19 +68 64 13 + +temperature-to-humidity map: +0 69 1 +1 0 69 + +humidity-to-location map: +60 56 37 +56 93 4 + + + diff --git a/2023/day6.input b/2023/day6.input new file mode 100644 index 0000000..2a9ca07 --- /dev/null +++ b/2023/day6.input @@ -0,0 +1,2 @@ +Time: 48 87 69 81 +Distance: 255 1288 1117 1623 diff --git a/2023/day7.input b/2023/day7.input new file mode 100644 index 0000000..12bfd93 --- /dev/null +++ b/2023/day7.input @@ -0,0 +1,1000 @@ +53AQ3 698 +555A5 490 +KQQ8K 338 +Q8J88 94 +T844J 329 +99A9A 918 +5846Q 753 +99TJT 175 +A3465 353 +J9K99 725 +6A9Q8 525 +5Q2K3 666 +88688 729 +4TA4J 398 +Q4JA9 769 +33937 941 +TTT4T 743 +95999 256 +597K7 401 +73Q79 258 +AAJKJ 419 +9TA77 7 +Q727K 810 +QQJQ4 977 +QA764 57 +4J694 116 +969TT 379 +AAA77 897 +84333 535 +2J444 694 +22TK2 313 +29244 557 +K77K8 231 +54995 916 +T24QK 700 +97543 325 +788A8 37 +T5858 872 +2TTT2 154 +JJ482 518 +24748 104 +272J2 25 +A7KJK 82 +7T5Q4 900 +33T23 577 +7JQAA 846 +3KKKK 61 +67396 644 +K99KK 328 +QKAKQ 435 +297A9 103 +AA5AA 428 +577TJ 536 +56393 460 +K8K8A 605 +ATTJQ 529 +A8T33 865 +29889 777 +9QAJK 310 +3A2AJ 866 +A8888 568 +9TAJ7 93 +46QQ6 508 +J62QK 341 +4Q4JK 522 +JAJ43 504 +J6K45 26 +TAT9A 784 +9A4Q7 531 +T4554 142 +828QQ 619 +J7K7J 985 +92296 695 +9J989 565 +27775 902 +4652Q 656 +QQQ6Q 701 +43K67 318 +7QT92 994 +T3366 757 +4AA77 511 +6859Q 312 +87222 875 +76749 429 +36KQQ 639 +66966 130 +88T8T 68 +3Q33J 521 +76T36 216 +44592 876 +9QJJ5 906 +382Q7 764 +555TT 407 +77977 888 +32J77 305 +K4KQK 73 +KQJ33 894 +94J3Q 242 +44Q46 90 +488JK 474 +5Q2K7 121 +47A56 38 +J393K 739 +9A933 691 +Q222A 15 +22422 177 +K8A27 471 +J744A 840 +TTTJT 219 +KK2K3 652 +4TT49 822 +7279Q 277 +JJ8JJ 623 +KJKKK 355 +7QQ37 164 +J3829 101 +487T7 514 +3T333 838 +K74Q9 126 +7K7KQ 625 +6J644 50 +2942J 651 +68868 742 +TJTT7 998 +44JAA 842 +96844 873 +T8TTK 27 +A9373 836 +2JQ25 238 +7Q66K 879 +5928J 996 +K524Q 109 +55AAA 861 +48437 58 +4J5K9 792 +Q6A54 606 +KQ7A4 352 +KKKTK 496 +83844 539 +K7KK7 158 +TQKQT 749 +A2AAA 186 +973A4 32 +Q9J6K 654 +83A3Q 40 +JKK3K 221 +KA5T2 844 +2J525 513 +94797 248 +35355 308 +JT4A3 787 +55J55 543 +3A982 687 +75758 400 +T94A5 115 +2K7K7 523 +ATJAA 871 +725A6 424 +TATTT 141 +26TK5 783 +6666J 272 +T9939 440 +8TT4T 234 +T98JT 67 +K22TT 117 +K6293 223 +5542K 378 +98779 629 +KKAAK 556 +JT666 71 +59AT3 937 +J83QQ 610 +7KK88 466 +Q7TKK 657 +44J74 889 +3J37J 79 +77J7T 685 +6692K 266 +TT2A9 554 +58A6J 963 +5TQ76 343 +QJ633 206 +39QQ4 563 +AA66A 333 +JKKJ3 575 +6TK6T 139 +45K7A 789 +8448K 704 +88J8J 645 +J8QQA 296 +6TA56 236 +TTJT2 83 +TKKK2 895 +73J7T 898 +3975J 632 +8T267 624 +4TT4T 251 +A44A4 456 +3J974 364 +345J3 956 +9T9J2 3 +9999K 145 +QQJ4A 371 +78594 638 +78T7J 699 +5455T 817 +A9J8J 947 +AA6AA 955 +8KAKA 828 +42KT5 229 +38373 171 +K7TKA 43 +92JJ3 49 +8Q7T5 939 +J79J9 112 +652K6 174 +999JA 516 +72J82 351 +QK6AQ 28 +TT7J6 436 +T8TTT 834 +T2338 307 +7Q77Q 858 +JQQJA 903 +66JKJ 143 +75JT8 870 +82TKA 781 +224Q8 395 +ATA7A 484 +4K33K 35 +45Q72 643 +Q88J3 847 +459J6 993 +QK8QT 259 +8888T 235 +K2J7A 733 +KT74Q 576 +AQQQQ 210 +5A967 786 +937J7 710 +6JT7K 54 +AJA58 59 +K754K 949 +T6K8Q 591 +T3444 185 +3J269 635 +JJ222 323 +66433 669 +T55JT 243 +787A7 984 +97969 294 +74777 10 +99T99 414 +3A3JA 770 +34A87 830 +AAKAK 264 +33322 848 +JJ547 153 +44Q43 620 +92777 826 +4K5K8 803 +66A66 982 +68666 285 +Q3Q53 215 +87455 17 +J58T4 616 +J79Q7 181 +TTKKT 87 +AQAAQ 630 +QQ65K 374 +J2J57 5 +25545 973 +AT6A6 373 +55656 199 +56755 807 +55552 358 +262J3 495 +TQ24T 102 +JK8K9 208 +68J42 314 +TJA8Q 752 +2542J 389 +8KK88 394 +94A29 196 +494TJ 755 +KAKK8 672 +J545J 157 +TQ7TQ 463 +64J98 622 +JA6A3 499 +QQQ4Q 18 +99994 944 +3722A 437 +33T3K 24 +K2225 122 +89896 726 +9TT9Q 8 +KJKQQ 369 +A44A6 72 +T853A 882 +A969A 372 +6665K 254 +25235 200 +3A84T 475 +6A5K6 298 +TK3T3 650 +KT6A4 642 +26A7J 991 +QQQQ8 23 +8888K 689 +T3AQ7 609 +A9TJA 581 +AAKTA 547 +AAAJQ 590 +3K5A8 194 +QQ8TQ 127 +45556 665 +AAA44 852 +63396 148 +J3333 144 +87T63 297 +3T33T 663 +K2AJA 64 +5J754 408 +7TTKK 135 +727J2 714 +6QA87 12 +K6K52 346 +828JQ 98 +266T6 11 +8AATA 488 +JKQJT 375 +AK5T5 267 +777AA 491 +83JQ7 597 +T5K6T 538 +4AQ63 51 +8K93Q 968 +227AA 220 +A5AJA 721 +75445 760 +TA9JJ 823 +88877 70 +TTT95 268 +8J67J 972 +223JA 534 +9494K 173 +95959 683 +43KT7 42 +5KKKK 279 +58553 6 +4K222 180 +2999Q 835 +Q4AJ4 716 +8TQQT 628 +9Q577 992 +T99TT 381 +2JK26 123 +77722 222 +QJJ83 442 +88TT3 487 +62222 473 +76766 226 +42J3T 920 +43K4A 507 +8AKQT 120 +63T33 131 +39TT3 183 +AATT5 804 +995Q7 709 +24343 604 +AKJ77 168 +44888 421 +TATQT 598 +4A244 271 +37J6J 533 +T2AJ3 860 +222KK 253 +QJ64T 544 +3Q883 746 +99779 365 +73773 340 +3488J 831 +A4TJ8 911 +A4628 877 +5J55J 922 +89383 217 +44265 227 +87822 360 +KKKJT 960 +J9TTQ 332 +J6668 202 +79377 53 +8363K 76 +77T77 56 +JQJTT 66 +Q5555 891 +QQTTT 517 +3Q3Q3 498 +37J88 416 +JK284 845 +9KA9K 349 +2T88Q 927 +3Q333 403 +KA739 284 +975JK 502 +JJ353 438 +QT4K6 454 +QQ272 1 +KKJJ4 60 +96842 829 +539T8 827 +7J979 573 +28ATT 686 +J77J7 931 +KK6KK 169 +TK236 524 +552Q7 724 +75555 423 +77JJJ 970 +7J337 224 +9J98Q 455 +JTT94 603 +84448 427 +QKQ7K 452 +JK5A8 445 +3J33J 631 +95595 415 +52552 147 +55AKK 477 +922J9 607 +79292 925 +65665 765 +4JJ74 330 +44494 204 +K5924 762 +45975 288 +4AA84 771 +66999 111 +66JK5 161 +23JKT 962 +8QJ86 658 +88Q22 48 +JJ3T8 837 +4T44T 634 +94323 1000 +K8A64 813 +2QJ33 558 +AK95A 680 +442KT 347 +KK7KK 727 +9A273 969 +77AJ3 451 +6333A 4 +A4AT2 797 +37673 551 +TT5QT 500 +22A6A 540 +JK2J6 928 +T3J72 893 +K8A6A 376 +QT7Q7 626 +336J6 304 +97374 667 +K49K4 703 +Q8555 756 +63333 682 +8A787 404 +92499 932 +43334 494 +6464Q 361 +848TT 387 +A352K 483 +Q4454 228 +AJT4T 320 +5A2A5 732 +56266 151 +KJT45 594 +Q43T2 383 +J363J 118 +TT326 192 +66Q66 952 +8J778 790 +AAA2J 849 +339JJ 798 +33593 512 +49J55 406 +44447 530 +3QQTA 615 +977JJ 300 +86966 503 +Q6QQ6 326 +55775 63 +33222 31 +759TQ 673 +TTTT6 883 +22727 492 +255K2 713 +6JK2K 887 +646K6 862 +76677 596 +QK4JJ 758 +573J2 478 +QQQJ5 195 +TJJTT 80 +355J2 350 +4J288 722 +8TAT8 741 +43888 541 +TQ428 485 +AA4T8 582 +T2KJJ 808 +3TJ69 317 +9T6T5 481 +7K9A9 904 +TT5K2 549 +5QQQQ 113 +9339K 146 +A23A2 29 +88824 647 +35335 546 +539J4 542 +QQ9Q9 868 +QQ7Q7 409 +85854 207 +27777 964 +58226 519 +KK936 166 +277JJ 816 +8Q4A5 246 +Q9QAA 773 +A9444 506 +52546 441 +83833 184 +T3J3T 945 +7J98A 399 +57553 981 +8Q6QQ 602 +AJAJA 528 +7878T 449 +33A33 356 +AQ7JJ 211 +28822 74 +4A6K9 265 +4Q499 493 +TT2QT 560 +66365 908 +A2TTA 917 +777TT 417 +95A32 824 +5588Q 41 +T4Q4T 467 +99777 815 +2K2JK 617 +K93KK 957 +AAAJA 179 +69695 592 +ATA9Q 240 +4999T 96 +KK55K 980 +445A5 377 +KKJAA 579 +86586 133 +6KQ65 299 +Q5525 319 +232J3 593 +Q6Q66 708 +5522A 979 +2A92K 282 +TAT4A 170 +97A5T 878 +9595K 426 +2QJQQ 670 +99355 331 +A2JQ9 905 +9J444 751 +6J4J4 867 +32A4K 457 +6K766 599 +4Q367 874 +79966 397 +79999 278 +62Q9Q 978 +Q2Q37 434 +4J7TJ 580 +TKTTQ 646 +7K7K7 555 +4354J 36 +7K9JJ 405 +A3476 198 +J74J7 303 +A7TK8 515 +936T8 571 +AAAJ3 550 +AAQAA 261 +66664 203 +44QTQ 613 +A5659 859 +T77A8 954 +AJ833 81 +KK4KK 182 +Q4JJ2 618 +K9TT9 548 +82K8K 820 +6KK57 344 +66TT9 738 +52Q7Q 247 +9999A 422 +AA33A 241 +5KAQA 929 +9AAAA 923 +4J6Q5 983 +699J9 160 +85J55 775 +83543 584 +3K636 884 +AT92Q 178 +45Q67 967 +J2JJ2 255 +88A7A 190 +99K98 384 +98999 819 +99476 167 +442JJ 561 +4T263 750 +K3J2K 239 +9K8A7 274 +K333K 260 +AQQAQ 269 +J783J 388 +9QJ32 9 +22Q22 453 +58644 411 +98799 674 +755K2 140 +52252 734 +8878J 832 +5AA56 191 +988JJ 833 +5QQQ5 800 +JTJTA 155 +48J4A 19 +AAKTT 857 +6A665 532 +K623K 767 +33AK3 110 +K642J 88 +J26T3 661 +45845 915 +29J44 309 +QQ82Q 785 +88848 718 +28828 315 +KK8TK 988 +QTQ4Q 156 +Q52J9 899 +Q3859 252 +6J83Q 612 +36366 913 +K27Q2 233 +2T7T3 614 +J3337 795 +KQKKK 761 +84K4J 402 +TAQ5K 129 +A3T8J 684 +5K555 509 +A98QA 189 +782Q7 856 +8234T 938 +K7J55 55 +T3KA2 779 +7J64K 946 +88632 587 +76JAJ 611 +KJ9JJ 896 +J8JQ8 909 +TQKK9 933 +5T663 262 +KJ698 311 +3T35T 134 +JJJJJ 901 +266Q8 446 +AJA77 237 +AA888 649 +KKKK9 270 +82832 855 +3883J 136 +2KJ86 728 +KJ5T3 778 +8J448 719 +39599 44 +656T5 95 +TT7TT 715 +569K8 971 +3JQQQ 863 +8887Q 286 +88K8J 851 +23622 197 +A8QQA 942 +T237A 578 +2TJT5 608 +7T533 640 +8A884 737 +43Q83 744 +A822J 809 +46464 336 +4Q94K 564 +5Q9Q6 586 +28888 34 +TTT88 959 +32QAT 337 +8T363 841 +A28AQ 583 +3J443 22 +27QTJ 881 +6KK3K 995 +5884Q 108 +J3T85 52 +QQ9K9 461 +35J35 391 +54483 176 +JQ59Q 759 +4552T 780 +7Q39K 601 +42A4J 748 +J6A6T 132 +5T4A5 433 +98KK9 165 +Q7777 720 +K44KK 850 +4447K 292 +33933 986 +A228A 187 +Q76TT 30 +775J9 763 +Q4877 958 +Q22QQ 462 +KKQ2A 418 +Q4Q44 677 +666T6 678 +3688K 690 +69KAA 766 +3J8K8 574 +TTA55 675 +A8AAA 62 +K39K9 641 +88989 172 +A3JK3 705 +9J999 105 +22A27 692 +3T49J 214 +AK749 600 +9TJK5 465 +73334 799 +AAA4A 774 +22292 212 +8K653 2 +3A72A 659 +TTT3T 637 +Q3673 124 +59563 636 +5KA89 45 +AAATA 412 +9K5K2 75 +Q944Q 910 +52583 225 +69629 16 +4A6AA 702 +3393J 999 +A492Q 892 +76JT7 468 +7KQ64 420 +TA93Q 33 +JQ694 209 +TK983 283 +383JK 965 +ATT99 805 +Q3QQQ 193 +QQQQ2 731 +99T4A 13 +QQQQJ 137 +KK22K 782 +JJ354 864 +JKTTK 367 +99K29 559 +4993J 585 +Q7727 291 +6373J 747 +2J2AJ 370 +3533A 106 +KT93Q 85 +9T4T2 814 +KK79K 276 +8T9A5 390 +8828J 335 +TT2TT 569 +K7747 20 +A4444 712 +44644 588 +444AQ 363 +AA3AA 450 +5KA99 754 +Q45J5 679 +J4443 444 +82A53 249 +7TT7J 432 +9439A 919 +A76A2 201 +QJ85A 537 +KKKJJ 470 +2T45A 545 +QJ3Q3 97 +8JTT8 431 +55563 943 +K849A 505 +444Q4 936 +677K6 966 +J4J44 489 +5585T 119 +AAT2A 688 +64646 334 +K4J8A 806 +56J3J 671 +A8T32 92 +9KQ52 321 +76367 393 +96J42 633 +8Q848 69 +2J777 380 +95TJQ 218 +4KAA9 89 +7TJ48 562 +35333 107 +9992T 295 +44448 885 +77877 281 +7AAA6 459 +577JK 595 +J8655 990 +T43J4 723 +88442 368 +A7T7T 745 +6Q5QQ 664 +29J2T 316 +444J4 150 +3Q354 653 +43KQ6 443 +895J3 232 +JA46T 472 +9AJ22 553 +4QQQ4 469 +Q7JKT 768 +TTT8J 801 +A33Q3 188 +3363J 989 +J95T4 425 +J4J49 890 +5K5K5 152 +JK4K4 14 +Q57Q7 940 +55544 706 +66K26 257 +7JQA7 921 +K969J 128 +7754Q 290 +KKKAK 357 +4849K 821 +49699 322 +8TTQT 162 +KJTJ9 552 +79K48 339 +55655 497 +AA555 385 +222J2 853 +66JA6 159 +9AQ77 662 +5TTJT 213 +27A77 572 +3J97T 306 +27329 413 +66333 696 +85AJ2 348 +KK2KA 510 +55J57 301 +AQT48 354 +K2834 869 +666J3 772 +32724 950 +74377 907 +Q7999 244 +38J33 570 +252J3 84 +98782 788 +499J8 934 +33888 386 +2JK4Q 987 +96JJ6 480 +4KQJK 125 +87965 791 +7383J 275 +Q5JQ5 65 +2A822 589 +75289 740 +37473 39 +6TK95 839 +2A726 293 +888J8 914 +98969 681 +QKK66 825 +TT77T 430 +5QQ24 245 +66J64 21 +QK4J5 396 +Q2JTK 886 +6923T 796 +5TTT5 100 +8K929 345 +22826 693 +4TJ53 458 +55855 302 +94959 520 +82A5A 912 +KT7K9 464 +55KJK 655 +Q76QK 77 +A75A9 263 +94888 924 +59578 289 +87TK8 648 +4464J 382 +K8887 621 +Q4QAQ 802 +J6AAA 149 +AA3AQ 47 +25257 976 +KQK22 818 +TQ6A2 250 +J7777 138 +4T3T4 717 +QQJJQ 676 +J7TT2 86 +4K95Q 482 +2KJKJ 953 +9JJ99 997 +22322 392 +T86J9 854 +QQQ88 359 +J84J8 707 +26226 660 +QTTTT 366 +33337 486 +J4844 501 +8Q668 793 +77294 951 +6J66J 527 +377J7 668 +9T548 843 +57757 627 +KKK85 566 +7TJ7Q 526 +A9A93 975 +72K86 114 +63AK3 447 +J823Q 961 +44669 439 +4784J 205 +9K799 794 +K3J3K 730 +25475 930 +A3783 163 +87A65 287 +36A85 99 +77497 476 +39493 948 +QT9QQ 935 +33A3A 78 +KKK8K 362 +74J47 926 +T633T 410 +3K355 448 +89367 736 +Q6556 811 +58788 697 +A2Q74 479 +TT53T 880 +7J3A6 342 +JK8KK 230 +597J6 46 +TTT49 324 +2222A 273 +T5223 91 +97QQJ 812 +37373 776 +KKKQJ 327 +77K9J 280 +TT3T3 711 +92999 567 +99993 974 +52T22 735 diff --git a/2023/day7.test b/2023/day7.test new file mode 100644 index 0000000..e1303a7 --- /dev/null +++ b/2023/day7.test @@ -0,0 +1,6 @@ +32T3K 765 +T55J5 684 +KK677 28 +KTJJT 220 +QQQJA 483 + diff --git a/2023/day8.input b/2023/day8.input new file mode 100644 index 0000000..d95e19b --- /dev/null +++ b/2023/day8.input @@ -0,0 +1,716 @@ +LRRLRRLLRRRLRRLRLRRRLRRLRRRLRLLRRRLRRRLRLRRRLRRLRRLRLRLLLRRRLRRRLRRLRRLRLRRRLRRLLRRLRRLRLLRLRLRRLRLLRLRLRRRLRRLRLLRLRLLRRLRLRRLLLRLRRLRRRLLLRRLRLRRRLLRRLLLRRRLRRRLLLRRLLRLRRLRLRRLLLRLRRLLLLRRLLRRRLRRLRRLRLRLLRLRRRLLRRLLRRLRRLRRLRRLRLLRRLRRRLRLRLLLRRRLLRRRLRRLRRLLLLRRRR + +VRN = (CSM, GPD) +XDT = (QBK, PJR) +HVC = (MKM, TJS) +KRH = (BHN, PXB) +GTX = (VFD, TXR) +BQB = (MQV, PFQ) +TDV = (VSG, MJX) +VJM = (QHP, XMB) +KLG = (QLJ, HCV) +TSM = (JPG, DNP) +KHS = (QNR, DXJ) +FXM = (PHF, PHF) +RMV = (BMM, KHS) +QXL = (BKG, TLP) +MHS = (QXL, CFQ) +TBT = (TVT, BRD) +QXS = (GPP, RND) +XLL = (JHQ, LDV) +PBQ = (VXK, RJR) +FXB = (HMN, THX) +DPF = (GLX, GNC) +HVG = (HJF, SCH) +QMN = (DQJ, GMN) +MBS = (PFX, JHG) +VGL = (FHX, CCK) +QLV = (BLT, FDR) +MNS = (BDB, BMJ) +MMT = (TSM, SFR) +NRP = (FKB, QPH) +XFQ = (GTS, CCQ) +XFF = (HKG, NVL) +TXR = (VHQ, CKP) +VPL = (GHC, VMT) +SGC = (BGM, MJV) +SMS = (GJV, LSC) +BVC = (PRH, FJJ) +JHQ = (VJQ, XTX) +RJF = (GKK, NKX) +RJR = (JJQ, JTK) +VHQ = (JPS, JPS) +SFR = (JPG, DNP) +RDP = (GPD, CSM) +GGQ = (MVX, XBP) +XGK = (GBB, VPH) +XBH = (PTH, GSL) +MKG = (RBP, MGG) +FSG = (KFC, RMB) +NHC = (RQG, CVF) +SSV = (MVF, QFP) +RLP = (FXC, HCP) +FBZ = (FJF, CRJ) +HFL = (FKB, QPH) +NBM = (QBD, XGK) +NSP = (QKG, NDN) +TQF = (RMH, TDB) +RBB = (QTC, HPT) +CVF = (BSV, VTR) +XQG = (LFJ, JXD) +KXF = (CRJ, FJF) +MQC = (MQL, BSL) +RCC = (NHC, QLC) +TNT = (VKQ, NSX) +TVN = (NDN, QKG) +SCH = (FXB, NTM) +CVD = (XLJ, XDT) +QVF = (MQR, RDB) +GXS = (HCK, SHD) +KBD = (JHG, PFX) +KXV = (HVQ, QCJ) +MQR = (RNQ, SVC) +CBC = (SXB, BVC) +GKK = (HDR, LTF) +FRT = (CFQ, QXL) +VMT = (SQQ, DBB) +QPV = (NVQ, VVV) +XGD = (MPL, PMQ) +MNT = (JDD, NQC) +RGT = (QHD, SQP) +HXV = (RQD, RRX) +LGR = (FHX, CCK) +PHF = (CBV, TMC) +BTP = (JSC, QMN) +CXS = (SCH, HJF) +MQV = (FGJ, QPD) +HRZ = (CCX, BCF) +DDB = (DJK, CVD) +XNL = (QLJ, HCV) +GLX = (MGN, CFV) +QCJ = (NDK, XBR) +XBX = (CQM, VKD) +QPH = (XBH, CFG) +NSL = (LFJ, JXD) +DJQ = (VMN, STS) +RNV = (XFF, KSR) +JTR = (QLG, XRD) +VVV = (MDH, KHK) +TLR = (DMH, NXC) +GBH = (GLS, XLK) +LRN = (QRM, FMC) +BRM = (DCK, DSK) +GQS = (FXV, QPV) +XMT = (NHF, RXG) +KLR = (HFN, KDR) +SVH = (RMR, JLC) +QSG = (KQC, CMH) +VVX = (XGM, FNX) +BCF = (LNR, MTS) +RPJ = (RCC, CKG) +JJD = (NRP, HFL) +FGP = (MFS, RBB) +BJX = (BTD, KSC) +PQC = (VMN, STS) +JPG = (RQL, CSQ) +SLK = (JJC, BPJ) +JTK = (XHN, BFH) +HCV = (BRF, VPT) +VPH = (BVS, RRT) +MSH = (JQF, XFJ) +JHL = (QPF, QPF) +FGD = (MPC, TVB) +DCB = (JBC, XFB) +RKN = (TSL, VQG) +QBQ = (QLV, NRT) +MQX = (JSX, MCV) +XHX = (FNX, XGM) +DTL = (JDM, BDX) +LST = (JHL, CQN) +VGR = (HQV, HRZ) +CTQ = (XCF, TJK) +SQP = (HHB, NBM) +RRL = (TSL, VQG) +NNM = (DDS, XSF) +KHK = (HSG, NDF) +MGN = (VXT, VGV) +TLB = (DPK, MLV) +NMM = (TRR, XJH) +SJG = (XRJ, XBX) +GSC = (RRL, RKN) +KDR = (PSJ, TBM) +LRP = (SQP, QHD) +DKF = (MVR, QQB) +FHC = (BPT, BKC) +PLT = (JGG, GGQ) +XRD = (HMH, PBQ) +RHP = (JPD, XVL) +MXF = (MQR, RDB) +DML = (BRD, TVT) +CKP = (JPS, RBS) +BFK = (BCL, TLK) +KSR = (NVL, HKG) +XQF = (BMM, KHS) +BVJ = (CBL, PLC) +BCS = (RQF, GTB) +JCC = (VTT, VPQ) +BCL = (BNV, PDB) +HCK = (DDB, CBX) +SVG = (FGD, VQL) +BLT = (XNK, LHM) +MVQ = (LRG, NPB) +RND = (QCK, QRN) +HFR = (FBT, CLS) +KNK = (XDS, BCK) +XBB = (BRM, FDC) +XGM = (FFC, GJX) +PTN = (TQF, QKP) +RNQ = (GSC, XKH) +TPT = (CMK, KXT) +HPL = (CKB, QLR) +MVX = (QSG, TKJ) +QFP = (RLP, RSF) +GXF = (LNB, VNJ) +QHD = (NBM, HHB) +KSS = (LLH, PFK) +MFD = (XGJ, GGS) +JJQ = (XHN, BFH) +JDD = (HXV, FVH) +CFR = (FXM, FXM) +FDR = (XNK, LHM) +DHG = (BRS, TLR) +TDB = (SBS, XBB) +BVS = (GQH, BFS) +DGZ = (TMC, CBV) +HQD = (JSC, QMN) +TMZ = (XFB, JBC) +BRF = (MBF, KGJ) +RQG = (VTR, BSV) +CSQ = (FTS, RHR) +FFJ = (QCL, CTQ) +XKH = (RRL, RKN) +VJQ = (BTL, GQS) +NGK = (JGG, GGQ) +RQN = (GVG, SJN) +GRR = (RNV, FHF) +LSR = (VBL, SLK) +VQG = (QBV, NJV) +BHK = (BVJ, LJR) +BRS = (DMH, NXC) +NKX = (LTF, HDR) +QBD = (GBB, VPH) +RGQ = (CLM, FHK) +VXX = (KRH, VGN) +KRF = (VFQ, SMN) +XFR = (XGD, RMM) +JGC = (JGM, PFR) +SHD = (DDB, CBX) +QKG = (QTS, GXP) +CDL = (GLX, GNC) +RBP = (HKK, CMN) +CLN = (HDG, BHM) +XFX = (RNV, FHF) +AAA = (DXX, SVG) +FXC = (MMT, KLS) +PTF = (SKF, SDF) +QPF = (RQF, RQF) +DTB = (HQV, HQV) +RRF = (FNV, MKG) +MGG = (HKK, CMN) +NDF = (KMD, FFH) +DVL = (RKL, CLC) +JRQ = (BXV, BRB) +HVM = (DRT, SSV) +BHM = (KNK, BPP) +TDT = (DPS, VCP) +JPC = (DCH, FHD) +RSF = (FXC, HCP) +KSX = (BVJ, LJR) +NLT = (LTB, QBQ) +SBD = (NKX, GKK) +VQL = (MPC, TVB) +JXD = (MLK, LHN) +XNN = (TNT, LPQ) +HMH = (RJR, VXK) +JGG = (MVX, XBP) +PTP = (MVQ, NPS) +FQC = (XQF, RMV) +FXT = (TDH, JGD) +RGP = (CPN, KGF) +BTD = (NKN, NTQ) +BGM = (NRJ, CJN) +RMM = (PMQ, MPL) +DQJ = (DPF, CDL) +TVT = (TFJ, VJM) +TGL = (CGS, SJG) +NHF = (HVC, LVM) +NMK = (GRR, XFX) +QRN = (MMP, XSL) +FFH = (DJQ, PQC) +PDJ = (NQC, JDD) +CGS = (XBX, XRJ) +NTQ = (RXX, FLX) +CFB = (TVC, PTP) +GXK = (FLC, GXS) +RBS = (DCB, TMZ) +CFQ = (TLP, BKG) +QHP = (KVX, GSG) +HDJ = (RPH, QPK) +VXT = (GXF, JKM) +NCM = (NJL, TGL) +HFN = (TBM, PSJ) +JGF = (CFB, NMC) +JDM = (CLN, PHJ) +DJS = (RMR, JLC) +RDB = (RNQ, SVC) +RRX = (HQD, BTP) +HHS = (MXF, QVF) +MMP = (GTX, HKC) +JRK = (KKP, PTN) +TRR = (VGD, HGC) +JKM = (LNB, VNJ) +BRD = (TFJ, VJM) +TLK = (BNV, PDB) +QTS = (CHL, LSR) +BPP = (XDS, BCK) +RXX = (BKP, TLS) +VFD = (VHQ, VHQ) +BQF = (DHG, DQC) +XDL = (QVF, MXF) +ZZZ = (SVG, DXX) +GGB = (LTB, QBQ) +QTN = (JHL, CQN) +BVK = (BHQ, SSG) +VGB = (BXV, BRB) +QLR = (XFR, KNM) +QBK = (KNC, VJX) +BMJ = (JLK, TDV) +FDC = (DSK, DCK) +XDS = (SMS, TVR) +GBC = (NGK, PLT) +HPT = (XHQ, SXT) +FHK = (JCC, FJS) +KNM = (RMM, XGD) +GTB = (KLR, JVZ) +VCT = (PTN, KKP) +LDV = (XTX, VJQ) +KTK = (MQV, PFQ) +TVC = (MVQ, NPS) +BXV = (XLL, KDL) +BFA = (BCF, CCX) +CCF = (CLM, FHK) +JGS = (VCP, DPS) +RVK = (MKJ, QLH) +FNX = (FFC, GJX) +XBP = (QSG, TKJ) +LMJ = (FPH, JVL) +HKG = (VXX, RNX) +KMD = (DJQ, PQC) +BRB = (XLL, KDL) +NDK = (DJS, SVH) +BSV = (XVC, QXS) +TLS = (FSJ, MNS) +CRJ = (SGC, RNH) +BNV = (QSF, FSG) +SMN = (MNK, QGN) +JVV = (TRN, DVL) +JJC = (HBT, RPJ) +KSB = (XVL, JPD) +JJT = (TLB, DTJ) +TSL = (QBV, NJV) +GNV = (GCS, JLR) +HJF = (FXB, NTM) +VMN = (CFR, CFR) +GVG = (XDL, HHS) +LNB = (HMP, XMP) +RTL = (FXT, RCT) +XVC = (RND, GPP) +GNS = (MFS, RBB) +XTG = (LRM, DKQ) +JVZ = (KDR, HFN) +QQB = (XTG, GFG) +HMN = (FHC, FMN) +XLC = (FXT, RCT) +CKG = (QLC, NHC) +NJB = (DVL, TRN) +VCP = (LRF, HPL) +KQJ = (MXH, MXH) +GJV = (TPT, QNJ) +CCX = (LNR, MTS) +DTJ = (MLV, DPK) +HDX = (JSX, MCV) +XRJ = (VKD, CQM) +DMH = (RGP, KPR) +QGN = (VRF, QDL) +JSC = (DQJ, GMN) +BPT = (LLB, XNN) +CJN = (JJT, PGM) +XDV = (XVD, HJH) +JHG = (LLF, MLJ) +NKN = (FLX, RXX) +TGP = (XJH, TRR) +TLP = (XLC, RTL) +HQT = (SSN, BPS) +BKP = (MNS, FSJ) +VPT = (KGJ, MBF) +JSJ = (PFK, LLH) +CBX = (DJK, CVD) +TJK = (VGL, LGR) +THP = (TGL, NJL) +NSX = (SQL, GNV) +JQF = (VDM, JJD) +SDF = (JPC, KRV) +XNK = (HDJ, MQJ) +DSD = (SJN, GVG) +SBS = (FDC, BRM) +FPH = (NCM, THP) +LMR = (KQJ, BGV) +VKQ = (SQL, GNV) +FMC = (CPV, GBC) +HHB = (QBD, XGK) +HVQ = (NDK, XBR) +KXT = (JKG, NLS) +GJX = (TVP, JTR) +JLT = (MHM, MSH) +VNJ = (HMP, XMP) +TDH = (JGF, GGD) +VPQ = (HDX, MQX) +SKF = (JPC, KRV) +NXT = (RXG, NHF) +TRN = (CLC, RKL) +RRT = (BFS, GQH) +JFJ = (SXB, BVC) +KBR = (CGD, JGC) +PGG = (HFR, TJJ) +CMK = (JKG, NLS) +CBV = (FCX, KBR) +GMN = (DPF, CDL) +BTL = (QPV, FXV) +PFX = (MLJ, LLF) +DCT = (XLK, GLS) +PGM = (DTJ, TLB) +NVL = (VXX, RNX) +RPD = (TLK, BCL) +QDL = (FFJ, SFH) +JVL = (THP, NCM) +NVQ = (MDH, KHK) +TMC = (FCX, KBR) +LPQ = (NSX, VKQ) +RHR = (PPL, LCD) +JSX = (DHM, PMS) +DPK = (KBD, MBS) +LTF = (PGG, QPN) +BPS = (GXK, HCM) +HKC = (VFD, TXR) +PXB = (RPN, BQF) +FLX = (TLS, BKP) +PJR = (VJX, KNC) +PDB = (QSF, FSG) +NMC = (TVC, PTP) +MLP = (MSH, MHM) +PMQ = (KXV, QFJ) +FKB = (XBH, CFG) +JRV = (SMN, VFQ) +SQL = (GCS, JLR) +DXX = (FGD, VQL) +XMM = (GMG, LRN) +PFK = (HDL, XFQ) +XSL = (GTX, HKC) +CLC = (JRQ, VGB) +LMH = (KXF, FBZ) +NMX = (KSC, BTD) +GTJ = (KLG, XNL) +THX = (FMN, FHC) +RMH = (XBB, SBS) +SSG = (MFD, KFP) +QNR = (RBG, HNG) +DSK = (LMJ, FRP) +GQP = (FXM, XVT) +MFS = (QTC, HPT) +VHX = (VBD, RDD) +SQS = (GTJ, MSR) +LJR = (CBL, PLC) +QSF = (KFC, KFC) +DHM = (VFJ, DTL) +MDH = (NDF, HSG) +SSN = (HCM, GXK) +HCM = (FLC, GXS) +PQX = (FGG, BXR) +DQC = (BRS, TLR) +KRV = (DCH, FHD) +FNH = (SKF, SDF) +LFJ = (LHN, MLK) +MVR = (GFG, XTG) +HBT = (RCC, CKG) +VKD = (NMK, PFV) +TKJ = (KQC, CMH) +MRH = (RHV, ZZZ) +CKB = (XFR, KNM) +BMM = (DXJ, QNR) +KDL = (JHQ, LDV) +VFJ = (BDX, JDM) +PLC = (PND, GNP) +MNK = (QDL, VRF) +MXT = (RMV, XQF) +TJS = (PTF, FNH) +PHJ = (BHM, HDG) +FSJ = (BDB, BMJ) +CFV = (VGV, VXT) +XVD = (CBF, SQS) +TFJ = (QHP, XMB) +CPV = (PLT, NGK) +VTR = (XVC, QXS) +BKC = (XNN, LLB) +NPS = (NPB, LRG) +FXV = (NVQ, VVV) +FTS = (PPL, LCD) +HMP = (QMD, SNX) +VBD = (DTB, DTB) +VFQ = (QGN, MNK) +KFP = (GGS, XGJ) +BHN = (RPN, BQF) +PFV = (GRR, XFX) +QMD = (MGK, XDV) +MLK = (RPD, BFK) +GFG = (DKQ, LRM) +NLS = (BQB, KTK) +XLK = (HVG, CXS) +LSC = (QNJ, TPT) +FNV = (RBP, MGG) +HKK = (RCX, MQC) +GPD = (NSL, XQG) +RQL = (RHR, FTS) +HDB = (GHC, VMT) +HJH = (SQS, CBF) +QTC = (SXT, XHQ) +TRS = (BXR, FGG) +MTS = (DML, TBT) +RHV = (DXX, SVG) +XVL = (FGP, GNS) +GSG = (RRF, CSP) +VBL = (JJC, BPJ) +CCK = (RJF, SBD) +QPN = (TJJ, HFR) +PRH = (TGP, NMM) +PQT = (TRS, PQX) +QKP = (RMH, TDB) +XMP = (SNX, QMD) +QPD = (KRF, JRV) +RQD = (HQD, BTP) +XVT = (PHF, DGZ) +GXP = (CHL, LSR) +LHM = (MQJ, HDJ) +STS = (CFR, GQP) +FJJ = (NMM, TGP) +MPC = (CCF, RGQ) +MKM = (PTF, FNH) +QVH = (VBD, VBD) +XMB = (KVX, GSG) +CHL = (VBL, SLK) +XBR = (DJS, SVH) +KPR = (CPN, KGF) +MQL = (KSB, RHP) +CQM = (PFV, NMK) +XHQ = (HCR, HVM) +FFC = (JTR, TVP) +FMN = (BPT, BKC) +SNX = (MGK, XDV) +KNC = (QVJ, NNM) +DPS = (LRF, HPL) +GBB = (BVS, RRT) +BFH = (XMM, XQL) +GLS = (HVG, CXS) +RXG = (LVM, HVC) +MPL = (QFJ, KXV) +NXC = (KPR, RGP) +NJV = (TVN, NSP) +LLB = (LPQ, TNT) +SXT = (HVM, HCR) +LLH = (HDL, XFQ) +MLV = (KBD, MBS) +CBF = (GTJ, MSR) +JBC = (KTX, QQG) +FLC = (SHD, HCK) +FRP = (FPH, JVL) +BHQ = (MFD, KFP) +LNR = (DML, TBT) +CSP = (MKG, FNV) +GHC = (SQQ, DBB) +NRT = (BLT, FDR) +VTT = (HDX, MQX) +HSG = (FFH, KMD) +VGA = (CBV, TMC) +KLS = (TSM, SFR) +PFQ = (FGJ, QPD) +MKJ = (JLT, MLP) +MFX = (RVK, NSF) +QNJ = (KXT, CMK) +QBV = (NSP, TVN) +MSR = (KLG, XNL) +NSF = (QLH, MKJ) +DKQ = (JDR, DQQ) +PLH = (RVK, NSF) +JKG = (BQB, KTK) +LVM = (MKM, TJS) +QLJ = (VPT, BRF) +FVH = (RRX, RQD) +MJX = (DCT, GBH) +QLH = (MLP, JLT) +NPB = (XMT, NXT) +HDL = (CCQ, GTS) +JPS = (DCB, DCB) +CQN = (QPF, BCS) +GNP = (DSD, RQN) +JLK = (MJX, VSG) +PMS = (DTL, VFJ) +BFS = (JGS, TDT) +XJH = (VGD, HGC) +VRF = (SFH, FFJ) +BCK = (SMS, TVR) +DRT = (QFP, MVF) +PND = (DSD, RQN) +VSG = (GBH, DCT) +VGV = (JKM, GXF) +FHD = (MXT, FQC) +GPP = (QRN, QCK) +BDX = (CLN, PHJ) +LLF = (HQT, DCL) +DXA = (HFN, KDR) +MCV = (DHM, PMS) +NTM = (HMN, THX) +JLC = (RDP, VRN) +HQV = (BCF, CCX) +NDN = (QTS, GXP) +QVJ = (DDS, XSF) +MQJ = (RPH, QPK) +FGJ = (KRF, JRV) +LHN = (BFK, RPD) +MXH = (RHV, RHV) +HGC = (DNN, PQT) +MHM = (XFJ, JQF) +JGD = (JGF, GGD) +FCX = (JGC, CGD) +GCS = (LST, QTN) +RCX = (BSL, MQL) +XGJ = (VCT, JRK) +SXB = (FJJ, PRH) +LRG = (XMT, NXT) +XSF = (LRP, RGT) +DNP = (CSQ, RQL) +RKL = (VGB, JRQ) +KVX = (CSP, RRF) +JPD = (FGP, GNS) +GNC = (MGN, CFV) +PFR = (MHS, FRT) +DCK = (LMJ, FRP) +KKP = (TQF, QKP) +XQL = (GMG, LRN) +QCL = (TJK, XCF) +TVP = (XRD, QLG) +HDR = (QPN, PGG) +HLN = (BHQ, SSG) +GGS = (VCT, JRK) +SJN = (HHS, XDL) +DBB = (BHK, KSX) +QPK = (MFX, PLH) +MBF = (NLT, GGB) +BDB = (TDV, JLK) +KSC = (NKN, NTQ) +CPN = (HDB, VPL) +TVB = (RGQ, CCF) +VJX = (NNM, QVJ) +FBT = (JLL, LMR) +TVR = (GJV, LSC) +RNX = (KRH, VGN) +RPH = (MFX, PLH) +VJA = (JBC, XFB) +CLS = (JLL, LMR) +PSJ = (DKF, MSL) +QLG = (PBQ, HMH) +DXJ = (HNG, RBG) +XFB = (KTX, QQG) +TJJ = (FBT, CLS) +KFC = (JRF, JRF) +XFJ = (JJD, VDM) +RCT = (TDH, JGD) +RNH = (BGM, MJV) +VGD = (PQT, DNN) +KQC = (JFJ, CBC) +PPL = (JSJ, KSS) +HCR = (DRT, SSV) +XLJ = (PJR, QBK) +PTH = (QVH, VHX) +RQF = (KLR, KLR) +MSL = (MVR, QQB) +NRJ = (PGM, JJT) +JLL = (KQJ, KQJ) +DCL = (BPS, SSN) +GTS = (MNT, PDJ) +BXR = (NMX, BJX) +CBL = (PND, GNP) +VXK = (JJQ, JTK) +BSL = (RHP, KSB) +NJL = (SJG, CGS) +DQQ = (XHX, VVX) +SQQ = (BHK, KSX) +KTX = (BVK, HLN) +QCK = (XSL, MMP) +SVC = (GSC, XKH) +BGV = (MXH, MRH) +GMG = (QRM, FMC) +KGJ = (NLT, GGB) +LRF = (QLR, CKB) +CMN = (RCX, MQC) +CGD = (JGM, PFR) +LCD = (JSJ, KSS) +HDG = (BPP, KNK) +DDS = (LRP, RGT) +LRM = (DQQ, JDR) +CMH = (CBC, JFJ) +GQH = (TDT, JGS) +BKG = (RTL, XLC) +RMR = (VRN, RDP) +MGK = (XVD, HJH) +FJS = (VTT, VPQ) +SFH = (CTQ, QCL) +XHN = (XQL, XMM) +BPA = (CRJ, FJF) +XCF = (VGL, LGR) +TBM = (MSL, DKF) +JLR = (LST, QTN) +QFJ = (HVQ, QCJ) +CCQ = (MNT, PDJ) +VGN = (PXB, BHN) +LTB = (QLV, NRT) +DCH = (MXT, FQC) +CFG = (PTH, GSL) +JRF = (KXF, KXF) +QRM = (CPV, GBC) +XTX = (BTL, GQS) +FHX = (SBD, RJF) +FHF = (KSR, XFF) +CSM = (NSL, XQG) +HCP = (MMT, KLS) +DJK = (XDT, XLJ) +QLC = (CVF, RQG) +MLJ = (HQT, DCL) +CLM = (JCC, FJS) +NQC = (HXV, FVH) +RDD = (DTB, VGR) +RPN = (DQC, DHG) +GSL = (QVH, VHX) +FGG = (NMX, BJX) +BPJ = (RPJ, HBT) +RBG = (NJB, JVV) +FJF = (SGC, RNH) +GGD = (CFB, NMC) +QQG = (HLN, BVK) +MVF = (RLP, RSF) +JGM = (MHS, FRT) +RMB = (JRF, LMH) +VDM = (HFL, NRP) +HNG = (NJB, JVV) +MJV = (CJN, NRJ) +DNN = (PQX, TRS) +JDR = (XHX, VVX) +KGF = (HDB, VPL) diff --git a/2023/day8.test b/2023/day8.test new file mode 100644 index 0000000..5b3fa58 --- /dev/null +++ b/2023/day8.test @@ -0,0 +1,10 @@ +LR + +11A = (11B, XXX) +11B = (XXX, 11Z) +11Z = (11B, XXX) +22A = (22B, XXX) +22B = (22C, 22C) +22C = (22Z, 22Z) +22Z = (22B, 22B) +XXX = (XXX, XXX) diff --git a/2023/day9.input b/2023/day9.input new file mode 100644 index 0000000..65fb280 --- /dev/null +++ b/2023/day9.input @@ -0,0 +1,200 @@ +8 10 9 -2 -17 8 190 771 2208 5345 11753 24409 49063 97014 190779 375658 743112 1477240 2945141 5868120 11637263 +-9 -16 -26 -42 -67 -89 -41 278 1345 4163 10710 24787 53710 111805 227699 459451 925644 1868703 3782952 7672020 15562542 +28 51 96 170 284 469 798 1415 2573 4692 8485 15300 28049 53554 108059 229471 503402 1116673 2463878 5353430 11394522 +10 16 22 28 34 40 46 52 58 64 70 76 82 88 94 100 106 112 118 124 130 +8 24 56 121 238 431 742 1256 2137 3671 6309 10700 17701 28348 43769 65017 92798 127066 166454 207507 243680 +3 13 33 61 105 197 418 951 2204 5084 11556 25688 55464 115742 232843 451380 844073 1525447 2670475 4539407 7510219 +15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 +4 5 21 57 125 255 506 977 1818 3241 5531 9057 14283 21779 32232 46457 65408 90189 122065 162473 213033 +5 12 36 95 219 453 862 1541 2644 4472 7720 14109 27863 58876 128976 283411 610443 1272472 2551916 4913291 9078231 +2 19 48 88 142 226 378 659 1139 1866 2825 3907 4925 5735 6545 8524 14856 32421 74326 163554 338048 +3 2 -4 -12 -13 15 119 394 1027 2386 5231 11268 24599 55319 127898 299662 699808 1609223 3620339 7952681 17068804 +9 19 41 88 184 362 655 1088 1698 2633 4409 8432 17912 39299 84354 172945 336675 623603 1104781 1884372 3117140 +11 10 7 2 -5 -14 -25 -38 -53 -70 -89 -110 -133 -158 -185 -214 -245 -278 -313 -350 -389 +19 24 24 19 9 -6 -26 -51 -81 -116 -156 -201 -251 -306 -366 -431 -501 -576 -656 -741 -831 +9 32 76 155 293 539 990 1835 3446 6555 12569 24088 45704 85172 155057 274974 474551 797258 1305258 2085449 3256879 +4 22 61 126 216 323 429 496 442 104 -778 -2444 -4602 -5001 3844 41336 151368 424562 1035747 2304666 4791100 +0 0 9 40 118 299 697 1509 3030 5661 9946 16758 27950 48215 89776 183216 400828 904162 2036175 4492208 9625134 +13 25 39 60 106 222 501 1112 2341 4666 8915 16616 30800 57904 112321 227047 477565 1032763 2257999 4913736 10521598 +6 22 40 69 146 357 871 2004 4337 8920 17613 33667 62784 115219 210184 385179 715340 1352050 2596670 5035253 9774610 +2 9 16 23 30 37 44 51 58 65 72 79 86 93 100 107 114 121 128 135 142 +-1 -2 -8 -29 -74 -137 -160 57 1057 4150 12265 31578 74476 164761 346652 700523 1371301 2621840 4937055 9232612 17279510 +7 3 -1 -5 -9 -13 -17 -21 -25 -29 -33 -37 -41 -45 -49 -53 -57 -61 -65 -69 -73 +18 35 77 152 275 474 797 1337 2301 4165 8004 16198 33941 72398 155095 330403 695128 1437759 2915603 5788900 11248491 +7 28 76 166 310 512 772 1122 1725 3072 6312 13746 29508 60444 117184 215382 377075 632084 1019348 1588046 2398322 +-3 10 34 68 126 257 565 1229 2528 4882 8928 15661 26685 44639 73889 121610 199423 325802 529526 854522 1366528 +6 4 15 51 125 266 551 1157 2441 5079 10347 20719 41097 81174 159640 311114 596708 1118810 2039715 3601703 6142457 +12 35 71 120 182 257 345 446 560 687 827 980 1146 1325 1517 1722 1940 2171 2415 2672 2942 +-2 4 33 113 285 614 1209 2261 4127 7519 13909 26350 51070 100480 198753 392053 767092 1484370 2836777 5350987 9959291 +-6 -2 3 9 20 44 93 183 334 570 919 1413 2088 2984 4145 5619 7458 9718 12459 15745 19644 +12 25 49 95 174 290 437 612 857 1353 2630 6055 14955 37103 90000 211717 482514 1066813 2292543 4797075 9788236 +-4 4 16 26 29 26 31 88 318 1047 3127 8672 22628 55944 131699 296469 640572 1332626 2675974 5196610 9773547 +14 20 26 42 100 265 654 1485 3185 6596 13338 26437 51445 98542 186642 351540 662034 1251569 2380155 4556366 8781478 +17 28 52 116 263 555 1079 1958 3381 5702 9728 17440 33609 69151 147721 318136 676961 1408280 2851676 5615220 10758379 +27 38 47 50 36 -21 -161 -409 -683 -567 1192 7716 25976 70370 168856 372991 773719 1525352 2880909 5242830 9234076 +9 24 52 89 130 174 242 430 1026 2727 7008 16735 37199 77905 155712 300326 563743 1036074 1871316 3328125 5832568 +18 30 58 130 290 604 1169 2128 3710 6351 11024 20036 38775 79266 167002 353463 738166 1506184 2990058 5769178 10825356 +23 37 62 108 193 352 660 1280 2553 5166 10476 21162 42594 85792 173866 355862 735855 1532471 3197482 6646280 13695427 +-7 -9 1 33 93 192 372 760 1668 3760 8302 17494 34850 65539 116523 196223 313307 474021 677271 906407 1116355 +4 13 35 70 118 179 253 340 440 553 679 818 970 1135 1313 1504 1708 1925 2155 2398 2654 +13 32 68 135 266 535 1087 2173 4187 7702 13502 22607 36288 56069 83713 121189 170617 234188 314056 412199 530246 +15 39 72 119 196 333 580 1029 1874 3542 6945 13932 28069 55954 109395 208956 389625 709697 1264414 2206485 3776346 +23 48 100 198 372 668 1150 1905 3070 4928 8170 14508 27993 57733 123378 265976 568880 1196482 2462432 4942379 9645683 +22 37 58 84 123 216 478 1175 2866 6656 14639 30679 61822 120915 231510 436964 817030 1517731 2805360 5166426 9499429 +9 38 78 125 175 224 268 303 325 330 314 273 203 100 -40 -221 -447 -722 -1050 -1435 -1881 +10 28 69 152 306 570 993 1634 2562 3856 5605 7908 10874 14622 19281 24990 31898 40164 49957 61456 74850 +10 30 66 140 289 566 1040 1795 2928 4546 6762 9690 13439 18106 23768 30473 38230 46998 56674 67080 77949 +10 33 71 120 172 215 233 206 110 -83 -405 -892 -1584 -2525 -3763 -5350 -7342 -9799 -12785 -16368 -20620 +10 22 42 79 147 285 585 1232 2574 5271 10644 21490 43883 90886 189731 395088 813105 1645355 3271757 6413156 12459158 +10 22 42 75 127 213 369 668 1240 2296 4156 7281 12309 20095 31755 48714 72758 106090 151390 211879 291387 +-4 -11 -10 7 44 101 174 255 332 389 406 359 220 -43 -466 -1089 -1956 -3115 -4618 -6521 -8884 +6 13 27 55 126 305 707 1511 2974 5445 9379 15351 24070 36393 53339 76103 106070 144829 194187 256183 333102 +20 33 58 101 165 248 350 501 838 1791 4500 11709 29625 71674 165847 368562 789903 1638140 3296401 6452952 12322160 +23 39 62 92 129 173 224 282 347 419 498 584 677 777 884 998 1119 1247 1382 1524 1673 +8 23 43 75 141 283 577 1166 2326 4597 9059 17933 35875 72670 148631 305041 623716 1262615 2518947 4938203 9498009 +5 6 14 50 148 354 723 1323 2267 3805 6514 11618 21442 39941 73131 129065 216721 342776 504702 677906 793712 +17 39 77 145 271 506 944 1760 3284 6161 11714 22748 45250 91860 188860 390266 806371 1661427 3408743 6955423 14089337 +8 11 17 19 16 30 134 493 1416 3421 7337 14514 27296 50072 91574 169956 324336 641639 1319313 2809709 6143224 +20 40 82 157 276 450 690 1007 1412 1916 2530 3265 4132 5142 6306 7635 9140 10832 12722 14821 17140 +26 51 92 152 243 410 767 1551 3215 6604 13286 26131 50219 94068 170936 299469 502108 798261 1187076 1611454 1890399 +5 4 -3 -16 -37 -71 -118 -146 -26 614 2709 8433 22564 55138 126495 276803 584082 1198534 2408270 4765262 9325584 +16 24 24 20 20 33 68 136 256 466 840 1512 2708 4787 8292 14012 23056 36940 57688 87948 131124 +2 4 17 50 116 232 419 702 1110 1676 2437 3434 4712 6320 8311 10742 13674 17172 21305 26146 31772 +9 21 50 100 171 262 381 562 889 1527 2760 5036 9019 15648 26203 42378 66361 100921 149502 216324 306491 +13 19 47 108 224 444 870 1714 3432 7027 14700 31188 66405 140452 292753 598086 1193703 2323675 4409173 8156732 14720782 +9 14 24 54 143 367 864 1895 3980 8163 16475 32679 63396 119726 219493 390258 673259 1128452 1840842 2928308 4551141 +2 1 4 10 10 -19 -107 -262 -420 -378 302 2477 7844 19892 45891 100715 213678 440047 879496 1704492 3202470 +23 51 106 201 353 596 998 1681 2859 4937 8750 16060 30476 59057 115120 223470 430907 828331 1597490 3107587 6107791 +20 41 78 134 207 294 404 583 954 1767 3431 6461 11241 17567 24329 30972 45742 113631 394186 1354910 4215913 +24 44 85 162 305 572 1065 1962 3594 6612 12299 23081 43291 80299 146385 262490 466732 834112 1520337 2853824 5518005 +13 25 53 116 249 517 1041 2041 3906 7306 13366 23927 41924 71916 120808 198810 320683 507327 787771 1201630 1802099 +21 36 51 65 78 93 132 286 825 2400 6393 15550 35227 75980 158961 326806 664625 1338584 2663715 5218371 10030592 +-2 10 41 111 263 574 1177 2302 4346 7998 14498 26240 48213 91352 180004 367865 770694 1631114 3442799 7181181 14719595 +18 37 69 128 236 416 695 1128 1861 3265 6203 12558 26282 55463 116296 240439 488096 970361 1885949 3579504 6631284 +16 22 39 87 214 510 1121 2263 4236 7438 12379 19695 30162 44710 64437 90623 124744 168486 223759 292711 377742 +9 12 25 49 89 160 301 608 1312 2951 6717 15102 33027 69744 142059 280147 539226 1025523 1957432 3810972 7658912 +20 23 28 51 127 324 759 1624 3256 6337 12400 24960 51801 109240 229543 473023 946556 1830019 3410988 6125145 10594043 +13 41 81 141 250 464 868 1574 2715 4435 6875 10155 14352 19474 25430 31996 38777 45165 50293 52985 51702 +9 25 60 119 218 394 712 1273 2236 3882 6772 12095 22397 43107 85819 175561 367114 781429 1685305 3661271 7960379 +4 -3 -16 -36 -64 -101 -148 -206 -276 -359 -456 -568 -696 -841 -1004 -1186 -1388 -1611 -1856 -2124 -2416 +12 22 40 66 101 159 289 616 1428 3364 7800 17594 38458 81425 167274 334550 654272 1257026 2382572 4469306 8312199 +16 36 62 92 124 156 186 212 232 244 246 236 212 172 114 36 -64 -188 -338 -516 -724 +-7 -6 1 14 33 58 89 126 169 218 273 334 401 474 553 638 729 826 929 1038 1153 +21 41 85 171 323 570 943 1470 2169 3039 4049 5125 6135 6872 7035 6208 3837 -795 -8595 -20689 -38453 +0 2 3 7 42 189 631 1728 4124 8892 17723 33165 58918 100191 164127 260302 401304 603398 887283 1278947 1810626 +6 27 66 133 252 474 900 1733 3392 6747 13590 27567 55991 113275 227215 450074 877438 1679215 3149022 5780661 10383546 +9 31 60 105 196 390 771 1445 2548 4325 7416 13619 27615 60490 136517 305923 669051 1423011 2953492 6016853 12099022 +10 10 21 57 143 333 754 1693 3747 8052 16589 32520 60419 106134 175917 274623 403748 562914 764993 1088463 1815555 +0 11 47 123 250 438 717 1186 2100 4005 7931 15653 30030 55432 98265 167604 275944 440079 682119 1030655 1522082 +4 2 5 13 19 5 -59 -207 -444 -647 -311 2028 9979 31542 83085 196006 427388 876388 1708621 3191415 5743531 +21 28 30 24 16 36 154 489 1199 2436 4246 6390 8058 7444 1146 -16649 -55239 -128788 -258066 -472604 -813324 +2 1 3 8 31 126 434 1265 3232 7490 16224 33728 68807 139949 285947 586660 1201702 2439383 4874513 9541916 18242623 +11 15 11 0 -8 20 173 655 1882 4654 10510 22528 47110 97732 202274 416411 846705 1688621 3286965 6229712 11491728 +22 34 53 83 132 217 384 759 1656 3781 8578 18756 39018 77011 144606 259984 452078 771652 1319659 2317357 4271044 +-1 10 40 92 174 315 592 1169 2349 4640 8836 16114 28148 47241 76476 119887 182651 271302 393968 560632 783418 +11 27 70 166 357 711 1348 2493 4581 8479 15978 30885 61394 125101 259370 542362 1135062 2364307 4885498 10000015 20273388 +16 34 71 142 262 448 727 1148 1805 2912 5045 9795 21275 49208 114707 260357 566838 1179102 2346051 4478772 8233684 +-1 3 10 20 33 49 68 90 115 143 174 208 245 285 328 374 423 475 530 588 649 +8 19 45 96 187 347 635 1155 2072 3652 6373 11169 19859 35758 64343 113626 193536 313097 473469 653950 786771 +16 27 57 113 198 323 534 953 1841 3719 7634 15727 32332 65876 131823 256818 484209 881806 1555374 2678560 4566449 +6 15 32 61 113 206 365 622 1016 1593 2406 3515 4987 6896 9323 12356 16090 20627 26076 32553 40181 +12 22 41 78 161 360 818 1788 3675 7089 12934 22598 38391 64551 109515 190999 347381 663416 1328773 2771447 5959410 +20 37 57 82 120 202 409 905 1974 4070 7921 14798 27191 50372 95791 188266 381292 790377 1667237 3566548 7718806 +13 31 51 84 169 384 851 1731 3207 5457 8622 12766 17791 23206 27605 27891 19281 389 -3571 134438 850205 +12 30 69 155 343 727 1450 2720 4851 8376 14327 24862 44585 83254 161329 321456 652505 1340181 2773452 5766664 12017378 +7 33 73 127 195 277 373 483 607 745 897 1063 1243 1437 1645 1867 2103 2353 2617 2895 3187 +14 28 57 126 266 511 910 1580 2847 5550 11627 25187 54445 115233 237408 476507 934644 1797152 3395149 6309420 11538196 +12 20 31 64 149 337 730 1545 3236 6713 13717 27432 53431 101047 185216 328782 565363 943750 1538049 2477213 4031782 +4 9 15 22 30 39 49 60 72 85 99 114 130 147 165 184 204 225 247 270 294 +8 16 40 86 162 281 478 850 1629 3313 6920 14505 30198 62187 126285 251980 492162 938034 1741020 3143748 5522366 +16 27 42 65 100 151 222 317 440 595 786 1017 1292 1615 1990 2421 2912 3467 4090 4785 5556 +6 20 54 122 238 416 670 1014 1462 2028 2726 3570 4574 5752 7118 8686 10470 12484 14742 17258 20046 +9 24 58 124 248 479 909 1713 3230 6126 11716 22596 43907 85957 169853 339829 690242 1423895 2975313 6264575 13205537 +10 30 69 129 215 346 572 997 1808 3310 5967 10449 17685 28922 45790 70373 105286 153758 219721 307905 423939 +5 6 12 44 147 410 1009 2300 5014 10641 22129 45070 89636 173785 328969 611348 1125520 2076190 3879935 7401246 14436738 +4 23 58 126 255 497 955 1823 3438 6343 11360 19672 32913 53265 83561 127393 189224 274503 389782 542834 742771 +-3 3 14 23 25 25 43 111 257 471 648 503 -547 -3539 -10163 -23009 -45867 -84085 -144990 -238377 -377071 +24 32 45 77 159 360 827 1863 4068 8584 17521 34717 67143 127585 239871 449153 842175 1587195 3012500 5760444 11088242 +-1 -10 -11 17 100 263 524 900 1447 2377 4337 9008 20296 46552 104484 225721 467367 928352 1773957 3271571 5841540 +7 9 21 54 125 261 505 927 1647 2882 5033 8829 15541 27268 47277 80348 133031 213663 331917 497560 717981 +10 25 59 126 244 435 733 1209 2021 3494 6227 11208 19891 34148 55951 86561 124900 164655 189507 165690 30862 +17 39 65 91 129 232 527 1254 2820 5913 11798 23063 45363 91274 188528 397238 845276 1799567 3807034 7968541 16464470 +10 5 8 41 136 332 666 1164 1850 2805 4324 7237 13480 27024 55294 111236 216218 403981 725888 1257753 2108568 +23 28 45 103 240 500 936 1633 2784 4889 9214 18760 40184 87465 188797 399575 827065 1677498 3345611 6582649 12805268 +16 36 75 162 343 693 1348 2572 4878 9227 17344 32245 59237 108076 197887 368248 703127 1380167 2768016 5612597 11386394 +9 25 48 72 98 137 208 331 515 741 940 966 564 -667 -3316 -8207 -16451 -29503 -49224 -77948 -118554 +8 11 19 51 147 387 916 1974 3939 7405 13332 23309 39939 67244 110732 176273 266070 368619 437421 350083 -164985 +1 18 58 126 237 431 788 1443 2601 4552 7686 12508 19653 29901 44192 63641 89553 123438 167026 222282 291421 +6 14 44 113 249 499 946 1753 3263 6207 12115 24099 48316 96714 192312 379634 745628 1461428 2864106 5612169 10971811 +3 -1 -4 15 107 376 1022 2428 5329 11117 22350 43537 82253 150582 266772 456790 755159 1204011 1848664 2727187 3850311 +-2 11 36 86 184 371 731 1440 2846 5587 10754 20106 36344 63451 107105 175172 278286 430523 650176 960638 1391400 +2 12 49 136 307 612 1119 1915 3118 4931 7803 12816 22494 42330 83446 166930 330518 638386 1194857 2162772 3787073 +14 23 56 129 259 471 826 1484 2816 5579 11168 21959 41757 76363 134274 227530 372722 592175 915320 1380269 2035607 +-3 10 37 93 208 427 810 1432 2383 3768 5707 8335 11802 16273 21928 28962 37585 48022 60513 75313 92692 +14 26 51 89 140 204 281 371 474 590 719 861 1016 1184 1365 1559 1766 1986 2219 2465 2724 +13 18 22 22 18 15 24 62 151 316 582 970 1492 2145 2904 3714 4481 5062 5254 4782 3286 +2 9 33 96 243 556 1172 2313 4353 7978 14545 26820 50378 96085 184258 351319 660028 1214703 2183217 3828008 6548853 +16 14 18 44 112 244 468 833 1440 2494 4382 7782 13808 24196 41536 69555 113456 180318 279562 423488 627888 +26 51 102 207 421 842 1643 3133 5872 10895 20161 37455 70161 132626 252290 480413 910142 1705891 3149624 5711711 10156653 +-8 -9 -5 6 26 57 101 160 236 331 447 586 750 941 1161 1412 1696 2015 2371 2766 3202 +6 11 36 109 272 579 1093 1890 3099 5048 8652 16275 33429 71844 154659 324750 657532 1279953 2397844 4334305 7582398 +12 13 19 49 142 372 874 1886 3822 7408 13943 25807 47456 87359 161694 301190 563352 1053519 1959875 3609765 6557578 +3 11 30 60 101 153 216 290 375 471 578 696 825 965 1116 1278 1451 1635 1830 2036 2253 +2 5 14 38 86 167 290 464 698 1001 1382 1850 2414 3083 3866 4772 5810 6989 8318 9806 11462 +12 14 25 57 123 242 448 813 1520 3071 6796 15951 37865 87827 195703 416649 847748 1652956 3099403 5608869 9829151 +11 19 46 109 234 461 861 1576 2893 5363 9976 18403 33316 58797 100847 168006 272095 429091 660146 992761 1462126 +12 23 46 76 103 123 168 360 988 2610 6216 13584 28159 57134 115970 237426 488356 999153 2012874 3963868 7599263 +10 27 58 116 238 503 1059 2170 4308 8331 15813 29644 55142 102218 189816 355285 674142 1300799 2549636 5050248 10033414 +-1 -4 -11 -23 -41 -66 -99 -141 -193 -256 -331 -419 -521 -638 -771 -921 -1089 -1276 -1483 -1711 -1961 +25 51 96 173 317 600 1159 2245 4300 8080 14874 26942 48463 87669 161677 307220 603675 1220565 2511928 5198007 10707121 +6 28 60 95 122 126 88 -15 -210 -528 -1004 -1677 -2590 -3790 -5328 -7259 -9642 -12540 -16020 -20153 -25014 +14 27 46 83 176 401 886 1840 3627 6937 13133 24885 47239 89311 166843 305910 548124 957743 1631160 2709319 4393682 +16 28 49 81 128 208 369 702 1349 2526 4627 8552 16517 33764 71801 154073 325302 666144 1315301 2501803 4590846 +28 43 66 110 191 336 602 1103 2052 3863 7434 14852 30927 66172 142094 299937 614308 1213403 2307810 4230074 7487335 +17 21 36 76 171 394 901 1991 4208 8544 16875 32885 63920 124479 242406 469310 897323 1685023 3096214 5556282 9732049 +20 27 37 61 114 218 416 815 1700 3806 8912 21041 48724 109025 234339 483377 958252 1830189 3377111 6037213 10483638 +0 13 36 73 134 248 489 1018 2144 4402 8643 16149 28862 50022 85992 151103 279532 552483 1156778 2504561 5466066 +7 5 0 -5 0 33 133 396 1045 2545 5774 12261 24502 46365 83595 144430 240339 386893 604780 920975 1370076 +13 9 9 34 128 365 862 1820 3630 7095 13832 26934 52012 98876 184552 339505 621668 1148550 2168444 4210603 8385165 +-5 -12 -23 -30 -18 35 158 387 765 1342 2175 3328 4872 6885 9452 12665 16623 21432 27205 34062 42130 +5 9 17 39 105 283 715 1694 3815 8241 17147 34472 67267 128237 240613 447347 827905 1527761 2808205 5127421 9268133 +25 37 57 106 230 518 1137 2397 4859 9508 18054 33532 61594 113281 210702 398013 761477 1464303 2804527 5307542 9869150 +11 17 46 114 241 455 798 1334 2159 3413 5294 8074 12117 17899 26030 37278 52595 73145 100334 135842 181657 +4 -1 -4 12 78 257 677 1583 3423 7014 13911 27274 53877 108552 223482 466589 976170 2023577 4123518 8225636 16048444 +0 1 0 -3 -8 -15 -24 -35 -48 -63 -80 -99 -120 -143 -168 -195 -224 -255 -288 -323 -360 +11 18 29 49 92 206 522 1339 3257 7370 15531 30701 57394 102230 174608 287511 458455 710594 1073993 1587081 2298296 +13 15 9 -12 -48 -79 -45 193 934 2793 6973 15712 33032 66133 128347 245886 473338 927958 1861532 3802331 7819427 +2 6 10 14 18 22 26 30 34 38 42 46 50 54 58 62 66 70 74 78 82 +11 27 52 97 186 362 709 1407 2852 5898 12324 25725 53226 108808 219736 438752 866576 1692276 3264166 6213201 11668991 +4 13 42 103 207 362 569 822 1123 1528 2245 3810 7372 15123 30914 61103 115686 209767 365428 614065 999261 +15 21 37 86 203 434 831 1439 2272 3276 4278 4921 4586 2303 -3346 -14328 -33259 -63497 -109221 -175488 -268259 +11 16 28 64 160 393 913 1979 3985 7464 13083 21703 34688 54819 88416 149606 268111 502480 961366 1836266 3450112 +19 28 52 114 257 565 1198 2452 4861 9361 17538 31985 56799 98260 165752 273013 439839 694418 1076536 1641980 2468565 +15 15 13 12 12 1 -45 -137 -191 184 2178 8829 27103 71775 172317 384631 810367 1627833 3140255 5849526 10566770 +12 11 5 -6 -22 -43 -69 -100 -136 -177 -223 -274 -330 -391 -457 -528 -604 -685 -771 -862 -958 +14 26 38 50 62 74 86 98 110 122 134 146 158 170 182 194 206 218 230 242 254 +13 19 31 63 138 294 607 1239 2530 5172 10540 21334 42843 85426 169298 333601 653532 1273267 2471552 4797589 9360217 +11 3 -4 4 47 149 343 691 1325 2507 4689 8539 14934 25131 41979 74636 152691 362315 929342 2395398 5968245 +18 22 40 91 193 361 613 998 1668 3038 6128 13283 29669 66335 146381 317205 674569 1409654 2901085 5895585 11864268 +11 37 82 161 309 586 1087 1974 3560 6490 12081 22905 43732 83003 155088 283716 507161 886051 1515060 2540273 4184711 +25 39 52 67 92 144 269 587 1366 3134 6880 14520 30088 62684 133303 289715 637379 1401437 3047748 6514061 13642856 +4 -4 -20 -50 -102 -185 -302 -435 -512 -331 602 3393 10381 26381 61265 135375 290656 612718 1272684 2603156 5230544 +16 37 62 103 197 413 863 1725 3295 6108 11215 20791 39404 76543 151493 302640 605473 1208410 2406047 4790866 9565986 +18 28 36 48 72 117 192 305 462 666 916 1206 1524 1851 2160 2415 2570 2568 2340 1804 864 +6 31 75 155 307 590 1091 1932 3290 5463 9049 15351 27179 50290 95789 183908 349686 651191 1181055 2082235 3569067 +13 24 44 80 152 311 679 1524 3380 7215 14639 28129 51229 88660 146248 230547 347999 503434 697670 923926 1162710 +10 22 32 51 114 303 788 1898 4249 8981 18195 35742 68605 129235 239371 436181 782284 1383028 2418714 4208909 7345156 +7 30 81 174 320 532 841 1335 2242 4084 7930 15770 31017 59118 108216 189751 318817 514002 796327 1186766 1701670 +14 27 59 134 293 607 1198 2270 4163 7468 13293 23865 43815 82762 160259 314926 620952 1217673 2362755 4528740 8580085 +8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 +8 0 -4 18 98 273 583 1076 1829 3005 4987 8667 16029 31260 62764 126655 252582 493110 938366 1738280 3135532 +-3 4 19 42 73 112 159 214 277 348 427 514 609 712 823 942 1069 1204 1347 1498 1657 +14 24 32 37 53 130 397 1139 2922 6787 14546 29230 55761 101947 179931 308262 514798 840698 1345812 2115835 3271653 +7 23 56 112 206 369 661 1190 2131 3727 6237 9780 14024 17718 18228 11631 -5265 -28077 -27602 87844 547546 +23 36 62 118 231 444 832 1544 2899 5581 11011 22063 44521 90194 183657 376560 777027 1608138 3321360 6812948 13832967 +8 0 -5 4 43 136 319 644 1176 1961 2930 3727 3573 1607 -1170 4025 48104 214582 698717 1914790 4680631 +6 17 37 64 93 116 122 97 24 -117 -349 -698 -1193 -1866 -2752 -3889 -5318 -7083 -9231 -11812 -14879 +-2 -7 -2 33 136 369 821 1608 2870 4765 7460 11119 15888 21877 29139 37646 47262 57713 68554 79133 88552 +18 20 30 66 151 310 570 972 1603 2653 4499 7817 13726 23977 41217 69385 114336 184842 294188 462668 721393 +3 0 -3 -6 -9 -12 -15 -18 -21 -24 -27 -30 -33 -36 -39 -42 -45 -48 -51 -54 -57 +16 28 38 46 52 56 58 58 56 52 46 38 28 16 2 -14 -32 -52 -74 -98 -124 diff --git a/2023/src/bin/day1.rs b/2023/src/bin/day1.rs new file mode 100644 index 0000000..89958c6 --- /dev/null +++ b/2023/src/bin/day1.rs @@ -0,0 +1,60 @@ +use std::io; +use std::collections::HashMap; +use std::str::FromStr; +use regex::Regex; + +fn main() { + let mut sum = 0u32; + let mut sum2: u32 = 0; + + let digit_names: HashMap<&str, u32> = HashMap::from([ + ("one", 1), + ("two", 2), + ("three", 3), + ("four", 4), + ("five", 5), + ("six", 6), + ("seven", 7), + ("eight", 8), + ("nine", 9) + ]); + + let regex_string = digit_names.keys() + .fold("\\d".to_owned(), |a,b| a + "|" + b); + println!("Regex: {regex_string}"); + let regex = Regex::from_str(®ex_string).expect("Invalid regex"); + + let get_digit = |m: regex::Match<'_>| { + let digit = m.as_str(); + digit.parse::() + .map_or(None, |x| Some(x)) + .or(digit_names.get(digit).copied()) + .expect("Regex doesn’t work") + }; + + for line in io::stdin().lines() { + let line = line.unwrap(); + let line = line.trim(); + + let digits: Vec<_> = line.chars() + .flat_map(|digit| digit.to_digit(10)) + .collect(); + + if let (Some(first), Some(last)) = (digits.first(), digits.last()) { + sum += first * 10 + last + } + + let match1 = regex.find(line) + .map(get_digit); + let match2 = (0..line.len()).rev().filter_map(|pos| regex.find_at(line, pos)).next() + .map(get_digit); + + if let (Some(first), Some(last)) = (match1, match2) { + sum2 += first * 10 + last + } + + } + + println!("Part 1: {sum}"); + println!("Part 2: {sum2}"); +} diff --git a/2023/src/bin/day10.rs b/2023/src/bin/day10.rs new file mode 100644 index 0000000..fcfde8c --- /dev/null +++ b/2023/src/bin/day10.rs @@ -0,0 +1,100 @@ +use aoc::grid::{Grid, GridVec}; +use std::iter::Iterator; + +trait MoreGrid: Grid { + + fn trace(&self, start: (usize, usize), start_direction: Direction) -> Option { + let mut position = start; + let mut direction = start_direction; + let mut count: usize = 0; + while let Some(new_position) = self.next_position(position, direction) { + count += 1; + let (x, y) = new_position; + position = new_position; + if start == position { + return Some(count); + } + + if let Some(dir) = next_direction(direction.opposite(), self.char_at(x, y)) { + direction = dir; + } else { + return None + } + } + None + } + + fn longest_loop(&self) -> Option { + if let Some(start) = self.find('S') { + vec![Direction::Top, Direction::Right, Direction::Bottom, Direction::Left] + .iter() + .filter_map(|dir| self.trace(start, *dir)) + .max() + } else { + None + } + } + + fn next_position(&self, current: (usize, usize), direction: Direction) -> Option<(usize, usize)> { + let (x, y) = current; + match direction { + Direction::Left => if x > 0 { Some((x - 1, y)) } else { None }, + Direction::Right => if x + 1 < self.width() { Some((x + 1, y))} else { None }, + Direction::Top => if y > 0 { Some((x, y - 1)) } else { None }, + Direction::Bottom => if y + 1 < self.height() { Some((x, y + 1)) } else { None } + } + } + +} + +#[derive(Debug, PartialEq, Eq, Clone, Copy)] +enum Direction { + Top, + Left, + Right, + Bottom +} + +fn connections(ch: char) -> Option<(Direction, Direction)> { + match ch { + '|' => Some((Direction::Top, Direction::Bottom)), + '-' => Some((Direction::Left, Direction::Right)), + 'L' => Some((Direction::Top, Direction::Right)), + 'J' => Some((Direction::Left, Direction::Top)), + '7' => Some((Direction::Left, Direction::Bottom)), + 'F' => Some((Direction::Bottom, Direction::Right)), + '.' => None, + _ => panic!("Invalid direction") + } +} + +fn next_direction(from: Direction, ch: char) -> Option { + if let Some(pair) = connections(ch) { + match pair { + (f, result) if f == from => Some(result), + (result, f) if f == from => Some(result), + _ => None + } + } else { + None + } +} + +impl Direction { + fn opposite(self) -> Direction { + match self { + Self::Top => Self::Bottom, + Self::Bottom => Self::Top, + Self::Left => Self::Right, + Self::Right => Self::Left + } + } +} + +impl MoreGrid for T {} + +fn main() { + let grid = GridVec::read(); + + println!("Part 1: {}", grid.longest_loop().expect("No solution") / 2); +} diff --git a/2023/src/bin/day11.rs b/2023/src/bin/day11.rs new file mode 100644 index 0000000..6fcf793 --- /dev/null +++ b/2023/src/bin/day11.rs @@ -0,0 +1,64 @@ +use aoc::grid::{Grid, GridVec}; +use itertools::Itertools; + + + +fn find_galaxies(grid: &GridVec, empty_columns: &Vec, empty_rows: &Vec, expansion_factor: usize) -> Vec<(usize, usize)> { + let mut offset_y: usize = 0; + let mut empty_rows = empty_rows.iter(); + let mut next_empty_row = empty_rows.next(); + let mut galaxies: Vec<(usize, usize)> = Vec::new(); + for y in 0..grid.height() { + if Some(&y) == next_empty_row { + offset_y += expansion_factor; + next_empty_row = empty_rows.next(); + } + + let mut offset_x: usize = 0; + let mut empty_columns = empty_columns.iter(); + let mut next_empty_column = empty_columns.next(); + for x in 0..grid.width() { + if Some(&x) == next_empty_column { + offset_x += expansion_factor; + next_empty_column = empty_columns.next(); + } + + if grid.char_at(x, y) == '#' { + galaxies.insert(galaxies.len(), (x + offset_x, y + offset_y)); + } + } + } + + galaxies +} + + +fn sum_galaxy_distances(galaxies: &Vec<(usize, usize)>) -> usize { + let mut sum: usize = 0; + for i in 0..galaxies.len() { + for j in 0..i { + let (ax, ay) = galaxies[i]; + let (bx, by) = galaxies[j]; + + sum += if ax < bx { bx - ax } else { ax - bx }; + sum += if ay < by { by - ay } else { ay - by }; + } + } + + sum +} + +fn main() { + let grid = GridVec::read(); + + let empty_columns: Vec<_> = (0..grid.width()).filter(|x| grid.column(*x).all(|ch| ch == '.')).collect(); + let empty_rows: Vec<_> = (0..grid.height()).filter(|y| grid.row(*y).all(|ch| ch == '.')).collect(); + + let galaxies = find_galaxies(&grid, &empty_columns, &empty_rows, 1); + let part1 = sum_galaxy_distances(&galaxies); + println!("Part 1: {part1}"); + + let galaxies = find_galaxies(&grid, &empty_columns, &empty_rows, 1000000 - 1); + let part2 = sum_galaxy_distances(&galaxies); + println!("Part 2: {part2}"); +} diff --git a/2023/src/bin/day12.rs b/2023/src/bin/day12.rs new file mode 100644 index 0000000..66ceaad --- /dev/null +++ b/2023/src/bin/day12.rs @@ -0,0 +1,57 @@ +use std::iter::zip; +use aoc::{parsing, read_input}; +use nom::{character::complete::{space1, newline}, Parser, bytes::complete::{take_while1, tag}, sequence::{tuple, terminated}, multi::{separated_list0, many0}}; +use aoc::parsing::number; + +fn matches(string: &str, groups: &Vec) -> bool { + let parts = string.split('.') + .filter(|s| !s.is_empty()) + .map(|s| s.chars().filter(|ch| *ch == '#').count()); + + let group_iter = groups.iter(); + + let all_equal = zip(parts.clone(), group_iter).all(|(a, b)| a == *b); + parts.count() == groups.len() && all_equal +} + +fn combinations(string: &str, groups: &Vec) -> usize { + if let Some(index) = string.find('?') { + let first = &string[..index]; + let rest = &string[(index + 1)..]; + + let mut a = first.to_owned(); + a.push('.'); + a.push_str(rest); + + let mut b = first.to_owned(); + b.push('#'); + b.push_str(rest); + + combinations(&a, groups) + combinations(&b, groups) + } else if matches(string, groups) { + 1 + } else { + 0 + } +} + +fn springs<'a>(input: &'a str) -> parsing::Result<'a, &'a str> { + take_while1(|ch| ch == '#' || ch == '.' || ch == '?').parse(input) +} + +fn line<'a>(input: &'a str) -> parsing::Result<'a, (&'a str, Vec)> { + tuple(( + terminated(springs, space1), + separated_list0(tag(","), number) + )).parse(input) +} + +fn main() { + let input = read_input(); + let (_, input) = separated_list0(newline, line).parse(&input).expect("Cannot parse input"); + let mut sum: usize = 0; + for (str, groups) in input { + sum += combinations(&str, &groups); + } + println!("Part 1: {sum}"); +} diff --git a/2023/src/bin/day13.rs b/2023/src/bin/day13.rs new file mode 100644 index 0000000..14ae8e0 --- /dev/null +++ b/2023/src/bin/day13.rs @@ -0,0 +1,41 @@ +use std::{io::stdin, cmp::min}; + +use aoc::grid::{Grid, GridVec}; + +fn main() { + let mut input = stdin().lines().map(|x| x.expect("Cannot read line")); + let mut sum: usize = 0; + + while let Some(grid) = GridVec::read_one(&mut input) { + + 'outer: for i in 1..grid.width() { + let left = i; + let right = grid.width() - i; + let compare = min(left, right); + + for k in 1..=compare { + if !grid.column(i - k).zip(grid.column(i + k - 1)).all(|(a,b)| a == b) { + continue 'outer; + } + } + + sum += i; + } + + 'outer: for i in 1..grid.height() { + let top = i; + let bottom = grid.height() - i; + let compare = min(top, bottom); + + for k in 1..=compare { + if !grid.row(i - k).zip(grid.row(i + k - 1)).all(|(a,b)| a == b) { + continue 'outer; + } + } + + sum += 100 * i; + } + } + + println!("Part 1: {sum}"); +} diff --git a/2023/src/bin/day14.rs b/2023/src/bin/day14.rs new file mode 100644 index 0000000..ff38fdb --- /dev/null +++ b/2023/src/bin/day14.rs @@ -0,0 +1,45 @@ +use aoc::grid::{GridVec, Grid}; + +fn main() { + let mut grid = GridVec::read(); + for y in 0..grid.height() { + for x in 0..grid.width() { + if grid.char_at(x, y) != 'O' { + continue; + } + + if let Some(open_y) = find_open_spot(&grid, x, y) { + grid.set_char_at(x, open_y, 'O'); + grid.set_char_at(x, y, '.'); + } + } + } + + grid.print(); + + let mut sum = 0; + for y in 0..grid.height() { + let rocks = grid.line_at(y).chars().filter(|ch| *ch == 'O').count(); + let weight = grid.height() - y; + sum += weight * rocks; + } + + println!("Part 1: {sum}"); +} + +fn find_open_spot(grid: &GridVec, x: usize, y: usize) -> Option { + if y == 0 { + return None; + } + + let mut new_y = y; + while new_y > 0 && grid.char_at(x, new_y - 1) == '.' { + new_y -= 1; + } + + if new_y != y { + Some(new_y) + } else { + None + } +} \ No newline at end of file diff --git a/2023/src/bin/day15.rs b/2023/src/bin/day15.rs new file mode 100644 index 0000000..972cd6e --- /dev/null +++ b/2023/src/bin/day15.rs @@ -0,0 +1,67 @@ +use std::collections::HashMap; + +use aoc::read_input; +use itertools::Itertools; +use linked_hash_map::LinkedHashMap; + +fn hash_hash(string: &str) -> usize { + let mut current = 0; + for ch in string.bytes() { + current += ch as usize; + current *= 17; + current = current % 256; + } + + current +} + +struct LensBox<'a> { + content: LinkedHashMap<&'a str, usize> +} + +impl <'a> LensBox<'a> { + fn new() -> LensBox<'a> { + LensBox { + content: LinkedHashMap::new() + } + } + + fn remove(&mut self, label: &str) { + self.content.remove(label); + } + + fn add(&mut self, label: &'a str, power: usize) { + *self.content.entry(label).or_insert(power) = power; + } + + fn focus_power(&self, box_index: usize) -> usize { + self.content.iter().enumerate().fold(0, |a, (lens_index, (_, focus))| a + (box_index + 1) * (lens_index + 1) * *focus) + } +} + +fn main() { + let input = read_input(); + let input = input.split(',').collect_vec(); + let result = input.iter().map(|str| hash_hash(str)).fold(0, |a,b| a+ b); + println!("Part 1: {result}"); + + let mut boxes = HashMap::new(); + for instruction in input.iter() { + let index = instruction.find(|ch| ch == '=' || ch == '-').expect("Invalid instruction"); + let label = &instruction[..index]; + let box_index = hash_hash(label); + let lens_box = boxes.entry(box_index).or_insert_with(|| LensBox::new()); + if &instruction[index..=index] == "-" { + lens_box.remove(label) + } else { + let power = instruction[(index + 1)..].parse().expect("Invalid instruction"); + lens_box.add(label, power) + } + } + + let part2 = (0..=256) + .filter_map(|n| Some(boxes.get(&n)?.focus_power(n)) ) + .fold(0, |a, b| a + b); + + println!("Part 2: {part2}"); +} \ No newline at end of file diff --git a/2023/src/bin/day16.rs b/2023/src/bin/day16.rs new file mode 100644 index 0000000..e11a1bc --- /dev/null +++ b/2023/src/bin/day16.rs @@ -0,0 +1,96 @@ +use std::{collections::{HashMap, HashSet}, cmp::max}; + +use aoc::grid::{GridVec, Grid}; +use array2d::Array2D; + +fn grid_position(grid: &GridVec, x: isize, y: isize) -> Option<(usize, usize)> { + if x < 0 || y < 0 { + return None; + } + + let cur_x: usize = x.try_into().unwrap(); + let cur_y: usize = y.try_into().unwrap(); + + if cur_x >= grid.width() || cur_y >= grid.height() { + return None; + } + + return Some((cur_x, cur_y)); +} + +fn trace(grid: &GridVec, energized: &mut Array2D, cache: &mut HashMap<(isize, isize, isize, isize), ()>, mut x: isize, mut y: isize, mut dx: isize, mut dy: isize) { + + let key = (x, y, dx, dy); + if let Some(cached) = cache.get(&key) { + println!("Cached result found for {:?}", key); + return *cached; + } + + cache.insert(key, ()); + + let mut steps = HashSet::new(); + + while let Some((cur_x, cur_y)) = grid_position(grid, x, y) { + energized[(cur_y, cur_x)] = true; + let cur_ch = grid.char_at(cur_x, cur_y); + // println!("{x},{y} ({dx},{dy}) {cur_ch} "); + + match cur_ch { + '/' => (dx, dy) = (-dy, -dx), + '\\' => (dx, dy) = (dy, dx), + '|' if dy == 0 => { + trace(grid, energized, cache, x, y - 1, 0, -1); + (dx, dy) = (0, 1); + } + '-' if dx == 0 => { + trace(grid, energized, cache, x - 1, y, -1, 0); + (dx, dy) = (1, 0); + }, + '-' | '|' | '.' => {}, + _ => panic!("Unknown character") + }; + + assert!(dx == 0 || dy == 0); + + x += dx; + y += dy; + + if !steps.insert((x, y, dx, dy)) { + println!("Loop detected, stopping"); + break; + } + } + +} + +fn energized(grid: &GridVec, x: isize, y: isize, dx: isize, dy: isize) -> usize { + let mut energized = Array2D::filled_with(false, grid.height(), grid.width()); + let mut cache = HashMap::new(); + trace(&grid, &mut energized, &mut cache, x, y, dx, dy); + energized.elements_row_major_iter().filter(|energized| **energized).count() +} + +fn main() { + let grid = GridVec::read(); + let part1 = energized(&grid, 0, 0, 1, 0); + println!("Part 1: {part1}"); + + let mut part2 = 0; + + let x_max: isize = grid.width().try_into().unwrap(); + let y_max: isize = grid.height().try_into().unwrap(); + + for y in 0..y_max { + let a = energized(&grid, 0, y, 1, 0); + let b = energized(&grid, x_max - 1, y, -1, 0); + part2 = max(part2, max(a, b)); + } + + for x in 0..x_max { + let a = energized(&grid, x, 0, 0, 1); + let b = energized(&grid, x, y_max - 1, 0, -1); + part2 = max(part2, max(a, b)); + } + + println!("Part 2: {part2}"); +} diff --git a/2023/src/bin/day17.rs b/2023/src/bin/day17.rs new file mode 100644 index 0000000..2a778e4 --- /dev/null +++ b/2023/src/bin/day17.rs @@ -0,0 +1,3 @@ +fn main() { + +} diff --git a/2023/src/bin/day2.rs b/2023/src/bin/day2.rs new file mode 100644 index 0000000..d8e34ef --- /dev/null +++ b/2023/src/bin/day2.rs @@ -0,0 +1,163 @@ + +use std::{io, cmp::max}; +use std::io::Read; + +use nom::{ + branch::alt, + bytes::complete::tag, + IResult, + Parser, + multi::separated_list0, + sequence::{separated_pair, tuple}, + combinator::map_res, + character::{streaming::digit1, complete::line_ending}, +}; + +#[derive(Debug)] +struct Reveal { + red: usize, + green: usize, + blue: usize +} + +#[derive(Debug)] +struct Game { + id: usize, + reveals: Vec +} + +impl Game { + fn new(id: usize, reveals: Vec) -> Game { + Game { id, reveals } + } + + fn is_valid(&self) -> bool { + self.reveals.iter().all(|reveal| reveal.is_valid()) + } + + fn min_cubes(&self) -> Reveal { + self.reveals.iter().fold(Reveal::new(), |acc, reveal| { + Reveal { + red: max(acc.red, reveal.red), + green: max(acc.green, reveal.green), + blue: max(acc.blue, reveal.blue) + } + }) + } +} + +impl Reveal { + fn new() -> Reveal { + Reveal { red: 0, green: 0, blue: 0 } + } + + fn with_red(&self, red: usize) -> Reveal { + Reveal { red: self.red + red, green: self.green, blue: self.blue } + } + + fn with_green(&self, green: usize) -> Reveal { + Reveal { red: self.red, green: self.green + green, blue: self.blue } + } + + fn with_blue(&self, blue: usize) -> Reveal { + Reveal { red: self.red, green: self.green, blue: self.blue + blue } + } + + fn with(&self, color: Color, count: usize) -> Reveal { + match color { + Color::Red => self.with_red(count), + Color::Green => self.with_green(count), + Color::Blue => self.with_blue(count), + } + } + + fn is_valid(&self) -> bool { + self.red <= 12 && self.green <= 13 && self.blue <= 14 + } + + fn power(&self) -> usize { + self.red * self.green * self.blue + } +} + +#[derive(Clone, Copy)] +enum Color { + Red, + Green, + Blue +} + +impl From<&str> for Color { + fn from(value: &str) -> Self { + match value { + "red" => Color::Red, + "blue" => Color::Blue, + "green" => Color::Green, + _ => panic!("Invalid color") + } + } +} + +fn color(input: &str) -> IResult<&str, Color> { + Parser::into(alt(( + tag("red"), + tag("green"), + tag("blue") + ))).parse(input) +} + +fn number(input: &str) -> IResult<&str, usize> { + map_res(digit1, str::parse).parse(input) +} + +fn color_count(input: &str) -> IResult<&str, (usize, Color)> { + separated_pair( + number, + tag(" "), + color + ).parse(input) +} + +fn reveal(input: &str) -> IResult<&str, Reveal> { + separated_list0(tag(", "), color_count) + .map(|list| { + list.iter().fold(Reveal::new(), |acc, (count, color)| { + acc.with(*color, *count) + }) + }) + .parse(input) +} + +fn reveals(input: &str) -> IResult<&str, Vec> { + separated_list0(tag("; "), reveal).parse(input) +} + +fn game(input: &str) -> IResult<&str, Game> { + tuple(( + tag("Game "), + number, + tag(": "), + reveals, + )) + .map(|(_, id, _, reveals)| Game::new(id, reveals)) + .parse(input) +} + +fn input_file(input: &str) -> IResult<&str, Vec> { + separated_list0(line_ending, game).parse(input) +} + + +fn main() { + let mut input = String::new(); + io::stdin().read_to_string(&mut input).expect("Reading failed"); + + let (_, games) = input_file(input.as_str()).expect("Parsing failed"); + + + let part1 = games.iter().filter(|game| game.is_valid()).fold(0, |acc, game| acc + game.id); + println!("Part 1: {part1}"); + + let part2 = games.iter().fold(0, |acc, game| acc + game.min_cubes().power()); + println!("Part 2: {part2}"); +} diff --git a/2023/src/bin/day3.rs b/2023/src/bin/day3.rs new file mode 100644 index 0000000..f809157 --- /dev/null +++ b/2023/src/bin/day3.rs @@ -0,0 +1,81 @@ +use std::{io, cmp::min}; + +use regex::Regex; + +#[derive(Debug)] +struct Grid { + lines: Vec, + width: usize +} + +impl Grid { + fn read() -> Grid { + let lines: Vec = io::stdin().lines().map(|line| line.expect("Cannot read line")).collect(); + let width = lines.first().map_or(0, |l| l.len()); + let ok = lines.iter().skip(1).all(|line| line.len() == width); + if !ok { + panic!("Not all lines same length"); + } + + Grid { lines, width } + } + + fn char_at(&self, x: usize, y: usize) -> char { + self.lines[y].chars().nth(x).expect("Invalid index") + } + + fn height(&self) -> usize { self.lines.len() } + + fn numbers<'a>(&'a self, line: usize) -> Vec<(usize, usize, usize)> { + let regex: Regex = Regex::new("\\d+").unwrap(); + + regex.find_iter(&self.lines[line]) + .map(|x| { + let index = x.start(); + let str = x.as_str(); + let result = (index, index + str.len() - 1, str.parse::().expect("Must be numeric")); + result + }) + .filter(move |(start, end, _)| self.has_adjacent_symbol(line, *start, *end)) + .collect::>() + } + + fn all_numbers<'a>(&'a self)-> impl Iterator + 'a { + (0..self.height()) + .flat_map(|l| self.numbers(l)) + .map(|(_, _, num)| num) + + } + + fn has_adjacent_symbol(&self, line: usize, start: usize, end: usize) -> bool { + if start > 0 && is_symbol(self.char_at(start - 1, line)) { + return true; + } + + if end + 1 < self.width && is_symbol(self.char_at(end + 1, line)) { + return true; + } + + let xmin = if start > 0 { start - 1 } else { start }; + let xmax = min(end + 1, self.width - 1); + if line > 0 && self.lines[line - 1][xmin..=xmax].contains(is_symbol) { + return true; + } + + if line + 1 < self.height() && self.lines[line + 1][xmin..=xmax].contains(is_symbol) { + return true; + } + + false + } +} + +fn is_symbol(ch: char) -> bool { + ch != '.' && !ch.is_numeric() +} + +fn main() { + let grid = Grid::read(); + let part1 = grid.all_numbers().fold(0, |a, b| a + b); + println!("Part 1: {part1}"); +} \ No newline at end of file diff --git a/2023/src/bin/day4.rs b/2023/src/bin/day4.rs new file mode 100644 index 0000000..19d16f0 --- /dev/null +++ b/2023/src/bin/day4.rs @@ -0,0 +1,68 @@ +use std::collections::HashSet; + +#[derive(Debug)] +struct Card { + number: usize, + winning: HashSet, + numbers: Vec +} + +impl Card { + fn new(number: usize, winning: HashSet, numbers: Vec) -> Self { Self { number, winning, numbers } } + + fn winning_numbers(&self) -> usize { + self.numbers.iter().filter(|x| self.winning.contains(x)).count() + } + + fn score(&self) -> usize { + let winners = self.winning_numbers(); + if winners > 0 { + 2usize.pow((winners - 1).try_into().unwrap()) + } else { + 0 + } + } +} + +mod parser { + use std::collections::{HashSet, hash_map::RandomState}; + + use nom::{IResult, multi::{many0, separated_list0}, Parser, sequence::{tuple, preceded}, bytes::complete::tag, character::complete::{multispace0, digit1}, combinator::map_res}; + use nom::character::complete::multispace1; + + use crate::Card; + + fn number(input: &str) -> IResult<&str, usize> { + map_res(digit1, str::parse)(input) + } + + fn list(input: &str) -> IResult<&str, Vec> { + preceded(multispace0, separated_list0(multispace1, number)).parse(input) + } + + fn card(input: &str) -> IResult<&str, Card> { + tuple(( + tag("Card"), + preceded(multispace1, number), + tag(":"), + list + .map(|list| HashSet::::from_iter(list.iter().map(|x| *x))), + preceded(multispace0, tag("|")), + list, + multispace0 + )).map(|(_, card_index, _, winning, _, given, _)| Card::new(card_index, winning, given)) + .parse(input) + } + + pub fn input(input: &str) -> IResult<&str, Vec> { + many0(card).parse(input) + } +} + +fn main() { + let data = aoc::read_input(); + let cards = parser::input(&data).expect("Parsing failed").1; + + let part1 = cards.into_iter().fold(0, |a, b| a + b.score()); + println!("Part 1: {part1}"); +} \ No newline at end of file diff --git a/2023/src/bin/day5.rs b/2023/src/bin/day5.rs new file mode 100644 index 0000000..0ad698c --- /dev/null +++ b/2023/src/bin/day5.rs @@ -0,0 +1,100 @@ +use aoc::read_input; + +#[derive(Debug)] +struct MapEntry { + destination: usize, + source: usize, + length: usize, +} + +impl MapEntry { + fn map(&self, input: usize) -> Option { + if input < self.source || self.source + self.length <= input { + return None + } + + return Some(self.destination + ( input - self.source)) + } +} + +#[derive(Debug)] +struct Map { + entries: Vec +} + +impl Map { + fn map(&self, input: usize) -> usize { + self.entries.iter() + .find_map( |e| e.map(input)) + .unwrap_or(input) + } +} + +mod parser { + use aoc::parsing::number; + use nom::{IResult, sequence::{tuple, preceded, terminated}, character::complete::{newline, multispace1}, multi::{separated_list0, count}, error::Error, bytes::complete::tag}; + use nom::Parser; + + use crate::MapEntry; + + fn map_entry(input: &str) -> IResult<&str, MapEntry> { + tuple(( + number, + preceded(multispace1, number), + preceded(multispace1, number), + )) + .map(|(a, b, c)| MapEntry{destination: a, source: b, length: c}) + .parse(input) + } + + fn map(input: &str) -> IResult<&str, crate::Map> { + terminated(separated_list0(newline, map_entry),newlines) + .map(|x| crate::Map{entries: x}) + .parse(input) + } + + fn map_with_title(title: &str) -> impl Parser<&str, crate::Map, Error<&str>>{ + preceded(tuple((tag(title), tag(":"), newline)), map) + } + + fn newlines(input: &str) -> IResult<&str, ()> { + count(newline, 2).map(|_| ()).parse(input) + } + + fn seeds(input: &str) -> IResult<&str, Vec> { + terminated(preceded(tag("seeds: "), separated_list0(multispace1, number)), newlines) + .parse(input) + } + + pub fn input(input: &str) -> IResult<&str, (Vec, crate::Map, crate::Map, crate::Map, crate::Map, crate::Map, crate::Map, crate::Map)> { + tuple(( + seeds, + map_with_title("seed-to-soil map"), + map_with_title("soil-to-fertilizer map"), + map_with_title("fertilizer-to-water map"), + map_with_title("water-to-light map"), + map_with_title("light-to-temperature map"), + map_with_title("temperature-to-humidity map"), + map_with_title("humidity-to-location map") + )) + .parse(input) + } +} + +fn main() { + let data = read_input(); + let (_, input) = parser::input(&data).expect("Stuff"); + let (seeds, seed_soil, soil_fertilizer, fertilizer_water, water_light, light_temp, temp_humid, humid_location) = input; + let x = seeds.iter() + .map(|seed| seed_soil.map(*seed) ) + .map(|soil| soil_fertilizer.map(soil) ) + .map(|fert| fertilizer_water.map(fert) ) + .map(|water| water_light.map(water) ) + .map(|light| light_temp.map(light) ) + .map(|temp| temp_humid.map(temp) ) + .map(|humid| humid_location.map(humid) ) + .min() + .expect("Need a solution"); + + println!("Part 1: {x}"); +} \ No newline at end of file diff --git a/2023/src/bin/day6.rs b/2023/src/bin/day6.rs new file mode 100644 index 0000000..a8a3c87 --- /dev/null +++ b/2023/src/bin/day6.rs @@ -0,0 +1,36 @@ +struct Race { + time: usize, + distance: usize, +} + +impl Race { + fn calculate_distance(&self, charge: usize) -> usize { + let speed = charge; + let move_time = self.time - charge; + move_time * speed + } + + fn ways_to_win(&self) -> usize { + (1..self.time).filter(|charge| self.calculate_distance(*charge) > self.distance).count() + } +} + +/* +Time: 48 87 69 81 +Distance: 255 1288 1117 1623 + */ +fn main() { + let input = vec![ + Race { time: 48, distance: 255 }, + Race { time: 87, distance: 1288 }, + Race { time: 69, distance: 1117 }, + Race { time: 81, distance: 1623 }, + ]; + + let part1 = input.iter().map(Race::ways_to_win).fold(1, |a,b| a * b); + println!("Part 1: {part1}"); + + let input2 = Race { time: 48876981, distance: 255128811171623 }; + println!("Part 2: {}", input2.ways_to_win()); + +} diff --git a/2023/src/bin/day7-2.rs b/2023/src/bin/day7-2.rs new file mode 100644 index 0000000..9d523eb --- /dev/null +++ b/2023/src/bin/day7-2.rs @@ -0,0 +1,172 @@ +use std::{error::Error, collections::HashMap, cmp::Ordering}; + +#[derive(PartialEq, Eq, PartialOrd, Ord, Debug, Clone, Copy, Hash)] +enum Label { + J, + Two, + Three, + Four, + Five, + Six, + Seven, + Eight, + Nine, + T, + Q, + K, + A +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd)] +struct Hand { + cards: [Label; 5] +} + +struct WrongCardCount; + +impl TryFrom> for Hand { + type Error = WrongCardCount; + fn try_from(value: Vec