From b9eea86883c6c9a50669797fa2be013508be55a8 Mon Sep 17 00:00:00 2001 From: rene-d Date: Thu, 23 Jan 2025 19:08:36 +0100 Subject: [PATCH 1/2] single --- 2015/Cargo.toml | 5 - 2015/day1/Cargo.toml | 11 - 2015/day10/Cargo.toml | 11 - 2015/day11/Cargo.toml | 11 - 2015/day12/Cargo.toml | 13 - 2015/day13/Cargo.toml | 14 - 2015/day14/Cargo.toml | 12 - 2015/day15/Cargo.toml | 12 - 2015/day16/Cargo.toml | 13 - 2015/day17/Cargo.toml | 13 - 2015/day18/Cargo.toml | 16 -- 2015/day19/Cargo.toml | 12 - 2015/day2/Cargo.toml | 11 - 2015/day20/Cargo.toml | 12 - 2015/day21/Cargo.toml | 11 - 2015/day22/Cargo.toml | 13 - 2015/day23/Cargo.toml | 11 - 2015/day24/Cargo.toml | 12 - 2015/day25/Cargo.toml | 11 - 2015/day3/Cargo.toml | 12 - 2015/day4/Cargo.toml | 12 - 2015/day5/Cargo.toml | 11 - 2015/day6/Cargo.toml | 12 - 2015/day7/Cargo.toml | 13 - 2015/day8/Cargo.toml | 11 - 2015/day9/Cargo.toml | 14 - 2016/Cargo.toml | 8 - 2016/day1/Cargo.toml | 12 - 2016/day10/Cargo.toml | 13 - 2016/day11/Cargo.toml | 14 - 2016/day12/Cargo.toml | 12 - 2016/day13/Cargo.toml | 12 - 2016/day14/Cargo.toml | 13 - 2016/day15/Cargo.toml | 12 - 2016/day16/Cargo.toml | 11 - 2016/day17/Cargo.toml | 12 - 2016/day18/Cargo.toml | 11 - 2016/day19/Cargo.toml | 11 - 2016/day2/Cargo.toml | 11 - 2016/day20/Cargo.toml | 11 - 2016/day21/Cargo.toml | 12 - 2016/day22/Cargo.toml | 12 - 2016/day23/Cargo.toml | 13 - 2016/day24/Cargo.toml | 13 - 2016/day25/Cargo.toml | 13 - 2016/day3/Cargo.toml | 12 - 2016/day4/Cargo.toml | 14 - 2016/day5/Cargo.toml | 13 - 2016/day6/Cargo.toml | 11 - 2016/day7/Cargo.toml | 12 - 2016/day8/Cargo.toml | 12 - 2016/day9/Cargo.toml | 11 - 2017/Cargo.toml | 5 - 2017/day1/Cargo.toml | 11 - 2017/day10/Cargo.toml | 14 - 2017/day11/Cargo.toml | 11 - 2017/day12/Cargo.toml | 12 - 2017/day13/Cargo.toml | 12 - 2017/day14/Cargo.toml | 11 - 2017/day15/Cargo.toml | 11 - 2017/day16/Cargo.toml | 11 - 2017/day17/Cargo.toml | 11 - 2017/day18/Cargo.toml | 12 - 2017/day19/Cargo.toml | 11 - 2017/day2/Cargo.toml | 11 - 2017/day20/Cargo.toml | 13 - 2017/day21/Cargo.toml | 13 - 2017/day22/Cargo.toml | 12 - 2017/day23/Cargo.toml | 12 - 2017/day24/Cargo.toml | 11 - 2017/day25/Cargo.toml | 12 - 2017/day3/Cargo.toml | 11 - 2017/day4/Cargo.toml | 12 - 2017/day5/Cargo.toml | 11 - 2017/day6/Cargo.toml | 12 - 2017/day7/Cargo.toml | 13 - 2017/day8/Cargo.toml | 14 - 2017/day9/Cargo.toml | 11 - 2018/Cargo.toml | 5 - 2018/day1/Cargo.toml | 12 - 2018/day10/Cargo.toml | 11 - 2018/day11/Cargo.toml | 11 - 2018/day12/Cargo.toml | 12 - 2018/day13/Cargo.toml | 12 - 2018/day14/Cargo.toml | 11 - 2018/day15/Cargo.toml | 12 - 2018/day16/Cargo.toml | 13 - 2018/day17/Cargo.toml | 13 - 2018/day18/Cargo.toml | 12 - 2018/day19/Cargo.toml | 11 - 2018/day2/Cargo.toml | 11 - 2018/day20/Cargo.toml | 12 - 2018/day21/Cargo.toml | 12 - 2018/day22/Cargo.toml | 12 - 2018/day23/Cargo.toml | 13 - 2018/day23_z3/Cargo.toml | 13 - 2018/day24/Cargo.toml | 12 - 2018/day24/army.rs | 104 ------- 2018/day24/attacktype.rs | 25 -- 2018/day24/combat.rs | 86 ------ 2018/day24/group.rs | 262 ------------------ 2018/day25/Cargo.toml | 12 - 2018/day3/Cargo.toml | 13 - 2018/day4/Cargo.toml | 12 - 2018/day5/Cargo.toml | 11 - 2018/day6/Cargo.toml | 12 - 2018/day7/Cargo.toml | 12 - 2018/day8/Cargo.toml | 11 - 2018/day9/Cargo.toml | 12 - 2018/day9_c/Cargo.toml | 14 - 2019/Cargo.toml | 5 - 2019/day1/Cargo.toml | 11 - 2019/day10/Cargo.toml | 12 - 2019/day11/Cargo.toml | 13 - 2019/day12/Cargo.toml | 12 - 2019/day13/Cargo.toml | 12 - 2019/day14/Cargo.toml | 12 - 2019/day15/Cargo.toml | 13 - 2019/day16/Cargo.toml | 11 - 2019/day17/Cargo.toml | 13 - 2019/day18/Cargo.toml | 12 - 2019/day18/mazecell.rs | 43 --- 2019/day18/mazette.rs | 145 ---------- 2019/day18/multirobot.rs | 61 ---- 2019/day18/path.rs | 31 --- 2019/day18/state.rs | 68 ----- 2019/day19/Cargo.toml | 12 - 2019/day2/Cargo.toml | 11 - 2019/day20/Cargo.toml | 12 - 2019/day21/Cargo.toml | 12 - 2019/day22/Cargo.toml | 11 - 2019/day23/Cargo.toml | 12 - 2019/day24/Cargo.toml | 12 - 2019/day25/Cargo.toml | 13 - 2019/day3/Cargo.toml | 12 - 2019/day4/Cargo.toml | 12 - 2019/day5/Cargo.toml | 12 - 2019/day6/Cargo.toml | 12 - 2019/day7/Cargo.toml | 13 - 2019/day8/Cargo.toml | 11 - 2019/day9/Cargo.toml | 12 - 2020/Cargo.toml | 5 - 2020/day1/Cargo.toml | 12 - 2020/day10/Cargo.toml | 12 - 2020/day11/Cargo.toml | 12 - 2020/day12/Cargo.toml | 11 - 2020/day13/Cargo.toml | 11 - 2020/day14/Cargo.toml | 12 - 2020/day15/Cargo.toml | 12 - 2020/day16/Cargo.toml | 13 - 2020/day17/Cargo.toml | 12 - 2020/day18/Cargo.toml | 11 - 2020/day19/Cargo.toml | 12 - 2020/day2/Cargo.toml | 11 - 2020/day20/Cargo.toml | 12 - 2020/day21/Cargo.toml | 12 - 2020/day22/Cargo.toml | 12 - 2020/day23/Cargo.toml | 11 - 2020/day24/Cargo.toml | 12 - 2020/day25/Cargo.toml | 12 - 2020/day3/Cargo.toml | 11 - 2020/day4/Cargo.toml | 12 - 2020/day5/Cargo.toml | 11 - 2020/day6/Cargo.toml | 12 - 2020/day7/Cargo.toml | 13 - 2020/day8/Cargo.toml | 12 - 2020/day9/Cargo.toml | 11 - 2021/Cargo.toml | 5 - 2021/day1/Cargo.toml | 13 - 2021/day10/Cargo.toml | 13 - 2021/day11/Cargo.toml | 11 - 2021/day12/Cargo.toml | 14 - 2021/day13/Cargo.toml | 11 - 2021/day14/Cargo.toml | 12 - 2021/day15/Cargo.toml | 13 - 2021/day16/Cargo.toml | 11 - 2021/day17/Cargo.toml | 14 - 2021/day18/Cargo.toml | 12 - 2021/day19/Cargo.toml | 13 - 2021/day2/Cargo.toml | 13 - 2021/day20/Cargo.toml | 11 - 2021/day21/Cargo.toml | 12 - 2021/day22/Cargo.toml | 13 - 2021/day23/Cargo.toml | 12 - 2021/day24/Cargo.toml | 13 - 2021/day25/Cargo.toml | 11 - 2021/day3/Cargo.toml | 13 - 2021/day4/Cargo.toml | 13 - 2021/day5/Cargo.toml | 14 - 2021/day6/Cargo.toml | 11 - 2021/day7/Cargo.toml | 14 - 2021/day8/Cargo.toml | 12 - 2021/day9/Cargo.toml | 11 - 2022/Cargo.toml | 5 - 2022/day1/Cargo.toml | 13 - 2022/day10/Cargo.toml | 11 - 2022/day11/Cargo.toml | 11 - 2022/day12/Cargo.toml | 12 - 2022/day13/Cargo.toml | 12 - 2022/day13_pest/Cargo.toml | 13 - 2022/day14/Cargo.toml | 12 - 2022/day15/Cargo.toml | 13 - 2022/day16/Cargo.toml | 13 - 2022/day17/Cargo.toml | 11 - 2022/day18/Cargo.toml | 12 - 2022/day19/Cargo.toml | 13 - 2022/day2/Cargo.toml | 13 - 2022/day20/Cargo.toml | 11 - 2022/day21/Cargo.toml | 14 - 2022/day22/Cargo.toml | 12 - 2022/day23/Cargo.toml | 12 - 2022/day24/Cargo.toml | 12 - 2022/day25/Cargo.toml | 11 - 2022/day3/Cargo.toml | 13 - 2022/day4/Cargo.toml | 12 - 2022/day5/Cargo.toml | 12 - 2022/day6/Cargo.toml | 12 - 2022/day7/Cargo.toml | 12 - 2022/day8/Cargo.toml | 11 - 2022/day9/Cargo.toml | 12 - 2023/Cargo.toml | 5 - 2023/day1/Cargo.toml | 13 - 2023/day10/Cargo.toml | 15 - 2023/day11/Cargo.toml | 11 - 2023/day12/Cargo.toml | 12 - 2023/day13/Cargo.toml | 11 - 2023/day14/Cargo.toml | 12 - 2023/day15/Cargo.toml | 11 - 2023/day16/Cargo.toml | 11 - 2023/day17/Cargo.toml | 12 - 2023/day18/Cargo.toml | 11 - 2023/day19/Cargo.toml | 13 - 2023/day2/Cargo.toml | 13 - 2023/day20/Cargo.toml | 13 - 2023/day21/Cargo.toml | 13 - 2023/day22/Cargo.toml | 12 - 2023/day23/Cargo.toml | 12 - 2023/day24/Cargo.toml | 14 - 2023/day25/Cargo.toml | 13 - 2023/day3/Cargo.toml | 12 - 2023/day4/Cargo.toml | 12 - 2023/day5/Cargo.toml | 11 - 2023/day6/Cargo.toml | 11 - 2023/day7/Cargo.toml | 12 - 2023/day8/Cargo.toml | 13 - 2023/day9/Cargo.toml | 11 - 2024/Cargo.toml | 5 - 2024/day1/Cargo.toml | 12 - 2024/day10/Cargo.toml | 12 - 2024/day11/Cargo.toml | 12 - 2024/day12/Cargo.toml | 12 - 2024/day13/Cargo.toml | 13 - 2024/day13_z3/Cargo.toml | 13 - 2024/day14/Cargo.toml | 13 - 2024/day15/Cargo.toml | 16 -- 2024/day16/Cargo.toml | 16 -- 2024/day17/Cargo.toml | 11 - 2024/day18/Cargo.toml | 11 - 2024/day19/Cargo.toml | 11 - 2024/day2/Cargo.toml | 11 - 2024/day20/Cargo.toml | 12 - 2024/day21/Cargo.toml | 13 - 2024/day22/Cargo.toml | 12 - 2024/day23/Cargo.toml | 14 - 2024/day24/Cargo.toml | 12 - 2024/day25/Cargo.toml | 11 - 2024/day3/Cargo.toml | 12 - 2024/day4/Cargo.toml | 11 - 2024/day5/Cargo.toml | 12 - 2024/day6/Cargo.toml | 12 - 2024/day7/Cargo.toml | 12 - 2024/day8/Cargo.toml | 13 - 2024/day9/Cargo.toml | 11 - one/Cargo.toml => Cargo.toml | 6 +- 2018/day23_z3/build.rs => build.rs | 0 {aoc => crates/aoc}/Cargo.toml | 0 {aoc => crates/aoc}/input.txt | 0 {aoc => crates/aoc}/src/args.rs | 0 {aoc => crates/aoc}/src/bin/dayXX/main.rs | 0 {aoc => crates/aoc}/src/coord.rs | 0 {aoc => crates/aoc}/src/counter.rs | 0 {aoc => crates/aoc}/src/direction.rs | 0 {aoc => crates/aoc}/src/grid.rs | 0 {aoc => crates/aoc}/src/gridu.rs | 0 {aoc => crates/aoc}/src/hexslice.rs | 0 {aoc => crates/aoc}/src/integer.rs | 0 {aoc => crates/aoc}/src/knot.rs | 0 {aoc => crates/aoc}/src/lib.rs | 0 {aoc => crates/aoc}/src/math.rs | 0 {aoc => crates/aoc}/src/ocr.rs | 0 {aoc => crates/aoc}/src/square.rs | 0 {aoc => crates/aoc}/src/util.rs | 0 {aoc => crates/aoc}/tests/coord_test.rs | 0 {aoc => crates/aoc}/tests/grid_test.rs | 0 {aoc => crates/aoc}/tests/gridu_test.rs | 0 {2016 => crates}/assembunny/Cargo.toml | 2 +- {2016 => crates}/assembunny/assembler/asm.py | 0 .../assembunny/assembler/calc.assembunny | 0 .../assembunny/assembler/heart.assembunny | 0 .../assembunny/assembler/hello1.assembunny | 0 .../assembunny/assembler/hello2.assembunny | 0 .../assembunny/assembler/print_a.assembunny | 0 {2016 => crates}/assembunny/bonus.txt | 0 {2016 => crates}/assembunny/src/bin/run.rs | 0 {2016 => crates}/assembunny/src/lib.rs | 3 +- .../intcode-rs => crates/intcode}/Cargo.toml | 2 +- .../intcode}/src/day5_compare.intcode | 0 .../intcode-rs => crates/intcode}/src/lib.rs | 0 .../intcode-rs => crates/intcode}/src/main.rs | 0 one/m.py | 50 ---- {one/src => src}/lib.rs | 0 {one/src => src}/main.rs | 0 {2015 => src/year2015}/README.md | 0 {2015 => src/year2015}/day1/day1.rs | 0 {2015 => src/year2015}/day10/day10.rs | 0 {2015 => src/year2015}/day11/day11.rs | 0 {2015 => src/year2015}/day12/day12.rs | 0 {2015 => src/year2015}/day13/day13.py | 0 {2015 => src/year2015}/day13/day13.rs | 0 {2015 => src/year2015}/day13/test.txt | 0 {2015 => src/year2015}/day14/day14.rs | 0 {2015 => src/year2015}/day14/test.txt | 0 {2015 => src/year2015}/day15/day15.rs | 0 {2015 => src/year2015}/day15/test.txt | 0 {2015 => src/year2015}/day16/day16.py | 0 {2015 => src/year2015}/day16/day16.rs | 0 {2015 => src/year2015}/day17/day17.rs | 0 {2015 => src/year2015}/day17/test.txt | 0 {2015 => src/year2015}/day18/README.md | 0 {2015 => src/year2015}/day18/anim.sh | 0 {2015 => src/year2015}/day18/anim1.gif | Bin {2015 => src/year2015}/day18/anim2.gif | Bin {2015 => src/year2015}/day18/day18.rs | 0 {2015 => src/year2015}/day18/demo.txt | 0 {2015 => src/year2015}/day19/day19.rs | 0 {2015 => src/year2015}/day19/sample_1.txt | 0 {2015 => src/year2015}/day19/sample_2.txt | 0 {2015 => src/year2015}/day2/day2.rs | 0 {2015 => src/year2015}/day20/day20.rs | 0 {2015 => src/year2015}/day21/day21.py | 0 {2015 => src/year2015}/day21/day21.rs | 0 {2015 => src/year2015}/day22/day22.rs | 0 {2015 => src/year2015}/day23/day23.py | 0 {2015 => src/year2015}/day23/day23.rs | 0 {2015 => src/year2015}/day23/test.txt | 0 {2015 => src/year2015}/day24/day24.py | 0 {2015 => src/year2015}/day24/day24.rs | 0 {2015 => src/year2015}/day24/test.txt | 0 {2015 => src/year2015}/day25/day25.rs | 0 {2015 => src/year2015}/day3/day3.rs | 0 {2015 => src/year2015}/day4/day4.rs | 0 {2015 => src/year2015}/day4/demo.txt | 0 {2015 => src/year2015}/day5/day5.rs | 0 {2015 => src/year2015}/day6/day6.rs | 0 {2015 => src/year2015}/day7/day7.rs | 0 {2015 => src/year2015}/day7/demo.txt | 0 {2015 => src/year2015}/day8/day8.rs | 0 {2015 => src/year2015}/day8/test.txt | 0 {2015 => src/year2015}/day9/day9.rs | 0 {2015 => src/year2015}/day9/test.txt | 0 {2016 => src/year2016}/.bonus.md | 0 {2016 => src/year2016}/.rustfmt.toml | 0 {2016 => src/year2016}/README.md | 0 {2016 => src/year2016}/day1/day1.rs | 0 {2016 => src/year2016}/day10/day10.rs | 0 {2016 => src/year2016}/day11/day11.rs | 0 {2016 => src/year2016}/day11/test.txt | 0 {2016 => src/year2016}/day12/day12.rs | 0 {2016 => src/year2016}/day13/day13.rs | 0 {2016 => src/year2016}/day14/day14.rs | 0 {2016 => src/year2016}/day15/day15.rs | 0 {2016 => src/year2016}/day16/day16.rs | 0 {2016 => src/year2016}/day17/day17.rs | 0 {2016 => src/year2016}/day18/day18.rs | 0 {2016 => src/year2016}/day19/day19.rs | 0 {2016 => src/year2016}/day2/day2.rs | 0 {2016 => src/year2016}/day2/test.txt | 0 {2016 => src/year2016}/day20/day20.rs | 0 {2016 => src/year2016}/day21/day21.rs | 0 {2016 => src/year2016}/day22/day22.rs | 0 {2016 => src/year2016}/day22/sample_1.txt | 0 {2016 => src/year2016}/day23/day23.rs | 0 {2016 => src/year2016}/day24/day24.rs | 0 {2016 => src/year2016}/day24/sample_1.txt | 0 {2016 => src/year2016}/day25/day25.rs | 0 {2016 => src/year2016}/day3/day3.rs | 0 {2016 => src/year2016}/day4/day4.rs | 0 {2016 => src/year2016}/day5/day5.rs | 0 {2016 => src/year2016}/day6/day6.rs | 0 {2016 => src/year2016}/day6/test.txt | 0 {2016 => src/year2016}/day7/day7.rs | 0 {2016 => src/year2016}/day8/day8.rs | 0 {2016 => src/year2016}/day9/day9.rs | 0 {2017 => src/year2017}/README.md | 0 {2017 => src/year2017}/day1/day1.py | 0 {2017 => src/year2017}/day1/day1.rs | 0 {2017 => src/year2017}/day10/day10.rs | 0 {2017 => src/year2017}/day11/day11.py | 0 {2017 => src/year2017}/day11/day11.rs | 0 {2017 => src/year2017}/day12/day12.py | 0 {2017 => src/year2017}/day12/day12.rs | 0 {2017 => src/year2017}/day12/test.txt | 0 {2017 => src/year2017}/day13/day13.rs | 0 {2017 => src/year2017}/day13/test.txt | 0 {2017 => src/year2017}/day14/day14.rs | 0 {2017 => src/year2017}/day14/test.txt | 0 {2017 => src/year2017}/day15/day15.rs | 0 {2017 => src/year2017}/day16/day16.rs | 0 {2017 => src/year2017}/day17/day17.rs | 0 {2017 => src/year2017}/day18/day18.rs | 0 {2017 => src/year2017}/day18/sample_1.txt | 0 {2017 => src/year2017}/day18/sample_2.txt | 0 {2017 => src/year2017}/day19/day19.py | 0 {2017 => src/year2017}/day19/day19.rs | 0 {2017 => src/year2017}/day19/test.txt | 0 {2017 => src/year2017}/day2/day2.py | 0 {2017 => src/year2017}/day2/day2.rs | 0 {2017 => src/year2017}/day2/sample_1.txt | 0 {2017 => src/year2017}/day2/sample_2.txt | 0 {2017 => src/year2017}/day20/day20.py | 0 {2017 => src/year2017}/day20/day20.rs | 0 {2017 => src/year2017}/day21/day21.py | 0 {2017 => src/year2017}/day21/day21.rs | 0 {2017 => src/year2017}/day21/test.txt | 0 {2017 => src/year2017}/day22/day22.py | 0 {2017 => src/year2017}/day22/day22.rs | 0 {2017 => src/year2017}/day22/test.txt | 0 {2017 => src/year2017}/day23/day23.rs | 0 {2017 => src/year2017}/day24/day24.py | 0 {2017 => src/year2017}/day24/day24.rs | 0 {2017 => src/year2017}/day24/test.txt | 0 {2017 => src/year2017}/day25/day25.py | 0 {2017 => src/year2017}/day25/day25.rs | 0 {2017 => src/year2017}/day25/test.txt | 0 {2017 => src/year2017}/day3/day3.py | 0 {2017 => src/year2017}/day3/day3.rs | 0 {2017 => src/year2017}/day4/day4.py | 0 {2017 => src/year2017}/day4/day4.rs | 0 {2017 => src/year2017}/day5/day5.py | 0 {2017 => src/year2017}/day5/day5.rs | 0 {2017 => src/year2017}/day5/test.txt | 0 {2017 => src/year2017}/day6/day6.py | 0 {2017 => src/year2017}/day6/day6.rs | 0 {2017 => src/year2017}/day6/test.txt | 0 {2017 => src/year2017}/day7/day7.py | 0 {2017 => src/year2017}/day7/day7.rs | 0 {2017 => src/year2017}/day7/test.txt | 0 {2017 => src/year2017}/day8/day8.pest | 0 {2017 => src/year2017}/day8/day8.py | 0 {2017 => src/year2017}/day8/day8.rs | 2 +- {2017 => src/year2017}/day8/test.txt | 0 {2017 => src/year2017}/day9/day9.py | 0 {2017 => src/year2017}/day9/day9.rs | 0 {2018 => src/year2018}/README.md | 0 {2018 => src/year2018}/day1/day1.rs | 0 {2018 => src/year2018}/day1/test1.txt | 0 {2018 => src/year2018}/day1/test2.txt | 0 {2018 => src/year2018}/day10/day10.rs | 0 {2018 => src/year2018}/day11/day11.rs | 0 {2018 => src/year2018}/day12/day12.rs | 0 {2018 => src/year2018}/day12/test.txt | 0 {2018 => src/year2018}/day13/day13.rs | 0 {2018 => src/year2018}/day13/sample_4.txt | 0 {2018 => src/year2018}/day13/sample_6.txt | 0 {2018 => src/year2018}/day14/day14.rs | 0 {2018 => src/year2018}/day15/day15.rs | 0 {2018 => src/year2018}/day15/sample_10.txt | 0 {2018 => src/year2018}/day15/sample_11.txt | 0 {2018 => src/year2018}/day15/sample_6.txt | 0 {2018 => src/year2018}/day15/sample_7.txt | 0 {2018 => src/year2018}/day15/sample_8.txt | 0 {2018 => src/year2018}/day15/sample_9.txt | 0 {2018 => src/year2018}/day16/day16.py | 0 {2018 => src/year2018}/day16/day16.rs | 0 {2018 => src/year2018}/day17/day17.rs | 0 {2018 => src/year2018}/day17/test.txt | 0 {2018 => src/year2018}/day18/README.md | 0 {2018 => src/year2018}/day18/day18.py | 0 {2018 => src/year2018}/day18/day18.rs | 0 {2018 => src/year2018}/day18/lumberarea.gif | Bin {2018 => src/year2018}/day18/test.txt | 0 {2018 => src/year2018}/day19/day19.rs | 0 {2018 => src/year2018}/day19/sample_1.txt | 0 {2018 => src/year2018}/day2/day2.rs | 0 {2018 => src/year2018}/day2/test1.txt | 0 {2018 => src/year2018}/day2/test2.txt | 0 {2018 => src/year2018}/day20/day20.rs | 0 {2018 => src/year2018}/day21/day21.rs | 0 {2018 => src/year2018}/day22/day22.rs | 0 {2018 => src/year2018}/day22/test.txt | 0 {2018 => src/year2018}/day23/day23.rs | 0 {2018 => src/year2018}/day23/sample_1.txt | 0 {2018 => src/year2018}/day23/sample_2.txt | 0 .../day24 => src/year2018/day23_z3}/build.rs | 0 {2018 => src/year2018}/day23_z3/day23.rs | 0 {2018 => src/year2018}/day23_z3/sample_1.txt | 0 {2018 => src/year2018}/day23_z3/sample_2.txt | 0 {2018 => src/year2018}/day24/day24.rs | 0 {2018 => src/year2018}/day24/test.txt | 0 {2018 => src/year2018}/day25/day25.rs | 0 {2018 => src/year2018}/day25/sample_1.txt | 0 {2018 => src/year2018}/day25/sample_2.txt | 0 {2018 => src/year2018}/day25/sample_3.txt | 0 {2018 => src/year2018}/day25/sample_4.txt | 0 {2018 => src/year2018}/day3/day3.rs | 0 {2018 => src/year2018}/day3/test.txt | 0 {2018 => src/year2018}/day4/day4.py | 0 {2018 => src/year2018}/day4/day4.rs | 0 {2018 => src/year2018}/day4/test.txt | 0 {2018 => src/year2018}/day5/day5.rs | 0 {2018 => src/year2018}/day5/test.txt | 0 {2018 => src/year2018}/day6/day6.rs | 0 {2018 => src/year2018}/day6/test.txt | 0 {2018 => src/year2018}/day7/day7.rs | 0 {2018 => src/year2018}/day7/test.txt | 0 .../year2018}/day8/.vscode/launch.json | 0 {2018 => src/year2018}/day8/day8.py | 0 {2018 => src/year2018}/day8/day8.rs | 0 {2018 => src/year2018}/day8/test.txt | 0 {2018 => src/year2018}/day9/day9.rs | 0 {2018 => src/year2018}/day9_c/build.rs | 0 {2018 => src/year2018}/day9_c/day9.c | 0 {2018 => src/year2018}/day9_c/day9.rs | 0 {2019 => src/year2019}/README.md | 0 {2019 => src/year2019}/day1/day1.py | 0 {2019 => src/year2019}/day1/day1.rs | 0 {2019 => src/year2019}/day10/day10.py | 0 {2019 => src/year2019}/day10/day10.rs | 0 {2019 => src/year2019}/day10/sample_1.txt | 0 {2019 => src/year2019}/day10/sample_4.txt | 0 {2019 => src/year2019}/day10/sample_5.txt | 0 {2019 => src/year2019}/day10/sample_6.txt | 0 {2019 => src/year2019}/day10/sample_7.txt | 0 {2019 => src/year2019}/day11/day11.py | 0 {2019 => src/year2019}/day11/day11.rs | 0 {2019 => src/year2019}/day12/day12.py | 0 {2019 => src/year2019}/day12/day12.rs | 0 {2019 => src/year2019}/day12/sample_1.txt | 0 {2019 => src/year2019}/day12/sample_4.txt | 0 {2019 => src/year2019}/day13/README.md | 0 {2019 => src/year2019}/day13/day13.py | 0 {2019 => src/year2019}/day13/day13.rs | 0 {2019 => src/year2019}/day13/demo.cast | 0 {2019 => src/year2019}/day14/day14.py | 0 {2019 => src/year2019}/day14/day14.rs | 0 {2019 => src/year2019}/day14/sample_1.txt | 0 {2019 => src/year2019}/day14/sample_2.txt | 0 {2019 => src/year2019}/day14/sample_3.txt | 0 {2019 => src/year2019}/day14/sample_4.txt | 0 {2019 => src/year2019}/day14/sample_5.txt | 0 {2019 => src/year2019}/day15/README.md | 0 {2019 => src/year2019}/day15/anim.gif | Bin {2019 => src/year2019}/day15/day15.py | 0 {2019 => src/year2019}/day15/day15.rs | 0 {2019 => src/year2019}/day15/maze.py | 0 {2019 => src/year2019}/day16/day16.c | 0 {2019 => src/year2019}/day16/day16.py | 0 {2019 => src/year2019}/day16/day16.rs | 0 {2019 => src/year2019}/day17/day17.py | 0 {2019 => src/year2019}/day17/day17.rs | 0 {2019 => src/year2019}/day18/day18.rs | 0 {2019 => src/year2019}/day18/sample_1.txt | 0 {2019 => src/year2019}/day18/sample_10.txt | 0 {2019 => src/year2019}/day18/sample_11.txt | 0 {2019 => src/year2019}/day18/sample_4.txt | 0 {2019 => src/year2019}/day18/sample_9.txt | 0 {2019 => src/year2019}/day19/day19.py | 0 {2019 => src/year2019}/day19/day19.rs | 0 {2019 => src/year2019}/day2/day2.py | 0 {2019 => src/year2019}/day2/day2.rs | 0 {2019 => src/year2019}/day20/day20.py | 0 {2019 => src/year2019}/day20/day20.rs | 0 {2019 => src/year2019}/day20/sample_1.txt | 0 {2019 => src/year2019}/day20/sample_2.txt | 0 {2019 => src/year2019}/day20/sample_3.txt | 0 {2019 => src/year2019}/day21/day21.py | 0 {2019 => src/year2019}/day21/day21.rs | 0 {2019 => src/year2019}/day22/day22.rs | 0 {2019 => src/year2019}/day23/day23.py | 0 {2019 => src/year2019}/day23/day23.rs | 0 {2019 => src/year2019}/day24/day24.py | 0 {2019 => src/year2019}/day24/day24.rs | 0 {2019 => src/year2019}/day24/test.txt | 0 {2019 => src/year2019}/day25/day25.py | 0 {2019 => src/year2019}/day25/day25.rs | 0 {2019 => src/year2019}/day25/play.py | 0 {2019 => src/year2019}/day3/day3.py | 0 {2019 => src/year2019}/day3/day3.rs | 0 {2019 => src/year2019}/day3/test1.txt | 0 {2019 => src/year2019}/day3/test2.txt | 0 {2019 => src/year2019}/day4/day4.py | 0 {2019 => src/year2019}/day4/day4.rs | 0 {2019 => src/year2019}/day5/day5.py | 0 {2019 => src/year2019}/day5/day5.rs | 0 {2019 => src/year2019}/day6/day6.py | 0 {2019 => src/year2019}/day6/day6.rs | 0 {2019 => src/year2019}/day6/sample_2.txt | 0 {2019 => src/year2019}/day6/sample_4.txt | 0 {2019 => src/year2019}/day7/day7.py | 0 {2019 => src/year2019}/day7/day7.rs | 0 {2019 => src/year2019}/day8/day8.py | 0 {2019 => src/year2019}/day8/day8.rs | 0 {2019 => src/year2019}/day9/day9.py | 0 {2019 => src/year2019}/day9/day9.rs | 0 {2019 => src/year2019}/intcode/Intcode.py | 0 {2019 => src/year2019}/intcode/amp1.intcode | 0 {2019 => src/year2019}/intcode/amp2.intcode | 0 {2019 => src/year2019}/intcode/amp3.intcode | 0 .../year2019}/intcode/bignum1.intcode | 0 .../year2019}/intcode/bignum2.intcode | 0 .../year2019}/intcode/compare8.intcode | 0 .../year2019}/intcode/copyitself.intcode | 0 .../year2019}/intcode/count10.intcode | 0 {2019 => src/year2019}/intcode/day2p1.intcode | 0 {2019 => src/year2019}/intcode/day2p2.intcode | 0 .../year2019}/intcode/exampleday2.intcode | 0 .../year2019}/intcode/helloworld.intcode | 0 .../year2019}/intcode/langtonsant.intcode | 0 .../year2019}/intcode/nonzero1.intcode | 0 .../year2019}/intcode/nonzero2.intcode | 0 {2019 => src/year2019}/ocr/ocr.py | 0 {2020 => src/year2020}/README.md | 0 {2020 => src/year2020}/day1/day1.py | 0 {2020 => src/year2020}/day1/day1.rs | 0 {2020 => src/year2020}/day1/test.txt | 0 {2020 => src/year2020}/day10/day10.py | 0 {2020 => src/year2020}/day10/day10.rs | 0 {2020 => src/year2020}/day10/sample_1.txt | 0 {2020 => src/year2020}/day10/sample_2.txt | 0 {2020 => src/year2020}/day11/day11.py | 0 {2020 => src/year2020}/day11/day11.rs | 0 {2020 => src/year2020}/day11/test.txt | 0 {2020 => src/year2020}/day12/day12.py | 0 {2020 => src/year2020}/day12/day12.rs | 0 {2020 => src/year2020}/day12/test.txt | 0 {2020 => src/year2020}/day13/day13.py | 0 {2020 => src/year2020}/day13/day13.rs | 0 {2020 => src/year2020}/day13/test.txt | 0 {2020 => src/year2020}/day14/day14.py | 0 {2020 => src/year2020}/day14/day14.rs | 0 {2020 => src/year2020}/day14/sample_1.txt | 0 {2020 => src/year2020}/day14/sample_5.txt | 0 {2020 => src/year2020}/day15/day15.py | 0 {2020 => src/year2020}/day15/day15.rs | 0 {2020 => src/year2020}/day15/test.txt | 0 {2020 => src/year2020}/day16/day16.py | 0 {2020 => src/year2020}/day16/day16.rs | 0 {2020 => src/year2020}/day16/sample_2.txt | 0 {2020 => src/year2020}/day16/sample_3.txt | 0 {2020 => src/year2020}/day17/day17.py | 0 {2020 => src/year2020}/day17/day17.rs | 0 {2020 => src/year2020}/day17/test.txt | 0 {2020 => src/year2020}/day18/day18.py | 0 {2020 => src/year2020}/day18/day18.rs | 0 {2020 => src/year2020}/day19/day19.rs | 0 {2020 => src/year2020}/day19/test.txt | 0 {2020 => src/year2020}/day19/test2.txt | 0 {2020 => src/year2020}/day2/day2.py | 0 {2020 => src/year2020}/day2/day2.rs | 0 {2020 => src/year2020}/day2/test.txt | 0 {2020 => src/year2020}/day20/day20.py | 0 {2020 => src/year2020}/day20/day20.rs | 0 {2020 => src/year2020}/day20/test.txt | 0 {2020 => src/year2020}/day21/day21.py | 0 {2020 => src/year2020}/day21/day21.rs | 0 {2020 => src/year2020}/day21/test.txt | 0 {2020 => src/year2020}/day22/day22.py | 0 {2020 => src/year2020}/day22/day22.rs | 0 {2020 => src/year2020}/day22/test.txt | 0 {2020 => src/year2020}/day23/day23.rs | 0 {2020 => src/year2020}/day23/test.txt | 0 {2020 => src/year2020}/day24/day24.py | 0 {2020 => src/year2020}/day24/day24.rs | 0 {2020 => src/year2020}/day24/test.txt | 0 {2020 => src/year2020}/day25/day25.py | 0 {2020 => src/year2020}/day25/day25.rs | 0 {2020 => src/year2020}/day25/test.txt | 0 {2020 => src/year2020}/day3/day3.py | 0 {2020 => src/year2020}/day3/day3.rs | 0 {2020 => src/year2020}/day3/test.txt | 0 {2020 => src/year2020}/day4/day4.py | 0 {2020 => src/year2020}/day4/day4.rs | 0 {2020 => src/year2020}/day4/sample_1.txt | 0 {2020 => src/year2020}/day4/sample_3.txt | 0 {2020 => src/year2020}/day4/sample_4.txt | 0 {2020 => src/year2020}/day5/day5.py | 0 {2020 => src/year2020}/day5/day5.rs | 0 {2020 => src/year2020}/day6/day6.py | 0 {2020 => src/year2020}/day6/day6.rs | 0 {2020 => src/year2020}/day6/test.txt | 0 {2020 => src/year2020}/day7/day7.py | 0 {2020 => src/year2020}/day7/day7.rs | 0 {2020 => src/year2020}/day7/sample_1.txt | 0 {2020 => src/year2020}/day7/sample_2.txt | 0 {2020 => src/year2020}/day8/day8.py | 0 {2020 => src/year2020}/day8/day8.rs | 0 {2020 => src/year2020}/day8/test.txt | 0 {2020 => src/year2020}/day9/day9.py | 0 {2020 => src/year2020}/day9/day9.rs | 0 {2020 => src/year2020}/day9/test.txt | 0 {2021 => src/year2021}/README.md | 0 {2021 => src/year2021}/day1/day1.py | 0 {2021 => src/year2021}/day1/day1.rs | 0 {2021 => src/year2021}/day1/test.txt | 0 {2021 => src/year2021}/day10/day10.py | 0 {2021 => src/year2021}/day10/day10.rs | 0 {2021 => src/year2021}/day10/test.txt | 0 {2021 => src/year2021}/day11/day11.rs | 0 {2021 => src/year2021}/day11/demo.txt | 0 {2021 => src/year2021}/day12/day12.py | 0 {2021 => src/year2021}/day12/day12.rs | 0 {2021 => src/year2021}/day13/day13.py | 0 {2021 => src/year2021}/day13/day13.rs | 0 {2021 => src/year2021}/day13/test.txt | 0 {2021 => src/year2021}/day14/day14.rs | 0 {2021 => src/year2021}/day14/step1.py | 0 {2021 => src/year2021}/day14/step2.py | 0 {2021 => src/year2021}/day14/test01.txt | 0 {2021 => src/year2021}/day14/test02.txt | 0 {2021 => src/year2021}/day15/day15.rs | 0 {2021 => src/year2021}/day15/sample_1.txt | 0 {2021 => src/year2021}/day16/day16.py | 0 {2021 => src/year2021}/day16/day16.rs | 0 {2021 => src/year2021}/day17/day17.rs | 0 {2021 => src/year2021}/day17/test.txt | 0 {2021 => src/year2021}/day18/day18.py | 0 {2021 => src/year2021}/day18/day18.rs | 0 {2021 => src/year2021}/day18/day18_eval.py | 0 {2021 => src/year2021}/day18/sample_1.txt | 0 {2021 => src/year2021}/day18/sample_7.txt | 0 {2021 => src/year2021}/day18/sample_8.txt | 0 {2021 => src/year2021}/day19/day19.rs | 0 {2021 => src/year2021}/day19/test.txt | 0 {2021 => src/year2021}/day2/day2.rs | 0 {2021 => src/year2021}/day2/test.txt | 0 {2021 => src/year2021}/day20/day20.rs | 0 {2021 => src/year2021}/day20/test.txt | 0 {2021 => src/year2021}/day21/day21.rs | 0 {2021 => src/year2021}/day22/day22.rs | 0 {2021 => src/year2021}/day22/sample_1.txt | 0 {2021 => src/year2021}/day22/sample_2.txt | 0 {2021 => src/year2021}/day22/sample_3.txt | 0 {2021 => src/year2021}/day23/day23.rs | 0 {2021 => src/year2021}/day23/test.txt | 0 {2021 => src/year2021}/day24/boxes.py | 0 {2021 => src/year2021}/day24/day24.rs | 0 {2021 => src/year2021}/day24/demo.txt | 0 {2021 => src/year2021}/day25/day25.py | 0 {2021 => src/year2021}/day25/day25.rs | 0 {2021 => src/year2021}/day25/test.txt | 0 {2021 => src/year2021}/day3/day3.rs | 0 {2021 => src/year2021}/day3/step2.py | 0 {2021 => src/year2021}/day3/test.txt | 0 {2021 => src/year2021}/day4/day4.rs | 0 {2021 => src/year2021}/day4/day4_bug.py | 0 {2021 => src/year2021}/day4/test.txt | 0 {2021 => src/year2021}/day5/day5.py | 0 {2021 => src/year2021}/day5/day5.rs | 0 {2021 => src/year2021}/day5/test.txt | 0 {2021 => src/year2021}/day6/day6.py | 0 {2021 => src/year2021}/day6/day6.rs | 0 {2021 => src/year2021}/day6/test.txt | 0 {2021 => src/year2021}/day7/day7.rs | 0 {2021 => src/year2021}/day7/test.txt | 0 {2021 => src/year2021}/day8/day8.py | 0 {2021 => src/year2021}/day8/day8.rs | 0 {2021 => src/year2021}/day8/test.txt | 0 {2021 => src/year2021}/day9/day9.py | 0 {2021 => src/year2021}/day9/day9.rs | 0 {2021 => src/year2021}/day9/test.txt | 0 {2021 => src/year2021}/ocr/ocr.py | 0 {2022 => src/year2022}/README.md | 0 {2022 => src/year2022}/day1/day1.py | 0 {2022 => src/year2022}/day1/day1.rs | 0 {2022 => src/year2022}/day1/day1_oneliner.py | 0 {2022 => src/year2022}/day1/test.txt | 0 {2022 => src/year2022}/day10/day10.py | 0 {2022 => src/year2022}/day10/day10.rs | 0 {2022 => src/year2022}/day10/test.txt | 0 {2022 => src/year2022}/day11/day11.cpp | 0 {2022 => src/year2022}/day11/day11.py | 0 {2022 => src/year2022}/day11/day11.rs | 0 {2022 => src/year2022}/day11/test.txt | 0 {2022 => src/year2022}/day12/day12.py | 0 {2022 => src/year2022}/day12/day12.rs | 0 {2022 => src/year2022}/day12/test.txt | 0 {2022 => src/year2022}/day13/day13.rs | 0 {2022 => src/year2022}/day13/test.txt | 0 {2022 => src/year2022}/day13_pest/day13.pest | 0 {2022 => src/year2022}/day13_pest/day13.py | 0 {2022 => src/year2022}/day13_pest/day13.rs | 0 {2022 => src/year2022}/day13_pest/test.txt | 0 {2022 => src/year2022}/day14/day14.py | 0 {2022 => src/year2022}/day14/day14.rs | 0 {2022 => src/year2022}/day14/test.txt | 0 {2022 => src/year2022}/day15/day15.py | 0 {2022 => src/year2022}/day15/day15.rs | 0 {2022 => src/year2022}/day15/test.txt | 0 {2022 => src/year2022}/day16/day16.rs | 0 {2022 => src/year2022}/day16/test.txt | 0 {2022 => src/year2022}/day17/README.md | 0 {2022 => src/year2022}/day17/day17.py | 0 {2022 => src/year2022}/day17/day17.rs | 0 {2022 => src/year2022}/day17/test.txt | 0 {2022 => src/year2022}/day17/tetris.gif | Bin {2022 => src/year2022}/day17/tetris.py | 0 {2022 => src/year2022}/day18/day18.rs | 0 {2022 => src/year2022}/day18/test.txt | 0 {2022 => src/year2022}/day19/day19.rs | 0 {2022 => src/year2022}/day19/test.txt | 0 {2022 => src/year2022}/day2/day2.py | 0 {2022 => src/year2022}/day2/day2.rs | 0 {2022 => src/year2022}/day2/test.txt | 0 {2022 => src/year2022}/day20/day20.rs | 0 {2022 => src/year2022}/day20/test.txt | 0 {2022 => src/year2022}/day21/day21.py | 0 {2022 => src/year2022}/day21/day21.rs | 0 {2022 => src/year2022}/day21/test.txt | 0 {2022 => src/year2022}/day22/day22.rs | 0 {2022 => src/year2022}/day22/test.txt | 0 {2022 => src/year2022}/day23/day23.rs | 0 {2022 => src/year2022}/day23/test.txt | 0 {2022 => src/year2022}/day24/day24.rs | 0 {2022 => src/year2022}/day24/demo.txt | 0 {2022 => src/year2022}/day24/test.txt | 0 {2022 => src/year2022}/day25/day25.py | 0 {2022 => src/year2022}/day25/day25.rs | 0 {2022 => src/year2022}/day25/test.txt | 0 {2022 => src/year2022}/day3/day3.c | 0 {2022 => src/year2022}/day3/day3.py | 0 {2022 => src/year2022}/day3/day3.rs | 0 {2022 => src/year2022}/day3/test.txt | 0 {2022 => src/year2022}/day4/day4.py | 0 {2022 => src/year2022}/day4/day4.rs | 0 {2022 => src/year2022}/day4/test.txt | 0 {2022 => src/year2022}/day5/day5.py | 0 {2022 => src/year2022}/day5/day5.rs | 0 {2022 => src/year2022}/day5/test.txt | 0 {2022 => src/year2022}/day6/day6.py | 0 {2022 => src/year2022}/day6/day6.rs | 0 {2022 => src/year2022}/day6/test.txt | 0 {2022 => src/year2022}/day7/day7.py | 0 {2022 => src/year2022}/day7/day7.rs | 0 {2022 => src/year2022}/day7/test.txt | 0 {2022 => src/year2022}/day8/day8.py | 0 {2022 => src/year2022}/day8/day8.rs | 0 {2022 => src/year2022}/day8/test.txt | 0 {2022 => src/year2022}/day9/day9.py | 0 {2022 => src/year2022}/day9/day9.rs | 0 {2022 => src/year2022}/day9/test.txt | 0 {2022 => src/year2022}/day9/test02.txt | 0 {2022 => src/year2022}/ocr/ocr.py | 0 {2023 => src/year2023}/README.md | 0 {2023 => src/year2023}/day1/day1.py | 0 {2023 => src/year2023}/day1/day1.rs | 0 {2023 => src/year2023}/day1/sample_1.txt | 0 {2023 => src/year2023}/day1/sample_2.txt | 0 {2023 => src/year2023}/day10/README.md | 0 {2023 => src/year2023}/day10/day10.py | 0 {2023 => src/year2023}/day10/day10.rs | 0 {2023 => src/year2023}/day10/pipemaze.sh | 0 {2023 => src/year2023}/day10/test1.png | Bin {2023 => src/year2023}/day10/test1.txt | 0 {2023 => src/year2023}/day10/test2.png | Bin {2023 => src/year2023}/day10/test2.txt | 0 {2023 => src/year2023}/day10/test3.png | Bin {2023 => src/year2023}/day10/test3.txt | 0 {2023 => src/year2023}/day10/test4.png | Bin {2023 => src/year2023}/day10/test4.txt | 0 {2023 => src/year2023}/day10/test5.png | Bin {2023 => src/year2023}/day10/test5.txt | 0 {2023 => src/year2023}/day10/test6.png | Bin {2023 => src/year2023}/day10/test6.txt | 0 {2023 => src/year2023}/day11/day11.rs | 0 {2023 => src/year2023}/day11/test.txt | 0 {2023 => src/year2023}/day12/day12.rs | 0 {2023 => src/year2023}/day12/test.txt | 0 {2023 => src/year2023}/day13/day13.rs | 0 {2023 => src/year2023}/day13/test.txt | 0 {2023 => src/year2023}/day14/day14.rs | 0 {2023 => src/year2023}/day14/test.txt | 0 {2023 => src/year2023}/day15/day15.rs | 0 {2023 => src/year2023}/day15/test.txt | 0 {2023 => src/year2023}/day16/day16.py | 0 {2023 => src/year2023}/day16/day16.rs | 0 {2023 => src/year2023}/day16/test.txt | 0 {2023 => src/year2023}/day17/day17.rs | 0 {2023 => src/year2023}/day17/test.txt | 0 {2023 => src/year2023}/day17/test2.txt | 0 {2023 => src/year2023}/day18/day18.rs | 0 {2023 => src/year2023}/day18/test.txt | 0 {2023 => src/year2023}/day19/day19.rs | 0 {2023 => src/year2023}/day19/test.txt | 0 {2023 => src/year2023}/day2/day2.py | 0 {2023 => src/year2023}/day2/day2.rs | 0 {2023 => src/year2023}/day2/test.txt | 0 {2023 => src/year2023}/day20/day20.rs | 0 {2023 => src/year2023}/day20/test.txt | 0 {2023 => src/year2023}/day20/test2.txt | 0 {2023 => src/year2023}/day21/day21.rs | 0 {2023 => src/year2023}/day21/test.txt | 0 {2023 => src/year2023}/day22/day22.rs | 0 {2023 => src/year2023}/day22/test.txt | 0 {2023 => src/year2023}/day23/day23.rs | 0 {2023 => src/year2023}/day23/naive_part2.c | 0 {2023 => src/year2023}/day23/test.txt | 0 .../day13_z3 => src/year2023/day24}/build.rs | 0 {2023 => src/year2023}/day24/day24.py | 0 {2023 => src/year2023}/day24/day24.rs | 0 {2023 => src/year2023}/day24/test.txt | 0 {2023 => src/year2023}/day25/day25.py | 0 {2023 => src/year2023}/day25/day25.rs | 0 {2023 => src/year2023}/day25/test.txt | 0 {2023 => src/year2023}/day3/day3.py | 0 {2023 => src/year2023}/day3/day3.rs | 0 {2023 => src/year2023}/day3/test.txt | 0 {2023 => src/year2023}/day4/day4.py | 0 {2023 => src/year2023}/day4/day4.rs | 0 {2023 => src/year2023}/day4/test.txt | 0 {2023 => src/year2023}/day5/day5.rs | 0 .../year2023}/day5/day5_bruteforce.py | 0 {2023 => src/year2023}/day5/test.txt | 0 {2023 => src/year2023}/day6/day6.py | 0 {2023 => src/year2023}/day6/day6.rs | 0 {2023 => src/year2023}/day6/test.txt | 0 {2023 => src/year2023}/day7/day7.rs | 0 {2023 => src/year2023}/day7/test.txt | 0 {2023 => src/year2023}/day8/day8.rs | 0 {2023 => src/year2023}/day8/test1.txt | 0 {2023 => src/year2023}/day8/test2.txt | 0 {2023 => src/year2023}/day9/day9.py | 0 {2023 => src/year2023}/day9/day9.rs | 0 {2023 => src/year2023}/day9/test.txt | 0 {2024 => src/year2024}/README.md | 0 {2024 => src/year2024}/day1/day1.c | 0 {2024 => src/year2024}/day1/day1.cpp | 0 {2024 => src/year2024}/day1/day1.cs | 0 {2024 => src/year2024}/day1/day1.go | 0 {2024 => src/year2024}/day1/day1.java | 0 {2024 => src/year2024}/day1/day1.js | 0 .../year2024}/day1/day1.kernel/Makefile | 0 .../year2024}/day1/day1.kernel/README.md | 0 {2024 => src/year2024}/day1/day1.kernel/aoc.c | 0 .../year2024}/day1/day1.kernel/aoc.sh | 0 .../year2024}/day1/day1.kernel/kaoc.png | Bin {2024 => src/year2024}/day1/day1.lua | 0 {2024 => src/year2024}/day1/day1.pl | 0 {2024 => src/year2024}/day1/day1.py | 0 {2024 => src/year2024}/day1/day1.rb | 0 {2024 => src/year2024}/day1/day1.rs | 0 {2024 => src/year2024}/day1/day1.sh | 0 {2024 => src/year2024}/day1/day1.sql | 0 {2024 => src/year2024}/day1/day1.swift | 0 {2024 => src/year2024}/day1/test.txt | 0 {2024 => src/year2024}/day10/day10.rs | 0 {2024 => src/year2024}/day10/sample_1.txt | 0 {2024 => src/year2024}/day10/sample_10.txt | 0 {2024 => src/year2024}/day10/sample_2.txt | 0 {2024 => src/year2024}/day10/sample_3.txt | 0 {2024 => src/year2024}/day10/sample_4.txt | 0 {2024 => src/year2024}/day10/sample_5.txt | 0 {2024 => src/year2024}/day10/sample_6.txt | 0 {2024 => src/year2024}/day10/sample_8.txt | 0 {2024 => src/year2024}/day10/sample_9.txt | 0 {2024 => src/year2024}/day11/day11.go | 0 {2024 => src/year2024}/day11/day11.rs | 0 {2024 => src/year2024}/day11/test.txt | 0 {2024 => src/year2024}/day12/day12.rs | 0 {2024 => src/year2024}/day12/sample_1.txt | 0 {2024 => src/year2024}/day12/sample_3.txt | 0 {2024 => src/year2024}/day12/sample_4.txt | 0 {2024 => src/year2024}/day12/sample_6.txt | 0 {2024 => src/year2024}/day12/sample_7.txt | 0 {2024 => src/year2024}/day13/day13.rs | 0 {2024 => src/year2024}/day13/test.txt | 0 {one => src/year2024/day13_z3}/build.rs | 0 {2024 => src/year2024}/day13_z3/day13.py | 0 {2024 => src/year2024}/day13_z3/day13.rs | 0 {2024 => src/year2024}/day13_z3/test.txt | 0 {2024 => src/year2024}/day14/README.md | 0 .../year2024}/day14/christmastree.gif | Bin {2024 => src/year2024}/day14/day14.py | 0 {2024 => src/year2024}/day14/day14.rs | 0 {2024 => src/year2024}/day14/easteregg.py | 0 .../year2024}/day14/easteregg_anim.sh | 0 {2024 => src/year2024}/day14/test.txt | 0 {2024 => src/year2024}/day15/README.md | 0 {2024 => src/year2024}/day15/anim.sh | 0 {2024 => src/year2024}/day15/day15.rs | 0 {2024 => src/year2024}/day15/large1.gif | Bin {2024 => src/year2024}/day15/large2.gif | Bin {2024 => src/year2024}/day15/sample_1.txt | 0 {2024 => src/year2024}/day15/sample_2.txt | 0 {2024 => src/year2024}/day15/small1.gif | Bin {2024 => src/year2024}/day15/small2.gif | Bin {2024 => src/year2024}/day16/README.md | 0 {2024 => src/year2024}/day16/anim.gif | Bin {2024 => src/year2024}/day16/anim.sh | 0 {2024 => src/year2024}/day16/day16.rs | 0 {2024 => src/year2024}/day16/sample_1.txt | 0 {2024 => src/year2024}/day16/sample_3.txt | 0 {2024 => src/year2024}/day17/day17.rs | 0 {2024 => src/year2024}/day17/sample_1.txt | 0 {2024 => src/year2024}/day17/sample_2.txt | 0 {2024 => src/year2024}/day18/day18.cpp | 0 {2024 => src/year2024}/day18/day18.go | 0 {2024 => src/year2024}/day18/day18.rs | 0 {2024 => src/year2024}/day18/sample_1.txt | 0 {2024 => src/year2024}/day19/day19.rs | 0 {2024 => src/year2024}/day19/test.txt | 0 {2024 => src/year2024}/day2/day2.go | 0 {2024 => src/year2024}/day2/day2.py | 0 {2024 => src/year2024}/day2/day2.rs | 0 {2024 => src/year2024}/day2/test.txt | 0 {2024 => src/year2024}/day20/day20.rs | 0 {2024 => src/year2024}/day20/test.txt | 0 {2024 => src/year2024}/day21/day21.rs | 0 {2024 => src/year2024}/day21/test.txt | 0 {2024 => src/year2024}/day22/day22.rs | 0 {2024 => src/year2024}/day22/test.txt | 0 {2024 => src/year2024}/day23/day23.py | 0 {2024 => src/year2024}/day23/day23.rs | 0 {2024 => src/year2024}/day23/test.txt | 0 {2024 => src/year2024}/day24/day24.rs | 0 {2024 => src/year2024}/day24/full_adder.png | Bin {2024 => src/year2024}/day24/half_adder.png | Bin {2024 => src/year2024}/day24/sample_1.txt | 0 {2024 => src/year2024}/day24/sample_2.txt | 0 {2024 => src/year2024}/day25/day25.go | 0 {2024 => src/year2024}/day25/day25.py | 0 {2024 => src/year2024}/day25/day25.rs | 0 {2024 => src/year2024}/day25/test.txt | 0 {2024 => src/year2024}/day3/day3.go | 0 {2024 => src/year2024}/day3/day3.pl | 0 {2024 => src/year2024}/day3/day3.py | 0 {2024 => src/year2024}/day3/day3.rs | 0 {2024 => src/year2024}/day3/sample_1.txt | 0 {2024 => src/year2024}/day3/sample_2.txt | 0 {2024 => src/year2024}/day4/day4.py | 0 {2024 => src/year2024}/day4/day4.rs | 0 {2024 => src/year2024}/day4/sample_1.txt | 0 {2024 => src/year2024}/day4/sample_2.txt | 0 {2024 => src/year2024}/day4/sample_3.txt | 0 {2024 => src/year2024}/day4/sample_4.txt | 0 {2024 => src/year2024}/day4/sample_5.txt | 0 {2024 => src/year2024}/day5/day5.rs | 0 {2024 => src/year2024}/day5/test.txt | 0 {2024 => src/year2024}/day6/day6.rs | 0 {2024 => src/year2024}/day6/test.txt | 0 {2024 => src/year2024}/day7/day7.go | 0 {2024 => src/year2024}/day7/day7.py | 3 +- {2024 => src/year2024}/day7/day7.rs | 0 {2024 => src/year2024}/day7/test.txt | 0 {2024 => src/year2024}/day8/day8.py | 0 {2024 => src/year2024}/day8/day8.rs | 0 {2024 => src/year2024}/day8/test.txt | 0 {2024 => src/year2024}/day9/day9.rs | 0 {2024 => src/year2024}/day9/test.txt | 0 1058 files changed, 9 insertions(+), 4006 deletions(-) delete mode 100644 2015/Cargo.toml delete mode 100644 2015/day1/Cargo.toml delete mode 100644 2015/day10/Cargo.toml delete mode 100644 2015/day11/Cargo.toml delete mode 100644 2015/day12/Cargo.toml delete mode 100644 2015/day13/Cargo.toml delete mode 100644 2015/day14/Cargo.toml delete mode 100644 2015/day15/Cargo.toml delete mode 100644 2015/day16/Cargo.toml delete mode 100644 2015/day17/Cargo.toml delete mode 100644 2015/day18/Cargo.toml delete mode 100644 2015/day19/Cargo.toml delete mode 100644 2015/day2/Cargo.toml delete mode 100644 2015/day20/Cargo.toml delete mode 100644 2015/day21/Cargo.toml delete mode 100644 2015/day22/Cargo.toml delete mode 100644 2015/day23/Cargo.toml delete mode 100644 2015/day24/Cargo.toml delete mode 100644 2015/day25/Cargo.toml delete mode 100644 2015/day3/Cargo.toml delete mode 100644 2015/day4/Cargo.toml delete mode 100644 2015/day5/Cargo.toml delete mode 100644 2015/day6/Cargo.toml delete mode 100644 2015/day7/Cargo.toml delete mode 100644 2015/day8/Cargo.toml delete mode 100644 2015/day9/Cargo.toml delete mode 100644 2016/Cargo.toml delete mode 100644 2016/day1/Cargo.toml delete mode 100644 2016/day10/Cargo.toml delete mode 100644 2016/day11/Cargo.toml delete mode 100644 2016/day12/Cargo.toml delete mode 100644 2016/day13/Cargo.toml delete mode 100644 2016/day14/Cargo.toml delete mode 100644 2016/day15/Cargo.toml delete mode 100644 2016/day16/Cargo.toml delete mode 100644 2016/day17/Cargo.toml delete mode 100644 2016/day18/Cargo.toml delete mode 100644 2016/day19/Cargo.toml delete mode 100644 2016/day2/Cargo.toml delete mode 100644 2016/day20/Cargo.toml delete mode 100644 2016/day21/Cargo.toml delete mode 100644 2016/day22/Cargo.toml delete mode 100644 2016/day23/Cargo.toml delete mode 100644 2016/day24/Cargo.toml delete mode 100644 2016/day25/Cargo.toml delete mode 100644 2016/day3/Cargo.toml delete mode 100644 2016/day4/Cargo.toml delete mode 100644 2016/day5/Cargo.toml delete mode 100644 2016/day6/Cargo.toml delete mode 100644 2016/day7/Cargo.toml delete mode 100644 2016/day8/Cargo.toml delete mode 100644 2016/day9/Cargo.toml delete mode 100644 2017/Cargo.toml delete mode 100644 2017/day1/Cargo.toml delete mode 100644 2017/day10/Cargo.toml delete mode 100644 2017/day11/Cargo.toml delete mode 100644 2017/day12/Cargo.toml delete mode 100644 2017/day13/Cargo.toml delete mode 100644 2017/day14/Cargo.toml delete mode 100644 2017/day15/Cargo.toml delete mode 100644 2017/day16/Cargo.toml delete mode 100644 2017/day17/Cargo.toml delete mode 100644 2017/day18/Cargo.toml delete mode 100644 2017/day19/Cargo.toml delete mode 100644 2017/day2/Cargo.toml delete mode 100644 2017/day20/Cargo.toml delete mode 100644 2017/day21/Cargo.toml delete mode 100644 2017/day22/Cargo.toml delete mode 100644 2017/day23/Cargo.toml delete mode 100644 2017/day24/Cargo.toml delete mode 100644 2017/day25/Cargo.toml delete mode 100644 2017/day3/Cargo.toml delete mode 100644 2017/day4/Cargo.toml delete mode 100644 2017/day5/Cargo.toml delete mode 100644 2017/day6/Cargo.toml delete mode 100644 2017/day7/Cargo.toml delete mode 100644 2017/day8/Cargo.toml delete mode 100644 2017/day9/Cargo.toml delete mode 100644 2018/Cargo.toml delete mode 100644 2018/day1/Cargo.toml delete mode 100644 2018/day10/Cargo.toml delete mode 100644 2018/day11/Cargo.toml delete mode 100644 2018/day12/Cargo.toml delete mode 100644 2018/day13/Cargo.toml delete mode 100644 2018/day14/Cargo.toml delete mode 100644 2018/day15/Cargo.toml delete mode 100644 2018/day16/Cargo.toml delete mode 100644 2018/day17/Cargo.toml delete mode 100644 2018/day18/Cargo.toml delete mode 100644 2018/day19/Cargo.toml delete mode 100644 2018/day2/Cargo.toml delete mode 100644 2018/day20/Cargo.toml delete mode 100644 2018/day21/Cargo.toml delete mode 100644 2018/day22/Cargo.toml delete mode 100644 2018/day23/Cargo.toml delete mode 100644 2018/day23_z3/Cargo.toml delete mode 100644 2018/day24/Cargo.toml delete mode 100644 2018/day24/army.rs delete mode 100644 2018/day24/attacktype.rs delete mode 100644 2018/day24/combat.rs delete mode 100644 2018/day24/group.rs delete mode 100644 2018/day25/Cargo.toml delete mode 100644 2018/day3/Cargo.toml delete mode 100644 2018/day4/Cargo.toml delete mode 100644 2018/day5/Cargo.toml delete mode 100644 2018/day6/Cargo.toml delete mode 100644 2018/day7/Cargo.toml delete mode 100644 2018/day8/Cargo.toml delete mode 100644 2018/day9/Cargo.toml delete mode 100644 2018/day9_c/Cargo.toml delete mode 100644 2019/Cargo.toml delete mode 100644 2019/day1/Cargo.toml delete mode 100644 2019/day10/Cargo.toml delete mode 100644 2019/day11/Cargo.toml delete mode 100644 2019/day12/Cargo.toml delete mode 100644 2019/day13/Cargo.toml delete mode 100644 2019/day14/Cargo.toml delete mode 100644 2019/day15/Cargo.toml delete mode 100644 2019/day16/Cargo.toml delete mode 100644 2019/day17/Cargo.toml delete mode 100644 2019/day18/Cargo.toml delete mode 100644 2019/day18/mazecell.rs delete mode 100644 2019/day18/mazette.rs delete mode 100644 2019/day18/multirobot.rs delete mode 100644 2019/day18/path.rs delete mode 100644 2019/day18/state.rs delete mode 100644 2019/day19/Cargo.toml delete mode 100644 2019/day2/Cargo.toml delete mode 100644 2019/day20/Cargo.toml delete mode 100644 2019/day21/Cargo.toml delete mode 100644 2019/day22/Cargo.toml delete mode 100644 2019/day23/Cargo.toml delete mode 100644 2019/day24/Cargo.toml delete mode 100644 2019/day25/Cargo.toml delete mode 100644 2019/day3/Cargo.toml delete mode 100644 2019/day4/Cargo.toml delete mode 100644 2019/day5/Cargo.toml delete mode 100644 2019/day6/Cargo.toml delete mode 100644 2019/day7/Cargo.toml delete mode 100644 2019/day8/Cargo.toml delete mode 100644 2019/day9/Cargo.toml delete mode 100644 2020/Cargo.toml delete mode 100644 2020/day1/Cargo.toml delete mode 100644 2020/day10/Cargo.toml delete mode 100644 2020/day11/Cargo.toml delete mode 100644 2020/day12/Cargo.toml delete mode 100644 2020/day13/Cargo.toml delete mode 100644 2020/day14/Cargo.toml delete mode 100644 2020/day15/Cargo.toml delete mode 100644 2020/day16/Cargo.toml delete mode 100644 2020/day17/Cargo.toml delete mode 100644 2020/day18/Cargo.toml delete mode 100644 2020/day19/Cargo.toml delete mode 100644 2020/day2/Cargo.toml delete mode 100644 2020/day20/Cargo.toml delete mode 100644 2020/day21/Cargo.toml delete mode 100644 2020/day22/Cargo.toml delete mode 100644 2020/day23/Cargo.toml delete mode 100644 2020/day24/Cargo.toml delete mode 100644 2020/day25/Cargo.toml delete mode 100644 2020/day3/Cargo.toml delete mode 100644 2020/day4/Cargo.toml delete mode 100644 2020/day5/Cargo.toml delete mode 100644 2020/day6/Cargo.toml delete mode 100644 2020/day7/Cargo.toml delete mode 100644 2020/day8/Cargo.toml delete mode 100644 2020/day9/Cargo.toml delete mode 100644 2021/Cargo.toml delete mode 100644 2021/day1/Cargo.toml delete mode 100644 2021/day10/Cargo.toml delete mode 100644 2021/day11/Cargo.toml delete mode 100644 2021/day12/Cargo.toml delete mode 100644 2021/day13/Cargo.toml delete mode 100644 2021/day14/Cargo.toml delete mode 100644 2021/day15/Cargo.toml delete mode 100644 2021/day16/Cargo.toml delete mode 100644 2021/day17/Cargo.toml delete mode 100644 2021/day18/Cargo.toml delete mode 100644 2021/day19/Cargo.toml delete mode 100644 2021/day2/Cargo.toml delete mode 100644 2021/day20/Cargo.toml delete mode 100644 2021/day21/Cargo.toml delete mode 100644 2021/day22/Cargo.toml delete mode 100644 2021/day23/Cargo.toml delete mode 100644 2021/day24/Cargo.toml delete mode 100644 2021/day25/Cargo.toml delete mode 100644 2021/day3/Cargo.toml delete mode 100644 2021/day4/Cargo.toml delete mode 100644 2021/day5/Cargo.toml delete mode 100644 2021/day6/Cargo.toml delete mode 100644 2021/day7/Cargo.toml delete mode 100644 2021/day8/Cargo.toml delete mode 100644 2021/day9/Cargo.toml delete mode 100644 2022/Cargo.toml delete mode 100644 2022/day1/Cargo.toml delete mode 100644 2022/day10/Cargo.toml delete mode 100644 2022/day11/Cargo.toml delete mode 100644 2022/day12/Cargo.toml delete mode 100644 2022/day13/Cargo.toml delete mode 100644 2022/day13_pest/Cargo.toml delete mode 100644 2022/day14/Cargo.toml delete mode 100644 2022/day15/Cargo.toml delete mode 100644 2022/day16/Cargo.toml delete mode 100644 2022/day17/Cargo.toml delete mode 100644 2022/day18/Cargo.toml delete mode 100644 2022/day19/Cargo.toml delete mode 100644 2022/day2/Cargo.toml delete mode 100644 2022/day20/Cargo.toml delete mode 100644 2022/day21/Cargo.toml delete mode 100644 2022/day22/Cargo.toml delete mode 100644 2022/day23/Cargo.toml delete mode 100644 2022/day24/Cargo.toml delete mode 100644 2022/day25/Cargo.toml delete mode 100644 2022/day3/Cargo.toml delete mode 100644 2022/day4/Cargo.toml delete mode 100644 2022/day5/Cargo.toml delete mode 100644 2022/day6/Cargo.toml delete mode 100644 2022/day7/Cargo.toml delete mode 100644 2022/day8/Cargo.toml delete mode 100644 2022/day9/Cargo.toml delete mode 100644 2023/Cargo.toml delete mode 100644 2023/day1/Cargo.toml delete mode 100644 2023/day10/Cargo.toml delete mode 100644 2023/day11/Cargo.toml delete mode 100644 2023/day12/Cargo.toml delete mode 100644 2023/day13/Cargo.toml delete mode 100644 2023/day14/Cargo.toml delete mode 100644 2023/day15/Cargo.toml delete mode 100644 2023/day16/Cargo.toml delete mode 100644 2023/day17/Cargo.toml delete mode 100644 2023/day18/Cargo.toml delete mode 100644 2023/day19/Cargo.toml delete mode 100644 2023/day2/Cargo.toml delete mode 100644 2023/day20/Cargo.toml delete mode 100644 2023/day21/Cargo.toml delete mode 100644 2023/day22/Cargo.toml delete mode 100644 2023/day23/Cargo.toml delete mode 100644 2023/day24/Cargo.toml delete mode 100644 2023/day25/Cargo.toml delete mode 100644 2023/day3/Cargo.toml delete mode 100644 2023/day4/Cargo.toml delete mode 100644 2023/day5/Cargo.toml delete mode 100644 2023/day6/Cargo.toml delete mode 100644 2023/day7/Cargo.toml delete mode 100644 2023/day8/Cargo.toml delete mode 100644 2023/day9/Cargo.toml delete mode 100644 2024/Cargo.toml delete mode 100644 2024/day1/Cargo.toml delete mode 100644 2024/day10/Cargo.toml delete mode 100644 2024/day11/Cargo.toml delete mode 100644 2024/day12/Cargo.toml delete mode 100644 2024/day13/Cargo.toml delete mode 100644 2024/day13_z3/Cargo.toml delete mode 100644 2024/day14/Cargo.toml delete mode 100644 2024/day15/Cargo.toml delete mode 100644 2024/day16/Cargo.toml delete mode 100644 2024/day17/Cargo.toml delete mode 100644 2024/day18/Cargo.toml delete mode 100644 2024/day19/Cargo.toml delete mode 100644 2024/day2/Cargo.toml delete mode 100644 2024/day20/Cargo.toml delete mode 100644 2024/day21/Cargo.toml delete mode 100644 2024/day22/Cargo.toml delete mode 100644 2024/day23/Cargo.toml delete mode 100644 2024/day24/Cargo.toml delete mode 100644 2024/day25/Cargo.toml delete mode 100644 2024/day3/Cargo.toml delete mode 100644 2024/day4/Cargo.toml delete mode 100644 2024/day5/Cargo.toml delete mode 100644 2024/day6/Cargo.toml delete mode 100644 2024/day7/Cargo.toml delete mode 100644 2024/day8/Cargo.toml delete mode 100644 2024/day9/Cargo.toml rename one/Cargo.toml => Cargo.toml (85%) rename 2018/day23_z3/build.rs => build.rs (100%) rename {aoc => crates/aoc}/Cargo.toml (100%) rename {aoc => crates/aoc}/input.txt (100%) rename {aoc => crates/aoc}/src/args.rs (100%) rename {aoc => crates/aoc}/src/bin/dayXX/main.rs (100%) rename {aoc => crates/aoc}/src/coord.rs (100%) rename {aoc => crates/aoc}/src/counter.rs (100%) rename {aoc => crates/aoc}/src/direction.rs (100%) rename {aoc => crates/aoc}/src/grid.rs (100%) rename {aoc => crates/aoc}/src/gridu.rs (100%) rename {aoc => crates/aoc}/src/hexslice.rs (100%) rename {aoc => crates/aoc}/src/integer.rs (100%) rename {aoc => crates/aoc}/src/knot.rs (100%) rename {aoc => crates/aoc}/src/lib.rs (100%) rename {aoc => crates/aoc}/src/math.rs (100%) rename {aoc => crates/aoc}/src/ocr.rs (100%) rename {aoc => crates/aoc}/src/square.rs (100%) rename {aoc => crates/aoc}/src/util.rs (100%) rename {aoc => crates/aoc}/tests/coord_test.rs (100%) rename {aoc => crates/aoc}/tests/grid_test.rs (100%) rename {aoc => crates/aoc}/tests/gridu_test.rs (100%) rename {2016 => crates}/assembunny/Cargo.toml (75%) rename {2016 => crates}/assembunny/assembler/asm.py (100%) rename {2016 => crates}/assembunny/assembler/calc.assembunny (100%) rename {2016 => crates}/assembunny/assembler/heart.assembunny (100%) rename {2016 => crates}/assembunny/assembler/hello1.assembunny (100%) rename {2016 => crates}/assembunny/assembler/hello2.assembunny (100%) rename {2016 => crates}/assembunny/assembler/print_a.assembunny (100%) rename {2016 => crates}/assembunny/bonus.txt (100%) rename {2016 => crates}/assembunny/src/bin/run.rs (100%) rename {2016 => crates}/assembunny/src/lib.rs (99%) rename {2019/intcode-rs => crates/intcode}/Cargo.toml (72%) rename {2019/intcode-rs => crates/intcode}/src/day5_compare.intcode (100%) rename {2019/intcode-rs => crates/intcode}/src/lib.rs (100%) rename {2019/intcode-rs => crates/intcode}/src/main.rs (100%) delete mode 100755 one/m.py rename {one/src => src}/lib.rs (100%) rename {one/src => src}/main.rs (100%) rename {2015 => src/year2015}/README.md (100%) rename {2015 => src/year2015}/day1/day1.rs (100%) rename {2015 => src/year2015}/day10/day10.rs (100%) rename {2015 => src/year2015}/day11/day11.rs (100%) rename {2015 => src/year2015}/day12/day12.rs (100%) rename {2015 => src/year2015}/day13/day13.py (100%) rename {2015 => src/year2015}/day13/day13.rs (100%) rename {2015 => src/year2015}/day13/test.txt (100%) rename {2015 => src/year2015}/day14/day14.rs (100%) rename {2015 => src/year2015}/day14/test.txt (100%) rename {2015 => src/year2015}/day15/day15.rs (100%) rename {2015 => src/year2015}/day15/test.txt (100%) rename {2015 => src/year2015}/day16/day16.py (100%) rename {2015 => src/year2015}/day16/day16.rs (100%) rename {2015 => src/year2015}/day17/day17.rs (100%) rename {2015 => src/year2015}/day17/test.txt (100%) rename {2015 => src/year2015}/day18/README.md (100%) rename {2015 => src/year2015}/day18/anim.sh (100%) rename {2015 => src/year2015}/day18/anim1.gif (100%) rename {2015 => src/year2015}/day18/anim2.gif (100%) rename {2015 => src/year2015}/day18/day18.rs (100%) rename {2015 => src/year2015}/day18/demo.txt (100%) rename {2015 => src/year2015}/day19/day19.rs (100%) rename {2015 => src/year2015}/day19/sample_1.txt (100%) rename {2015 => src/year2015}/day19/sample_2.txt (100%) rename {2015 => src/year2015}/day2/day2.rs (100%) rename {2015 => src/year2015}/day20/day20.rs (100%) rename {2015 => src/year2015}/day21/day21.py (100%) rename {2015 => src/year2015}/day21/day21.rs (100%) rename {2015 => src/year2015}/day22/day22.rs (100%) rename {2015 => src/year2015}/day23/day23.py (100%) rename {2015 => src/year2015}/day23/day23.rs (100%) rename {2015 => src/year2015}/day23/test.txt (100%) rename {2015 => src/year2015}/day24/day24.py (100%) rename {2015 => src/year2015}/day24/day24.rs (100%) rename {2015 => src/year2015}/day24/test.txt (100%) rename {2015 => src/year2015}/day25/day25.rs (100%) rename {2015 => src/year2015}/day3/day3.rs (100%) rename {2015 => src/year2015}/day4/day4.rs (100%) rename {2015 => src/year2015}/day4/demo.txt (100%) rename {2015 => src/year2015}/day5/day5.rs (100%) rename {2015 => src/year2015}/day6/day6.rs (100%) rename {2015 => src/year2015}/day7/day7.rs (100%) rename {2015 => src/year2015}/day7/demo.txt (100%) rename {2015 => src/year2015}/day8/day8.rs (100%) rename {2015 => src/year2015}/day8/test.txt (100%) rename {2015 => src/year2015}/day9/day9.rs (100%) rename {2015 => src/year2015}/day9/test.txt (100%) rename {2016 => src/year2016}/.bonus.md (100%) rename {2016 => src/year2016}/.rustfmt.toml (100%) rename {2016 => src/year2016}/README.md (100%) rename {2016 => src/year2016}/day1/day1.rs (100%) rename {2016 => src/year2016}/day10/day10.rs (100%) rename {2016 => src/year2016}/day11/day11.rs (100%) rename {2016 => src/year2016}/day11/test.txt (100%) rename {2016 => src/year2016}/day12/day12.rs (100%) rename {2016 => src/year2016}/day13/day13.rs (100%) rename {2016 => src/year2016}/day14/day14.rs (100%) rename {2016 => src/year2016}/day15/day15.rs (100%) rename {2016 => src/year2016}/day16/day16.rs (100%) rename {2016 => src/year2016}/day17/day17.rs (100%) rename {2016 => src/year2016}/day18/day18.rs (100%) rename {2016 => src/year2016}/day19/day19.rs (100%) rename {2016 => src/year2016}/day2/day2.rs (100%) rename {2016 => src/year2016}/day2/test.txt (100%) rename {2016 => src/year2016}/day20/day20.rs (100%) rename {2016 => src/year2016}/day21/day21.rs (100%) rename {2016 => src/year2016}/day22/day22.rs (100%) rename {2016 => src/year2016}/day22/sample_1.txt (100%) rename {2016 => src/year2016}/day23/day23.rs (100%) rename {2016 => src/year2016}/day24/day24.rs (100%) rename {2016 => src/year2016}/day24/sample_1.txt (100%) rename {2016 => src/year2016}/day25/day25.rs (100%) rename {2016 => src/year2016}/day3/day3.rs (100%) rename {2016 => src/year2016}/day4/day4.rs (100%) rename {2016 => src/year2016}/day5/day5.rs (100%) rename {2016 => src/year2016}/day6/day6.rs (100%) rename {2016 => src/year2016}/day6/test.txt (100%) rename {2016 => src/year2016}/day7/day7.rs (100%) rename {2016 => src/year2016}/day8/day8.rs (100%) rename {2016 => src/year2016}/day9/day9.rs (100%) rename {2017 => src/year2017}/README.md (100%) rename {2017 => src/year2017}/day1/day1.py (100%) rename {2017 => src/year2017}/day1/day1.rs (100%) rename {2017 => src/year2017}/day10/day10.rs (100%) rename {2017 => src/year2017}/day11/day11.py (100%) rename {2017 => src/year2017}/day11/day11.rs (100%) rename {2017 => src/year2017}/day12/day12.py (100%) rename {2017 => src/year2017}/day12/day12.rs (100%) rename {2017 => src/year2017}/day12/test.txt (100%) rename {2017 => src/year2017}/day13/day13.rs (100%) rename {2017 => src/year2017}/day13/test.txt (100%) rename {2017 => src/year2017}/day14/day14.rs (100%) rename {2017 => src/year2017}/day14/test.txt (100%) rename {2017 => src/year2017}/day15/day15.rs (100%) rename {2017 => src/year2017}/day16/day16.rs (100%) rename {2017 => src/year2017}/day17/day17.rs (100%) rename {2017 => src/year2017}/day18/day18.rs (100%) rename {2017 => src/year2017}/day18/sample_1.txt (100%) rename {2017 => src/year2017}/day18/sample_2.txt (100%) rename {2017 => src/year2017}/day19/day19.py (100%) rename {2017 => src/year2017}/day19/day19.rs (100%) rename {2017 => src/year2017}/day19/test.txt (100%) rename {2017 => src/year2017}/day2/day2.py (100%) rename {2017 => src/year2017}/day2/day2.rs (100%) rename {2017 => src/year2017}/day2/sample_1.txt (100%) rename {2017 => src/year2017}/day2/sample_2.txt (100%) rename {2017 => src/year2017}/day20/day20.py (100%) rename {2017 => src/year2017}/day20/day20.rs (100%) rename {2017 => src/year2017}/day21/day21.py (100%) rename {2017 => src/year2017}/day21/day21.rs (100%) rename {2017 => src/year2017}/day21/test.txt (100%) rename {2017 => src/year2017}/day22/day22.py (100%) rename {2017 => src/year2017}/day22/day22.rs (100%) rename {2017 => src/year2017}/day22/test.txt (100%) rename {2017 => src/year2017}/day23/day23.rs (100%) rename {2017 => src/year2017}/day24/day24.py (100%) rename {2017 => src/year2017}/day24/day24.rs (100%) rename {2017 => src/year2017}/day24/test.txt (100%) rename {2017 => src/year2017}/day25/day25.py (100%) rename {2017 => src/year2017}/day25/day25.rs (100%) rename {2017 => src/year2017}/day25/test.txt (100%) rename {2017 => src/year2017}/day3/day3.py (100%) rename {2017 => src/year2017}/day3/day3.rs (100%) rename {2017 => src/year2017}/day4/day4.py (100%) rename {2017 => src/year2017}/day4/day4.rs (100%) rename {2017 => src/year2017}/day5/day5.py (100%) rename {2017 => src/year2017}/day5/day5.rs (100%) rename {2017 => src/year2017}/day5/test.txt (100%) rename {2017 => src/year2017}/day6/day6.py (100%) rename {2017 => src/year2017}/day6/day6.rs (100%) rename {2017 => src/year2017}/day6/test.txt (100%) rename {2017 => src/year2017}/day7/day7.py (100%) rename {2017 => src/year2017}/day7/day7.rs (100%) rename {2017 => src/year2017}/day7/test.txt (100%) rename {2017 => src/year2017}/day8/day8.pest (100%) rename {2017 => src/year2017}/day8/day8.py (100%) rename {2017 => src/year2017}/day8/day8.rs (98%) rename {2017 => src/year2017}/day8/test.txt (100%) rename {2017 => src/year2017}/day9/day9.py (100%) rename {2017 => src/year2017}/day9/day9.rs (100%) rename {2018 => src/year2018}/README.md (100%) rename {2018 => src/year2018}/day1/day1.rs (100%) rename {2018 => src/year2018}/day1/test1.txt (100%) rename {2018 => src/year2018}/day1/test2.txt (100%) rename {2018 => src/year2018}/day10/day10.rs (100%) rename {2018 => src/year2018}/day11/day11.rs (100%) rename {2018 => src/year2018}/day12/day12.rs (100%) rename {2018 => src/year2018}/day12/test.txt (100%) rename {2018 => src/year2018}/day13/day13.rs (100%) rename {2018 => src/year2018}/day13/sample_4.txt (100%) rename {2018 => src/year2018}/day13/sample_6.txt (100%) rename {2018 => src/year2018}/day14/day14.rs (100%) rename {2018 => src/year2018}/day15/day15.rs (100%) rename {2018 => src/year2018}/day15/sample_10.txt (100%) rename {2018 => src/year2018}/day15/sample_11.txt (100%) rename {2018 => src/year2018}/day15/sample_6.txt (100%) rename {2018 => src/year2018}/day15/sample_7.txt (100%) rename {2018 => src/year2018}/day15/sample_8.txt (100%) rename {2018 => src/year2018}/day15/sample_9.txt (100%) rename {2018 => src/year2018}/day16/day16.py (100%) rename {2018 => src/year2018}/day16/day16.rs (100%) rename {2018 => src/year2018}/day17/day17.rs (100%) rename {2018 => src/year2018}/day17/test.txt (100%) rename {2018 => src/year2018}/day18/README.md (100%) rename {2018 => src/year2018}/day18/day18.py (100%) rename {2018 => src/year2018}/day18/day18.rs (100%) rename {2018 => src/year2018}/day18/lumberarea.gif (100%) rename {2018 => src/year2018}/day18/test.txt (100%) rename {2018 => src/year2018}/day19/day19.rs (100%) rename {2018 => src/year2018}/day19/sample_1.txt (100%) rename {2018 => src/year2018}/day2/day2.rs (100%) rename {2018 => src/year2018}/day2/test1.txt (100%) rename {2018 => src/year2018}/day2/test2.txt (100%) rename {2018 => src/year2018}/day20/day20.rs (100%) rename {2018 => src/year2018}/day21/day21.rs (100%) rename {2018 => src/year2018}/day22/day22.rs (100%) rename {2018 => src/year2018}/day22/test.txt (100%) rename {2018 => src/year2018}/day23/day23.rs (100%) rename {2018 => src/year2018}/day23/sample_1.txt (100%) rename {2018 => src/year2018}/day23/sample_2.txt (100%) rename {2023/day24 => src/year2018/day23_z3}/build.rs (100%) rename {2018 => src/year2018}/day23_z3/day23.rs (100%) rename {2018 => src/year2018}/day23_z3/sample_1.txt (100%) rename {2018 => src/year2018}/day23_z3/sample_2.txt (100%) rename {2018 => src/year2018}/day24/day24.rs (100%) rename {2018 => src/year2018}/day24/test.txt (100%) rename {2018 => src/year2018}/day25/day25.rs (100%) rename {2018 => src/year2018}/day25/sample_1.txt (100%) rename {2018 => src/year2018}/day25/sample_2.txt (100%) rename {2018 => src/year2018}/day25/sample_3.txt (100%) rename {2018 => src/year2018}/day25/sample_4.txt (100%) rename {2018 => src/year2018}/day3/day3.rs (100%) rename {2018 => src/year2018}/day3/test.txt (100%) rename {2018 => src/year2018}/day4/day4.py (100%) rename {2018 => src/year2018}/day4/day4.rs (100%) rename {2018 => src/year2018}/day4/test.txt (100%) rename {2018 => src/year2018}/day5/day5.rs (100%) rename {2018 => src/year2018}/day5/test.txt (100%) rename {2018 => src/year2018}/day6/day6.rs (100%) rename {2018 => src/year2018}/day6/test.txt (100%) rename {2018 => src/year2018}/day7/day7.rs (100%) rename {2018 => src/year2018}/day7/test.txt (100%) rename {2018 => src/year2018}/day8/.vscode/launch.json (100%) rename {2018 => src/year2018}/day8/day8.py (100%) rename {2018 => src/year2018}/day8/day8.rs (100%) rename {2018 => src/year2018}/day8/test.txt (100%) rename {2018 => src/year2018}/day9/day9.rs (100%) rename {2018 => src/year2018}/day9_c/build.rs (100%) rename {2018 => src/year2018}/day9_c/day9.c (100%) rename {2018 => src/year2018}/day9_c/day9.rs (100%) rename {2019 => src/year2019}/README.md (100%) rename {2019 => src/year2019}/day1/day1.py (100%) rename {2019 => src/year2019}/day1/day1.rs (100%) rename {2019 => src/year2019}/day10/day10.py (100%) rename {2019 => src/year2019}/day10/day10.rs (100%) rename {2019 => src/year2019}/day10/sample_1.txt (100%) rename {2019 => src/year2019}/day10/sample_4.txt (100%) rename {2019 => src/year2019}/day10/sample_5.txt (100%) rename {2019 => src/year2019}/day10/sample_6.txt (100%) rename {2019 => src/year2019}/day10/sample_7.txt (100%) rename {2019 => src/year2019}/day11/day11.py (100%) rename {2019 => src/year2019}/day11/day11.rs (100%) rename {2019 => src/year2019}/day12/day12.py (100%) rename {2019 => src/year2019}/day12/day12.rs (100%) rename {2019 => src/year2019}/day12/sample_1.txt (100%) rename {2019 => src/year2019}/day12/sample_4.txt (100%) rename {2019 => src/year2019}/day13/README.md (100%) rename {2019 => src/year2019}/day13/day13.py (100%) rename {2019 => src/year2019}/day13/day13.rs (100%) rename {2019 => src/year2019}/day13/demo.cast (100%) rename {2019 => src/year2019}/day14/day14.py (100%) rename {2019 => src/year2019}/day14/day14.rs (100%) rename {2019 => src/year2019}/day14/sample_1.txt (100%) rename {2019 => src/year2019}/day14/sample_2.txt (100%) rename {2019 => src/year2019}/day14/sample_3.txt (100%) rename {2019 => src/year2019}/day14/sample_4.txt (100%) rename {2019 => src/year2019}/day14/sample_5.txt (100%) rename {2019 => src/year2019}/day15/README.md (100%) rename {2019 => src/year2019}/day15/anim.gif (100%) rename {2019 => src/year2019}/day15/day15.py (100%) rename {2019 => src/year2019}/day15/day15.rs (100%) rename {2019 => src/year2019}/day15/maze.py (100%) rename {2019 => src/year2019}/day16/day16.c (100%) rename {2019 => src/year2019}/day16/day16.py (100%) rename {2019 => src/year2019}/day16/day16.rs (100%) rename {2019 => src/year2019}/day17/day17.py (100%) rename {2019 => src/year2019}/day17/day17.rs (100%) rename {2019 => src/year2019}/day18/day18.rs (100%) rename {2019 => src/year2019}/day18/sample_1.txt (100%) rename {2019 => src/year2019}/day18/sample_10.txt (100%) rename {2019 => src/year2019}/day18/sample_11.txt (100%) rename {2019 => src/year2019}/day18/sample_4.txt (100%) rename {2019 => src/year2019}/day18/sample_9.txt (100%) rename {2019 => src/year2019}/day19/day19.py (100%) rename {2019 => src/year2019}/day19/day19.rs (100%) rename {2019 => src/year2019}/day2/day2.py (100%) rename {2019 => src/year2019}/day2/day2.rs (100%) rename {2019 => src/year2019}/day20/day20.py (100%) rename {2019 => src/year2019}/day20/day20.rs (100%) rename {2019 => src/year2019}/day20/sample_1.txt (100%) rename {2019 => src/year2019}/day20/sample_2.txt (100%) rename {2019 => src/year2019}/day20/sample_3.txt (100%) rename {2019 => src/year2019}/day21/day21.py (100%) rename {2019 => src/year2019}/day21/day21.rs (100%) rename {2019 => src/year2019}/day22/day22.rs (100%) rename {2019 => src/year2019}/day23/day23.py (100%) rename {2019 => src/year2019}/day23/day23.rs (100%) rename {2019 => src/year2019}/day24/day24.py (100%) rename {2019 => src/year2019}/day24/day24.rs (100%) rename {2019 => src/year2019}/day24/test.txt (100%) rename {2019 => src/year2019}/day25/day25.py (100%) rename {2019 => src/year2019}/day25/day25.rs (100%) rename {2019 => src/year2019}/day25/play.py (100%) rename {2019 => src/year2019}/day3/day3.py (100%) rename {2019 => src/year2019}/day3/day3.rs (100%) rename {2019 => src/year2019}/day3/test1.txt (100%) rename {2019 => src/year2019}/day3/test2.txt (100%) rename {2019 => src/year2019}/day4/day4.py (100%) rename {2019 => src/year2019}/day4/day4.rs (100%) rename {2019 => src/year2019}/day5/day5.py (100%) rename {2019 => src/year2019}/day5/day5.rs (100%) rename {2019 => src/year2019}/day6/day6.py (100%) rename {2019 => src/year2019}/day6/day6.rs (100%) rename {2019 => src/year2019}/day6/sample_2.txt (100%) rename {2019 => src/year2019}/day6/sample_4.txt (100%) rename {2019 => src/year2019}/day7/day7.py (100%) rename {2019 => src/year2019}/day7/day7.rs (100%) rename {2019 => src/year2019}/day8/day8.py (100%) rename {2019 => src/year2019}/day8/day8.rs (100%) rename {2019 => src/year2019}/day9/day9.py (100%) rename {2019 => src/year2019}/day9/day9.rs (100%) rename {2019 => src/year2019}/intcode/Intcode.py (100%) rename {2019 => src/year2019}/intcode/amp1.intcode (100%) rename {2019 => src/year2019}/intcode/amp2.intcode (100%) rename {2019 => src/year2019}/intcode/amp3.intcode (100%) rename {2019 => src/year2019}/intcode/bignum1.intcode (100%) rename {2019 => src/year2019}/intcode/bignum2.intcode (100%) rename {2019 => src/year2019}/intcode/compare8.intcode (100%) rename {2019 => src/year2019}/intcode/copyitself.intcode (100%) rename {2019 => src/year2019}/intcode/count10.intcode (100%) rename {2019 => src/year2019}/intcode/day2p1.intcode (100%) rename {2019 => src/year2019}/intcode/day2p2.intcode (100%) rename {2019 => src/year2019}/intcode/exampleday2.intcode (100%) rename {2019 => src/year2019}/intcode/helloworld.intcode (100%) rename {2019 => src/year2019}/intcode/langtonsant.intcode (100%) rename {2019 => src/year2019}/intcode/nonzero1.intcode (100%) rename {2019 => src/year2019}/intcode/nonzero2.intcode (100%) rename {2019 => src/year2019}/ocr/ocr.py (100%) rename {2020 => src/year2020}/README.md (100%) rename {2020 => src/year2020}/day1/day1.py (100%) rename {2020 => src/year2020}/day1/day1.rs (100%) rename {2020 => src/year2020}/day1/test.txt (100%) rename {2020 => src/year2020}/day10/day10.py (100%) rename {2020 => src/year2020}/day10/day10.rs (100%) rename {2020 => src/year2020}/day10/sample_1.txt (100%) rename {2020 => src/year2020}/day10/sample_2.txt (100%) rename {2020 => src/year2020}/day11/day11.py (100%) rename {2020 => src/year2020}/day11/day11.rs (100%) rename {2020 => src/year2020}/day11/test.txt (100%) rename {2020 => src/year2020}/day12/day12.py (100%) rename {2020 => src/year2020}/day12/day12.rs (100%) rename {2020 => src/year2020}/day12/test.txt (100%) rename {2020 => src/year2020}/day13/day13.py (100%) rename {2020 => src/year2020}/day13/day13.rs (100%) rename {2020 => src/year2020}/day13/test.txt (100%) rename {2020 => src/year2020}/day14/day14.py (100%) rename {2020 => src/year2020}/day14/day14.rs (100%) rename {2020 => src/year2020}/day14/sample_1.txt (100%) rename {2020 => src/year2020}/day14/sample_5.txt (100%) rename {2020 => src/year2020}/day15/day15.py (100%) rename {2020 => src/year2020}/day15/day15.rs (100%) rename {2020 => src/year2020}/day15/test.txt (100%) rename {2020 => src/year2020}/day16/day16.py (100%) rename {2020 => src/year2020}/day16/day16.rs (100%) rename {2020 => src/year2020}/day16/sample_2.txt (100%) rename {2020 => src/year2020}/day16/sample_3.txt (100%) rename {2020 => src/year2020}/day17/day17.py (100%) rename {2020 => src/year2020}/day17/day17.rs (100%) rename {2020 => src/year2020}/day17/test.txt (100%) rename {2020 => src/year2020}/day18/day18.py (100%) rename {2020 => src/year2020}/day18/day18.rs (100%) rename {2020 => src/year2020}/day19/day19.rs (100%) rename {2020 => src/year2020}/day19/test.txt (100%) rename {2020 => src/year2020}/day19/test2.txt (100%) rename {2020 => src/year2020}/day2/day2.py (100%) rename {2020 => src/year2020}/day2/day2.rs (100%) rename {2020 => src/year2020}/day2/test.txt (100%) rename {2020 => src/year2020}/day20/day20.py (100%) rename {2020 => src/year2020}/day20/day20.rs (100%) rename {2020 => src/year2020}/day20/test.txt (100%) rename {2020 => src/year2020}/day21/day21.py (100%) rename {2020 => src/year2020}/day21/day21.rs (100%) rename {2020 => src/year2020}/day21/test.txt (100%) rename {2020 => src/year2020}/day22/day22.py (100%) rename {2020 => src/year2020}/day22/day22.rs (100%) rename {2020 => src/year2020}/day22/test.txt (100%) rename {2020 => src/year2020}/day23/day23.rs (100%) rename {2020 => src/year2020}/day23/test.txt (100%) rename {2020 => src/year2020}/day24/day24.py (100%) rename {2020 => src/year2020}/day24/day24.rs (100%) rename {2020 => src/year2020}/day24/test.txt (100%) rename {2020 => src/year2020}/day25/day25.py (100%) rename {2020 => src/year2020}/day25/day25.rs (100%) rename {2020 => src/year2020}/day25/test.txt (100%) rename {2020 => src/year2020}/day3/day3.py (100%) rename {2020 => src/year2020}/day3/day3.rs (100%) rename {2020 => src/year2020}/day3/test.txt (100%) rename {2020 => src/year2020}/day4/day4.py (100%) rename {2020 => src/year2020}/day4/day4.rs (100%) rename {2020 => src/year2020}/day4/sample_1.txt (100%) rename {2020 => src/year2020}/day4/sample_3.txt (100%) rename {2020 => src/year2020}/day4/sample_4.txt (100%) rename {2020 => src/year2020}/day5/day5.py (100%) rename {2020 => src/year2020}/day5/day5.rs (100%) rename {2020 => src/year2020}/day6/day6.py (100%) rename {2020 => src/year2020}/day6/day6.rs (100%) rename {2020 => src/year2020}/day6/test.txt (100%) rename {2020 => src/year2020}/day7/day7.py (100%) rename {2020 => src/year2020}/day7/day7.rs (100%) rename {2020 => src/year2020}/day7/sample_1.txt (100%) rename {2020 => src/year2020}/day7/sample_2.txt (100%) rename {2020 => src/year2020}/day8/day8.py (100%) rename {2020 => src/year2020}/day8/day8.rs (100%) rename {2020 => src/year2020}/day8/test.txt (100%) rename {2020 => src/year2020}/day9/day9.py (100%) rename {2020 => src/year2020}/day9/day9.rs (100%) rename {2020 => src/year2020}/day9/test.txt (100%) rename {2021 => src/year2021}/README.md (100%) rename {2021 => src/year2021}/day1/day1.py (100%) rename {2021 => src/year2021}/day1/day1.rs (100%) rename {2021 => src/year2021}/day1/test.txt (100%) rename {2021 => src/year2021}/day10/day10.py (100%) rename {2021 => src/year2021}/day10/day10.rs (100%) rename {2021 => src/year2021}/day10/test.txt (100%) rename {2021 => src/year2021}/day11/day11.rs (100%) rename {2021 => src/year2021}/day11/demo.txt (100%) rename {2021 => src/year2021}/day12/day12.py (100%) rename {2021 => src/year2021}/day12/day12.rs (100%) rename {2021 => src/year2021}/day13/day13.py (100%) rename {2021 => src/year2021}/day13/day13.rs (100%) rename {2021 => src/year2021}/day13/test.txt (100%) rename {2021 => src/year2021}/day14/day14.rs (100%) rename {2021 => src/year2021}/day14/step1.py (100%) rename {2021 => src/year2021}/day14/step2.py (100%) rename {2021 => src/year2021}/day14/test01.txt (100%) rename {2021 => src/year2021}/day14/test02.txt (100%) rename {2021 => src/year2021}/day15/day15.rs (100%) rename {2021 => src/year2021}/day15/sample_1.txt (100%) rename {2021 => src/year2021}/day16/day16.py (100%) rename {2021 => src/year2021}/day16/day16.rs (100%) rename {2021 => src/year2021}/day17/day17.rs (100%) rename {2021 => src/year2021}/day17/test.txt (100%) rename {2021 => src/year2021}/day18/day18.py (100%) rename {2021 => src/year2021}/day18/day18.rs (100%) rename {2021 => src/year2021}/day18/day18_eval.py (100%) rename {2021 => src/year2021}/day18/sample_1.txt (100%) rename {2021 => src/year2021}/day18/sample_7.txt (100%) rename {2021 => src/year2021}/day18/sample_8.txt (100%) rename {2021 => src/year2021}/day19/day19.rs (100%) rename {2021 => src/year2021}/day19/test.txt (100%) rename {2021 => src/year2021}/day2/day2.rs (100%) rename {2021 => src/year2021}/day2/test.txt (100%) rename {2021 => src/year2021}/day20/day20.rs (100%) rename {2021 => src/year2021}/day20/test.txt (100%) rename {2021 => src/year2021}/day21/day21.rs (100%) rename {2021 => src/year2021}/day22/day22.rs (100%) rename {2021 => src/year2021}/day22/sample_1.txt (100%) rename {2021 => src/year2021}/day22/sample_2.txt (100%) rename {2021 => src/year2021}/day22/sample_3.txt (100%) rename {2021 => src/year2021}/day23/day23.rs (100%) rename {2021 => src/year2021}/day23/test.txt (100%) rename {2021 => src/year2021}/day24/boxes.py (100%) rename {2021 => src/year2021}/day24/day24.rs (100%) rename {2021 => src/year2021}/day24/demo.txt (100%) rename {2021 => src/year2021}/day25/day25.py (100%) rename {2021 => src/year2021}/day25/day25.rs (100%) rename {2021 => src/year2021}/day25/test.txt (100%) rename {2021 => src/year2021}/day3/day3.rs (100%) rename {2021 => src/year2021}/day3/step2.py (100%) rename {2021 => src/year2021}/day3/test.txt (100%) rename {2021 => src/year2021}/day4/day4.rs (100%) rename {2021 => src/year2021}/day4/day4_bug.py (100%) rename {2021 => src/year2021}/day4/test.txt (100%) rename {2021 => src/year2021}/day5/day5.py (100%) rename {2021 => src/year2021}/day5/day5.rs (100%) rename {2021 => src/year2021}/day5/test.txt (100%) rename {2021 => src/year2021}/day6/day6.py (100%) rename {2021 => src/year2021}/day6/day6.rs (100%) rename {2021 => src/year2021}/day6/test.txt (100%) rename {2021 => src/year2021}/day7/day7.rs (100%) rename {2021 => src/year2021}/day7/test.txt (100%) rename {2021 => src/year2021}/day8/day8.py (100%) rename {2021 => src/year2021}/day8/day8.rs (100%) rename {2021 => src/year2021}/day8/test.txt (100%) rename {2021 => src/year2021}/day9/day9.py (100%) rename {2021 => src/year2021}/day9/day9.rs (100%) rename {2021 => src/year2021}/day9/test.txt (100%) rename {2021 => src/year2021}/ocr/ocr.py (100%) rename {2022 => src/year2022}/README.md (100%) rename {2022 => src/year2022}/day1/day1.py (100%) rename {2022 => src/year2022}/day1/day1.rs (100%) rename {2022 => src/year2022}/day1/day1_oneliner.py (100%) rename {2022 => src/year2022}/day1/test.txt (100%) rename {2022 => src/year2022}/day10/day10.py (100%) rename {2022 => src/year2022}/day10/day10.rs (100%) rename {2022 => src/year2022}/day10/test.txt (100%) rename {2022 => src/year2022}/day11/day11.cpp (100%) rename {2022 => src/year2022}/day11/day11.py (100%) rename {2022 => src/year2022}/day11/day11.rs (100%) rename {2022 => src/year2022}/day11/test.txt (100%) rename {2022 => src/year2022}/day12/day12.py (100%) rename {2022 => src/year2022}/day12/day12.rs (100%) rename {2022 => src/year2022}/day12/test.txt (100%) rename {2022 => src/year2022}/day13/day13.rs (100%) rename {2022 => src/year2022}/day13/test.txt (100%) rename {2022 => src/year2022}/day13_pest/day13.pest (100%) rename {2022 => src/year2022}/day13_pest/day13.py (100%) rename {2022 => src/year2022}/day13_pest/day13.rs (100%) rename {2022 => src/year2022}/day13_pest/test.txt (100%) rename {2022 => src/year2022}/day14/day14.py (100%) rename {2022 => src/year2022}/day14/day14.rs (100%) rename {2022 => src/year2022}/day14/test.txt (100%) rename {2022 => src/year2022}/day15/day15.py (100%) rename {2022 => src/year2022}/day15/day15.rs (100%) rename {2022 => src/year2022}/day15/test.txt (100%) rename {2022 => src/year2022}/day16/day16.rs (100%) rename {2022 => src/year2022}/day16/test.txt (100%) rename {2022 => src/year2022}/day17/README.md (100%) rename {2022 => src/year2022}/day17/day17.py (100%) rename {2022 => src/year2022}/day17/day17.rs (100%) rename {2022 => src/year2022}/day17/test.txt (100%) rename {2022 => src/year2022}/day17/tetris.gif (100%) rename {2022 => src/year2022}/day17/tetris.py (100%) rename {2022 => src/year2022}/day18/day18.rs (100%) rename {2022 => src/year2022}/day18/test.txt (100%) rename {2022 => src/year2022}/day19/day19.rs (100%) rename {2022 => src/year2022}/day19/test.txt (100%) rename {2022 => src/year2022}/day2/day2.py (100%) rename {2022 => src/year2022}/day2/day2.rs (100%) rename {2022 => src/year2022}/day2/test.txt (100%) rename {2022 => src/year2022}/day20/day20.rs (100%) rename {2022 => src/year2022}/day20/test.txt (100%) rename {2022 => src/year2022}/day21/day21.py (100%) rename {2022 => src/year2022}/day21/day21.rs (100%) rename {2022 => src/year2022}/day21/test.txt (100%) rename {2022 => src/year2022}/day22/day22.rs (100%) rename {2022 => src/year2022}/day22/test.txt (100%) rename {2022 => src/year2022}/day23/day23.rs (100%) rename {2022 => src/year2022}/day23/test.txt (100%) rename {2022 => src/year2022}/day24/day24.rs (100%) rename {2022 => src/year2022}/day24/demo.txt (100%) rename {2022 => src/year2022}/day24/test.txt (100%) rename {2022 => src/year2022}/day25/day25.py (100%) rename {2022 => src/year2022}/day25/day25.rs (100%) rename {2022 => src/year2022}/day25/test.txt (100%) rename {2022 => src/year2022}/day3/day3.c (100%) rename {2022 => src/year2022}/day3/day3.py (100%) rename {2022 => src/year2022}/day3/day3.rs (100%) rename {2022 => src/year2022}/day3/test.txt (100%) rename {2022 => src/year2022}/day4/day4.py (100%) rename {2022 => src/year2022}/day4/day4.rs (100%) rename {2022 => src/year2022}/day4/test.txt (100%) rename {2022 => src/year2022}/day5/day5.py (100%) rename {2022 => src/year2022}/day5/day5.rs (100%) rename {2022 => src/year2022}/day5/test.txt (100%) rename {2022 => src/year2022}/day6/day6.py (100%) rename {2022 => src/year2022}/day6/day6.rs (100%) rename {2022 => src/year2022}/day6/test.txt (100%) rename {2022 => src/year2022}/day7/day7.py (100%) rename {2022 => src/year2022}/day7/day7.rs (100%) rename {2022 => src/year2022}/day7/test.txt (100%) rename {2022 => src/year2022}/day8/day8.py (100%) rename {2022 => src/year2022}/day8/day8.rs (100%) rename {2022 => src/year2022}/day8/test.txt (100%) rename {2022 => src/year2022}/day9/day9.py (100%) rename {2022 => src/year2022}/day9/day9.rs (100%) rename {2022 => src/year2022}/day9/test.txt (100%) rename {2022 => src/year2022}/day9/test02.txt (100%) rename {2022 => src/year2022}/ocr/ocr.py (100%) rename {2023 => src/year2023}/README.md (100%) rename {2023 => src/year2023}/day1/day1.py (100%) rename {2023 => src/year2023}/day1/day1.rs (100%) rename {2023 => src/year2023}/day1/sample_1.txt (100%) rename {2023 => src/year2023}/day1/sample_2.txt (100%) rename {2023 => src/year2023}/day10/README.md (100%) rename {2023 => src/year2023}/day10/day10.py (100%) rename {2023 => src/year2023}/day10/day10.rs (100%) rename {2023 => src/year2023}/day10/pipemaze.sh (100%) rename {2023 => src/year2023}/day10/test1.png (100%) rename {2023 => src/year2023}/day10/test1.txt (100%) rename {2023 => src/year2023}/day10/test2.png (100%) rename {2023 => src/year2023}/day10/test2.txt (100%) rename {2023 => src/year2023}/day10/test3.png (100%) rename {2023 => src/year2023}/day10/test3.txt (100%) rename {2023 => src/year2023}/day10/test4.png (100%) rename {2023 => src/year2023}/day10/test4.txt (100%) rename {2023 => src/year2023}/day10/test5.png (100%) rename {2023 => src/year2023}/day10/test5.txt (100%) rename {2023 => src/year2023}/day10/test6.png (100%) rename {2023 => src/year2023}/day10/test6.txt (100%) rename {2023 => src/year2023}/day11/day11.rs (100%) rename {2023 => src/year2023}/day11/test.txt (100%) rename {2023 => src/year2023}/day12/day12.rs (100%) rename {2023 => src/year2023}/day12/test.txt (100%) rename {2023 => src/year2023}/day13/day13.rs (100%) rename {2023 => src/year2023}/day13/test.txt (100%) rename {2023 => src/year2023}/day14/day14.rs (100%) rename {2023 => src/year2023}/day14/test.txt (100%) rename {2023 => src/year2023}/day15/day15.rs (100%) rename {2023 => src/year2023}/day15/test.txt (100%) rename {2023 => src/year2023}/day16/day16.py (100%) rename {2023 => src/year2023}/day16/day16.rs (100%) rename {2023 => src/year2023}/day16/test.txt (100%) rename {2023 => src/year2023}/day17/day17.rs (100%) rename {2023 => src/year2023}/day17/test.txt (100%) rename {2023 => src/year2023}/day17/test2.txt (100%) rename {2023 => src/year2023}/day18/day18.rs (100%) rename {2023 => src/year2023}/day18/test.txt (100%) rename {2023 => src/year2023}/day19/day19.rs (100%) rename {2023 => src/year2023}/day19/test.txt (100%) rename {2023 => src/year2023}/day2/day2.py (100%) rename {2023 => src/year2023}/day2/day2.rs (100%) rename {2023 => src/year2023}/day2/test.txt (100%) rename {2023 => src/year2023}/day20/day20.rs (100%) rename {2023 => src/year2023}/day20/test.txt (100%) rename {2023 => src/year2023}/day20/test2.txt (100%) rename {2023 => src/year2023}/day21/day21.rs (100%) rename {2023 => src/year2023}/day21/test.txt (100%) rename {2023 => src/year2023}/day22/day22.rs (100%) rename {2023 => src/year2023}/day22/test.txt (100%) rename {2023 => src/year2023}/day23/day23.rs (100%) rename {2023 => src/year2023}/day23/naive_part2.c (100%) rename {2023 => src/year2023}/day23/test.txt (100%) rename {2024/day13_z3 => src/year2023/day24}/build.rs (100%) rename {2023 => src/year2023}/day24/day24.py (100%) rename {2023 => src/year2023}/day24/day24.rs (100%) rename {2023 => src/year2023}/day24/test.txt (100%) rename {2023 => src/year2023}/day25/day25.py (100%) rename {2023 => src/year2023}/day25/day25.rs (100%) rename {2023 => src/year2023}/day25/test.txt (100%) rename {2023 => src/year2023}/day3/day3.py (100%) rename {2023 => src/year2023}/day3/day3.rs (100%) rename {2023 => src/year2023}/day3/test.txt (100%) rename {2023 => src/year2023}/day4/day4.py (100%) rename {2023 => src/year2023}/day4/day4.rs (100%) rename {2023 => src/year2023}/day4/test.txt (100%) rename {2023 => src/year2023}/day5/day5.rs (100%) rename {2023 => src/year2023}/day5/day5_bruteforce.py (100%) rename {2023 => src/year2023}/day5/test.txt (100%) rename {2023 => src/year2023}/day6/day6.py (100%) rename {2023 => src/year2023}/day6/day6.rs (100%) rename {2023 => src/year2023}/day6/test.txt (100%) rename {2023 => src/year2023}/day7/day7.rs (100%) rename {2023 => src/year2023}/day7/test.txt (100%) rename {2023 => src/year2023}/day8/day8.rs (100%) rename {2023 => src/year2023}/day8/test1.txt (100%) rename {2023 => src/year2023}/day8/test2.txt (100%) rename {2023 => src/year2023}/day9/day9.py (100%) rename {2023 => src/year2023}/day9/day9.rs (100%) rename {2023 => src/year2023}/day9/test.txt (100%) rename {2024 => src/year2024}/README.md (100%) rename {2024 => src/year2024}/day1/day1.c (100%) rename {2024 => src/year2024}/day1/day1.cpp (100%) rename {2024 => src/year2024}/day1/day1.cs (100%) rename {2024 => src/year2024}/day1/day1.go (100%) rename {2024 => src/year2024}/day1/day1.java (100%) rename {2024 => src/year2024}/day1/day1.js (100%) rename {2024 => src/year2024}/day1/day1.kernel/Makefile (100%) rename {2024 => src/year2024}/day1/day1.kernel/README.md (100%) rename {2024 => src/year2024}/day1/day1.kernel/aoc.c (100%) rename {2024 => src/year2024}/day1/day1.kernel/aoc.sh (100%) rename {2024 => src/year2024}/day1/day1.kernel/kaoc.png (100%) rename {2024 => src/year2024}/day1/day1.lua (100%) rename {2024 => src/year2024}/day1/day1.pl (100%) rename {2024 => src/year2024}/day1/day1.py (100%) rename {2024 => src/year2024}/day1/day1.rb (100%) rename {2024 => src/year2024}/day1/day1.rs (100%) rename {2024 => src/year2024}/day1/day1.sh (100%) rename {2024 => src/year2024}/day1/day1.sql (100%) rename {2024 => src/year2024}/day1/day1.swift (100%) rename {2024 => src/year2024}/day1/test.txt (100%) rename {2024 => src/year2024}/day10/day10.rs (100%) rename {2024 => src/year2024}/day10/sample_1.txt (100%) rename {2024 => src/year2024}/day10/sample_10.txt (100%) rename {2024 => src/year2024}/day10/sample_2.txt (100%) rename {2024 => src/year2024}/day10/sample_3.txt (100%) rename {2024 => src/year2024}/day10/sample_4.txt (100%) rename {2024 => src/year2024}/day10/sample_5.txt (100%) rename {2024 => src/year2024}/day10/sample_6.txt (100%) rename {2024 => src/year2024}/day10/sample_8.txt (100%) rename {2024 => src/year2024}/day10/sample_9.txt (100%) rename {2024 => src/year2024}/day11/day11.go (100%) rename {2024 => src/year2024}/day11/day11.rs (100%) rename {2024 => src/year2024}/day11/test.txt (100%) rename {2024 => src/year2024}/day12/day12.rs (100%) rename {2024 => src/year2024}/day12/sample_1.txt (100%) rename {2024 => src/year2024}/day12/sample_3.txt (100%) rename {2024 => src/year2024}/day12/sample_4.txt (100%) rename {2024 => src/year2024}/day12/sample_6.txt (100%) rename {2024 => src/year2024}/day12/sample_7.txt (100%) rename {2024 => src/year2024}/day13/day13.rs (100%) rename {2024 => src/year2024}/day13/test.txt (100%) rename {one => src/year2024/day13_z3}/build.rs (100%) rename {2024 => src/year2024}/day13_z3/day13.py (100%) rename {2024 => src/year2024}/day13_z3/day13.rs (100%) rename {2024 => src/year2024}/day13_z3/test.txt (100%) rename {2024 => src/year2024}/day14/README.md (100%) rename {2024 => src/year2024}/day14/christmastree.gif (100%) rename {2024 => src/year2024}/day14/day14.py (100%) rename {2024 => src/year2024}/day14/day14.rs (100%) rename {2024 => src/year2024}/day14/easteregg.py (100%) rename {2024 => src/year2024}/day14/easteregg_anim.sh (100%) rename {2024 => src/year2024}/day14/test.txt (100%) rename {2024 => src/year2024}/day15/README.md (100%) rename {2024 => src/year2024}/day15/anim.sh (100%) rename {2024 => src/year2024}/day15/day15.rs (100%) rename {2024 => src/year2024}/day15/large1.gif (100%) rename {2024 => src/year2024}/day15/large2.gif (100%) rename {2024 => src/year2024}/day15/sample_1.txt (100%) rename {2024 => src/year2024}/day15/sample_2.txt (100%) rename {2024 => src/year2024}/day15/small1.gif (100%) rename {2024 => src/year2024}/day15/small2.gif (100%) rename {2024 => src/year2024}/day16/README.md (100%) rename {2024 => src/year2024}/day16/anim.gif (100%) rename {2024 => src/year2024}/day16/anim.sh (100%) rename {2024 => src/year2024}/day16/day16.rs (100%) rename {2024 => src/year2024}/day16/sample_1.txt (100%) rename {2024 => src/year2024}/day16/sample_3.txt (100%) rename {2024 => src/year2024}/day17/day17.rs (100%) rename {2024 => src/year2024}/day17/sample_1.txt (100%) rename {2024 => src/year2024}/day17/sample_2.txt (100%) rename {2024 => src/year2024}/day18/day18.cpp (100%) rename {2024 => src/year2024}/day18/day18.go (100%) rename {2024 => src/year2024}/day18/day18.rs (100%) rename {2024 => src/year2024}/day18/sample_1.txt (100%) rename {2024 => src/year2024}/day19/day19.rs (100%) rename {2024 => src/year2024}/day19/test.txt (100%) rename {2024 => src/year2024}/day2/day2.go (100%) rename {2024 => src/year2024}/day2/day2.py (100%) rename {2024 => src/year2024}/day2/day2.rs (100%) rename {2024 => src/year2024}/day2/test.txt (100%) rename {2024 => src/year2024}/day20/day20.rs (100%) rename {2024 => src/year2024}/day20/test.txt (100%) rename {2024 => src/year2024}/day21/day21.rs (100%) rename {2024 => src/year2024}/day21/test.txt (100%) rename {2024 => src/year2024}/day22/day22.rs (100%) rename {2024 => src/year2024}/day22/test.txt (100%) rename {2024 => src/year2024}/day23/day23.py (100%) rename {2024 => src/year2024}/day23/day23.rs (100%) rename {2024 => src/year2024}/day23/test.txt (100%) rename {2024 => src/year2024}/day24/day24.rs (100%) rename {2024 => src/year2024}/day24/full_adder.png (100%) rename {2024 => src/year2024}/day24/half_adder.png (100%) rename {2024 => src/year2024}/day24/sample_1.txt (100%) rename {2024 => src/year2024}/day24/sample_2.txt (100%) rename {2024 => src/year2024}/day25/day25.go (100%) rename {2024 => src/year2024}/day25/day25.py (100%) rename {2024 => src/year2024}/day25/day25.rs (100%) rename {2024 => src/year2024}/day25/test.txt (100%) rename {2024 => src/year2024}/day3/day3.go (100%) rename {2024 => src/year2024}/day3/day3.pl (100%) rename {2024 => src/year2024}/day3/day3.py (100%) rename {2024 => src/year2024}/day3/day3.rs (100%) rename {2024 => src/year2024}/day3/sample_1.txt (100%) rename {2024 => src/year2024}/day3/sample_2.txt (100%) rename {2024 => src/year2024}/day4/day4.py (100%) rename {2024 => src/year2024}/day4/day4.rs (100%) rename {2024 => src/year2024}/day4/sample_1.txt (100%) rename {2024 => src/year2024}/day4/sample_2.txt (100%) rename {2024 => src/year2024}/day4/sample_3.txt (100%) rename {2024 => src/year2024}/day4/sample_4.txt (100%) rename {2024 => src/year2024}/day4/sample_5.txt (100%) rename {2024 => src/year2024}/day5/day5.rs (100%) rename {2024 => src/year2024}/day5/test.txt (100%) rename {2024 => src/year2024}/day6/day6.rs (100%) rename {2024 => src/year2024}/day6/test.txt (100%) rename {2024 => src/year2024}/day7/day7.go (100%) rename {2024 => src/year2024}/day7/day7.py (99%) rename {2024 => src/year2024}/day7/day7.rs (100%) rename {2024 => src/year2024}/day7/test.txt (100%) rename {2024 => src/year2024}/day8/day8.py (100%) rename {2024 => src/year2024}/day8/day8.rs (100%) rename {2024 => src/year2024}/day8/test.txt (100%) rename {2024 => src/year2024}/day9/day9.rs (100%) rename {2024 => src/year2024}/day9/test.txt (100%) diff --git a/2015/Cargo.toml b/2015/Cargo.toml deleted file mode 100644 index e30b2418..00000000 --- a/2015/Cargo.toml +++ /dev/null @@ -1,5 +0,0 @@ -# https://adventofcode.com/2015 - -[workspace] -members = ["day*"] -resolver = "2" diff --git a/2015/day1/Cargo.toml b/2015/day1/Cargo.toml deleted file mode 100644 index bbf40642..00000000 --- a/2015/day1/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day1" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day1" -path = "day1.rs" diff --git a/2015/day10/Cargo.toml b/2015/day10/Cargo.toml deleted file mode 100644 index 0c6b79d5..00000000 --- a/2015/day10/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day10" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day10" -path = "day10.rs" diff --git a/2015/day11/Cargo.toml b/2015/day11/Cargo.toml deleted file mode 100644 index 6f7b3801..00000000 --- a/2015/day11/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day11" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day11" -path = "day11.rs" diff --git a/2015/day12/Cargo.toml b/2015/day12/Cargo.toml deleted file mode 100644 index a387b716..00000000 --- a/2015/day12/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day12" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" -serde_json = "*" - -[[bin]] -name = "day12" -path = "day12.rs" diff --git a/2015/day13/Cargo.toml b/2015/day13/Cargo.toml deleted file mode 100644 index 0116b484..00000000 --- a/2015/day13/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "day13" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" -rustc-hash = "*" -itertools = "*" - -[[bin]] -name = "day13" -path = "day13.rs" diff --git a/2015/day14/Cargo.toml b/2015/day14/Cargo.toml deleted file mode 100644 index 83b818d2..00000000 --- a/2015/day14/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day14" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" - -[[bin]] -name = "day14" -path = "day14.rs" diff --git a/2015/day15/Cargo.toml b/2015/day15/Cargo.toml deleted file mode 100644 index e555ab14..00000000 --- a/2015/day15/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day15" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" - -[[bin]] -name = "day15" -path = "day15.rs" diff --git a/2015/day16/Cargo.toml b/2015/day16/Cargo.toml deleted file mode 100644 index cc47be34..00000000 --- a/2015/day16/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day16" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" -rustc-hash = "*" - -[[bin]] -name = "day16" -path = "day16.rs" diff --git a/2015/day17/Cargo.toml b/2015/day17/Cargo.toml deleted file mode 100644 index 914ae753..00000000 --- a/2015/day17/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day17" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -itertools = "*" -rustc-hash = "*" - -[[bin]] -name = "day17" -path = "day17.rs" diff --git a/2015/day18/Cargo.toml b/2015/day18/Cargo.toml deleted file mode 100644 index 3a0c4bfc..00000000 --- a/2015/day18/Cargo.toml +++ /dev/null @@ -1,16 +0,0 @@ -[package] -name = "day18" -version = "0.1.0" -edition = "2021" - -[features] -ascii = [] -anim = ["image"] - -[dependencies] -aoc = { path = "../../aoc" } -image = { version = "*", optional = true } - -[[bin]] -name = "day18" -path = "day18.rs" diff --git a/2015/day19/Cargo.toml b/2015/day19/Cargo.toml deleted file mode 100644 index c46af131..00000000 --- a/2015/day19/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day19" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day19" -path = "day19.rs" diff --git a/2015/day2/Cargo.toml b/2015/day2/Cargo.toml deleted file mode 100644 index 768b1e4b..00000000 --- a/2015/day2/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day2" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day2" -path = "day2.rs" diff --git a/2015/day20/Cargo.toml b/2015/day20/Cargo.toml deleted file mode 100644 index 4547f15e..00000000 --- a/2015/day20/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day20" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -divisors = "*" - -[[bin]] -name = "day20" -path = "day20.rs" diff --git a/2015/day21/Cargo.toml b/2015/day21/Cargo.toml deleted file mode 100644 index 06a1dbab..00000000 --- a/2015/day21/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day21" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day21" -path = "day21.rs" diff --git a/2015/day22/Cargo.toml b/2015/day22/Cargo.toml deleted file mode 100644 index 8a6b51d4..00000000 --- a/2015/day22/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day22" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -strum = { version = "*", features = ["strum_macros", "derive"] } -strum_macros = "*" - -[[bin]] -name = "day22" -path = "day22.rs" diff --git a/2015/day23/Cargo.toml b/2015/day23/Cargo.toml deleted file mode 100644 index 8a51b172..00000000 --- a/2015/day23/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day23" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day23" -path = "day23.rs" diff --git a/2015/day24/Cargo.toml b/2015/day24/Cargo.toml deleted file mode 100644 index 82a5d728..00000000 --- a/2015/day24/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day24" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -itertools = "*" - -[[bin]] -name = "day24" -path = "day24.rs" diff --git a/2015/day25/Cargo.toml b/2015/day25/Cargo.toml deleted file mode 100644 index 9fd6995b..00000000 --- a/2015/day25/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day25" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day25" -path = "day25.rs" diff --git a/2015/day3/Cargo.toml b/2015/day3/Cargo.toml deleted file mode 100644 index 4f561a74..00000000 --- a/2015/day3/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day3" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day3" -path = "day3.rs" diff --git a/2015/day4/Cargo.toml b/2015/day4/Cargo.toml deleted file mode 100644 index ccc13204..00000000 --- a/2015/day4/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day4" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -md5 = "*" - -[[bin]] -name = "day4" -path = "day4.rs" diff --git a/2015/day5/Cargo.toml b/2015/day5/Cargo.toml deleted file mode 100644 index 64854eb5..00000000 --- a/2015/day5/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day5" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day5" -path = "day5.rs" diff --git a/2015/day6/Cargo.toml b/2015/day6/Cargo.toml deleted file mode 100644 index 4ed5981d..00000000 --- a/2015/day6/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day6" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" - -[[bin]] -name = "day6" -path = "day6.rs" diff --git a/2015/day7/Cargo.toml b/2015/day7/Cargo.toml deleted file mode 100644 index f1450864..00000000 --- a/2015/day7/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day7" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" -rustc-hash = "*" - -[[bin]] -name = "day7" -path = "day7.rs" diff --git a/2015/day8/Cargo.toml b/2015/day8/Cargo.toml deleted file mode 100644 index 63ccc8ce..00000000 --- a/2015/day8/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day8" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day8" -path = "day8.rs" diff --git a/2015/day9/Cargo.toml b/2015/day9/Cargo.toml deleted file mode 100644 index 013a2e89..00000000 --- a/2015/day9/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "day9" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -itertools = "*" -regex = "*" -rustc-hash = "*" - -[[bin]] -name = "day9" -path = "day9.rs" diff --git a/2016/Cargo.toml b/2016/Cargo.toml deleted file mode 100644 index e0828cd5..00000000 --- a/2016/Cargo.toml +++ /dev/null @@ -1,8 +0,0 @@ -# https://adventofcode.com/2016 - -[workspace] -members = ["day*", "assembunny"] -resolver = "2" - -[profile.release] -opt-level = "s" diff --git a/2016/day1/Cargo.toml b/2016/day1/Cargo.toml deleted file mode 100644 index d907473c..00000000 --- a/2016/day1/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day1" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day1" -path = "day1.rs" diff --git a/2016/day10/Cargo.toml b/2016/day10/Cargo.toml deleted file mode 100644 index 1700ce22..00000000 --- a/2016/day10/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day10" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" -rustc-hash = "*" - -[[bin]] -name = "day10" -path = "day10.rs" diff --git a/2016/day11/Cargo.toml b/2016/day11/Cargo.toml deleted file mode 100644 index b546e67b..00000000 --- a/2016/day11/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "day11" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -itertools = "*" -regex = "*" -rustc-hash = "*" - -[[bin]] -name = "day11" -path = "day11.rs" diff --git a/2016/day12/Cargo.toml b/2016/day12/Cargo.toml deleted file mode 100644 index 943459a7..00000000 --- a/2016/day12/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day12" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -assembunny = { path = "../assembunny/" } - -[[bin]] -name = "day12" -path = "day12.rs" diff --git a/2016/day13/Cargo.toml b/2016/day13/Cargo.toml deleted file mode 100644 index f02942c5..00000000 --- a/2016/day13/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day13" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day13" -path = "day13.rs" diff --git a/2016/day14/Cargo.toml b/2016/day14/Cargo.toml deleted file mode 100644 index bc4fa3c3..00000000 --- a/2016/day14/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day14" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -md5 = "*" -rustc-hash = "*" - -[[bin]] -name = "day14" -path = "day14.rs" diff --git a/2016/day15/Cargo.toml b/2016/day15/Cargo.toml deleted file mode 100644 index e555ab14..00000000 --- a/2016/day15/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day15" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" - -[[bin]] -name = "day15" -path = "day15.rs" diff --git a/2016/day16/Cargo.toml b/2016/day16/Cargo.toml deleted file mode 100644 index 4f755eeb..00000000 --- a/2016/day16/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day16" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day16" -path = "day16.rs" diff --git a/2016/day17/Cargo.toml b/2016/day17/Cargo.toml deleted file mode 100644 index 46622276..00000000 --- a/2016/day17/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day17" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -md5 = "*" - -[[bin]] -name = "day17" -path = "day17.rs" diff --git a/2016/day18/Cargo.toml b/2016/day18/Cargo.toml deleted file mode 100644 index 86a98d20..00000000 --- a/2016/day18/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day18" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day18" -path = "day18.rs" diff --git a/2016/day19/Cargo.toml b/2016/day19/Cargo.toml deleted file mode 100644 index 39989142..00000000 --- a/2016/day19/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day19" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day19" -path = "day19.rs" diff --git a/2016/day2/Cargo.toml b/2016/day2/Cargo.toml deleted file mode 100644 index 768b1e4b..00000000 --- a/2016/day2/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day2" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day2" -path = "day2.rs" diff --git a/2016/day20/Cargo.toml b/2016/day20/Cargo.toml deleted file mode 100644 index 613f3064..00000000 --- a/2016/day20/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day20" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day20" -path = "day20.rs" diff --git a/2016/day21/Cargo.toml b/2016/day21/Cargo.toml deleted file mode 100644 index 83581643..00000000 --- a/2016/day21/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day21" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" - -[[bin]] -name = "day21" -path = "day21.rs" diff --git a/2016/day22/Cargo.toml b/2016/day22/Cargo.toml deleted file mode 100644 index 046e465e..00000000 --- a/2016/day22/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day22" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day22" -path = "day22.rs" diff --git a/2016/day23/Cargo.toml b/2016/day23/Cargo.toml deleted file mode 100644 index d1e03d16..00000000 --- a/2016/day23/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day23" -version = "0.1.0" -edition = "2021" - -[dependencies] -assembunny = { path = "../assembunny/" } -aoc = { path = "../../aoc" } -num-traits = "*" - -[[bin]] -name = "day23" -path = "day23.rs" diff --git a/2016/day24/Cargo.toml b/2016/day24/Cargo.toml deleted file mode 100644 index 06cfd2d1..00000000 --- a/2016/day24/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day24" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -itertools = "*" -rustc-hash = "*" - -[[bin]] -name = "day24" -path = "day24.rs" diff --git a/2016/day25/Cargo.toml b/2016/day25/Cargo.toml deleted file mode 100644 index a682ce04..00000000 --- a/2016/day25/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day25" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -assembunny = { path = "../assembunny/" } -num-traits = "*" - -[[bin]] -name = "day25" -path = "day25.rs" diff --git a/2016/day3/Cargo.toml b/2016/day3/Cargo.toml deleted file mode 100644 index bea419dd..00000000 --- a/2016/day3/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day3" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -itertools = "*" - -[[bin]] -name = "day3" -path = "day3.rs" diff --git a/2016/day4/Cargo.toml b/2016/day4/Cargo.toml deleted file mode 100644 index 11ce32a0..00000000 --- a/2016/day4/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "day4" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" -lazy_static = "*" -rustc-hash = "*" - -[[bin]] -name = "day4" -path = "day4.rs" diff --git a/2016/day5/Cargo.toml b/2016/day5/Cargo.toml deleted file mode 100644 index 359b2408..00000000 --- a/2016/day5/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day5" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -md5 = "*" -indicatif = "*" - -[[bin]] -name = "day5" -path = "day5.rs" diff --git a/2016/day6/Cargo.toml b/2016/day6/Cargo.toml deleted file mode 100644 index 0c1a3cb7..00000000 --- a/2016/day6/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day6" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day6" -path = "day6.rs" diff --git a/2016/day7/Cargo.toml b/2016/day7/Cargo.toml deleted file mode 100644 index ed2e3f98..00000000 --- a/2016/day7/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day7" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day7" -path = "day7.rs" diff --git a/2016/day8/Cargo.toml b/2016/day8/Cargo.toml deleted file mode 100644 index df330ad3..00000000 --- a/2016/day8/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day8" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" - -[[bin]] -name = "day8" -path = "day8.rs" diff --git a/2016/day9/Cargo.toml b/2016/day9/Cargo.toml deleted file mode 100644 index 4c086fa8..00000000 --- a/2016/day9/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day9" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day9" -path = "day9.rs" diff --git a/2017/Cargo.toml b/2017/Cargo.toml deleted file mode 100644 index 6cc30904..00000000 --- a/2017/Cargo.toml +++ /dev/null @@ -1,5 +0,0 @@ -# https://adventofcode.com/2017 - -[workspace] -members = ["day*"] -resolver = "2" diff --git a/2017/day1/Cargo.toml b/2017/day1/Cargo.toml deleted file mode 100644 index bbf40642..00000000 --- a/2017/day1/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day1" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day1" -path = "day1.rs" diff --git a/2017/day10/Cargo.toml b/2017/day10/Cargo.toml deleted file mode 100644 index 1627df73..00000000 --- a/2017/day10/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "day10" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day10" -path = "day10.rs" - -# [lib] -# path = "lib.rs" \ No newline at end of file diff --git a/2017/day11/Cargo.toml b/2017/day11/Cargo.toml deleted file mode 100644 index 6f7b3801..00000000 --- a/2017/day11/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day11" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day11" -path = "day11.rs" diff --git a/2017/day12/Cargo.toml b/2017/day12/Cargo.toml deleted file mode 100644 index 8be331ad..00000000 --- a/2017/day12/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day12" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day12" -path = "day12.rs" diff --git a/2017/day13/Cargo.toml b/2017/day13/Cargo.toml deleted file mode 100644 index f02942c5..00000000 --- a/2017/day13/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day13" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day13" -path = "day13.rs" diff --git a/2017/day14/Cargo.toml b/2017/day14/Cargo.toml deleted file mode 100644 index b21cf887..00000000 --- a/2017/day14/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day14" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day14" -path = "day14.rs" diff --git a/2017/day15/Cargo.toml b/2017/day15/Cargo.toml deleted file mode 100644 index 46c03c2c..00000000 --- a/2017/day15/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day15" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day15" -path = "day15.rs" diff --git a/2017/day16/Cargo.toml b/2017/day16/Cargo.toml deleted file mode 100644 index 4f755eeb..00000000 --- a/2017/day16/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day16" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day16" -path = "day16.rs" diff --git a/2017/day17/Cargo.toml b/2017/day17/Cargo.toml deleted file mode 100644 index 17cc3676..00000000 --- a/2017/day17/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day17" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day17" -path = "day17.rs" diff --git a/2017/day18/Cargo.toml b/2017/day18/Cargo.toml deleted file mode 100644 index b5aa9822..00000000 --- a/2017/day18/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day18" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day18" -path = "day18.rs" diff --git a/2017/day19/Cargo.toml b/2017/day19/Cargo.toml deleted file mode 100644 index 39989142..00000000 --- a/2017/day19/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day19" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day19" -path = "day19.rs" diff --git a/2017/day2/Cargo.toml b/2017/day2/Cargo.toml deleted file mode 100644 index 768b1e4b..00000000 --- a/2017/day2/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day2" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day2" -path = "day2.rs" diff --git a/2017/day20/Cargo.toml b/2017/day20/Cargo.toml deleted file mode 100644 index 03a48bb9..00000000 --- a/2017/day20/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day20" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" -rustc-hash = "*" - -[[bin]] -name = "day20" -path = "day20.rs" diff --git a/2017/day21/Cargo.toml b/2017/day21/Cargo.toml deleted file mode 100644 index 384cf73d..00000000 --- a/2017/day21/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day21" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -bytecount = "*" -rustc-hash = "*" - -[[bin]] -name = "day21" -path = "day21.rs" diff --git a/2017/day22/Cargo.toml b/2017/day22/Cargo.toml deleted file mode 100644 index 046e465e..00000000 --- a/2017/day22/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day22" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day22" -path = "day22.rs" diff --git a/2017/day23/Cargo.toml b/2017/day23/Cargo.toml deleted file mode 100644 index a8ac5bf9..00000000 --- a/2017/day23/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day23" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day23" -path = "day23.rs" diff --git a/2017/day24/Cargo.toml b/2017/day24/Cargo.toml deleted file mode 100644 index 69504340..00000000 --- a/2017/day24/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day24" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day24" -path = "day24.rs" diff --git a/2017/day25/Cargo.toml b/2017/day25/Cargo.toml deleted file mode 100644 index 7275a50e..00000000 --- a/2017/day25/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day25" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day25" -path = "day25.rs" diff --git a/2017/day3/Cargo.toml b/2017/day3/Cargo.toml deleted file mode 100644 index 985edff0..00000000 --- a/2017/day3/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day3" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day3" -path = "day3.rs" diff --git a/2017/day4/Cargo.toml b/2017/day4/Cargo.toml deleted file mode 100644 index a83fc9cd..00000000 --- a/2017/day4/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day4" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day4" -path = "day4.rs" diff --git a/2017/day5/Cargo.toml b/2017/day5/Cargo.toml deleted file mode 100644 index 64854eb5..00000000 --- a/2017/day5/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day5" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day5" -path = "day5.rs" diff --git a/2017/day6/Cargo.toml b/2017/day6/Cargo.toml deleted file mode 100644 index 54bf4c71..00000000 --- a/2017/day6/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day6" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day6" -path = "day6.rs" diff --git a/2017/day7/Cargo.toml b/2017/day7/Cargo.toml deleted file mode 100644 index f1450864..00000000 --- a/2017/day7/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day7" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" -rustc-hash = "*" - -[[bin]] -name = "day7" -path = "day7.rs" diff --git a/2017/day8/Cargo.toml b/2017/day8/Cargo.toml deleted file mode 100644 index c36bf38a..00000000 --- a/2017/day8/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "day8" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -pest = { version = "*", default-features = false } -pest_derive = { version = "*", default-features = true } -rustc-hash = "*" - -[[bin]] -name = "day8" -path = "day8.rs" diff --git a/2017/day9/Cargo.toml b/2017/day9/Cargo.toml deleted file mode 100644 index 4c086fa8..00000000 --- a/2017/day9/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day9" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day9" -path = "day9.rs" diff --git a/2018/Cargo.toml b/2018/Cargo.toml deleted file mode 100644 index c6966bdf..00000000 --- a/2018/Cargo.toml +++ /dev/null @@ -1,5 +0,0 @@ -# https://adventofcode.com/2018 - -[workspace] -members = ["day*"] -resolver = "2" diff --git a/2018/day1/Cargo.toml b/2018/day1/Cargo.toml deleted file mode 100644 index d907473c..00000000 --- a/2018/day1/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day1" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day1" -path = "day1.rs" diff --git a/2018/day10/Cargo.toml b/2018/day10/Cargo.toml deleted file mode 100644 index 0c6b79d5..00000000 --- a/2018/day10/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day10" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day10" -path = "day10.rs" diff --git a/2018/day11/Cargo.toml b/2018/day11/Cargo.toml deleted file mode 100644 index 6f7b3801..00000000 --- a/2018/day11/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day11" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day11" -path = "day11.rs" diff --git a/2018/day12/Cargo.toml b/2018/day12/Cargo.toml deleted file mode 100644 index 8be331ad..00000000 --- a/2018/day12/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day12" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day12" -path = "day12.rs" diff --git a/2018/day13/Cargo.toml b/2018/day13/Cargo.toml deleted file mode 100644 index f02942c5..00000000 --- a/2018/day13/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day13" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day13" -path = "day13.rs" diff --git a/2018/day14/Cargo.toml b/2018/day14/Cargo.toml deleted file mode 100644 index b21cf887..00000000 --- a/2018/day14/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day14" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day14" -path = "day14.rs" diff --git a/2018/day15/Cargo.toml b/2018/day15/Cargo.toml deleted file mode 100644 index 0cbdff01..00000000 --- a/2018/day15/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day15" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day15" -path = "day15.rs" diff --git a/2018/day16/Cargo.toml b/2018/day16/Cargo.toml deleted file mode 100644 index 3b422d4f..00000000 --- a/2018/day16/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day16" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -itertools = "*" -rustc-hash = "*" - -[[bin]] -name = "day16" -path = "day16.rs" diff --git a/2018/day17/Cargo.toml b/2018/day17/Cargo.toml deleted file mode 100644 index 770e2f00..00000000 --- a/2018/day17/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day17" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -nom = "*" -rustc-hash = "*" - -[[bin]] -name = "day17" -path = "day17.rs" diff --git a/2018/day18/Cargo.toml b/2018/day18/Cargo.toml deleted file mode 100644 index b5aa9822..00000000 --- a/2018/day18/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day18" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day18" -path = "day18.rs" diff --git a/2018/day19/Cargo.toml b/2018/day19/Cargo.toml deleted file mode 100644 index 39989142..00000000 --- a/2018/day19/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day19" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day19" -path = "day19.rs" diff --git a/2018/day2/Cargo.toml b/2018/day2/Cargo.toml deleted file mode 100644 index 768b1e4b..00000000 --- a/2018/day2/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day2" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day2" -path = "day2.rs" diff --git a/2018/day20/Cargo.toml b/2018/day20/Cargo.toml deleted file mode 100644 index 7870325e..00000000 --- a/2018/day20/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day20" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day20" -path = "day20.rs" diff --git a/2018/day21/Cargo.toml b/2018/day21/Cargo.toml deleted file mode 100644 index a85a420a..00000000 --- a/2018/day21/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day21" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day21" -path = "day21.rs" diff --git a/2018/day22/Cargo.toml b/2018/day22/Cargo.toml deleted file mode 100644 index 046e465e..00000000 --- a/2018/day22/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day22" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day22" -path = "day22.rs" diff --git a/2018/day23/Cargo.toml b/2018/day23/Cargo.toml deleted file mode 100644 index 9f75d345..00000000 --- a/2018/day23/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day23" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" - - -[[bin]] -name = "day23" -path = "day23.rs" diff --git a/2018/day23_z3/Cargo.toml b/2018/day23_z3/Cargo.toml deleted file mode 100644 index ee9f649e..00000000 --- a/2018/day23_z3/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day23_z3" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" -z3 = "*" - -[[bin]] -name = "day23_z3" -path = "day23.rs" diff --git a/2018/day24/Cargo.toml b/2018/day24/Cargo.toml deleted file mode 100644 index eec9b882..00000000 --- a/2018/day24/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day24" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" - -[[bin]] -name = "day24" -path = "day24.rs" diff --git a/2018/day24/army.rs b/2018/day24/army.rs deleted file mode 100644 index bae55ed0..00000000 --- a/2018/day24/army.rs +++ /dev/null @@ -1,104 +0,0 @@ -use std::ops::AddAssign; - -use super::group::Fight; -use super::group::Group; - -#[derive(Debug, Clone)] -pub struct Army { - name: String, - groups: Vec, -} - -impl Army { - #[must_use] - pub const fn new() -> Self { - Self { - name: String::new(), - groups: vec![], - } - } -} - -impl Default for Army { - fn default() -> Self { - Self::new() - } -} - -impl std::str::FromStr for Army { - type Err = Box; - - fn from_str(s: &str) -> Result { - let mut a = Self::new(); - let mut id = 0; - - for line in s.lines() { - if let Some(line) = line.strip_suffix(':') { - a.name = line.to_string(); - } else { - let mut g: Group = line.parse()?; - id.add_assign(1); - g.set_id(&a.name, id); - a.groups.push(g); - } - } - - Ok(a) - } -} - -impl Army { - pub fn set_boost(&mut self, boost: u32) { - for group in &mut self.groups { - group.set_boost(boost); - } - } - - #[must_use] - pub fn is_alive(&self) -> bool { - self.groups.iter().any(Group::is_alive) - } - - #[must_use] - pub fn alive_units(&self) -> u32 { - self.groups.iter().map(Group::alive_units).sum() - } - - #[must_use] - pub fn select_fights<'a>(&'a self, other: &'a Self) -> Vec> { - let mut fights: Vec> = vec![]; - - let mut attackers = self.alive_groups(); - let mut targets = other.alive_groups(); - - // sort by effective power then initiative - attackers.sort_unstable(); - - for attacker in &attackers { - if let Some(i) = attacker.select_target(&targets) { - fights.push(Fight { - attacker, - opponent: targets[i], - }); - - targets.remove(i); - } - } - - fights - } - - #[must_use] - pub fn alive_groups(&self) -> Vec<&Group> { - self.groups.iter().filter(|g| g.is_alive()).collect() - } -} - -impl std::fmt::Display for Army { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - for g in &self.groups { - writeln!(f, "{g}")?; - } - Ok(()) - } -} diff --git a/2018/day24/attacktype.rs b/2018/day24/attacktype.rs deleted file mode 100644 index 21f70f7b..00000000 --- a/2018/day24/attacktype.rs +++ /dev/null @@ -1,25 +0,0 @@ -use std::string::ParseError; - -/// Kind of attacks. Units can deal damage with these attacks, can be immune or weak. -#[derive(PartialEq, Eq, Debug, Clone)] -pub enum AttackType { - Fire, - Radiation, - Slashing, - Bludgeoning, - Cold, -} - -impl std::str::FromStr for AttackType { - type Err = ParseError; - fn from_str(s: &str) -> Result { - Ok(match s { - "fire" => Self::Fire, - "radiation" => Self::Radiation, - "slashing" => Self::Slashing, - "bludgeoning" => Self::Bludgeoning, - "cold" => Self::Cold, - _ => panic!(), - }) - } -} diff --git a/2018/day24/combat.rs b/2018/day24/combat.rs deleted file mode 100644 index 2644ff17..00000000 --- a/2018/day24/combat.rs +++ /dev/null @@ -1,86 +0,0 @@ -use super::army::Army; - -const MAX_FIGHTS: usize = 10000; - -#[derive(Clone)] -pub struct Combat { - army1: Army, - army2: Army, -} - -impl Default for Combat { - fn default() -> Self { - Self::new() - } -} - -impl Combat { - #[must_use] - pub const fn new() -> Self { - Self { - army1: Army::new(), - army2: Army::new(), - } - } - - #[must_use] - pub const fn with_armies(army1: Army, army2: Army) -> Self { - Self { army1, army2 } - } - - pub fn set_army1_boost(&mut self, boost: u32) { - self.army1.set_boost(boost); - } - - #[must_use] - pub fn immune_alive_units(&self) -> u32 { - self.army1.alive_units() - } - - #[must_use] - pub fn infection_alive_units(&self) -> u32 { - self.army2.alive_units() - } - - #[must_use] - pub fn fight_to_death(&self) -> u32 { - for _ in 0..MAX_FIGHTS { - if let Some(winner) = self.fight() { - return winner.alive_units(); - } - } - 0 - } - - /// # Panics - /// si both armies are alive - #[must_use] - pub fn fight(&self) -> Option<&Army> { - let mut fights = self.army1.select_fights(&self.army2); - fights.extend(self.army2.select_fights(&self.army1)); - - // sort by initiative, greater first - fights.sort_unstable(); - - for f in &fights { - f.fight(); - } - - assert!(self.army1.is_alive() || self.army2.is_alive()); - - if !self.army1.is_alive() { - Some(&self.army2) - } else if !self.army2.is_alive() { - Some(&self.army1) - } else { - None - } - } -} - -impl std::fmt::Display for Combat { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{}", self.army1)?; - write!(f, "{}", self.army2) - } -} diff --git a/2018/day24/group.rs b/2018/day24/group.rs deleted file mode 100644 index 94aa4b32..00000000 --- a/2018/day24/group.rs +++ /dev/null @@ -1,262 +0,0 @@ -use regex::Regex; -use std::cell::Cell; -use std::error::Error; - -use super::attacktype::AttackType; - -// __ -// /__.__ ._ -// \_||(_)|_||_) -// | - -/// A group of soldiers. Each unit shares the same number of hit points, has the same immunities and weaknesses, and deals the same damage. -/// The initiative is the unit's preferred rank for attacking. -#[derive(Debug, Clone)] -pub struct Group { - army: String, - id: u32, - num_units: Cell, - hp: u32, - immunities: Vec, - weaknesses: Vec, - damage: u32, - damage_type: AttackType, - initiative: u32, -} - -impl std::str::FromStr for Group { - type Err = Box; - - fn from_str(s: &str) -> Result { - let re = Regex::new(r"^(\d+) units each with (\d+) hit points( \(.+\))? with an attack that does (\d+) (\w+) damage at initiative (\d+)$").unwrap(); - - let m = re.captures(s).ok_or("cannot parse line")?; - - let mut g = Self { - army: String::new(), - id: 0, - num_units: Cell::new(m[1].parse()?), - hp: m[2].parse()?, - immunities: vec![], - weaknesses: vec![], - damage: m[4].parse()?, - damage_type: m[5].parse()?, - initiative: m[6].parse()?, - }; - - if let Some(s) = m.get(3) { - for s in s - .as_str() - .strip_prefix(" (") - .ok_or("missing (")? - .strip_suffix(')') - .ok_or("missing )")? - .split(';') - { - let s = s.trim_start(); - - if let Some(weak) = s.strip_prefix("weak to ") { - g.weaknesses = weak.split(", ").map(|s| s.parse().unwrap()).collect(); - } else if let Some(immune) = s.strip_prefix("immune to ") { - g.immunities = immune.split(", ").map(|s| s.parse().unwrap()).collect(); - } else { - return Err("bad input".into()); - } - } - } - - Ok(g) - } -} - -impl std::fmt::Display for Group { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!( - f, - "{}#{:X} ({} hp {} dmg {} {:?})", - self.army, - self.id, - self.num_units.get(), - self.hp, - self.damage, - self.damage_type - ) - } -} - -impl Group { - pub fn set_id(&mut self, army: &str, id: u32) { - self.army = army.to_string(); - self.id = id; - } - - #[allow(dead_code)] - pub fn abbrev(&self) -> String { - if self.army == "Infection" { - format!("i{}", self.id) - } else { - format!("u{}", self.id) - } - } - - pub fn set_boost(&mut self, boost: u32) { - self.damage += boost; - } - - pub fn alive_units(&self) -> u32 { - self.num_units.get() - } - - pub fn is_alive(&self) -> bool { - self.num_units.get() != 0 - } - - fn effective_power(&self) -> u32 { - self.num_units.get() * self.damage - } - - fn is_immune(&self, attack: &AttackType) -> bool { - self.immunities.contains(attack) - } - - fn is_weak(&self, attack: &AttackType) -> bool { - self.weaknesses.contains(attack) - } - - pub fn attack_damage(&self, other: &Self) -> u32 { - if other.is_immune(&self.damage_type) { - return 0; - } - - let damage = self.effective_power(); - if other.is_weak(&self.damage_type) { - damage * 2 - } else { - damage - } - } - - fn take_damage(&self, damage: u32) { - let units_lost = damage / self.hp; - let old = self.num_units.get(); - self.num_units.set(old.saturating_sub(units_lost)); - } - - pub fn select_target(&self, others: &[&Self]) -> Option { - // filter with - // - alive units - // - can deal damage - // sort by - // - damage - // - effective power - // - initiative - - let target = others - .iter() - .enumerate() - .filter(|(_, &other)| other.is_alive() && self.attack_damage(other) != 0) - .max_by_key(|(_, &other)| { - ( - self.attack_damage(other), - other.effective_power(), - other.initiative, - ) - }) - .map(|(i, _)| i); - - target - } -} - -impl PartialOrd for Group { - fn partial_cmp(&self, other: &Self) -> Option { - Some(self.cmp(other)) - } -} - -impl Ord for Group { - fn cmp(&self, other: &Self) -> std::cmp::Ordering { - self.effective_power() - .cmp(&other.effective_power()) - .reverse() - .then(self.initiative.cmp(&other.initiative).reverse()) - } -} - -impl PartialEq for Group { - fn eq(&self, other: &Self) -> bool { - self.effective_power().eq(&other.effective_power()) && self.initiative.eq(&other.initiative) - } -} - -impl Eq for Group {} - -// _ -// |_o _ |__|_ -// | |(_|| ||_ -// _| - -pub struct Fight<'a> { - pub attacker: &'a Group, - pub opponent: &'a Group, -} - -impl Fight<'_> { - pub fn fight(&self) { - if self.attacker.is_alive() { - let damage = self.attacker.attack_damage(self.opponent); - self.opponent.take_damage(damage); - } - } -} - -impl PartialOrd for Fight<'_> { - fn partial_cmp(&self, other: &Self) -> Option { - Some(self.cmp(other)) - } -} - -impl Ord for Fight<'_> { - fn cmp(&self, other: &Self) -> std::cmp::Ordering { - self.attacker - .initiative - .cmp(&other.attacker.initiative) - .reverse() - } -} - -impl PartialEq for Fight<'_> { - fn eq(&self, other: &Self) -> bool { - self.attacker.initiative.eq(&other.attacker.initiative) - } -} - -impl Eq for Fight<'_> {} - -#[cfg(test)] -mod test { - use super::*; - - #[test] - fn test_group() { - let g1: Group = "17 units each with 5390 hit points (weak to radiation, bludgeoning) with an attack that does 4507 fire damage at initiative 2".parse().unwrap(); - let g2: Group = "989 units each with 1274 hit points (immune to fire; weak to bludgeoning, slashing) with an attack that does 25 slashing damage at initiative 3".parse().unwrap(); - let g3: Group = "801 units each with 4706 hit points (weak to radiation) with an attack that does 116 bludgeoning damage at initiative 1".parse().unwrap(); - let g4: Group = "4485 units each with 2961 hit points (immune to radiation; weak to fire, cold) with an attack that does 12 slashing damage at initiative 4".parse().unwrap(); - - assert!(g1.is_alive()); - assert!(g2.is_alive()); - assert!(g3.is_alive()); - assert!(g4.is_alive()); - - assert_eq!(g1.effective_power(), 17 * 4507); - - assert_eq!(g1.attack_damage(&g2), 0); // g1 deals fire damage but g2 is immune to fire - assert_eq!(g1.attack_damage(&g3), 4507 * 17); // g3 - assert_eq!(g1.attack_damage(&g4), 2 * 4507 * 17); // g4 is weak to fire, damage are doubled - - let others = [&g2, &g3, &g4]; - let target = g1.select_target(&others); - assert_eq!(target, Some(2)); - } -} diff --git a/2018/day25/Cargo.toml b/2018/day25/Cargo.toml deleted file mode 100644 index 2fd9f876..00000000 --- a/2018/day25/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day25" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustworkx-core = "*" - -[[bin]] -name = "day25" -path = "day25.rs" diff --git a/2018/day3/Cargo.toml b/2018/day3/Cargo.toml deleted file mode 100644 index 5ad3a759..00000000 --- a/2018/day3/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day3" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" -rustc-hash = "*" - -[[bin]] -name = "day3" -path = "day3.rs" diff --git a/2018/day4/Cargo.toml b/2018/day4/Cargo.toml deleted file mode 100644 index a83fc9cd..00000000 --- a/2018/day4/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day4" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day4" -path = "day4.rs" diff --git a/2018/day5/Cargo.toml b/2018/day5/Cargo.toml deleted file mode 100644 index 64854eb5..00000000 --- a/2018/day5/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day5" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day5" -path = "day5.rs" diff --git a/2018/day6/Cargo.toml b/2018/day6/Cargo.toml deleted file mode 100644 index 54bf4c71..00000000 --- a/2018/day6/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day6" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day6" -path = "day6.rs" diff --git a/2018/day7/Cargo.toml b/2018/day7/Cargo.toml deleted file mode 100644 index ed2e3f98..00000000 --- a/2018/day7/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day7" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day7" -path = "day7.rs" diff --git a/2018/day8/Cargo.toml b/2018/day8/Cargo.toml deleted file mode 100644 index 63ccc8ce..00000000 --- a/2018/day8/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day8" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day8" -path = "day8.rs" diff --git a/2018/day9/Cargo.toml b/2018/day9/Cargo.toml deleted file mode 100644 index 01a7aa09..00000000 --- a/2018/day9/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day9" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "2.1.0" - -[[bin]] -name = "day9" -path = "day9.rs" diff --git a/2018/day9_c/Cargo.toml b/2018/day9_c/Cargo.toml deleted file mode 100644 index c9125d2e..00000000 --- a/2018/day9_c/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "day9_c" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[build-dependencies] -cc = "*" - -[[bin]] -name = "day9_c" -path = "day9.rs" diff --git a/2019/Cargo.toml b/2019/Cargo.toml deleted file mode 100644 index b18a42bd..00000000 --- a/2019/Cargo.toml +++ /dev/null @@ -1,5 +0,0 @@ -# https://adventofcode.com/2019 - -[workspace] -members = ["day*", "intcode-rs"] -resolver = "2" diff --git a/2019/day1/Cargo.toml b/2019/day1/Cargo.toml deleted file mode 100644 index bbf40642..00000000 --- a/2019/day1/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day1" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day1" -path = "day1.rs" diff --git a/2019/day10/Cargo.toml b/2019/day10/Cargo.toml deleted file mode 100644 index adee8e9c..00000000 --- a/2019/day10/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day10" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day10" -path = "day10.rs" diff --git a/2019/day11/Cargo.toml b/2019/day11/Cargo.toml deleted file mode 100644 index ae41626d..00000000 --- a/2019/day11/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day11" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -intcode = { path = "../intcode-rs" } -rustc-hash = "*" - -[[bin]] -name = "day11" -path = "day11.rs" diff --git a/2019/day12/Cargo.toml b/2019/day12/Cargo.toml deleted file mode 100644 index 81b416b9..00000000 --- a/2019/day12/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day12" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" - -[[bin]] -name = "day12" -path = "day12.rs" diff --git a/2019/day13/Cargo.toml b/2019/day13/Cargo.toml deleted file mode 100644 index a0ef1ffa..00000000 --- a/2019/day13/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day13" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -intcode = { path = "../intcode-rs" } - -[[bin]] -name = "day13" -path = "day13.rs" diff --git a/2019/day14/Cargo.toml b/2019/day14/Cargo.toml deleted file mode 100644 index abba6d6f..00000000 --- a/2019/day14/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day14" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day14" -path = "day14.rs" diff --git a/2019/day15/Cargo.toml b/2019/day15/Cargo.toml deleted file mode 100644 index 7baac4a5..00000000 --- a/2019/day15/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day15" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -intcode = { path = "../intcode-rs" } -rustc-hash = "*" - -[[bin]] -name = "day15" -path = "day15.rs" diff --git a/2019/day16/Cargo.toml b/2019/day16/Cargo.toml deleted file mode 100644 index 4f755eeb..00000000 --- a/2019/day16/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day16" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day16" -path = "day16.rs" diff --git a/2019/day17/Cargo.toml b/2019/day17/Cargo.toml deleted file mode 100644 index ff2f4162..00000000 --- a/2019/day17/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day17" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -intcode = { path = "../intcode-rs" } -rustc-hash = "*" - -[[bin]] -name = "day17" -path = "day17.rs" diff --git a/2019/day18/Cargo.toml b/2019/day18/Cargo.toml deleted file mode 100644 index b35dcc61..00000000 --- a/2019/day18/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day18" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day18" -path = "day18.rs" \ No newline at end of file diff --git a/2019/day18/mazecell.rs b/2019/day18/mazecell.rs deleted file mode 100644 index bbcb2c20..00000000 --- a/2019/day18/mazecell.rs +++ /dev/null @@ -1,43 +0,0 @@ -pub trait MazeCell { - fn is_wall(&self) -> bool; - fn is_key(&self) -> bool; - fn is_door(&self) -> bool; - fn is_entrance(&self) -> bool; - // fn is_robot(&self) -> bool; - - fn set_wall(&mut self); - fn set_entrance(&mut self); -} - -impl MazeCell for u8 { - fn is_wall(&self) -> bool { - self == &b'#' - } - - fn is_key(&self) -> bool { - self.is_ascii_lowercase() - // (b'a'..=b'z').contains(self) - } - - fn is_door(&self) -> bool { - self.is_ascii_uppercase() - // (b'A'..=b'Z').contains(self) - } - - fn is_entrance(&self) -> bool { - self == &b'@' - } - - // fn is_robot(&self) -> bool { - // // valid after maze update in part 2 - // (b'1'..=b'4').contains(self) - // } - - fn set_wall(&mut self) { - *self = b'#'; - } - - fn set_entrance(&mut self) { - *self = b'@'; - } -} diff --git a/2019/day18/mazette.rs b/2019/day18/mazette.rs deleted file mode 100644 index 3ec6bc56..00000000 --- a/2019/day18/mazette.rs +++ /dev/null @@ -1,145 +0,0 @@ -use rustc_hash::{FxHashMap, FxHashSet}; -use std::cmp::Reverse; -use std::collections::{BinaryHeap, VecDeque}; - -use super::mazecell::MazeCell; -use super::path::Path; -use super::state::State; - -pub trait Dijkstra { - fn search(&self) -> usize; -} - -/// Calculate distances to keys and seen keys and doors from the given cell of the maze. -fn get_paths_from(maze: &aoc::GridU, start: (usize, usize)) -> Vec { - let mut paths = vec![]; - - let mut seen = FxHashSet::default(); - let mut q = VecDeque::new(); - - q.push_back((start, 0, 0, 0)); - while let Some((pos, steps, mut keys_set, mut doors_set)) = q.pop_front() { - // - if pos != start && maze[pos].is_key() { - paths.push(Path { - destination: maze[pos], - steps, - keys: keys_set, - doors: doors_set, - }); - } - - for np in maze.iter_directions(pos) { - let c = maze[np]; - - if !c.is_wall() && !seen.contains(&np) { - seen.insert(np); - - if c.is_key() { - keys_set |= 1 << (c - b'a'); - } - if c.is_door() { - doors_set |= 1 << (c - b'A'); - } - - q.push_back((np, steps + 1, keys_set, doors_set)); - } - } - } - - paths -} - -fn get_all_paths(maze: &aoc::GridU) -> (u8, FxHashMap>) { - let mut all_paths = FxHashMap::default(); - - let mut num_robots = 0; - - for (xy, c) in maze.iter() { - let mut c = *c; - - if c.is_entrance() || c.is_key() { - if c.is_entrance() { - num_robots += 1; - c = b'0' + num_robots; - } - - all_paths.insert(c, get_paths_from(maze, xy)); - } - } - - (num_robots, all_paths) -} - -impl Dijkstra for aoc::GridU { - fn search(&self) -> usize { - let all_keys = self - .iter() - .filter(|(_, c)| c.is_key()) - .fold(0, |all_keys, (_, c)| all_keys | 1 << (c - b'a')); - - let (num_robots, all_paths) = get_all_paths(self); - - let state = State::new(num_robots); - - let mut scores = FxHashMap::default(); - scores.insert(state.clone(), 0usize); - - let mut closed = FxHashSet::default(); - - let mut open = FxHashSet::default(); - open.insert(state.clone()); - - let mut q = BinaryHeap::new(); - q.push((Reverse(0), state)); - - while let Some((_, current)) = q.pop() { - if current.keys == all_keys { - return *scores.get(¤t).unwrap(); - } - - open.remove(¤t); - closed.insert(current.clone()); - - for (neighbor, steps) in current.next(&all_paths) { - if closed.contains(&neighbor) { - continue; - } - - let score = scores[¤t] + steps; - - if score < *scores.get(&neighbor).unwrap_or(&usize::MAX) { - scores.insert(neighbor.clone(), score); - - if !open.contains(&neighbor) { - q.push((Reverse(score), neighbor)); - } - } - } - } - - 0 - } -} - -#[cfg(test)] -mod test { - use super::*; - - #[test] - fn test1() { - let maze = "\ -############### -#d.ABC.#.....a# -######@#@###### -############### -######@#@###### -#b.....#.....c# -############### -"; - - let maze = aoc::GridU::::parse(maze); - - assert_eq!(maze.search(), 24); - } -} diff --git a/2019/day18/multirobot.rs b/2019/day18/multirobot.rs deleted file mode 100644 index 6a9a23dc..00000000 --- a/2019/day18/multirobot.rs +++ /dev/null @@ -1,61 +0,0 @@ -use super::mazecell::MazeCell; // needed for trait - -pub trait Multirobot { - fn update(&mut self); -} - -impl Multirobot for aoc::GridU { - /// Update the maze for part 2: the main entrance becomes four robots - fn update(&mut self) { - let (x, y) = self - .iter() - .find_map(|(xy, c)| if c.is_entrance() { Some(xy) } else { None }) - .unwrap(); - - self[(x, y)].set_wall(); - self[(x - 1, y)].set_wall(); - self[(x + 1, y)].set_wall(); - self[(x, y - 1)].set_wall(); - self[(x, y + 1)].set_wall(); - - self[(x - 1, y - 1)].set_entrance(); - self[(x + 1, y - 1)].set_entrance(); - self[(x - 1, y + 1)].set_entrance(); - self[(x + 1, y + 1)].set_entrance(); - } -} - -#[cfg(test)] -mod test { - use super::*; - - #[test] - fn update() { - let mut maze = aoc::GridU::::parse( - "\ -####### -#a.#Cd# -##...## -##.@.## -##...## -#cB#Ab# -####### -", - ); - - maze.update(); - - assert_eq!( - maze.to_string(), - "\ -####### -#a.#Cd# -##@#@## -####### -##@#@## -#cB#Ab# -####### -" - ); - } -} diff --git a/2019/day18/path.rs b/2019/day18/path.rs deleted file mode 100644 index ad06a592..00000000 --- a/2019/day18/path.rs +++ /dev/null @@ -1,31 +0,0 @@ -pub struct Path { - pub destination: u8, // key: 'a'..'z' - pub steps: usize, - pub keys: u32, // bit = key 'a'+ - pub doors: u32, // bit = door 'A'+ -} - -impl std::fmt::Display for Path { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let mut keys = String::new(); - let mut doors = String::new(); - - for i in 0..26 { - if self.keys & (1 << i) != 0 { - keys.push((i + b'a') as char); - } - if self.doors & (1 << i) != 0 { - doors.push((i + b'A') as char); - } - } - - write!( - f, - "[dest:{} keys:{}, doors:{}, steps:{}]", - (self.destination) as char, - keys, - doors, - self.steps - ) - } -} diff --git a/2019/day18/state.rs b/2019/day18/state.rs deleted file mode 100644 index aa1e9a2a..00000000 --- a/2019/day18/state.rs +++ /dev/null @@ -1,68 +0,0 @@ -use super::{mazecell::MazeCell, path::Path}; -use rustc_hash::FxHashMap; - -#[derive(Hash, Eq, PartialEq, Ord, PartialOrd, Clone)] -pub struct State { - pub keys: u32, - robots: Vec, -} - -impl State { - #[must_use] - pub fn new(num_robots: u8) -> Self { - Self { - keys: 0, - robots: (b'1'..=(b'0' + num_robots)).collect(), - } - } - - /// Find the next states - /// # Panics - /// may be... - #[must_use] - pub fn next(&self, paths: &FxHashMap>) -> Vec<(Self, usize)> { - // impl Iterator { - - let mut result = vec![]; - - for (index, pos) in self.robots.iter().enumerate() { - for path in paths.get(pos).unwrap() { - // we already have the key - if path.destination.is_key() && self.keys & (1 << (path.destination - b'a')) != 0 { - continue; - } - - // not all doors of path are open - if path.doors & self.keys != path.doors { - continue; - } - - let mut robots = self.robots.clone(); - robots[index] = path.destination; - - result.push(( - Self { - keys: self.keys | path.keys, - robots, - }, - path.steps, - )); - } - } - result - } -} - -impl std::fmt::Display for State { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let mut keys = String::new(); - let robots: String = self.robots.iter().map(|c| *c as char).collect(); - - for i in 0..26 { - if self.keys & (1 << i) != 0 { - keys.push((i + b'a') as char); - } - } - write!(f, "State[keys:{keys} robots:{robots}]") - } -} diff --git a/2019/day19/Cargo.toml b/2019/day19/Cargo.toml deleted file mode 100644 index ee43e103..00000000 --- a/2019/day19/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day19" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -intcode = { path = "../intcode-rs" } - -[[bin]] -name = "day19" -path = "day19.rs" diff --git a/2019/day2/Cargo.toml b/2019/day2/Cargo.toml deleted file mode 100644 index 768b1e4b..00000000 --- a/2019/day2/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day2" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day2" -path = "day2.rs" diff --git a/2019/day20/Cargo.toml b/2019/day20/Cargo.toml deleted file mode 100644 index 7870325e..00000000 --- a/2019/day20/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day20" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day20" -path = "day20.rs" diff --git a/2019/day21/Cargo.toml b/2019/day21/Cargo.toml deleted file mode 100644 index 4360f764..00000000 --- a/2019/day21/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day21" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -intcode = { path = "../intcode-rs" } - -[[bin]] -name = "day21" -path = "day21.rs" diff --git a/2019/day22/Cargo.toml b/2019/day22/Cargo.toml deleted file mode 100644 index b16e4075..00000000 --- a/2019/day22/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day22" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day22" -path = "day22.rs" diff --git a/2019/day23/Cargo.toml b/2019/day23/Cargo.toml deleted file mode 100644 index 3d4d76de..00000000 --- a/2019/day23/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day23" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -intcode = { path = "../intcode-rs" } - -[[bin]] -name = "day23" -path = "day23.rs" diff --git a/2019/day24/Cargo.toml b/2019/day24/Cargo.toml deleted file mode 100644 index 9802ce8d..00000000 --- a/2019/day24/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day24" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day24" -path = "day24.rs" diff --git a/2019/day25/Cargo.toml b/2019/day25/Cargo.toml deleted file mode 100644 index 03e2563f..00000000 --- a/2019/day25/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day25" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -intcode = { path = "../intcode-rs" } -regex = "*" - -[[bin]] -name = "day25" -path = "day25.rs" diff --git a/2019/day3/Cargo.toml b/2019/day3/Cargo.toml deleted file mode 100644 index 4f561a74..00000000 --- a/2019/day3/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day3" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day3" -path = "day3.rs" diff --git a/2019/day4/Cargo.toml b/2019/day4/Cargo.toml deleted file mode 100644 index a83fc9cd..00000000 --- a/2019/day4/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day4" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day4" -path = "day4.rs" diff --git a/2019/day5/Cargo.toml b/2019/day5/Cargo.toml deleted file mode 100644 index b7d348ec..00000000 --- a/2019/day5/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day5" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -intcode = { path = "../intcode-rs" } - -[[bin]] -name = "day5" -path = "day5.rs" diff --git a/2019/day6/Cargo.toml b/2019/day6/Cargo.toml deleted file mode 100644 index 54bf4c71..00000000 --- a/2019/day6/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day6" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day6" -path = "day6.rs" diff --git a/2019/day7/Cargo.toml b/2019/day7/Cargo.toml deleted file mode 100644 index effb5a3b..00000000 --- a/2019/day7/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day7" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -intcode = { path = "../intcode-rs" } -itertools = "*" - -[[bin]] -name = "day7" -path = "day7.rs" diff --git a/2019/day8/Cargo.toml b/2019/day8/Cargo.toml deleted file mode 100644 index 63ccc8ce..00000000 --- a/2019/day8/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day8" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day8" -path = "day8.rs" diff --git a/2019/day9/Cargo.toml b/2019/day9/Cargo.toml deleted file mode 100644 index 24ea4303..00000000 --- a/2019/day9/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day9" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -intcode = { path = "../intcode-rs" } - -[[bin]] -name = "day9" -path = "day9.rs" diff --git a/2020/Cargo.toml b/2020/Cargo.toml deleted file mode 100644 index 1fcf6591..00000000 --- a/2020/Cargo.toml +++ /dev/null @@ -1,5 +0,0 @@ -# https://adventofcode.com/2020 - -[workspace] -members = ["day*"] -resolver = "2" diff --git a/2020/day1/Cargo.toml b/2020/day1/Cargo.toml deleted file mode 100644 index d907473c..00000000 --- a/2020/day1/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day1" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day1" -path = "day1.rs" diff --git a/2020/day10/Cargo.toml b/2020/day10/Cargo.toml deleted file mode 100644 index adee8e9c..00000000 --- a/2020/day10/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day10" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day10" -path = "day10.rs" diff --git a/2020/day11/Cargo.toml b/2020/day11/Cargo.toml deleted file mode 100644 index 4230f46e..00000000 --- a/2020/day11/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day11" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day11" -path = "day11.rs" diff --git a/2020/day12/Cargo.toml b/2020/day12/Cargo.toml deleted file mode 100644 index ee7e2717..00000000 --- a/2020/day12/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day12" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day12" -path = "day12.rs" diff --git a/2020/day13/Cargo.toml b/2020/day13/Cargo.toml deleted file mode 100644 index 017a743d..00000000 --- a/2020/day13/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day13" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day13" -path = "day13.rs" diff --git a/2020/day14/Cargo.toml b/2020/day14/Cargo.toml deleted file mode 100644 index abba6d6f..00000000 --- a/2020/day14/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day14" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day14" -path = "day14.rs" diff --git a/2020/day15/Cargo.toml b/2020/day15/Cargo.toml deleted file mode 100644 index 0cbdff01..00000000 --- a/2020/day15/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day15" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day15" -path = "day15.rs" diff --git a/2020/day16/Cargo.toml b/2020/day16/Cargo.toml deleted file mode 100644 index cc47be34..00000000 --- a/2020/day16/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day16" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" -rustc-hash = "*" - -[[bin]] -name = "day16" -path = "day16.rs" diff --git a/2020/day17/Cargo.toml b/2020/day17/Cargo.toml deleted file mode 100644 index 1f55d0ae..00000000 --- a/2020/day17/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day17" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day17" -path = "day17.rs" diff --git a/2020/day18/Cargo.toml b/2020/day18/Cargo.toml deleted file mode 100644 index 86a98d20..00000000 --- a/2020/day18/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day18" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day18" -path = "day18.rs" diff --git a/2020/day19/Cargo.toml b/2020/day19/Cargo.toml deleted file mode 100644 index c46af131..00000000 --- a/2020/day19/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day19" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day19" -path = "day19.rs" diff --git a/2020/day2/Cargo.toml b/2020/day2/Cargo.toml deleted file mode 100644 index 768b1e4b..00000000 --- a/2020/day2/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day2" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day2" -path = "day2.rs" diff --git a/2020/day20/Cargo.toml b/2020/day20/Cargo.toml deleted file mode 100644 index 7870325e..00000000 --- a/2020/day20/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day20" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day20" -path = "day20.rs" diff --git a/2020/day21/Cargo.toml b/2020/day21/Cargo.toml deleted file mode 100644 index a85a420a..00000000 --- a/2020/day21/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day21" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day21" -path = "day21.rs" diff --git a/2020/day22/Cargo.toml b/2020/day22/Cargo.toml deleted file mode 100644 index 046e465e..00000000 --- a/2020/day22/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day22" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day22" -path = "day22.rs" diff --git a/2020/day23/Cargo.toml b/2020/day23/Cargo.toml deleted file mode 100644 index 8a51b172..00000000 --- a/2020/day23/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day23" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day23" -path = "day23.rs" diff --git a/2020/day24/Cargo.toml b/2020/day24/Cargo.toml deleted file mode 100644 index 9802ce8d..00000000 --- a/2020/day24/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day24" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day24" -path = "day24.rs" diff --git a/2020/day25/Cargo.toml b/2020/day25/Cargo.toml deleted file mode 100644 index 7275a50e..00000000 --- a/2020/day25/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day25" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day25" -path = "day25.rs" diff --git a/2020/day3/Cargo.toml b/2020/day3/Cargo.toml deleted file mode 100644 index 985edff0..00000000 --- a/2020/day3/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day3" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day3" -path = "day3.rs" diff --git a/2020/day4/Cargo.toml b/2020/day4/Cargo.toml deleted file mode 100644 index a83fc9cd..00000000 --- a/2020/day4/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day4" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day4" -path = "day4.rs" diff --git a/2020/day5/Cargo.toml b/2020/day5/Cargo.toml deleted file mode 100644 index 64854eb5..00000000 --- a/2020/day5/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day5" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day5" -path = "day5.rs" diff --git a/2020/day6/Cargo.toml b/2020/day6/Cargo.toml deleted file mode 100644 index 54bf4c71..00000000 --- a/2020/day6/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day6" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day6" -path = "day6.rs" diff --git a/2020/day7/Cargo.toml b/2020/day7/Cargo.toml deleted file mode 100644 index f1450864..00000000 --- a/2020/day7/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day7" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" -rustc-hash = "*" - -[[bin]] -name = "day7" -path = "day7.rs" diff --git a/2020/day8/Cargo.toml b/2020/day8/Cargo.toml deleted file mode 100644 index 27274c34..00000000 --- a/2020/day8/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day8" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day8" -path = "day8.rs" diff --git a/2020/day9/Cargo.toml b/2020/day9/Cargo.toml deleted file mode 100644 index 4c086fa8..00000000 --- a/2020/day9/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day9" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day9" -path = "day9.rs" diff --git a/2021/Cargo.toml b/2021/Cargo.toml deleted file mode 100644 index a18509ba..00000000 --- a/2021/Cargo.toml +++ /dev/null @@ -1,5 +0,0 @@ -# https://adventofcode.com/2021 - -[workspace] -members = ["day*"] -resolver = "2" diff --git a/2021/day1/Cargo.toml b/2021/day1/Cargo.toml deleted file mode 100644 index 8d833bf3..00000000 --- a/2021/day1/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day1" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day1" -path = "day1.rs" diff --git a/2021/day10/Cargo.toml b/2021/day10/Cargo.toml deleted file mode 100644 index 435928e0..00000000 --- a/2021/day10/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day10" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day10" -path = "day10.rs" diff --git a/2021/day11/Cargo.toml b/2021/day11/Cargo.toml deleted file mode 100644 index 6f7b3801..00000000 --- a/2021/day11/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day11" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day11" -path = "day11.rs" diff --git a/2021/day12/Cargo.toml b/2021/day12/Cargo.toml deleted file mode 100644 index acd35751..00000000 --- a/2021/day12/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "day12" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day12" -path = "day12.rs" diff --git a/2021/day13/Cargo.toml b/2021/day13/Cargo.toml deleted file mode 100644 index 017a743d..00000000 --- a/2021/day13/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day13" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day13" -path = "day13.rs" diff --git a/2021/day14/Cargo.toml b/2021/day14/Cargo.toml deleted file mode 100644 index abba6d6f..00000000 --- a/2021/day14/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day14" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day14" -path = "day14.rs" diff --git a/2021/day15/Cargo.toml b/2021/day15/Cargo.toml deleted file mode 100644 index 0112912b..00000000 --- a/2021/day15/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day15" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day15" -path = "day15.rs" diff --git a/2021/day16/Cargo.toml b/2021/day16/Cargo.toml deleted file mode 100644 index 4f755eeb..00000000 --- a/2021/day16/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day16" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day16" -path = "day16.rs" diff --git a/2021/day17/Cargo.toml b/2021/day17/Cargo.toml deleted file mode 100644 index f32e4217..00000000 --- a/2021/day17/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "day17" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -aoc = { path = "../../aoc" } -text_io = "*" - -[[bin]] -name = "day17" -path = "day17.rs" diff --git a/2021/day18/Cargo.toml b/2021/day18/Cargo.toml deleted file mode 100644 index a0ebc2c1..00000000 --- a/2021/day18/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day18" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -itertools = "*" - -[[bin]] -name = "day18" -path = "day18.rs" diff --git a/2021/day19/Cargo.toml b/2021/day19/Cargo.toml deleted file mode 100644 index e265a699..00000000 --- a/2021/day19/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day19" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" -scan_fmt = "*" - -[[bin]] -name = "day19" -path = "day19.rs" diff --git a/2021/day2/Cargo.toml b/2021/day2/Cargo.toml deleted file mode 100644 index eb906174..00000000 --- a/2021/day2/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day2" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day2" -path = "day2.rs" diff --git a/2021/day20/Cargo.toml b/2021/day20/Cargo.toml deleted file mode 100644 index 613f3064..00000000 --- a/2021/day20/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day20" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day20" -path = "day20.rs" diff --git a/2021/day21/Cargo.toml b/2021/day21/Cargo.toml deleted file mode 100644 index a85a420a..00000000 --- a/2021/day21/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day21" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day21" -path = "day21.rs" diff --git a/2021/day22/Cargo.toml b/2021/day22/Cargo.toml deleted file mode 100644 index 0b7b488e..00000000 --- a/2021/day22/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day22" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" -rustc-hash = "*" - -[[bin]] -name = "day22" -path = "day22.rs" diff --git a/2021/day23/Cargo.toml b/2021/day23/Cargo.toml deleted file mode 100644 index a8ac5bf9..00000000 --- a/2021/day23/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day23" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day23" -path = "day23.rs" diff --git a/2021/day24/Cargo.toml b/2021/day24/Cargo.toml deleted file mode 100644 index 5f93b1bf..00000000 --- a/2021/day24/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day24" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" -rand = "*" - -[[bin]] -name = "day24" -path = "day24.rs" diff --git a/2021/day25/Cargo.toml b/2021/day25/Cargo.toml deleted file mode 100644 index 9fd6995b..00000000 --- a/2021/day25/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day25" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day25" -path = "day25.rs" diff --git a/2021/day3/Cargo.toml b/2021/day3/Cargo.toml deleted file mode 100644 index a6c3509d..00000000 --- a/2021/day3/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day3" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day3" -path = "day3.rs" diff --git a/2021/day4/Cargo.toml b/2021/day4/Cargo.toml deleted file mode 100644 index 9de3563a..00000000 --- a/2021/day4/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day4" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day4" -path = "day4.rs" diff --git a/2021/day5/Cargo.toml b/2021/day5/Cargo.toml deleted file mode 100644 index 4b4f594a..00000000 --- a/2021/day5/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "day5" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" - -[[bin]] -name = "day5" -path = "day5.rs" diff --git a/2021/day6/Cargo.toml b/2021/day6/Cargo.toml deleted file mode 100644 index 0c1a3cb7..00000000 --- a/2021/day6/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day6" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day6" -path = "day6.rs" diff --git a/2021/day7/Cargo.toml b/2021/day7/Cargo.toml deleted file mode 100644 index 0efe2d44..00000000 --- a/2021/day7/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "day7" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" - -[[bin]] -name = "day7" -path = "day7.rs" diff --git a/2021/day8/Cargo.toml b/2021/day8/Cargo.toml deleted file mode 100644 index 27274c34..00000000 --- a/2021/day8/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day8" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day8" -path = "day8.rs" diff --git a/2021/day9/Cargo.toml b/2021/day9/Cargo.toml deleted file mode 100644 index 4c086fa8..00000000 --- a/2021/day9/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day9" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day9" -path = "day9.rs" diff --git a/2022/Cargo.toml b/2022/Cargo.toml deleted file mode 100644 index 3237f3e7..00000000 --- a/2022/Cargo.toml +++ /dev/null @@ -1,5 +0,0 @@ -# https://adventofcode.com/2022 - -[workspace] -members = ["day*"] -resolver = "2" diff --git a/2022/day1/Cargo.toml b/2022/day1/Cargo.toml deleted file mode 100644 index 8d833bf3..00000000 --- a/2022/day1/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day1" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day1" -path = "day1.rs" diff --git a/2022/day10/Cargo.toml b/2022/day10/Cargo.toml deleted file mode 100644 index 0c6b79d5..00000000 --- a/2022/day10/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day10" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day10" -path = "day10.rs" diff --git a/2022/day11/Cargo.toml b/2022/day11/Cargo.toml deleted file mode 100644 index 6f7b3801..00000000 --- a/2022/day11/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day11" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day11" -path = "day11.rs" diff --git a/2022/day12/Cargo.toml b/2022/day12/Cargo.toml deleted file mode 100644 index 8be331ad..00000000 --- a/2022/day12/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day12" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day12" -path = "day12.rs" diff --git a/2022/day13/Cargo.toml b/2022/day13/Cargo.toml deleted file mode 100644 index 214659de..00000000 --- a/2022/day13/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day13" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -nom = "*" - -[[bin]] -name = "day13" -path = "day13.rs" diff --git a/2022/day13_pest/Cargo.toml b/2022/day13_pest/Cargo.toml deleted file mode 100644 index 68c43381..00000000 --- a/2022/day13_pest/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day13_pest" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -pest = "*" -pest_derive = "*" - -[[bin]] -name = "day13_pest" -path = "day13.rs" diff --git a/2022/day14/Cargo.toml b/2022/day14/Cargo.toml deleted file mode 100644 index abba6d6f..00000000 --- a/2022/day14/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day14" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day14" -path = "day14.rs" diff --git a/2022/day15/Cargo.toml b/2022/day15/Cargo.toml deleted file mode 100644 index b534bcd8..00000000 --- a/2022/day15/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day15" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" -rustc-hash = "*" - -[[bin]] -name = "day15" -path = "day15.rs" diff --git a/2022/day16/Cargo.toml b/2022/day16/Cargo.toml deleted file mode 100644 index cc47be34..00000000 --- a/2022/day16/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day16" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" -rustc-hash = "*" - -[[bin]] -name = "day16" -path = "day16.rs" diff --git a/2022/day17/Cargo.toml b/2022/day17/Cargo.toml deleted file mode 100644 index 17cc3676..00000000 --- a/2022/day17/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day17" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day17" -path = "day17.rs" diff --git a/2022/day18/Cargo.toml b/2022/day18/Cargo.toml deleted file mode 100644 index b5aa9822..00000000 --- a/2022/day18/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day18" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day18" -path = "day18.rs" diff --git a/2022/day19/Cargo.toml b/2022/day19/Cargo.toml deleted file mode 100644 index fc447add..00000000 --- a/2022/day19/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day19" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" -rustc-hash = "*" - -[[bin]] -name = "day19" -path = "day19.rs" diff --git a/2022/day2/Cargo.toml b/2022/day2/Cargo.toml deleted file mode 100644 index eb906174..00000000 --- a/2022/day2/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day2" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day2" -path = "day2.rs" diff --git a/2022/day20/Cargo.toml b/2022/day20/Cargo.toml deleted file mode 100644 index 613f3064..00000000 --- a/2022/day20/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day20" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day20" -path = "day20.rs" diff --git a/2022/day21/Cargo.toml b/2022/day21/Cargo.toml deleted file mode 100644 index 217378ac..00000000 --- a/2022/day21/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "day21" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -fraction = "*" -num = "*" -rustc-hash = "*" - -[[bin]] -name = "day21" -path = "day21.rs" diff --git a/2022/day22/Cargo.toml b/2022/day22/Cargo.toml deleted file mode 100644 index 84490cac..00000000 --- a/2022/day22/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day22" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" - -[[bin]] -name = "day22" -path = "day22.rs" diff --git a/2022/day23/Cargo.toml b/2022/day23/Cargo.toml deleted file mode 100644 index a8ac5bf9..00000000 --- a/2022/day23/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day23" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day23" -path = "day23.rs" diff --git a/2022/day24/Cargo.toml b/2022/day24/Cargo.toml deleted file mode 100644 index 9802ce8d..00000000 --- a/2022/day24/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day24" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day24" -path = "day24.rs" diff --git a/2022/day25/Cargo.toml b/2022/day25/Cargo.toml deleted file mode 100644 index 9fd6995b..00000000 --- a/2022/day25/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day25" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day25" -path = "day25.rs" diff --git a/2022/day3/Cargo.toml b/2022/day3/Cargo.toml deleted file mode 100644 index a6c3509d..00000000 --- a/2022/day3/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day3" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day3" -path = "day3.rs" diff --git a/2022/day4/Cargo.toml b/2022/day4/Cargo.toml deleted file mode 100644 index 20cc1b6d..00000000 --- a/2022/day4/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day4" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" - -[[bin]] -name = "day4" -path = "day4.rs" diff --git a/2022/day5/Cargo.toml b/2022/day5/Cargo.toml deleted file mode 100644 index f7603d61..00000000 --- a/2022/day5/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day5" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" - -[[bin]] -name = "day5" -path = "day5.rs" diff --git a/2022/day6/Cargo.toml b/2022/day6/Cargo.toml deleted file mode 100644 index 54bf4c71..00000000 --- a/2022/day6/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day6" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day6" -path = "day6.rs" diff --git a/2022/day7/Cargo.toml b/2022/day7/Cargo.toml deleted file mode 100644 index ed2e3f98..00000000 --- a/2022/day7/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day7" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day7" -path = "day7.rs" diff --git a/2022/day8/Cargo.toml b/2022/day8/Cargo.toml deleted file mode 100644 index 63ccc8ce..00000000 --- a/2022/day8/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day8" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day8" -path = "day8.rs" diff --git a/2022/day9/Cargo.toml b/2022/day9/Cargo.toml deleted file mode 100644 index 94d4993b..00000000 --- a/2022/day9/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day9" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day9" -path = "day9.rs" diff --git a/2023/Cargo.toml b/2023/Cargo.toml deleted file mode 100644 index 1b18b227..00000000 --- a/2023/Cargo.toml +++ /dev/null @@ -1,5 +0,0 @@ -# https://adventofcode.com/2023 - -[workspace] -members = ["day*"] -resolver = "2" diff --git a/2023/day1/Cargo.toml b/2023/day1/Cargo.toml deleted file mode 100644 index 8d833bf3..00000000 --- a/2023/day1/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day1" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day1" -path = "day1.rs" diff --git a/2023/day10/Cargo.toml b/2023/day10/Cargo.toml deleted file mode 100644 index e7fac469..00000000 --- a/2023/day10/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -name = "day10" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -geo = "*" -geo-types = "*" -itertools = "*" -rustc-hash = "*" - -[[bin]] -name = "day10" -path = "day10.rs" diff --git a/2023/day11/Cargo.toml b/2023/day11/Cargo.toml deleted file mode 100644 index 6f7b3801..00000000 --- a/2023/day11/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day11" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day11" -path = "day11.rs" diff --git a/2023/day12/Cargo.toml b/2023/day12/Cargo.toml deleted file mode 100644 index 8be331ad..00000000 --- a/2023/day12/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day12" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day12" -path = "day12.rs" diff --git a/2023/day13/Cargo.toml b/2023/day13/Cargo.toml deleted file mode 100644 index 017a743d..00000000 --- a/2023/day13/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day13" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day13" -path = "day13.rs" diff --git a/2023/day14/Cargo.toml b/2023/day14/Cargo.toml deleted file mode 100644 index abba6d6f..00000000 --- a/2023/day14/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day14" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day14" -path = "day14.rs" diff --git a/2023/day15/Cargo.toml b/2023/day15/Cargo.toml deleted file mode 100644 index 46c03c2c..00000000 --- a/2023/day15/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day15" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day15" -path = "day15.rs" diff --git a/2023/day16/Cargo.toml b/2023/day16/Cargo.toml deleted file mode 100644 index 4f755eeb..00000000 --- a/2023/day16/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day16" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day16" -path = "day16.rs" diff --git a/2023/day17/Cargo.toml b/2023/day17/Cargo.toml deleted file mode 100644 index 1f55d0ae..00000000 --- a/2023/day17/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day17" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day17" -path = "day17.rs" diff --git a/2023/day18/Cargo.toml b/2023/day18/Cargo.toml deleted file mode 100644 index 86a98d20..00000000 --- a/2023/day18/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day18" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day18" -path = "day18.rs" diff --git a/2023/day19/Cargo.toml b/2023/day19/Cargo.toml deleted file mode 100644 index fc447add..00000000 --- a/2023/day19/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day19" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" -rustc-hash = "*" - -[[bin]] -name = "day19" -path = "day19.rs" diff --git a/2023/day2/Cargo.toml b/2023/day2/Cargo.toml deleted file mode 100644 index eb906174..00000000 --- a/2023/day2/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day2" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day2" -path = "day2.rs" diff --git a/2023/day20/Cargo.toml b/2023/day20/Cargo.toml deleted file mode 100644 index 01b081e8..00000000 --- a/2023/day20/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day20" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -num = "*" -rustc-hash = "*" - -[[bin]] -name = "day20" -path = "day20.rs" diff --git a/2023/day21/Cargo.toml b/2023/day21/Cargo.toml deleted file mode 100644 index 3c213730..00000000 --- a/2023/day21/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day21" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -num = "*" -rustc-hash = "*" - -[[bin]] -name = "day21" -path = "day21.rs" diff --git a/2023/day22/Cargo.toml b/2023/day22/Cargo.toml deleted file mode 100644 index 046e465e..00000000 --- a/2023/day22/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day22" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day22" -path = "day22.rs" diff --git a/2023/day23/Cargo.toml b/2023/day23/Cargo.toml deleted file mode 100644 index a8ac5bf9..00000000 --- a/2023/day23/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day23" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day23" -path = "day23.rs" diff --git a/2023/day24/Cargo.toml b/2023/day24/Cargo.toml deleted file mode 100644 index d060451e..00000000 --- a/2023/day24/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "day24" -version = "0.1.0" -edition = "2021" -build = "build.rs" - -[dependencies] -aoc = { path = "../../aoc" } -fraction = "*" -z3 = "*" - -[[bin]] -name = "day24" -path = "day24.rs" diff --git a/2023/day25/Cargo.toml b/2023/day25/Cargo.toml deleted file mode 100644 index fba5095a..00000000 --- a/2023/day25/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day25" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" -rustworkx-core = "*" - -[[bin]] -name = "day25" -path = "day25.rs" diff --git a/2023/day3/Cargo.toml b/2023/day3/Cargo.toml deleted file mode 100644 index 4f561a74..00000000 --- a/2023/day3/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day3" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day3" -path = "day3.rs" diff --git a/2023/day4/Cargo.toml b/2023/day4/Cargo.toml deleted file mode 100644 index a83fc9cd..00000000 --- a/2023/day4/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day4" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day4" -path = "day4.rs" diff --git a/2023/day5/Cargo.toml b/2023/day5/Cargo.toml deleted file mode 100644 index 64854eb5..00000000 --- a/2023/day5/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day5" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day5" -path = "day5.rs" diff --git a/2023/day6/Cargo.toml b/2023/day6/Cargo.toml deleted file mode 100644 index 0c1a3cb7..00000000 --- a/2023/day6/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day6" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day6" -path = "day6.rs" diff --git a/2023/day7/Cargo.toml b/2023/day7/Cargo.toml deleted file mode 100644 index ed2e3f98..00000000 --- a/2023/day7/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day7" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day7" -path = "day7.rs" diff --git a/2023/day8/Cargo.toml b/2023/day8/Cargo.toml deleted file mode 100644 index 0f4c5cb9..00000000 --- a/2023/day8/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day8" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -num = "*" -rustc-hash = "*" - -[[bin]] -name = "day8" -path = "day8.rs" diff --git a/2023/day9/Cargo.toml b/2023/day9/Cargo.toml deleted file mode 100644 index 4c086fa8..00000000 --- a/2023/day9/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day9" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day9" -path = "day9.rs" diff --git a/2024/Cargo.toml b/2024/Cargo.toml deleted file mode 100644 index ef08b4e9..00000000 --- a/2024/Cargo.toml +++ /dev/null @@ -1,5 +0,0 @@ -# https://adventofcode.com/2024 - -[workspace] -members = ["day*"] -resolver = "2" diff --git a/2024/day1/Cargo.toml b/2024/day1/Cargo.toml deleted file mode 100644 index d907473c..00000000 --- a/2024/day1/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day1" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day1" -path = "day1.rs" diff --git a/2024/day10/Cargo.toml b/2024/day10/Cargo.toml deleted file mode 100644 index adee8e9c..00000000 --- a/2024/day10/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day10" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day10" -path = "day10.rs" diff --git a/2024/day11/Cargo.toml b/2024/day11/Cargo.toml deleted file mode 100644 index 4230f46e..00000000 --- a/2024/day11/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day11" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day11" -path = "day11.rs" diff --git a/2024/day12/Cargo.toml b/2024/day12/Cargo.toml deleted file mode 100644 index 8be331ad..00000000 --- a/2024/day12/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day12" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day12" -path = "day12.rs" diff --git a/2024/day13/Cargo.toml b/2024/day13/Cargo.toml deleted file mode 100644 index fcc8cded..00000000 --- a/2024/day13/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day13" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" -fraction = "*" - -[[bin]] -name = "day13" -path = "day13.rs" diff --git a/2024/day13_z3/Cargo.toml b/2024/day13_z3/Cargo.toml deleted file mode 100644 index cd186107..00000000 --- a/2024/day13_z3/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day13_z3" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" -z3 = "*" - -[[bin]] -name = "day13_z3" -path = "day13.rs" diff --git a/2024/day14/Cargo.toml b/2024/day14/Cargo.toml deleted file mode 100644 index 818669aa..00000000 --- a/2024/day14/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day14" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" -rustc-hash = "*" - -[[bin]] -name = "day14" -path = "day14.rs" diff --git a/2024/day15/Cargo.toml b/2024/day15/Cargo.toml deleted file mode 100644 index 29f0394b..00000000 --- a/2024/day15/Cargo.toml +++ /dev/null @@ -1,16 +0,0 @@ -[package] -name = "day15" -version = "0.1.0" -edition = "2021" - -[features] -anim = ["image"] - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" -image = { version = "*", optional = true } - -[[bin]] -name = "day15" -path = "day15.rs" diff --git a/2024/day16/Cargo.toml b/2024/day16/Cargo.toml deleted file mode 100644 index e4dfe3ea..00000000 --- a/2024/day16/Cargo.toml +++ /dev/null @@ -1,16 +0,0 @@ -[package] -name = "day16" -version = "0.1.0" -edition = "2021" - -[features] -anim = [] - -[dependencies] -aoc = { path = "../../aoc" } -image = "*" -rustc-hash = "*" - -[[bin]] -name = "day16" -path = "day16.rs" diff --git a/2024/day17/Cargo.toml b/2024/day17/Cargo.toml deleted file mode 100644 index 17cc3676..00000000 --- a/2024/day17/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day17" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day17" -path = "day17.rs" diff --git a/2024/day18/Cargo.toml b/2024/day18/Cargo.toml deleted file mode 100644 index 86a98d20..00000000 --- a/2024/day18/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day18" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day18" -path = "day18.rs" diff --git a/2024/day19/Cargo.toml b/2024/day19/Cargo.toml deleted file mode 100644 index 39989142..00000000 --- a/2024/day19/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day19" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day19" -path = "day19.rs" diff --git a/2024/day2/Cargo.toml b/2024/day2/Cargo.toml deleted file mode 100644 index 768b1e4b..00000000 --- a/2024/day2/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day2" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day2" -path = "day2.rs" diff --git a/2024/day20/Cargo.toml b/2024/day20/Cargo.toml deleted file mode 100644 index 7870325e..00000000 --- a/2024/day20/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day20" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day20" -path = "day20.rs" diff --git a/2024/day21/Cargo.toml b/2024/day21/Cargo.toml deleted file mode 100644 index a7797abb..00000000 --- a/2024/day21/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day21" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -itertools = "*" -rustc-hash = "*" - -[[bin]] -name = "day21" -path = "day21.rs" diff --git a/2024/day22/Cargo.toml b/2024/day22/Cargo.toml deleted file mode 100644 index 046e465e..00000000 --- a/2024/day22/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day22" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day22" -path = "day22.rs" diff --git a/2024/day23/Cargo.toml b/2024/day23/Cargo.toml deleted file mode 100644 index 84133cbb..00000000 --- a/2024/day23/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "day23" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustworkx-core = "*" -petgraph = "*" -rustc-hash = "*" - -[[bin]] -name = "day23" -path = "day23.rs" diff --git a/2024/day24/Cargo.toml b/2024/day24/Cargo.toml deleted file mode 100644 index 9802ce8d..00000000 --- a/2024/day24/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day24" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day24" -path = "day24.rs" diff --git a/2024/day25/Cargo.toml b/2024/day25/Cargo.toml deleted file mode 100644 index 9fd6995b..00000000 --- a/2024/day25/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day25" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day25" -path = "day25.rs" diff --git a/2024/day3/Cargo.toml b/2024/day3/Cargo.toml deleted file mode 100644 index db5a5e90..00000000 --- a/2024/day3/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day3" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -regex = "*" - -[[bin]] -name = "day3" -path = "day3.rs" diff --git a/2024/day4/Cargo.toml b/2024/day4/Cargo.toml deleted file mode 100644 index 6ef088cb..00000000 --- a/2024/day4/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day4" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day4" -path = "day4.rs" diff --git a/2024/day5/Cargo.toml b/2024/day5/Cargo.toml deleted file mode 100644 index 2f5b39dd..00000000 --- a/2024/day5/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day5" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day5" -path = "day5.rs" diff --git a/2024/day6/Cargo.toml b/2024/day6/Cargo.toml deleted file mode 100644 index 54bf4c71..00000000 --- a/2024/day6/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day6" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day6" -path = "day6.rs" diff --git a/2024/day7/Cargo.toml b/2024/day7/Cargo.toml deleted file mode 100644 index ed2e3f98..00000000 --- a/2024/day7/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "day7" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -rustc-hash = "*" - -[[bin]] -name = "day7" -path = "day7.rs" diff --git a/2024/day8/Cargo.toml b/2024/day8/Cargo.toml deleted file mode 100644 index d3ba9490..00000000 --- a/2024/day8/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "day8" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } -itertools = "*" -rustc-hash = "*" - -[[bin]] -name = "day8" -path = "day8.rs" diff --git a/2024/day9/Cargo.toml b/2024/day9/Cargo.toml deleted file mode 100644 index 4c086fa8..00000000 --- a/2024/day9/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "day9" -version = "0.1.0" -edition = "2021" - -[dependencies] -aoc = { path = "../../aoc" } - -[[bin]] -name = "day9" -path = "day9.rs" diff --git a/one/Cargo.toml b/Cargo.toml similarity index 85% rename from one/Cargo.toml rename to Cargo.toml index 0ec4fb9f..35d8c3e3 100644 --- a/one/Cargo.toml +++ b/Cargo.toml @@ -8,9 +8,9 @@ ascii = [] anim = ["image"] [dependencies] -aoc = { path = "../aoc" } -assembunny = { path = "../2016/assembunny/" } -intcode = { path = "../2019/intcode-rs/" } +aoc = { path = "crates/aoc" } +assembunny = { path = "crates/assembunny" } +intcode = { path = "crates/intcode" } rustc-hash = "*" colored = "*" diff --git a/2018/day23_z3/build.rs b/build.rs similarity index 100% rename from 2018/day23_z3/build.rs rename to build.rs diff --git a/aoc/Cargo.toml b/crates/aoc/Cargo.toml similarity index 100% rename from aoc/Cargo.toml rename to crates/aoc/Cargo.toml diff --git a/aoc/input.txt b/crates/aoc/input.txt similarity index 100% rename from aoc/input.txt rename to crates/aoc/input.txt diff --git a/aoc/src/args.rs b/crates/aoc/src/args.rs similarity index 100% rename from aoc/src/args.rs rename to crates/aoc/src/args.rs diff --git a/aoc/src/bin/dayXX/main.rs b/crates/aoc/src/bin/dayXX/main.rs similarity index 100% rename from aoc/src/bin/dayXX/main.rs rename to crates/aoc/src/bin/dayXX/main.rs diff --git a/aoc/src/coord.rs b/crates/aoc/src/coord.rs similarity index 100% rename from aoc/src/coord.rs rename to crates/aoc/src/coord.rs diff --git a/aoc/src/counter.rs b/crates/aoc/src/counter.rs similarity index 100% rename from aoc/src/counter.rs rename to crates/aoc/src/counter.rs diff --git a/aoc/src/direction.rs b/crates/aoc/src/direction.rs similarity index 100% rename from aoc/src/direction.rs rename to crates/aoc/src/direction.rs diff --git a/aoc/src/grid.rs b/crates/aoc/src/grid.rs similarity index 100% rename from aoc/src/grid.rs rename to crates/aoc/src/grid.rs diff --git a/aoc/src/gridu.rs b/crates/aoc/src/gridu.rs similarity index 100% rename from aoc/src/gridu.rs rename to crates/aoc/src/gridu.rs diff --git a/aoc/src/hexslice.rs b/crates/aoc/src/hexslice.rs similarity index 100% rename from aoc/src/hexslice.rs rename to crates/aoc/src/hexslice.rs diff --git a/aoc/src/integer.rs b/crates/aoc/src/integer.rs similarity index 100% rename from aoc/src/integer.rs rename to crates/aoc/src/integer.rs diff --git a/aoc/src/knot.rs b/crates/aoc/src/knot.rs similarity index 100% rename from aoc/src/knot.rs rename to crates/aoc/src/knot.rs diff --git a/aoc/src/lib.rs b/crates/aoc/src/lib.rs similarity index 100% rename from aoc/src/lib.rs rename to crates/aoc/src/lib.rs diff --git a/aoc/src/math.rs b/crates/aoc/src/math.rs similarity index 100% rename from aoc/src/math.rs rename to crates/aoc/src/math.rs diff --git a/aoc/src/ocr.rs b/crates/aoc/src/ocr.rs similarity index 100% rename from aoc/src/ocr.rs rename to crates/aoc/src/ocr.rs diff --git a/aoc/src/square.rs b/crates/aoc/src/square.rs similarity index 100% rename from aoc/src/square.rs rename to crates/aoc/src/square.rs diff --git a/aoc/src/util.rs b/crates/aoc/src/util.rs similarity index 100% rename from aoc/src/util.rs rename to crates/aoc/src/util.rs diff --git a/aoc/tests/coord_test.rs b/crates/aoc/tests/coord_test.rs similarity index 100% rename from aoc/tests/coord_test.rs rename to crates/aoc/tests/coord_test.rs diff --git a/aoc/tests/grid_test.rs b/crates/aoc/tests/grid_test.rs similarity index 100% rename from aoc/tests/grid_test.rs rename to crates/aoc/tests/grid_test.rs diff --git a/aoc/tests/gridu_test.rs b/crates/aoc/tests/gridu_test.rs similarity index 100% rename from aoc/tests/gridu_test.rs rename to crates/aoc/tests/gridu_test.rs diff --git a/2016/assembunny/Cargo.toml b/crates/assembunny/Cargo.toml similarity index 75% rename from 2016/assembunny/Cargo.toml rename to crates/assembunny/Cargo.toml index ab21ad7a..f55d01fa 100644 --- a/2016/assembunny/Cargo.toml +++ b/crates/assembunny/Cargo.toml @@ -4,6 +4,6 @@ version = "0.1.0" edition = "2021" [dependencies] -aoc = { path = "../../aoc" } +aoc = { path = "../aoc" } [lib] diff --git a/2016/assembunny/assembler/asm.py b/crates/assembunny/assembler/asm.py similarity index 100% rename from 2016/assembunny/assembler/asm.py rename to crates/assembunny/assembler/asm.py diff --git a/2016/assembunny/assembler/calc.assembunny b/crates/assembunny/assembler/calc.assembunny similarity index 100% rename from 2016/assembunny/assembler/calc.assembunny rename to crates/assembunny/assembler/calc.assembunny diff --git a/2016/assembunny/assembler/heart.assembunny b/crates/assembunny/assembler/heart.assembunny similarity index 100% rename from 2016/assembunny/assembler/heart.assembunny rename to crates/assembunny/assembler/heart.assembunny diff --git a/2016/assembunny/assembler/hello1.assembunny b/crates/assembunny/assembler/hello1.assembunny similarity index 100% rename from 2016/assembunny/assembler/hello1.assembunny rename to crates/assembunny/assembler/hello1.assembunny diff --git a/2016/assembunny/assembler/hello2.assembunny b/crates/assembunny/assembler/hello2.assembunny similarity index 100% rename from 2016/assembunny/assembler/hello2.assembunny rename to crates/assembunny/assembler/hello2.assembunny diff --git a/2016/assembunny/assembler/print_a.assembunny b/crates/assembunny/assembler/print_a.assembunny similarity index 100% rename from 2016/assembunny/assembler/print_a.assembunny rename to crates/assembunny/assembler/print_a.assembunny diff --git a/2016/assembunny/bonus.txt b/crates/assembunny/bonus.txt similarity index 100% rename from 2016/assembunny/bonus.txt rename to crates/assembunny/bonus.txt diff --git a/2016/assembunny/src/bin/run.rs b/crates/assembunny/src/bin/run.rs similarity index 100% rename from 2016/assembunny/src/bin/run.rs rename to crates/assembunny/src/bin/run.rs diff --git a/2016/assembunny/src/lib.rs b/crates/assembunny/src/lib.rs similarity index 99% rename from 2016/assembunny/src/lib.rs rename to crates/assembunny/src/lib.rs index 77fc86a6..974a25f4 100644 --- a/2016/assembunny/src/lib.rs +++ b/crates/assembunny/src/lib.rs @@ -45,7 +45,8 @@ impl RegOrValue { // } else { // Self::Register(to_reg(s)) // } - s.parse::().map_or_else(|_| Self::Register(to_reg(s)), Self::Value) + s.parse::() + .map_or_else(|_| Self::Register(to_reg(s)), Self::Value) } } diff --git a/2019/intcode-rs/Cargo.toml b/crates/intcode/Cargo.toml similarity index 72% rename from 2019/intcode-rs/Cargo.toml rename to crates/intcode/Cargo.toml index 7378de58..a06cbb9f 100644 --- a/2019/intcode-rs/Cargo.toml +++ b/crates/intcode/Cargo.toml @@ -4,4 +4,4 @@ version = "0.1.0" edition = "2021" [dependencies] -aoc = { path = "../../aoc" } +aoc = { path = "../aoc" } diff --git a/2019/intcode-rs/src/day5_compare.intcode b/crates/intcode/src/day5_compare.intcode similarity index 100% rename from 2019/intcode-rs/src/day5_compare.intcode rename to crates/intcode/src/day5_compare.intcode diff --git a/2019/intcode-rs/src/lib.rs b/crates/intcode/src/lib.rs similarity index 100% rename from 2019/intcode-rs/src/lib.rs rename to crates/intcode/src/lib.rs diff --git a/2019/intcode-rs/src/main.rs b/crates/intcode/src/main.rs similarity index 100% rename from 2019/intcode-rs/src/main.rs rename to crates/intcode/src/main.rs diff --git a/one/m.py b/one/m.py deleted file mode 100755 index 3db6b367..00000000 --- a/one/m.py +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env python3 - -from pathlib import Path - - -def gen(year): - for src_dir in Path(f"../{year}").glob("day*"): - if "_" in src_dir.name: - continue - - src_file = src_dir / (src_dir.name + ".rs") - dest_dir = Path(f"src/year{year}") / src_dir.name - dest_dir.mkdir(parents=True, exist_ok=True) - - for txt in src_file.parent.glob("*.txt"): - (dest_dir / txt.name).write_bytes(txt.read_bytes()) - - dest_file = dest_dir / (src_dir.name + ".rs") - if src_file.is_file(): - - rs = src_file.read_text() - rs = rs.replace('#[grammar = "day8.pest"]', '#[grammar = "src/year2017/day8/day8.pest"]') - rs = rs.replace("\nfn main() {", "\npub fn main() {") - rs = rs.replace("\nfn solve(", "\n#[must_use]\npub fn solve(") - - dest_file.write_text(rs) - - for txt in src_file.parent.glob("*.rs"): - if txt.name != dest_file.name: - z = dest_dir / dest_file.stem - z.mkdir(parents=True, exist_ok=True) - (z / txt.name).write_bytes(txt.read_bytes()) - - for txt in src_file.parent.glob("*.txt"): - (dest_dir / txt.name).write_bytes(txt.read_bytes()) - - for txt in src_file.parent.glob("*.pest"): - (dest_dir / txt.name).write_bytes(txt.read_bytes()) - - -gen(2015) -gen(2016) -gen(2017) -gen(2018) -gen(2019) -gen(2020) -gen(2021) -gen(2022) -gen(2023) -gen(2024) diff --git a/one/src/lib.rs b/src/lib.rs similarity index 100% rename from one/src/lib.rs rename to src/lib.rs diff --git a/one/src/main.rs b/src/main.rs similarity index 100% rename from one/src/main.rs rename to src/main.rs diff --git a/2015/README.md b/src/year2015/README.md similarity index 100% rename from 2015/README.md rename to src/year2015/README.md diff --git a/2015/day1/day1.rs b/src/year2015/day1/day1.rs similarity index 100% rename from 2015/day1/day1.rs rename to src/year2015/day1/day1.rs diff --git a/2015/day10/day10.rs b/src/year2015/day10/day10.rs similarity index 100% rename from 2015/day10/day10.rs rename to src/year2015/day10/day10.rs diff --git a/2015/day11/day11.rs b/src/year2015/day11/day11.rs similarity index 100% rename from 2015/day11/day11.rs rename to src/year2015/day11/day11.rs diff --git a/2015/day12/day12.rs b/src/year2015/day12/day12.rs similarity index 100% rename from 2015/day12/day12.rs rename to src/year2015/day12/day12.rs diff --git a/2015/day13/day13.py b/src/year2015/day13/day13.py similarity index 100% rename from 2015/day13/day13.py rename to src/year2015/day13/day13.py diff --git a/2015/day13/day13.rs b/src/year2015/day13/day13.rs similarity index 100% rename from 2015/day13/day13.rs rename to src/year2015/day13/day13.rs diff --git a/2015/day13/test.txt b/src/year2015/day13/test.txt similarity index 100% rename from 2015/day13/test.txt rename to src/year2015/day13/test.txt diff --git a/2015/day14/day14.rs b/src/year2015/day14/day14.rs similarity index 100% rename from 2015/day14/day14.rs rename to src/year2015/day14/day14.rs diff --git a/2015/day14/test.txt b/src/year2015/day14/test.txt similarity index 100% rename from 2015/day14/test.txt rename to src/year2015/day14/test.txt diff --git a/2015/day15/day15.rs b/src/year2015/day15/day15.rs similarity index 100% rename from 2015/day15/day15.rs rename to src/year2015/day15/day15.rs diff --git a/2015/day15/test.txt b/src/year2015/day15/test.txt similarity index 100% rename from 2015/day15/test.txt rename to src/year2015/day15/test.txt diff --git a/2015/day16/day16.py b/src/year2015/day16/day16.py similarity index 100% rename from 2015/day16/day16.py rename to src/year2015/day16/day16.py diff --git a/2015/day16/day16.rs b/src/year2015/day16/day16.rs similarity index 100% rename from 2015/day16/day16.rs rename to src/year2015/day16/day16.rs diff --git a/2015/day17/day17.rs b/src/year2015/day17/day17.rs similarity index 100% rename from 2015/day17/day17.rs rename to src/year2015/day17/day17.rs diff --git a/2015/day17/test.txt b/src/year2015/day17/test.txt similarity index 100% rename from 2015/day17/test.txt rename to src/year2015/day17/test.txt diff --git a/2015/day18/README.md b/src/year2015/day18/README.md similarity index 100% rename from 2015/day18/README.md rename to src/year2015/day18/README.md diff --git a/2015/day18/anim.sh b/src/year2015/day18/anim.sh similarity index 100% rename from 2015/day18/anim.sh rename to src/year2015/day18/anim.sh diff --git a/2015/day18/anim1.gif b/src/year2015/day18/anim1.gif similarity index 100% rename from 2015/day18/anim1.gif rename to src/year2015/day18/anim1.gif diff --git a/2015/day18/anim2.gif b/src/year2015/day18/anim2.gif similarity index 100% rename from 2015/day18/anim2.gif rename to src/year2015/day18/anim2.gif diff --git a/2015/day18/day18.rs b/src/year2015/day18/day18.rs similarity index 100% rename from 2015/day18/day18.rs rename to src/year2015/day18/day18.rs diff --git a/2015/day18/demo.txt b/src/year2015/day18/demo.txt similarity index 100% rename from 2015/day18/demo.txt rename to src/year2015/day18/demo.txt diff --git a/2015/day19/day19.rs b/src/year2015/day19/day19.rs similarity index 100% rename from 2015/day19/day19.rs rename to src/year2015/day19/day19.rs diff --git a/2015/day19/sample_1.txt b/src/year2015/day19/sample_1.txt similarity index 100% rename from 2015/day19/sample_1.txt rename to src/year2015/day19/sample_1.txt diff --git a/2015/day19/sample_2.txt b/src/year2015/day19/sample_2.txt similarity index 100% rename from 2015/day19/sample_2.txt rename to src/year2015/day19/sample_2.txt diff --git a/2015/day2/day2.rs b/src/year2015/day2/day2.rs similarity index 100% rename from 2015/day2/day2.rs rename to src/year2015/day2/day2.rs diff --git a/2015/day20/day20.rs b/src/year2015/day20/day20.rs similarity index 100% rename from 2015/day20/day20.rs rename to src/year2015/day20/day20.rs diff --git a/2015/day21/day21.py b/src/year2015/day21/day21.py similarity index 100% rename from 2015/day21/day21.py rename to src/year2015/day21/day21.py diff --git a/2015/day21/day21.rs b/src/year2015/day21/day21.rs similarity index 100% rename from 2015/day21/day21.rs rename to src/year2015/day21/day21.rs diff --git a/2015/day22/day22.rs b/src/year2015/day22/day22.rs similarity index 100% rename from 2015/day22/day22.rs rename to src/year2015/day22/day22.rs diff --git a/2015/day23/day23.py b/src/year2015/day23/day23.py similarity index 100% rename from 2015/day23/day23.py rename to src/year2015/day23/day23.py diff --git a/2015/day23/day23.rs b/src/year2015/day23/day23.rs similarity index 100% rename from 2015/day23/day23.rs rename to src/year2015/day23/day23.rs diff --git a/2015/day23/test.txt b/src/year2015/day23/test.txt similarity index 100% rename from 2015/day23/test.txt rename to src/year2015/day23/test.txt diff --git a/2015/day24/day24.py b/src/year2015/day24/day24.py similarity index 100% rename from 2015/day24/day24.py rename to src/year2015/day24/day24.py diff --git a/2015/day24/day24.rs b/src/year2015/day24/day24.rs similarity index 100% rename from 2015/day24/day24.rs rename to src/year2015/day24/day24.rs diff --git a/2015/day24/test.txt b/src/year2015/day24/test.txt similarity index 100% rename from 2015/day24/test.txt rename to src/year2015/day24/test.txt diff --git a/2015/day25/day25.rs b/src/year2015/day25/day25.rs similarity index 100% rename from 2015/day25/day25.rs rename to src/year2015/day25/day25.rs diff --git a/2015/day3/day3.rs b/src/year2015/day3/day3.rs similarity index 100% rename from 2015/day3/day3.rs rename to src/year2015/day3/day3.rs diff --git a/2015/day4/day4.rs b/src/year2015/day4/day4.rs similarity index 100% rename from 2015/day4/day4.rs rename to src/year2015/day4/day4.rs diff --git a/2015/day4/demo.txt b/src/year2015/day4/demo.txt similarity index 100% rename from 2015/day4/demo.txt rename to src/year2015/day4/demo.txt diff --git a/2015/day5/day5.rs b/src/year2015/day5/day5.rs similarity index 100% rename from 2015/day5/day5.rs rename to src/year2015/day5/day5.rs diff --git a/2015/day6/day6.rs b/src/year2015/day6/day6.rs similarity index 100% rename from 2015/day6/day6.rs rename to src/year2015/day6/day6.rs diff --git a/2015/day7/day7.rs b/src/year2015/day7/day7.rs similarity index 100% rename from 2015/day7/day7.rs rename to src/year2015/day7/day7.rs diff --git a/2015/day7/demo.txt b/src/year2015/day7/demo.txt similarity index 100% rename from 2015/day7/demo.txt rename to src/year2015/day7/demo.txt diff --git a/2015/day8/day8.rs b/src/year2015/day8/day8.rs similarity index 100% rename from 2015/day8/day8.rs rename to src/year2015/day8/day8.rs diff --git a/2015/day8/test.txt b/src/year2015/day8/test.txt similarity index 100% rename from 2015/day8/test.txt rename to src/year2015/day8/test.txt diff --git a/2015/day9/day9.rs b/src/year2015/day9/day9.rs similarity index 100% rename from 2015/day9/day9.rs rename to src/year2015/day9/day9.rs diff --git a/2015/day9/test.txt b/src/year2015/day9/test.txt similarity index 100% rename from 2015/day9/test.txt rename to src/year2015/day9/test.txt diff --git a/2016/.bonus.md b/src/year2016/.bonus.md similarity index 100% rename from 2016/.bonus.md rename to src/year2016/.bonus.md diff --git a/2016/.rustfmt.toml b/src/year2016/.rustfmt.toml similarity index 100% rename from 2016/.rustfmt.toml rename to src/year2016/.rustfmt.toml diff --git a/2016/README.md b/src/year2016/README.md similarity index 100% rename from 2016/README.md rename to src/year2016/README.md diff --git a/2016/day1/day1.rs b/src/year2016/day1/day1.rs similarity index 100% rename from 2016/day1/day1.rs rename to src/year2016/day1/day1.rs diff --git a/2016/day10/day10.rs b/src/year2016/day10/day10.rs similarity index 100% rename from 2016/day10/day10.rs rename to src/year2016/day10/day10.rs diff --git a/2016/day11/day11.rs b/src/year2016/day11/day11.rs similarity index 100% rename from 2016/day11/day11.rs rename to src/year2016/day11/day11.rs diff --git a/2016/day11/test.txt b/src/year2016/day11/test.txt similarity index 100% rename from 2016/day11/test.txt rename to src/year2016/day11/test.txt diff --git a/2016/day12/day12.rs b/src/year2016/day12/day12.rs similarity index 100% rename from 2016/day12/day12.rs rename to src/year2016/day12/day12.rs diff --git a/2016/day13/day13.rs b/src/year2016/day13/day13.rs similarity index 100% rename from 2016/day13/day13.rs rename to src/year2016/day13/day13.rs diff --git a/2016/day14/day14.rs b/src/year2016/day14/day14.rs similarity index 100% rename from 2016/day14/day14.rs rename to src/year2016/day14/day14.rs diff --git a/2016/day15/day15.rs b/src/year2016/day15/day15.rs similarity index 100% rename from 2016/day15/day15.rs rename to src/year2016/day15/day15.rs diff --git a/2016/day16/day16.rs b/src/year2016/day16/day16.rs similarity index 100% rename from 2016/day16/day16.rs rename to src/year2016/day16/day16.rs diff --git a/2016/day17/day17.rs b/src/year2016/day17/day17.rs similarity index 100% rename from 2016/day17/day17.rs rename to src/year2016/day17/day17.rs diff --git a/2016/day18/day18.rs b/src/year2016/day18/day18.rs similarity index 100% rename from 2016/day18/day18.rs rename to src/year2016/day18/day18.rs diff --git a/2016/day19/day19.rs b/src/year2016/day19/day19.rs similarity index 100% rename from 2016/day19/day19.rs rename to src/year2016/day19/day19.rs diff --git a/2016/day2/day2.rs b/src/year2016/day2/day2.rs similarity index 100% rename from 2016/day2/day2.rs rename to src/year2016/day2/day2.rs diff --git a/2016/day2/test.txt b/src/year2016/day2/test.txt similarity index 100% rename from 2016/day2/test.txt rename to src/year2016/day2/test.txt diff --git a/2016/day20/day20.rs b/src/year2016/day20/day20.rs similarity index 100% rename from 2016/day20/day20.rs rename to src/year2016/day20/day20.rs diff --git a/2016/day21/day21.rs b/src/year2016/day21/day21.rs similarity index 100% rename from 2016/day21/day21.rs rename to src/year2016/day21/day21.rs diff --git a/2016/day22/day22.rs b/src/year2016/day22/day22.rs similarity index 100% rename from 2016/day22/day22.rs rename to src/year2016/day22/day22.rs diff --git a/2016/day22/sample_1.txt b/src/year2016/day22/sample_1.txt similarity index 100% rename from 2016/day22/sample_1.txt rename to src/year2016/day22/sample_1.txt diff --git a/2016/day23/day23.rs b/src/year2016/day23/day23.rs similarity index 100% rename from 2016/day23/day23.rs rename to src/year2016/day23/day23.rs diff --git a/2016/day24/day24.rs b/src/year2016/day24/day24.rs similarity index 100% rename from 2016/day24/day24.rs rename to src/year2016/day24/day24.rs diff --git a/2016/day24/sample_1.txt b/src/year2016/day24/sample_1.txt similarity index 100% rename from 2016/day24/sample_1.txt rename to src/year2016/day24/sample_1.txt diff --git a/2016/day25/day25.rs b/src/year2016/day25/day25.rs similarity index 100% rename from 2016/day25/day25.rs rename to src/year2016/day25/day25.rs diff --git a/2016/day3/day3.rs b/src/year2016/day3/day3.rs similarity index 100% rename from 2016/day3/day3.rs rename to src/year2016/day3/day3.rs diff --git a/2016/day4/day4.rs b/src/year2016/day4/day4.rs similarity index 100% rename from 2016/day4/day4.rs rename to src/year2016/day4/day4.rs diff --git a/2016/day5/day5.rs b/src/year2016/day5/day5.rs similarity index 100% rename from 2016/day5/day5.rs rename to src/year2016/day5/day5.rs diff --git a/2016/day6/day6.rs b/src/year2016/day6/day6.rs similarity index 100% rename from 2016/day6/day6.rs rename to src/year2016/day6/day6.rs diff --git a/2016/day6/test.txt b/src/year2016/day6/test.txt similarity index 100% rename from 2016/day6/test.txt rename to src/year2016/day6/test.txt diff --git a/2016/day7/day7.rs b/src/year2016/day7/day7.rs similarity index 100% rename from 2016/day7/day7.rs rename to src/year2016/day7/day7.rs diff --git a/2016/day8/day8.rs b/src/year2016/day8/day8.rs similarity index 100% rename from 2016/day8/day8.rs rename to src/year2016/day8/day8.rs diff --git a/2016/day9/day9.rs b/src/year2016/day9/day9.rs similarity index 100% rename from 2016/day9/day9.rs rename to src/year2016/day9/day9.rs diff --git a/2017/README.md b/src/year2017/README.md similarity index 100% rename from 2017/README.md rename to src/year2017/README.md diff --git a/2017/day1/day1.py b/src/year2017/day1/day1.py similarity index 100% rename from 2017/day1/day1.py rename to src/year2017/day1/day1.py diff --git a/2017/day1/day1.rs b/src/year2017/day1/day1.rs similarity index 100% rename from 2017/day1/day1.rs rename to src/year2017/day1/day1.rs diff --git a/2017/day10/day10.rs b/src/year2017/day10/day10.rs similarity index 100% rename from 2017/day10/day10.rs rename to src/year2017/day10/day10.rs diff --git a/2017/day11/day11.py b/src/year2017/day11/day11.py similarity index 100% rename from 2017/day11/day11.py rename to src/year2017/day11/day11.py diff --git a/2017/day11/day11.rs b/src/year2017/day11/day11.rs similarity index 100% rename from 2017/day11/day11.rs rename to src/year2017/day11/day11.rs diff --git a/2017/day12/day12.py b/src/year2017/day12/day12.py similarity index 100% rename from 2017/day12/day12.py rename to src/year2017/day12/day12.py diff --git a/2017/day12/day12.rs b/src/year2017/day12/day12.rs similarity index 100% rename from 2017/day12/day12.rs rename to src/year2017/day12/day12.rs diff --git a/2017/day12/test.txt b/src/year2017/day12/test.txt similarity index 100% rename from 2017/day12/test.txt rename to src/year2017/day12/test.txt diff --git a/2017/day13/day13.rs b/src/year2017/day13/day13.rs similarity index 100% rename from 2017/day13/day13.rs rename to src/year2017/day13/day13.rs diff --git a/2017/day13/test.txt b/src/year2017/day13/test.txt similarity index 100% rename from 2017/day13/test.txt rename to src/year2017/day13/test.txt diff --git a/2017/day14/day14.rs b/src/year2017/day14/day14.rs similarity index 100% rename from 2017/day14/day14.rs rename to src/year2017/day14/day14.rs diff --git a/2017/day14/test.txt b/src/year2017/day14/test.txt similarity index 100% rename from 2017/day14/test.txt rename to src/year2017/day14/test.txt diff --git a/2017/day15/day15.rs b/src/year2017/day15/day15.rs similarity index 100% rename from 2017/day15/day15.rs rename to src/year2017/day15/day15.rs diff --git a/2017/day16/day16.rs b/src/year2017/day16/day16.rs similarity index 100% rename from 2017/day16/day16.rs rename to src/year2017/day16/day16.rs diff --git a/2017/day17/day17.rs b/src/year2017/day17/day17.rs similarity index 100% rename from 2017/day17/day17.rs rename to src/year2017/day17/day17.rs diff --git a/2017/day18/day18.rs b/src/year2017/day18/day18.rs similarity index 100% rename from 2017/day18/day18.rs rename to src/year2017/day18/day18.rs diff --git a/2017/day18/sample_1.txt b/src/year2017/day18/sample_1.txt similarity index 100% rename from 2017/day18/sample_1.txt rename to src/year2017/day18/sample_1.txt diff --git a/2017/day18/sample_2.txt b/src/year2017/day18/sample_2.txt similarity index 100% rename from 2017/day18/sample_2.txt rename to src/year2017/day18/sample_2.txt diff --git a/2017/day19/day19.py b/src/year2017/day19/day19.py similarity index 100% rename from 2017/day19/day19.py rename to src/year2017/day19/day19.py diff --git a/2017/day19/day19.rs b/src/year2017/day19/day19.rs similarity index 100% rename from 2017/day19/day19.rs rename to src/year2017/day19/day19.rs diff --git a/2017/day19/test.txt b/src/year2017/day19/test.txt similarity index 100% rename from 2017/day19/test.txt rename to src/year2017/day19/test.txt diff --git a/2017/day2/day2.py b/src/year2017/day2/day2.py similarity index 100% rename from 2017/day2/day2.py rename to src/year2017/day2/day2.py diff --git a/2017/day2/day2.rs b/src/year2017/day2/day2.rs similarity index 100% rename from 2017/day2/day2.rs rename to src/year2017/day2/day2.rs diff --git a/2017/day2/sample_1.txt b/src/year2017/day2/sample_1.txt similarity index 100% rename from 2017/day2/sample_1.txt rename to src/year2017/day2/sample_1.txt diff --git a/2017/day2/sample_2.txt b/src/year2017/day2/sample_2.txt similarity index 100% rename from 2017/day2/sample_2.txt rename to src/year2017/day2/sample_2.txt diff --git a/2017/day20/day20.py b/src/year2017/day20/day20.py similarity index 100% rename from 2017/day20/day20.py rename to src/year2017/day20/day20.py diff --git a/2017/day20/day20.rs b/src/year2017/day20/day20.rs similarity index 100% rename from 2017/day20/day20.rs rename to src/year2017/day20/day20.rs diff --git a/2017/day21/day21.py b/src/year2017/day21/day21.py similarity index 100% rename from 2017/day21/day21.py rename to src/year2017/day21/day21.py diff --git a/2017/day21/day21.rs b/src/year2017/day21/day21.rs similarity index 100% rename from 2017/day21/day21.rs rename to src/year2017/day21/day21.rs diff --git a/2017/day21/test.txt b/src/year2017/day21/test.txt similarity index 100% rename from 2017/day21/test.txt rename to src/year2017/day21/test.txt diff --git a/2017/day22/day22.py b/src/year2017/day22/day22.py similarity index 100% rename from 2017/day22/day22.py rename to src/year2017/day22/day22.py diff --git a/2017/day22/day22.rs b/src/year2017/day22/day22.rs similarity index 100% rename from 2017/day22/day22.rs rename to src/year2017/day22/day22.rs diff --git a/2017/day22/test.txt b/src/year2017/day22/test.txt similarity index 100% rename from 2017/day22/test.txt rename to src/year2017/day22/test.txt diff --git a/2017/day23/day23.rs b/src/year2017/day23/day23.rs similarity index 100% rename from 2017/day23/day23.rs rename to src/year2017/day23/day23.rs diff --git a/2017/day24/day24.py b/src/year2017/day24/day24.py similarity index 100% rename from 2017/day24/day24.py rename to src/year2017/day24/day24.py diff --git a/2017/day24/day24.rs b/src/year2017/day24/day24.rs similarity index 100% rename from 2017/day24/day24.rs rename to src/year2017/day24/day24.rs diff --git a/2017/day24/test.txt b/src/year2017/day24/test.txt similarity index 100% rename from 2017/day24/test.txt rename to src/year2017/day24/test.txt diff --git a/2017/day25/day25.py b/src/year2017/day25/day25.py similarity index 100% rename from 2017/day25/day25.py rename to src/year2017/day25/day25.py diff --git a/2017/day25/day25.rs b/src/year2017/day25/day25.rs similarity index 100% rename from 2017/day25/day25.rs rename to src/year2017/day25/day25.rs diff --git a/2017/day25/test.txt b/src/year2017/day25/test.txt similarity index 100% rename from 2017/day25/test.txt rename to src/year2017/day25/test.txt diff --git a/2017/day3/day3.py b/src/year2017/day3/day3.py similarity index 100% rename from 2017/day3/day3.py rename to src/year2017/day3/day3.py diff --git a/2017/day3/day3.rs b/src/year2017/day3/day3.rs similarity index 100% rename from 2017/day3/day3.rs rename to src/year2017/day3/day3.rs diff --git a/2017/day4/day4.py b/src/year2017/day4/day4.py similarity index 100% rename from 2017/day4/day4.py rename to src/year2017/day4/day4.py diff --git a/2017/day4/day4.rs b/src/year2017/day4/day4.rs similarity index 100% rename from 2017/day4/day4.rs rename to src/year2017/day4/day4.rs diff --git a/2017/day5/day5.py b/src/year2017/day5/day5.py similarity index 100% rename from 2017/day5/day5.py rename to src/year2017/day5/day5.py diff --git a/2017/day5/day5.rs b/src/year2017/day5/day5.rs similarity index 100% rename from 2017/day5/day5.rs rename to src/year2017/day5/day5.rs diff --git a/2017/day5/test.txt b/src/year2017/day5/test.txt similarity index 100% rename from 2017/day5/test.txt rename to src/year2017/day5/test.txt diff --git a/2017/day6/day6.py b/src/year2017/day6/day6.py similarity index 100% rename from 2017/day6/day6.py rename to src/year2017/day6/day6.py diff --git a/2017/day6/day6.rs b/src/year2017/day6/day6.rs similarity index 100% rename from 2017/day6/day6.rs rename to src/year2017/day6/day6.rs diff --git a/2017/day6/test.txt b/src/year2017/day6/test.txt similarity index 100% rename from 2017/day6/test.txt rename to src/year2017/day6/test.txt diff --git a/2017/day7/day7.py b/src/year2017/day7/day7.py similarity index 100% rename from 2017/day7/day7.py rename to src/year2017/day7/day7.py diff --git a/2017/day7/day7.rs b/src/year2017/day7/day7.rs similarity index 100% rename from 2017/day7/day7.rs rename to src/year2017/day7/day7.rs diff --git a/2017/day7/test.txt b/src/year2017/day7/test.txt similarity index 100% rename from 2017/day7/test.txt rename to src/year2017/day7/test.txt diff --git a/2017/day8/day8.pest b/src/year2017/day8/day8.pest similarity index 100% rename from 2017/day8/day8.pest rename to src/year2017/day8/day8.pest diff --git a/2017/day8/day8.py b/src/year2017/day8/day8.py similarity index 100% rename from 2017/day8/day8.py rename to src/year2017/day8/day8.py diff --git a/2017/day8/day8.rs b/src/year2017/day8/day8.rs similarity index 98% rename from 2017/day8/day8.rs rename to src/year2017/day8/day8.rs index f370c63d..ea799e70 100644 --- a/2017/day8/day8.rs +++ b/src/year2017/day8/day8.rs @@ -6,7 +6,7 @@ use pest::Parser; use pest_derive::Parser; #[derive(Parser)] -#[grammar = "day8.pest"] +#[grammar = "./src/year2017/day8/day8.pest"] struct MyParser; struct Cpu { diff --git a/2017/day8/test.txt b/src/year2017/day8/test.txt similarity index 100% rename from 2017/day8/test.txt rename to src/year2017/day8/test.txt diff --git a/2017/day9/day9.py b/src/year2017/day9/day9.py similarity index 100% rename from 2017/day9/day9.py rename to src/year2017/day9/day9.py diff --git a/2017/day9/day9.rs b/src/year2017/day9/day9.rs similarity index 100% rename from 2017/day9/day9.rs rename to src/year2017/day9/day9.rs diff --git a/2018/README.md b/src/year2018/README.md similarity index 100% rename from 2018/README.md rename to src/year2018/README.md diff --git a/2018/day1/day1.rs b/src/year2018/day1/day1.rs similarity index 100% rename from 2018/day1/day1.rs rename to src/year2018/day1/day1.rs diff --git a/2018/day1/test1.txt b/src/year2018/day1/test1.txt similarity index 100% rename from 2018/day1/test1.txt rename to src/year2018/day1/test1.txt diff --git a/2018/day1/test2.txt b/src/year2018/day1/test2.txt similarity index 100% rename from 2018/day1/test2.txt rename to src/year2018/day1/test2.txt diff --git a/2018/day10/day10.rs b/src/year2018/day10/day10.rs similarity index 100% rename from 2018/day10/day10.rs rename to src/year2018/day10/day10.rs diff --git a/2018/day11/day11.rs b/src/year2018/day11/day11.rs similarity index 100% rename from 2018/day11/day11.rs rename to src/year2018/day11/day11.rs diff --git a/2018/day12/day12.rs b/src/year2018/day12/day12.rs similarity index 100% rename from 2018/day12/day12.rs rename to src/year2018/day12/day12.rs diff --git a/2018/day12/test.txt b/src/year2018/day12/test.txt similarity index 100% rename from 2018/day12/test.txt rename to src/year2018/day12/test.txt diff --git a/2018/day13/day13.rs b/src/year2018/day13/day13.rs similarity index 100% rename from 2018/day13/day13.rs rename to src/year2018/day13/day13.rs diff --git a/2018/day13/sample_4.txt b/src/year2018/day13/sample_4.txt similarity index 100% rename from 2018/day13/sample_4.txt rename to src/year2018/day13/sample_4.txt diff --git a/2018/day13/sample_6.txt b/src/year2018/day13/sample_6.txt similarity index 100% rename from 2018/day13/sample_6.txt rename to src/year2018/day13/sample_6.txt diff --git a/2018/day14/day14.rs b/src/year2018/day14/day14.rs similarity index 100% rename from 2018/day14/day14.rs rename to src/year2018/day14/day14.rs diff --git a/2018/day15/day15.rs b/src/year2018/day15/day15.rs similarity index 100% rename from 2018/day15/day15.rs rename to src/year2018/day15/day15.rs diff --git a/2018/day15/sample_10.txt b/src/year2018/day15/sample_10.txt similarity index 100% rename from 2018/day15/sample_10.txt rename to src/year2018/day15/sample_10.txt diff --git a/2018/day15/sample_11.txt b/src/year2018/day15/sample_11.txt similarity index 100% rename from 2018/day15/sample_11.txt rename to src/year2018/day15/sample_11.txt diff --git a/2018/day15/sample_6.txt b/src/year2018/day15/sample_6.txt similarity index 100% rename from 2018/day15/sample_6.txt rename to src/year2018/day15/sample_6.txt diff --git a/2018/day15/sample_7.txt b/src/year2018/day15/sample_7.txt similarity index 100% rename from 2018/day15/sample_7.txt rename to src/year2018/day15/sample_7.txt diff --git a/2018/day15/sample_8.txt b/src/year2018/day15/sample_8.txt similarity index 100% rename from 2018/day15/sample_8.txt rename to src/year2018/day15/sample_8.txt diff --git a/2018/day15/sample_9.txt b/src/year2018/day15/sample_9.txt similarity index 100% rename from 2018/day15/sample_9.txt rename to src/year2018/day15/sample_9.txt diff --git a/2018/day16/day16.py b/src/year2018/day16/day16.py similarity index 100% rename from 2018/day16/day16.py rename to src/year2018/day16/day16.py diff --git a/2018/day16/day16.rs b/src/year2018/day16/day16.rs similarity index 100% rename from 2018/day16/day16.rs rename to src/year2018/day16/day16.rs diff --git a/2018/day17/day17.rs b/src/year2018/day17/day17.rs similarity index 100% rename from 2018/day17/day17.rs rename to src/year2018/day17/day17.rs diff --git a/2018/day17/test.txt b/src/year2018/day17/test.txt similarity index 100% rename from 2018/day17/test.txt rename to src/year2018/day17/test.txt diff --git a/2018/day18/README.md b/src/year2018/day18/README.md similarity index 100% rename from 2018/day18/README.md rename to src/year2018/day18/README.md diff --git a/2018/day18/day18.py b/src/year2018/day18/day18.py similarity index 100% rename from 2018/day18/day18.py rename to src/year2018/day18/day18.py diff --git a/2018/day18/day18.rs b/src/year2018/day18/day18.rs similarity index 100% rename from 2018/day18/day18.rs rename to src/year2018/day18/day18.rs diff --git a/2018/day18/lumberarea.gif b/src/year2018/day18/lumberarea.gif similarity index 100% rename from 2018/day18/lumberarea.gif rename to src/year2018/day18/lumberarea.gif diff --git a/2018/day18/test.txt b/src/year2018/day18/test.txt similarity index 100% rename from 2018/day18/test.txt rename to src/year2018/day18/test.txt diff --git a/2018/day19/day19.rs b/src/year2018/day19/day19.rs similarity index 100% rename from 2018/day19/day19.rs rename to src/year2018/day19/day19.rs diff --git a/2018/day19/sample_1.txt b/src/year2018/day19/sample_1.txt similarity index 100% rename from 2018/day19/sample_1.txt rename to src/year2018/day19/sample_1.txt diff --git a/2018/day2/day2.rs b/src/year2018/day2/day2.rs similarity index 100% rename from 2018/day2/day2.rs rename to src/year2018/day2/day2.rs diff --git a/2018/day2/test1.txt b/src/year2018/day2/test1.txt similarity index 100% rename from 2018/day2/test1.txt rename to src/year2018/day2/test1.txt diff --git a/2018/day2/test2.txt b/src/year2018/day2/test2.txt similarity index 100% rename from 2018/day2/test2.txt rename to src/year2018/day2/test2.txt diff --git a/2018/day20/day20.rs b/src/year2018/day20/day20.rs similarity index 100% rename from 2018/day20/day20.rs rename to src/year2018/day20/day20.rs diff --git a/2018/day21/day21.rs b/src/year2018/day21/day21.rs similarity index 100% rename from 2018/day21/day21.rs rename to src/year2018/day21/day21.rs diff --git a/2018/day22/day22.rs b/src/year2018/day22/day22.rs similarity index 100% rename from 2018/day22/day22.rs rename to src/year2018/day22/day22.rs diff --git a/2018/day22/test.txt b/src/year2018/day22/test.txt similarity index 100% rename from 2018/day22/test.txt rename to src/year2018/day22/test.txt diff --git a/2018/day23/day23.rs b/src/year2018/day23/day23.rs similarity index 100% rename from 2018/day23/day23.rs rename to src/year2018/day23/day23.rs diff --git a/2018/day23/sample_1.txt b/src/year2018/day23/sample_1.txt similarity index 100% rename from 2018/day23/sample_1.txt rename to src/year2018/day23/sample_1.txt diff --git a/2018/day23/sample_2.txt b/src/year2018/day23/sample_2.txt similarity index 100% rename from 2018/day23/sample_2.txt rename to src/year2018/day23/sample_2.txt diff --git a/2023/day24/build.rs b/src/year2018/day23_z3/build.rs similarity index 100% rename from 2023/day24/build.rs rename to src/year2018/day23_z3/build.rs diff --git a/2018/day23_z3/day23.rs b/src/year2018/day23_z3/day23.rs similarity index 100% rename from 2018/day23_z3/day23.rs rename to src/year2018/day23_z3/day23.rs diff --git a/2018/day23_z3/sample_1.txt b/src/year2018/day23_z3/sample_1.txt similarity index 100% rename from 2018/day23_z3/sample_1.txt rename to src/year2018/day23_z3/sample_1.txt diff --git a/2018/day23_z3/sample_2.txt b/src/year2018/day23_z3/sample_2.txt similarity index 100% rename from 2018/day23_z3/sample_2.txt rename to src/year2018/day23_z3/sample_2.txt diff --git a/2018/day24/day24.rs b/src/year2018/day24/day24.rs similarity index 100% rename from 2018/day24/day24.rs rename to src/year2018/day24/day24.rs diff --git a/2018/day24/test.txt b/src/year2018/day24/test.txt similarity index 100% rename from 2018/day24/test.txt rename to src/year2018/day24/test.txt diff --git a/2018/day25/day25.rs b/src/year2018/day25/day25.rs similarity index 100% rename from 2018/day25/day25.rs rename to src/year2018/day25/day25.rs diff --git a/2018/day25/sample_1.txt b/src/year2018/day25/sample_1.txt similarity index 100% rename from 2018/day25/sample_1.txt rename to src/year2018/day25/sample_1.txt diff --git a/2018/day25/sample_2.txt b/src/year2018/day25/sample_2.txt similarity index 100% rename from 2018/day25/sample_2.txt rename to src/year2018/day25/sample_2.txt diff --git a/2018/day25/sample_3.txt b/src/year2018/day25/sample_3.txt similarity index 100% rename from 2018/day25/sample_3.txt rename to src/year2018/day25/sample_3.txt diff --git a/2018/day25/sample_4.txt b/src/year2018/day25/sample_4.txt similarity index 100% rename from 2018/day25/sample_4.txt rename to src/year2018/day25/sample_4.txt diff --git a/2018/day3/day3.rs b/src/year2018/day3/day3.rs similarity index 100% rename from 2018/day3/day3.rs rename to src/year2018/day3/day3.rs diff --git a/2018/day3/test.txt b/src/year2018/day3/test.txt similarity index 100% rename from 2018/day3/test.txt rename to src/year2018/day3/test.txt diff --git a/2018/day4/day4.py b/src/year2018/day4/day4.py similarity index 100% rename from 2018/day4/day4.py rename to src/year2018/day4/day4.py diff --git a/2018/day4/day4.rs b/src/year2018/day4/day4.rs similarity index 100% rename from 2018/day4/day4.rs rename to src/year2018/day4/day4.rs diff --git a/2018/day4/test.txt b/src/year2018/day4/test.txt similarity index 100% rename from 2018/day4/test.txt rename to src/year2018/day4/test.txt diff --git a/2018/day5/day5.rs b/src/year2018/day5/day5.rs similarity index 100% rename from 2018/day5/day5.rs rename to src/year2018/day5/day5.rs diff --git a/2018/day5/test.txt b/src/year2018/day5/test.txt similarity index 100% rename from 2018/day5/test.txt rename to src/year2018/day5/test.txt diff --git a/2018/day6/day6.rs b/src/year2018/day6/day6.rs similarity index 100% rename from 2018/day6/day6.rs rename to src/year2018/day6/day6.rs diff --git a/2018/day6/test.txt b/src/year2018/day6/test.txt similarity index 100% rename from 2018/day6/test.txt rename to src/year2018/day6/test.txt diff --git a/2018/day7/day7.rs b/src/year2018/day7/day7.rs similarity index 100% rename from 2018/day7/day7.rs rename to src/year2018/day7/day7.rs diff --git a/2018/day7/test.txt b/src/year2018/day7/test.txt similarity index 100% rename from 2018/day7/test.txt rename to src/year2018/day7/test.txt diff --git a/2018/day8/.vscode/launch.json b/src/year2018/day8/.vscode/launch.json similarity index 100% rename from 2018/day8/.vscode/launch.json rename to src/year2018/day8/.vscode/launch.json diff --git a/2018/day8/day8.py b/src/year2018/day8/day8.py similarity index 100% rename from 2018/day8/day8.py rename to src/year2018/day8/day8.py diff --git a/2018/day8/day8.rs b/src/year2018/day8/day8.rs similarity index 100% rename from 2018/day8/day8.rs rename to src/year2018/day8/day8.rs diff --git a/2018/day8/test.txt b/src/year2018/day8/test.txt similarity index 100% rename from 2018/day8/test.txt rename to src/year2018/day8/test.txt diff --git a/2018/day9/day9.rs b/src/year2018/day9/day9.rs similarity index 100% rename from 2018/day9/day9.rs rename to src/year2018/day9/day9.rs diff --git a/2018/day9_c/build.rs b/src/year2018/day9_c/build.rs similarity index 100% rename from 2018/day9_c/build.rs rename to src/year2018/day9_c/build.rs diff --git a/2018/day9_c/day9.c b/src/year2018/day9_c/day9.c similarity index 100% rename from 2018/day9_c/day9.c rename to src/year2018/day9_c/day9.c diff --git a/2018/day9_c/day9.rs b/src/year2018/day9_c/day9.rs similarity index 100% rename from 2018/day9_c/day9.rs rename to src/year2018/day9_c/day9.rs diff --git a/2019/README.md b/src/year2019/README.md similarity index 100% rename from 2019/README.md rename to src/year2019/README.md diff --git a/2019/day1/day1.py b/src/year2019/day1/day1.py similarity index 100% rename from 2019/day1/day1.py rename to src/year2019/day1/day1.py diff --git a/2019/day1/day1.rs b/src/year2019/day1/day1.rs similarity index 100% rename from 2019/day1/day1.rs rename to src/year2019/day1/day1.rs diff --git a/2019/day10/day10.py b/src/year2019/day10/day10.py similarity index 100% rename from 2019/day10/day10.py rename to src/year2019/day10/day10.py diff --git a/2019/day10/day10.rs b/src/year2019/day10/day10.rs similarity index 100% rename from 2019/day10/day10.rs rename to src/year2019/day10/day10.rs diff --git a/2019/day10/sample_1.txt b/src/year2019/day10/sample_1.txt similarity index 100% rename from 2019/day10/sample_1.txt rename to src/year2019/day10/sample_1.txt diff --git a/2019/day10/sample_4.txt b/src/year2019/day10/sample_4.txt similarity index 100% rename from 2019/day10/sample_4.txt rename to src/year2019/day10/sample_4.txt diff --git a/2019/day10/sample_5.txt b/src/year2019/day10/sample_5.txt similarity index 100% rename from 2019/day10/sample_5.txt rename to src/year2019/day10/sample_5.txt diff --git a/2019/day10/sample_6.txt b/src/year2019/day10/sample_6.txt similarity index 100% rename from 2019/day10/sample_6.txt rename to src/year2019/day10/sample_6.txt diff --git a/2019/day10/sample_7.txt b/src/year2019/day10/sample_7.txt similarity index 100% rename from 2019/day10/sample_7.txt rename to src/year2019/day10/sample_7.txt diff --git a/2019/day11/day11.py b/src/year2019/day11/day11.py similarity index 100% rename from 2019/day11/day11.py rename to src/year2019/day11/day11.py diff --git a/2019/day11/day11.rs b/src/year2019/day11/day11.rs similarity index 100% rename from 2019/day11/day11.rs rename to src/year2019/day11/day11.rs diff --git a/2019/day12/day12.py b/src/year2019/day12/day12.py similarity index 100% rename from 2019/day12/day12.py rename to src/year2019/day12/day12.py diff --git a/2019/day12/day12.rs b/src/year2019/day12/day12.rs similarity index 100% rename from 2019/day12/day12.rs rename to src/year2019/day12/day12.rs diff --git a/2019/day12/sample_1.txt b/src/year2019/day12/sample_1.txt similarity index 100% rename from 2019/day12/sample_1.txt rename to src/year2019/day12/sample_1.txt diff --git a/2019/day12/sample_4.txt b/src/year2019/day12/sample_4.txt similarity index 100% rename from 2019/day12/sample_4.txt rename to src/year2019/day12/sample_4.txt diff --git a/2019/day13/README.md b/src/year2019/day13/README.md similarity index 100% rename from 2019/day13/README.md rename to src/year2019/day13/README.md diff --git a/2019/day13/day13.py b/src/year2019/day13/day13.py similarity index 100% rename from 2019/day13/day13.py rename to src/year2019/day13/day13.py diff --git a/2019/day13/day13.rs b/src/year2019/day13/day13.rs similarity index 100% rename from 2019/day13/day13.rs rename to src/year2019/day13/day13.rs diff --git a/2019/day13/demo.cast b/src/year2019/day13/demo.cast similarity index 100% rename from 2019/day13/demo.cast rename to src/year2019/day13/demo.cast diff --git a/2019/day14/day14.py b/src/year2019/day14/day14.py similarity index 100% rename from 2019/day14/day14.py rename to src/year2019/day14/day14.py diff --git a/2019/day14/day14.rs b/src/year2019/day14/day14.rs similarity index 100% rename from 2019/day14/day14.rs rename to src/year2019/day14/day14.rs diff --git a/2019/day14/sample_1.txt b/src/year2019/day14/sample_1.txt similarity index 100% rename from 2019/day14/sample_1.txt rename to src/year2019/day14/sample_1.txt diff --git a/2019/day14/sample_2.txt b/src/year2019/day14/sample_2.txt similarity index 100% rename from 2019/day14/sample_2.txt rename to src/year2019/day14/sample_2.txt diff --git a/2019/day14/sample_3.txt b/src/year2019/day14/sample_3.txt similarity index 100% rename from 2019/day14/sample_3.txt rename to src/year2019/day14/sample_3.txt diff --git a/2019/day14/sample_4.txt b/src/year2019/day14/sample_4.txt similarity index 100% rename from 2019/day14/sample_4.txt rename to src/year2019/day14/sample_4.txt diff --git a/2019/day14/sample_5.txt b/src/year2019/day14/sample_5.txt similarity index 100% rename from 2019/day14/sample_5.txt rename to src/year2019/day14/sample_5.txt diff --git a/2019/day15/README.md b/src/year2019/day15/README.md similarity index 100% rename from 2019/day15/README.md rename to src/year2019/day15/README.md diff --git a/2019/day15/anim.gif b/src/year2019/day15/anim.gif similarity index 100% rename from 2019/day15/anim.gif rename to src/year2019/day15/anim.gif diff --git a/2019/day15/day15.py b/src/year2019/day15/day15.py similarity index 100% rename from 2019/day15/day15.py rename to src/year2019/day15/day15.py diff --git a/2019/day15/day15.rs b/src/year2019/day15/day15.rs similarity index 100% rename from 2019/day15/day15.rs rename to src/year2019/day15/day15.rs diff --git a/2019/day15/maze.py b/src/year2019/day15/maze.py similarity index 100% rename from 2019/day15/maze.py rename to src/year2019/day15/maze.py diff --git a/2019/day16/day16.c b/src/year2019/day16/day16.c similarity index 100% rename from 2019/day16/day16.c rename to src/year2019/day16/day16.c diff --git a/2019/day16/day16.py b/src/year2019/day16/day16.py similarity index 100% rename from 2019/day16/day16.py rename to src/year2019/day16/day16.py diff --git a/2019/day16/day16.rs b/src/year2019/day16/day16.rs similarity index 100% rename from 2019/day16/day16.rs rename to src/year2019/day16/day16.rs diff --git a/2019/day17/day17.py b/src/year2019/day17/day17.py similarity index 100% rename from 2019/day17/day17.py rename to src/year2019/day17/day17.py diff --git a/2019/day17/day17.rs b/src/year2019/day17/day17.rs similarity index 100% rename from 2019/day17/day17.rs rename to src/year2019/day17/day17.rs diff --git a/2019/day18/day18.rs b/src/year2019/day18/day18.rs similarity index 100% rename from 2019/day18/day18.rs rename to src/year2019/day18/day18.rs diff --git a/2019/day18/sample_1.txt b/src/year2019/day18/sample_1.txt similarity index 100% rename from 2019/day18/sample_1.txt rename to src/year2019/day18/sample_1.txt diff --git a/2019/day18/sample_10.txt b/src/year2019/day18/sample_10.txt similarity index 100% rename from 2019/day18/sample_10.txt rename to src/year2019/day18/sample_10.txt diff --git a/2019/day18/sample_11.txt b/src/year2019/day18/sample_11.txt similarity index 100% rename from 2019/day18/sample_11.txt rename to src/year2019/day18/sample_11.txt diff --git a/2019/day18/sample_4.txt b/src/year2019/day18/sample_4.txt similarity index 100% rename from 2019/day18/sample_4.txt rename to src/year2019/day18/sample_4.txt diff --git a/2019/day18/sample_9.txt b/src/year2019/day18/sample_9.txt similarity index 100% rename from 2019/day18/sample_9.txt rename to src/year2019/day18/sample_9.txt diff --git a/2019/day19/day19.py b/src/year2019/day19/day19.py similarity index 100% rename from 2019/day19/day19.py rename to src/year2019/day19/day19.py diff --git a/2019/day19/day19.rs b/src/year2019/day19/day19.rs similarity index 100% rename from 2019/day19/day19.rs rename to src/year2019/day19/day19.rs diff --git a/2019/day2/day2.py b/src/year2019/day2/day2.py similarity index 100% rename from 2019/day2/day2.py rename to src/year2019/day2/day2.py diff --git a/2019/day2/day2.rs b/src/year2019/day2/day2.rs similarity index 100% rename from 2019/day2/day2.rs rename to src/year2019/day2/day2.rs diff --git a/2019/day20/day20.py b/src/year2019/day20/day20.py similarity index 100% rename from 2019/day20/day20.py rename to src/year2019/day20/day20.py diff --git a/2019/day20/day20.rs b/src/year2019/day20/day20.rs similarity index 100% rename from 2019/day20/day20.rs rename to src/year2019/day20/day20.rs diff --git a/2019/day20/sample_1.txt b/src/year2019/day20/sample_1.txt similarity index 100% rename from 2019/day20/sample_1.txt rename to src/year2019/day20/sample_1.txt diff --git a/2019/day20/sample_2.txt b/src/year2019/day20/sample_2.txt similarity index 100% rename from 2019/day20/sample_2.txt rename to src/year2019/day20/sample_2.txt diff --git a/2019/day20/sample_3.txt b/src/year2019/day20/sample_3.txt similarity index 100% rename from 2019/day20/sample_3.txt rename to src/year2019/day20/sample_3.txt diff --git a/2019/day21/day21.py b/src/year2019/day21/day21.py similarity index 100% rename from 2019/day21/day21.py rename to src/year2019/day21/day21.py diff --git a/2019/day21/day21.rs b/src/year2019/day21/day21.rs similarity index 100% rename from 2019/day21/day21.rs rename to src/year2019/day21/day21.rs diff --git a/2019/day22/day22.rs b/src/year2019/day22/day22.rs similarity index 100% rename from 2019/day22/day22.rs rename to src/year2019/day22/day22.rs diff --git a/2019/day23/day23.py b/src/year2019/day23/day23.py similarity index 100% rename from 2019/day23/day23.py rename to src/year2019/day23/day23.py diff --git a/2019/day23/day23.rs b/src/year2019/day23/day23.rs similarity index 100% rename from 2019/day23/day23.rs rename to src/year2019/day23/day23.rs diff --git a/2019/day24/day24.py b/src/year2019/day24/day24.py similarity index 100% rename from 2019/day24/day24.py rename to src/year2019/day24/day24.py diff --git a/2019/day24/day24.rs b/src/year2019/day24/day24.rs similarity index 100% rename from 2019/day24/day24.rs rename to src/year2019/day24/day24.rs diff --git a/2019/day24/test.txt b/src/year2019/day24/test.txt similarity index 100% rename from 2019/day24/test.txt rename to src/year2019/day24/test.txt diff --git a/2019/day25/day25.py b/src/year2019/day25/day25.py similarity index 100% rename from 2019/day25/day25.py rename to src/year2019/day25/day25.py diff --git a/2019/day25/day25.rs b/src/year2019/day25/day25.rs similarity index 100% rename from 2019/day25/day25.rs rename to src/year2019/day25/day25.rs diff --git a/2019/day25/play.py b/src/year2019/day25/play.py similarity index 100% rename from 2019/day25/play.py rename to src/year2019/day25/play.py diff --git a/2019/day3/day3.py b/src/year2019/day3/day3.py similarity index 100% rename from 2019/day3/day3.py rename to src/year2019/day3/day3.py diff --git a/2019/day3/day3.rs b/src/year2019/day3/day3.rs similarity index 100% rename from 2019/day3/day3.rs rename to src/year2019/day3/day3.rs diff --git a/2019/day3/test1.txt b/src/year2019/day3/test1.txt similarity index 100% rename from 2019/day3/test1.txt rename to src/year2019/day3/test1.txt diff --git a/2019/day3/test2.txt b/src/year2019/day3/test2.txt similarity index 100% rename from 2019/day3/test2.txt rename to src/year2019/day3/test2.txt diff --git a/2019/day4/day4.py b/src/year2019/day4/day4.py similarity index 100% rename from 2019/day4/day4.py rename to src/year2019/day4/day4.py diff --git a/2019/day4/day4.rs b/src/year2019/day4/day4.rs similarity index 100% rename from 2019/day4/day4.rs rename to src/year2019/day4/day4.rs diff --git a/2019/day5/day5.py b/src/year2019/day5/day5.py similarity index 100% rename from 2019/day5/day5.py rename to src/year2019/day5/day5.py diff --git a/2019/day5/day5.rs b/src/year2019/day5/day5.rs similarity index 100% rename from 2019/day5/day5.rs rename to src/year2019/day5/day5.rs diff --git a/2019/day6/day6.py b/src/year2019/day6/day6.py similarity index 100% rename from 2019/day6/day6.py rename to src/year2019/day6/day6.py diff --git a/2019/day6/day6.rs b/src/year2019/day6/day6.rs similarity index 100% rename from 2019/day6/day6.rs rename to src/year2019/day6/day6.rs diff --git a/2019/day6/sample_2.txt b/src/year2019/day6/sample_2.txt similarity index 100% rename from 2019/day6/sample_2.txt rename to src/year2019/day6/sample_2.txt diff --git a/2019/day6/sample_4.txt b/src/year2019/day6/sample_4.txt similarity index 100% rename from 2019/day6/sample_4.txt rename to src/year2019/day6/sample_4.txt diff --git a/2019/day7/day7.py b/src/year2019/day7/day7.py similarity index 100% rename from 2019/day7/day7.py rename to src/year2019/day7/day7.py diff --git a/2019/day7/day7.rs b/src/year2019/day7/day7.rs similarity index 100% rename from 2019/day7/day7.rs rename to src/year2019/day7/day7.rs diff --git a/2019/day8/day8.py b/src/year2019/day8/day8.py similarity index 100% rename from 2019/day8/day8.py rename to src/year2019/day8/day8.py diff --git a/2019/day8/day8.rs b/src/year2019/day8/day8.rs similarity index 100% rename from 2019/day8/day8.rs rename to src/year2019/day8/day8.rs diff --git a/2019/day9/day9.py b/src/year2019/day9/day9.py similarity index 100% rename from 2019/day9/day9.py rename to src/year2019/day9/day9.py diff --git a/2019/day9/day9.rs b/src/year2019/day9/day9.rs similarity index 100% rename from 2019/day9/day9.rs rename to src/year2019/day9/day9.rs diff --git a/2019/intcode/Intcode.py b/src/year2019/intcode/Intcode.py similarity index 100% rename from 2019/intcode/Intcode.py rename to src/year2019/intcode/Intcode.py diff --git a/2019/intcode/amp1.intcode b/src/year2019/intcode/amp1.intcode similarity index 100% rename from 2019/intcode/amp1.intcode rename to src/year2019/intcode/amp1.intcode diff --git a/2019/intcode/amp2.intcode b/src/year2019/intcode/amp2.intcode similarity index 100% rename from 2019/intcode/amp2.intcode rename to src/year2019/intcode/amp2.intcode diff --git a/2019/intcode/amp3.intcode b/src/year2019/intcode/amp3.intcode similarity index 100% rename from 2019/intcode/amp3.intcode rename to src/year2019/intcode/amp3.intcode diff --git a/2019/intcode/bignum1.intcode b/src/year2019/intcode/bignum1.intcode similarity index 100% rename from 2019/intcode/bignum1.intcode rename to src/year2019/intcode/bignum1.intcode diff --git a/2019/intcode/bignum2.intcode b/src/year2019/intcode/bignum2.intcode similarity index 100% rename from 2019/intcode/bignum2.intcode rename to src/year2019/intcode/bignum2.intcode diff --git a/2019/intcode/compare8.intcode b/src/year2019/intcode/compare8.intcode similarity index 100% rename from 2019/intcode/compare8.intcode rename to src/year2019/intcode/compare8.intcode diff --git a/2019/intcode/copyitself.intcode b/src/year2019/intcode/copyitself.intcode similarity index 100% rename from 2019/intcode/copyitself.intcode rename to src/year2019/intcode/copyitself.intcode diff --git a/2019/intcode/count10.intcode b/src/year2019/intcode/count10.intcode similarity index 100% rename from 2019/intcode/count10.intcode rename to src/year2019/intcode/count10.intcode diff --git a/2019/intcode/day2p1.intcode b/src/year2019/intcode/day2p1.intcode similarity index 100% rename from 2019/intcode/day2p1.intcode rename to src/year2019/intcode/day2p1.intcode diff --git a/2019/intcode/day2p2.intcode b/src/year2019/intcode/day2p2.intcode similarity index 100% rename from 2019/intcode/day2p2.intcode rename to src/year2019/intcode/day2p2.intcode diff --git a/2019/intcode/exampleday2.intcode b/src/year2019/intcode/exampleday2.intcode similarity index 100% rename from 2019/intcode/exampleday2.intcode rename to src/year2019/intcode/exampleday2.intcode diff --git a/2019/intcode/helloworld.intcode b/src/year2019/intcode/helloworld.intcode similarity index 100% rename from 2019/intcode/helloworld.intcode rename to src/year2019/intcode/helloworld.intcode diff --git a/2019/intcode/langtonsant.intcode b/src/year2019/intcode/langtonsant.intcode similarity index 100% rename from 2019/intcode/langtonsant.intcode rename to src/year2019/intcode/langtonsant.intcode diff --git a/2019/intcode/nonzero1.intcode b/src/year2019/intcode/nonzero1.intcode similarity index 100% rename from 2019/intcode/nonzero1.intcode rename to src/year2019/intcode/nonzero1.intcode diff --git a/2019/intcode/nonzero2.intcode b/src/year2019/intcode/nonzero2.intcode similarity index 100% rename from 2019/intcode/nonzero2.intcode rename to src/year2019/intcode/nonzero2.intcode diff --git a/2019/ocr/ocr.py b/src/year2019/ocr/ocr.py similarity index 100% rename from 2019/ocr/ocr.py rename to src/year2019/ocr/ocr.py diff --git a/2020/README.md b/src/year2020/README.md similarity index 100% rename from 2020/README.md rename to src/year2020/README.md diff --git a/2020/day1/day1.py b/src/year2020/day1/day1.py similarity index 100% rename from 2020/day1/day1.py rename to src/year2020/day1/day1.py diff --git a/2020/day1/day1.rs b/src/year2020/day1/day1.rs similarity index 100% rename from 2020/day1/day1.rs rename to src/year2020/day1/day1.rs diff --git a/2020/day1/test.txt b/src/year2020/day1/test.txt similarity index 100% rename from 2020/day1/test.txt rename to src/year2020/day1/test.txt diff --git a/2020/day10/day10.py b/src/year2020/day10/day10.py similarity index 100% rename from 2020/day10/day10.py rename to src/year2020/day10/day10.py diff --git a/2020/day10/day10.rs b/src/year2020/day10/day10.rs similarity index 100% rename from 2020/day10/day10.rs rename to src/year2020/day10/day10.rs diff --git a/2020/day10/sample_1.txt b/src/year2020/day10/sample_1.txt similarity index 100% rename from 2020/day10/sample_1.txt rename to src/year2020/day10/sample_1.txt diff --git a/2020/day10/sample_2.txt b/src/year2020/day10/sample_2.txt similarity index 100% rename from 2020/day10/sample_2.txt rename to src/year2020/day10/sample_2.txt diff --git a/2020/day11/day11.py b/src/year2020/day11/day11.py similarity index 100% rename from 2020/day11/day11.py rename to src/year2020/day11/day11.py diff --git a/2020/day11/day11.rs b/src/year2020/day11/day11.rs similarity index 100% rename from 2020/day11/day11.rs rename to src/year2020/day11/day11.rs diff --git a/2020/day11/test.txt b/src/year2020/day11/test.txt similarity index 100% rename from 2020/day11/test.txt rename to src/year2020/day11/test.txt diff --git a/2020/day12/day12.py b/src/year2020/day12/day12.py similarity index 100% rename from 2020/day12/day12.py rename to src/year2020/day12/day12.py diff --git a/2020/day12/day12.rs b/src/year2020/day12/day12.rs similarity index 100% rename from 2020/day12/day12.rs rename to src/year2020/day12/day12.rs diff --git a/2020/day12/test.txt b/src/year2020/day12/test.txt similarity index 100% rename from 2020/day12/test.txt rename to src/year2020/day12/test.txt diff --git a/2020/day13/day13.py b/src/year2020/day13/day13.py similarity index 100% rename from 2020/day13/day13.py rename to src/year2020/day13/day13.py diff --git a/2020/day13/day13.rs b/src/year2020/day13/day13.rs similarity index 100% rename from 2020/day13/day13.rs rename to src/year2020/day13/day13.rs diff --git a/2020/day13/test.txt b/src/year2020/day13/test.txt similarity index 100% rename from 2020/day13/test.txt rename to src/year2020/day13/test.txt diff --git a/2020/day14/day14.py b/src/year2020/day14/day14.py similarity index 100% rename from 2020/day14/day14.py rename to src/year2020/day14/day14.py diff --git a/2020/day14/day14.rs b/src/year2020/day14/day14.rs similarity index 100% rename from 2020/day14/day14.rs rename to src/year2020/day14/day14.rs diff --git a/2020/day14/sample_1.txt b/src/year2020/day14/sample_1.txt similarity index 100% rename from 2020/day14/sample_1.txt rename to src/year2020/day14/sample_1.txt diff --git a/2020/day14/sample_5.txt b/src/year2020/day14/sample_5.txt similarity index 100% rename from 2020/day14/sample_5.txt rename to src/year2020/day14/sample_5.txt diff --git a/2020/day15/day15.py b/src/year2020/day15/day15.py similarity index 100% rename from 2020/day15/day15.py rename to src/year2020/day15/day15.py diff --git a/2020/day15/day15.rs b/src/year2020/day15/day15.rs similarity index 100% rename from 2020/day15/day15.rs rename to src/year2020/day15/day15.rs diff --git a/2020/day15/test.txt b/src/year2020/day15/test.txt similarity index 100% rename from 2020/day15/test.txt rename to src/year2020/day15/test.txt diff --git a/2020/day16/day16.py b/src/year2020/day16/day16.py similarity index 100% rename from 2020/day16/day16.py rename to src/year2020/day16/day16.py diff --git a/2020/day16/day16.rs b/src/year2020/day16/day16.rs similarity index 100% rename from 2020/day16/day16.rs rename to src/year2020/day16/day16.rs diff --git a/2020/day16/sample_2.txt b/src/year2020/day16/sample_2.txt similarity index 100% rename from 2020/day16/sample_2.txt rename to src/year2020/day16/sample_2.txt diff --git a/2020/day16/sample_3.txt b/src/year2020/day16/sample_3.txt similarity index 100% rename from 2020/day16/sample_3.txt rename to src/year2020/day16/sample_3.txt diff --git a/2020/day17/day17.py b/src/year2020/day17/day17.py similarity index 100% rename from 2020/day17/day17.py rename to src/year2020/day17/day17.py diff --git a/2020/day17/day17.rs b/src/year2020/day17/day17.rs similarity index 100% rename from 2020/day17/day17.rs rename to src/year2020/day17/day17.rs diff --git a/2020/day17/test.txt b/src/year2020/day17/test.txt similarity index 100% rename from 2020/day17/test.txt rename to src/year2020/day17/test.txt diff --git a/2020/day18/day18.py b/src/year2020/day18/day18.py similarity index 100% rename from 2020/day18/day18.py rename to src/year2020/day18/day18.py diff --git a/2020/day18/day18.rs b/src/year2020/day18/day18.rs similarity index 100% rename from 2020/day18/day18.rs rename to src/year2020/day18/day18.rs diff --git a/2020/day19/day19.rs b/src/year2020/day19/day19.rs similarity index 100% rename from 2020/day19/day19.rs rename to src/year2020/day19/day19.rs diff --git a/2020/day19/test.txt b/src/year2020/day19/test.txt similarity index 100% rename from 2020/day19/test.txt rename to src/year2020/day19/test.txt diff --git a/2020/day19/test2.txt b/src/year2020/day19/test2.txt similarity index 100% rename from 2020/day19/test2.txt rename to src/year2020/day19/test2.txt diff --git a/2020/day2/day2.py b/src/year2020/day2/day2.py similarity index 100% rename from 2020/day2/day2.py rename to src/year2020/day2/day2.py diff --git a/2020/day2/day2.rs b/src/year2020/day2/day2.rs similarity index 100% rename from 2020/day2/day2.rs rename to src/year2020/day2/day2.rs diff --git a/2020/day2/test.txt b/src/year2020/day2/test.txt similarity index 100% rename from 2020/day2/test.txt rename to src/year2020/day2/test.txt diff --git a/2020/day20/day20.py b/src/year2020/day20/day20.py similarity index 100% rename from 2020/day20/day20.py rename to src/year2020/day20/day20.py diff --git a/2020/day20/day20.rs b/src/year2020/day20/day20.rs similarity index 100% rename from 2020/day20/day20.rs rename to src/year2020/day20/day20.rs diff --git a/2020/day20/test.txt b/src/year2020/day20/test.txt similarity index 100% rename from 2020/day20/test.txt rename to src/year2020/day20/test.txt diff --git a/2020/day21/day21.py b/src/year2020/day21/day21.py similarity index 100% rename from 2020/day21/day21.py rename to src/year2020/day21/day21.py diff --git a/2020/day21/day21.rs b/src/year2020/day21/day21.rs similarity index 100% rename from 2020/day21/day21.rs rename to src/year2020/day21/day21.rs diff --git a/2020/day21/test.txt b/src/year2020/day21/test.txt similarity index 100% rename from 2020/day21/test.txt rename to src/year2020/day21/test.txt diff --git a/2020/day22/day22.py b/src/year2020/day22/day22.py similarity index 100% rename from 2020/day22/day22.py rename to src/year2020/day22/day22.py diff --git a/2020/day22/day22.rs b/src/year2020/day22/day22.rs similarity index 100% rename from 2020/day22/day22.rs rename to src/year2020/day22/day22.rs diff --git a/2020/day22/test.txt b/src/year2020/day22/test.txt similarity index 100% rename from 2020/day22/test.txt rename to src/year2020/day22/test.txt diff --git a/2020/day23/day23.rs b/src/year2020/day23/day23.rs similarity index 100% rename from 2020/day23/day23.rs rename to src/year2020/day23/day23.rs diff --git a/2020/day23/test.txt b/src/year2020/day23/test.txt similarity index 100% rename from 2020/day23/test.txt rename to src/year2020/day23/test.txt diff --git a/2020/day24/day24.py b/src/year2020/day24/day24.py similarity index 100% rename from 2020/day24/day24.py rename to src/year2020/day24/day24.py diff --git a/2020/day24/day24.rs b/src/year2020/day24/day24.rs similarity index 100% rename from 2020/day24/day24.rs rename to src/year2020/day24/day24.rs diff --git a/2020/day24/test.txt b/src/year2020/day24/test.txt similarity index 100% rename from 2020/day24/test.txt rename to src/year2020/day24/test.txt diff --git a/2020/day25/day25.py b/src/year2020/day25/day25.py similarity index 100% rename from 2020/day25/day25.py rename to src/year2020/day25/day25.py diff --git a/2020/day25/day25.rs b/src/year2020/day25/day25.rs similarity index 100% rename from 2020/day25/day25.rs rename to src/year2020/day25/day25.rs diff --git a/2020/day25/test.txt b/src/year2020/day25/test.txt similarity index 100% rename from 2020/day25/test.txt rename to src/year2020/day25/test.txt diff --git a/2020/day3/day3.py b/src/year2020/day3/day3.py similarity index 100% rename from 2020/day3/day3.py rename to src/year2020/day3/day3.py diff --git a/2020/day3/day3.rs b/src/year2020/day3/day3.rs similarity index 100% rename from 2020/day3/day3.rs rename to src/year2020/day3/day3.rs diff --git a/2020/day3/test.txt b/src/year2020/day3/test.txt similarity index 100% rename from 2020/day3/test.txt rename to src/year2020/day3/test.txt diff --git a/2020/day4/day4.py b/src/year2020/day4/day4.py similarity index 100% rename from 2020/day4/day4.py rename to src/year2020/day4/day4.py diff --git a/2020/day4/day4.rs b/src/year2020/day4/day4.rs similarity index 100% rename from 2020/day4/day4.rs rename to src/year2020/day4/day4.rs diff --git a/2020/day4/sample_1.txt b/src/year2020/day4/sample_1.txt similarity index 100% rename from 2020/day4/sample_1.txt rename to src/year2020/day4/sample_1.txt diff --git a/2020/day4/sample_3.txt b/src/year2020/day4/sample_3.txt similarity index 100% rename from 2020/day4/sample_3.txt rename to src/year2020/day4/sample_3.txt diff --git a/2020/day4/sample_4.txt b/src/year2020/day4/sample_4.txt similarity index 100% rename from 2020/day4/sample_4.txt rename to src/year2020/day4/sample_4.txt diff --git a/2020/day5/day5.py b/src/year2020/day5/day5.py similarity index 100% rename from 2020/day5/day5.py rename to src/year2020/day5/day5.py diff --git a/2020/day5/day5.rs b/src/year2020/day5/day5.rs similarity index 100% rename from 2020/day5/day5.rs rename to src/year2020/day5/day5.rs diff --git a/2020/day6/day6.py b/src/year2020/day6/day6.py similarity index 100% rename from 2020/day6/day6.py rename to src/year2020/day6/day6.py diff --git a/2020/day6/day6.rs b/src/year2020/day6/day6.rs similarity index 100% rename from 2020/day6/day6.rs rename to src/year2020/day6/day6.rs diff --git a/2020/day6/test.txt b/src/year2020/day6/test.txt similarity index 100% rename from 2020/day6/test.txt rename to src/year2020/day6/test.txt diff --git a/2020/day7/day7.py b/src/year2020/day7/day7.py similarity index 100% rename from 2020/day7/day7.py rename to src/year2020/day7/day7.py diff --git a/2020/day7/day7.rs b/src/year2020/day7/day7.rs similarity index 100% rename from 2020/day7/day7.rs rename to src/year2020/day7/day7.rs diff --git a/2020/day7/sample_1.txt b/src/year2020/day7/sample_1.txt similarity index 100% rename from 2020/day7/sample_1.txt rename to src/year2020/day7/sample_1.txt diff --git a/2020/day7/sample_2.txt b/src/year2020/day7/sample_2.txt similarity index 100% rename from 2020/day7/sample_2.txt rename to src/year2020/day7/sample_2.txt diff --git a/2020/day8/day8.py b/src/year2020/day8/day8.py similarity index 100% rename from 2020/day8/day8.py rename to src/year2020/day8/day8.py diff --git a/2020/day8/day8.rs b/src/year2020/day8/day8.rs similarity index 100% rename from 2020/day8/day8.rs rename to src/year2020/day8/day8.rs diff --git a/2020/day8/test.txt b/src/year2020/day8/test.txt similarity index 100% rename from 2020/day8/test.txt rename to src/year2020/day8/test.txt diff --git a/2020/day9/day9.py b/src/year2020/day9/day9.py similarity index 100% rename from 2020/day9/day9.py rename to src/year2020/day9/day9.py diff --git a/2020/day9/day9.rs b/src/year2020/day9/day9.rs similarity index 100% rename from 2020/day9/day9.rs rename to src/year2020/day9/day9.rs diff --git a/2020/day9/test.txt b/src/year2020/day9/test.txt similarity index 100% rename from 2020/day9/test.txt rename to src/year2020/day9/test.txt diff --git a/2021/README.md b/src/year2021/README.md similarity index 100% rename from 2021/README.md rename to src/year2021/README.md diff --git a/2021/day1/day1.py b/src/year2021/day1/day1.py similarity index 100% rename from 2021/day1/day1.py rename to src/year2021/day1/day1.py diff --git a/2021/day1/day1.rs b/src/year2021/day1/day1.rs similarity index 100% rename from 2021/day1/day1.rs rename to src/year2021/day1/day1.rs diff --git a/2021/day1/test.txt b/src/year2021/day1/test.txt similarity index 100% rename from 2021/day1/test.txt rename to src/year2021/day1/test.txt diff --git a/2021/day10/day10.py b/src/year2021/day10/day10.py similarity index 100% rename from 2021/day10/day10.py rename to src/year2021/day10/day10.py diff --git a/2021/day10/day10.rs b/src/year2021/day10/day10.rs similarity index 100% rename from 2021/day10/day10.rs rename to src/year2021/day10/day10.rs diff --git a/2021/day10/test.txt b/src/year2021/day10/test.txt similarity index 100% rename from 2021/day10/test.txt rename to src/year2021/day10/test.txt diff --git a/2021/day11/day11.rs b/src/year2021/day11/day11.rs similarity index 100% rename from 2021/day11/day11.rs rename to src/year2021/day11/day11.rs diff --git a/2021/day11/demo.txt b/src/year2021/day11/demo.txt similarity index 100% rename from 2021/day11/demo.txt rename to src/year2021/day11/demo.txt diff --git a/2021/day12/day12.py b/src/year2021/day12/day12.py similarity index 100% rename from 2021/day12/day12.py rename to src/year2021/day12/day12.py diff --git a/2021/day12/day12.rs b/src/year2021/day12/day12.rs similarity index 100% rename from 2021/day12/day12.rs rename to src/year2021/day12/day12.rs diff --git a/2021/day13/day13.py b/src/year2021/day13/day13.py similarity index 100% rename from 2021/day13/day13.py rename to src/year2021/day13/day13.py diff --git a/2021/day13/day13.rs b/src/year2021/day13/day13.rs similarity index 100% rename from 2021/day13/day13.rs rename to src/year2021/day13/day13.rs diff --git a/2021/day13/test.txt b/src/year2021/day13/test.txt similarity index 100% rename from 2021/day13/test.txt rename to src/year2021/day13/test.txt diff --git a/2021/day14/day14.rs b/src/year2021/day14/day14.rs similarity index 100% rename from 2021/day14/day14.rs rename to src/year2021/day14/day14.rs diff --git a/2021/day14/step1.py b/src/year2021/day14/step1.py similarity index 100% rename from 2021/day14/step1.py rename to src/year2021/day14/step1.py diff --git a/2021/day14/step2.py b/src/year2021/day14/step2.py similarity index 100% rename from 2021/day14/step2.py rename to src/year2021/day14/step2.py diff --git a/2021/day14/test01.txt b/src/year2021/day14/test01.txt similarity index 100% rename from 2021/day14/test01.txt rename to src/year2021/day14/test01.txt diff --git a/2021/day14/test02.txt b/src/year2021/day14/test02.txt similarity index 100% rename from 2021/day14/test02.txt rename to src/year2021/day14/test02.txt diff --git a/2021/day15/day15.rs b/src/year2021/day15/day15.rs similarity index 100% rename from 2021/day15/day15.rs rename to src/year2021/day15/day15.rs diff --git a/2021/day15/sample_1.txt b/src/year2021/day15/sample_1.txt similarity index 100% rename from 2021/day15/sample_1.txt rename to src/year2021/day15/sample_1.txt diff --git a/2021/day16/day16.py b/src/year2021/day16/day16.py similarity index 100% rename from 2021/day16/day16.py rename to src/year2021/day16/day16.py diff --git a/2021/day16/day16.rs b/src/year2021/day16/day16.rs similarity index 100% rename from 2021/day16/day16.rs rename to src/year2021/day16/day16.rs diff --git a/2021/day17/day17.rs b/src/year2021/day17/day17.rs similarity index 100% rename from 2021/day17/day17.rs rename to src/year2021/day17/day17.rs diff --git a/2021/day17/test.txt b/src/year2021/day17/test.txt similarity index 100% rename from 2021/day17/test.txt rename to src/year2021/day17/test.txt diff --git a/2021/day18/day18.py b/src/year2021/day18/day18.py similarity index 100% rename from 2021/day18/day18.py rename to src/year2021/day18/day18.py diff --git a/2021/day18/day18.rs b/src/year2021/day18/day18.rs similarity index 100% rename from 2021/day18/day18.rs rename to src/year2021/day18/day18.rs diff --git a/2021/day18/day18_eval.py b/src/year2021/day18/day18_eval.py similarity index 100% rename from 2021/day18/day18_eval.py rename to src/year2021/day18/day18_eval.py diff --git a/2021/day18/sample_1.txt b/src/year2021/day18/sample_1.txt similarity index 100% rename from 2021/day18/sample_1.txt rename to src/year2021/day18/sample_1.txt diff --git a/2021/day18/sample_7.txt b/src/year2021/day18/sample_7.txt similarity index 100% rename from 2021/day18/sample_7.txt rename to src/year2021/day18/sample_7.txt diff --git a/2021/day18/sample_8.txt b/src/year2021/day18/sample_8.txt similarity index 100% rename from 2021/day18/sample_8.txt rename to src/year2021/day18/sample_8.txt diff --git a/2021/day19/day19.rs b/src/year2021/day19/day19.rs similarity index 100% rename from 2021/day19/day19.rs rename to src/year2021/day19/day19.rs diff --git a/2021/day19/test.txt b/src/year2021/day19/test.txt similarity index 100% rename from 2021/day19/test.txt rename to src/year2021/day19/test.txt diff --git a/2021/day2/day2.rs b/src/year2021/day2/day2.rs similarity index 100% rename from 2021/day2/day2.rs rename to src/year2021/day2/day2.rs diff --git a/2021/day2/test.txt b/src/year2021/day2/test.txt similarity index 100% rename from 2021/day2/test.txt rename to src/year2021/day2/test.txt diff --git a/2021/day20/day20.rs b/src/year2021/day20/day20.rs similarity index 100% rename from 2021/day20/day20.rs rename to src/year2021/day20/day20.rs diff --git a/2021/day20/test.txt b/src/year2021/day20/test.txt similarity index 100% rename from 2021/day20/test.txt rename to src/year2021/day20/test.txt diff --git a/2021/day21/day21.rs b/src/year2021/day21/day21.rs similarity index 100% rename from 2021/day21/day21.rs rename to src/year2021/day21/day21.rs diff --git a/2021/day22/day22.rs b/src/year2021/day22/day22.rs similarity index 100% rename from 2021/day22/day22.rs rename to src/year2021/day22/day22.rs diff --git a/2021/day22/sample_1.txt b/src/year2021/day22/sample_1.txt similarity index 100% rename from 2021/day22/sample_1.txt rename to src/year2021/day22/sample_1.txt diff --git a/2021/day22/sample_2.txt b/src/year2021/day22/sample_2.txt similarity index 100% rename from 2021/day22/sample_2.txt rename to src/year2021/day22/sample_2.txt diff --git a/2021/day22/sample_3.txt b/src/year2021/day22/sample_3.txt similarity index 100% rename from 2021/day22/sample_3.txt rename to src/year2021/day22/sample_3.txt diff --git a/2021/day23/day23.rs b/src/year2021/day23/day23.rs similarity index 100% rename from 2021/day23/day23.rs rename to src/year2021/day23/day23.rs diff --git a/2021/day23/test.txt b/src/year2021/day23/test.txt similarity index 100% rename from 2021/day23/test.txt rename to src/year2021/day23/test.txt diff --git a/2021/day24/boxes.py b/src/year2021/day24/boxes.py similarity index 100% rename from 2021/day24/boxes.py rename to src/year2021/day24/boxes.py diff --git a/2021/day24/day24.rs b/src/year2021/day24/day24.rs similarity index 100% rename from 2021/day24/day24.rs rename to src/year2021/day24/day24.rs diff --git a/2021/day24/demo.txt b/src/year2021/day24/demo.txt similarity index 100% rename from 2021/day24/demo.txt rename to src/year2021/day24/demo.txt diff --git a/2021/day25/day25.py b/src/year2021/day25/day25.py similarity index 100% rename from 2021/day25/day25.py rename to src/year2021/day25/day25.py diff --git a/2021/day25/day25.rs b/src/year2021/day25/day25.rs similarity index 100% rename from 2021/day25/day25.rs rename to src/year2021/day25/day25.rs diff --git a/2021/day25/test.txt b/src/year2021/day25/test.txt similarity index 100% rename from 2021/day25/test.txt rename to src/year2021/day25/test.txt diff --git a/2021/day3/day3.rs b/src/year2021/day3/day3.rs similarity index 100% rename from 2021/day3/day3.rs rename to src/year2021/day3/day3.rs diff --git a/2021/day3/step2.py b/src/year2021/day3/step2.py similarity index 100% rename from 2021/day3/step2.py rename to src/year2021/day3/step2.py diff --git a/2021/day3/test.txt b/src/year2021/day3/test.txt similarity index 100% rename from 2021/day3/test.txt rename to src/year2021/day3/test.txt diff --git a/2021/day4/day4.rs b/src/year2021/day4/day4.rs similarity index 100% rename from 2021/day4/day4.rs rename to src/year2021/day4/day4.rs diff --git a/2021/day4/day4_bug.py b/src/year2021/day4/day4_bug.py similarity index 100% rename from 2021/day4/day4_bug.py rename to src/year2021/day4/day4_bug.py diff --git a/2021/day4/test.txt b/src/year2021/day4/test.txt similarity index 100% rename from 2021/day4/test.txt rename to src/year2021/day4/test.txt diff --git a/2021/day5/day5.py b/src/year2021/day5/day5.py similarity index 100% rename from 2021/day5/day5.py rename to src/year2021/day5/day5.py diff --git a/2021/day5/day5.rs b/src/year2021/day5/day5.rs similarity index 100% rename from 2021/day5/day5.rs rename to src/year2021/day5/day5.rs diff --git a/2021/day5/test.txt b/src/year2021/day5/test.txt similarity index 100% rename from 2021/day5/test.txt rename to src/year2021/day5/test.txt diff --git a/2021/day6/day6.py b/src/year2021/day6/day6.py similarity index 100% rename from 2021/day6/day6.py rename to src/year2021/day6/day6.py diff --git a/2021/day6/day6.rs b/src/year2021/day6/day6.rs similarity index 100% rename from 2021/day6/day6.rs rename to src/year2021/day6/day6.rs diff --git a/2021/day6/test.txt b/src/year2021/day6/test.txt similarity index 100% rename from 2021/day6/test.txt rename to src/year2021/day6/test.txt diff --git a/2021/day7/day7.rs b/src/year2021/day7/day7.rs similarity index 100% rename from 2021/day7/day7.rs rename to src/year2021/day7/day7.rs diff --git a/2021/day7/test.txt b/src/year2021/day7/test.txt similarity index 100% rename from 2021/day7/test.txt rename to src/year2021/day7/test.txt diff --git a/2021/day8/day8.py b/src/year2021/day8/day8.py similarity index 100% rename from 2021/day8/day8.py rename to src/year2021/day8/day8.py diff --git a/2021/day8/day8.rs b/src/year2021/day8/day8.rs similarity index 100% rename from 2021/day8/day8.rs rename to src/year2021/day8/day8.rs diff --git a/2021/day8/test.txt b/src/year2021/day8/test.txt similarity index 100% rename from 2021/day8/test.txt rename to src/year2021/day8/test.txt diff --git a/2021/day9/day9.py b/src/year2021/day9/day9.py similarity index 100% rename from 2021/day9/day9.py rename to src/year2021/day9/day9.py diff --git a/2021/day9/day9.rs b/src/year2021/day9/day9.rs similarity index 100% rename from 2021/day9/day9.rs rename to src/year2021/day9/day9.rs diff --git a/2021/day9/test.txt b/src/year2021/day9/test.txt similarity index 100% rename from 2021/day9/test.txt rename to src/year2021/day9/test.txt diff --git a/2021/ocr/ocr.py b/src/year2021/ocr/ocr.py similarity index 100% rename from 2021/ocr/ocr.py rename to src/year2021/ocr/ocr.py diff --git a/2022/README.md b/src/year2022/README.md similarity index 100% rename from 2022/README.md rename to src/year2022/README.md diff --git a/2022/day1/day1.py b/src/year2022/day1/day1.py similarity index 100% rename from 2022/day1/day1.py rename to src/year2022/day1/day1.py diff --git a/2022/day1/day1.rs b/src/year2022/day1/day1.rs similarity index 100% rename from 2022/day1/day1.rs rename to src/year2022/day1/day1.rs diff --git a/2022/day1/day1_oneliner.py b/src/year2022/day1/day1_oneliner.py similarity index 100% rename from 2022/day1/day1_oneliner.py rename to src/year2022/day1/day1_oneliner.py diff --git a/2022/day1/test.txt b/src/year2022/day1/test.txt similarity index 100% rename from 2022/day1/test.txt rename to src/year2022/day1/test.txt diff --git a/2022/day10/day10.py b/src/year2022/day10/day10.py similarity index 100% rename from 2022/day10/day10.py rename to src/year2022/day10/day10.py diff --git a/2022/day10/day10.rs b/src/year2022/day10/day10.rs similarity index 100% rename from 2022/day10/day10.rs rename to src/year2022/day10/day10.rs diff --git a/2022/day10/test.txt b/src/year2022/day10/test.txt similarity index 100% rename from 2022/day10/test.txt rename to src/year2022/day10/test.txt diff --git a/2022/day11/day11.cpp b/src/year2022/day11/day11.cpp similarity index 100% rename from 2022/day11/day11.cpp rename to src/year2022/day11/day11.cpp diff --git a/2022/day11/day11.py b/src/year2022/day11/day11.py similarity index 100% rename from 2022/day11/day11.py rename to src/year2022/day11/day11.py diff --git a/2022/day11/day11.rs b/src/year2022/day11/day11.rs similarity index 100% rename from 2022/day11/day11.rs rename to src/year2022/day11/day11.rs diff --git a/2022/day11/test.txt b/src/year2022/day11/test.txt similarity index 100% rename from 2022/day11/test.txt rename to src/year2022/day11/test.txt diff --git a/2022/day12/day12.py b/src/year2022/day12/day12.py similarity index 100% rename from 2022/day12/day12.py rename to src/year2022/day12/day12.py diff --git a/2022/day12/day12.rs b/src/year2022/day12/day12.rs similarity index 100% rename from 2022/day12/day12.rs rename to src/year2022/day12/day12.rs diff --git a/2022/day12/test.txt b/src/year2022/day12/test.txt similarity index 100% rename from 2022/day12/test.txt rename to src/year2022/day12/test.txt diff --git a/2022/day13/day13.rs b/src/year2022/day13/day13.rs similarity index 100% rename from 2022/day13/day13.rs rename to src/year2022/day13/day13.rs diff --git a/2022/day13/test.txt b/src/year2022/day13/test.txt similarity index 100% rename from 2022/day13/test.txt rename to src/year2022/day13/test.txt diff --git a/2022/day13_pest/day13.pest b/src/year2022/day13_pest/day13.pest similarity index 100% rename from 2022/day13_pest/day13.pest rename to src/year2022/day13_pest/day13.pest diff --git a/2022/day13_pest/day13.py b/src/year2022/day13_pest/day13.py similarity index 100% rename from 2022/day13_pest/day13.py rename to src/year2022/day13_pest/day13.py diff --git a/2022/day13_pest/day13.rs b/src/year2022/day13_pest/day13.rs similarity index 100% rename from 2022/day13_pest/day13.rs rename to src/year2022/day13_pest/day13.rs diff --git a/2022/day13_pest/test.txt b/src/year2022/day13_pest/test.txt similarity index 100% rename from 2022/day13_pest/test.txt rename to src/year2022/day13_pest/test.txt diff --git a/2022/day14/day14.py b/src/year2022/day14/day14.py similarity index 100% rename from 2022/day14/day14.py rename to src/year2022/day14/day14.py diff --git a/2022/day14/day14.rs b/src/year2022/day14/day14.rs similarity index 100% rename from 2022/day14/day14.rs rename to src/year2022/day14/day14.rs diff --git a/2022/day14/test.txt b/src/year2022/day14/test.txt similarity index 100% rename from 2022/day14/test.txt rename to src/year2022/day14/test.txt diff --git a/2022/day15/day15.py b/src/year2022/day15/day15.py similarity index 100% rename from 2022/day15/day15.py rename to src/year2022/day15/day15.py diff --git a/2022/day15/day15.rs b/src/year2022/day15/day15.rs similarity index 100% rename from 2022/day15/day15.rs rename to src/year2022/day15/day15.rs diff --git a/2022/day15/test.txt b/src/year2022/day15/test.txt similarity index 100% rename from 2022/day15/test.txt rename to src/year2022/day15/test.txt diff --git a/2022/day16/day16.rs b/src/year2022/day16/day16.rs similarity index 100% rename from 2022/day16/day16.rs rename to src/year2022/day16/day16.rs diff --git a/2022/day16/test.txt b/src/year2022/day16/test.txt similarity index 100% rename from 2022/day16/test.txt rename to src/year2022/day16/test.txt diff --git a/2022/day17/README.md b/src/year2022/day17/README.md similarity index 100% rename from 2022/day17/README.md rename to src/year2022/day17/README.md diff --git a/2022/day17/day17.py b/src/year2022/day17/day17.py similarity index 100% rename from 2022/day17/day17.py rename to src/year2022/day17/day17.py diff --git a/2022/day17/day17.rs b/src/year2022/day17/day17.rs similarity index 100% rename from 2022/day17/day17.rs rename to src/year2022/day17/day17.rs diff --git a/2022/day17/test.txt b/src/year2022/day17/test.txt similarity index 100% rename from 2022/day17/test.txt rename to src/year2022/day17/test.txt diff --git a/2022/day17/tetris.gif b/src/year2022/day17/tetris.gif similarity index 100% rename from 2022/day17/tetris.gif rename to src/year2022/day17/tetris.gif diff --git a/2022/day17/tetris.py b/src/year2022/day17/tetris.py similarity index 100% rename from 2022/day17/tetris.py rename to src/year2022/day17/tetris.py diff --git a/2022/day18/day18.rs b/src/year2022/day18/day18.rs similarity index 100% rename from 2022/day18/day18.rs rename to src/year2022/day18/day18.rs diff --git a/2022/day18/test.txt b/src/year2022/day18/test.txt similarity index 100% rename from 2022/day18/test.txt rename to src/year2022/day18/test.txt diff --git a/2022/day19/day19.rs b/src/year2022/day19/day19.rs similarity index 100% rename from 2022/day19/day19.rs rename to src/year2022/day19/day19.rs diff --git a/2022/day19/test.txt b/src/year2022/day19/test.txt similarity index 100% rename from 2022/day19/test.txt rename to src/year2022/day19/test.txt diff --git a/2022/day2/day2.py b/src/year2022/day2/day2.py similarity index 100% rename from 2022/day2/day2.py rename to src/year2022/day2/day2.py diff --git a/2022/day2/day2.rs b/src/year2022/day2/day2.rs similarity index 100% rename from 2022/day2/day2.rs rename to src/year2022/day2/day2.rs diff --git a/2022/day2/test.txt b/src/year2022/day2/test.txt similarity index 100% rename from 2022/day2/test.txt rename to src/year2022/day2/test.txt diff --git a/2022/day20/day20.rs b/src/year2022/day20/day20.rs similarity index 100% rename from 2022/day20/day20.rs rename to src/year2022/day20/day20.rs diff --git a/2022/day20/test.txt b/src/year2022/day20/test.txt similarity index 100% rename from 2022/day20/test.txt rename to src/year2022/day20/test.txt diff --git a/2022/day21/day21.py b/src/year2022/day21/day21.py similarity index 100% rename from 2022/day21/day21.py rename to src/year2022/day21/day21.py diff --git a/2022/day21/day21.rs b/src/year2022/day21/day21.rs similarity index 100% rename from 2022/day21/day21.rs rename to src/year2022/day21/day21.rs diff --git a/2022/day21/test.txt b/src/year2022/day21/test.txt similarity index 100% rename from 2022/day21/test.txt rename to src/year2022/day21/test.txt diff --git a/2022/day22/day22.rs b/src/year2022/day22/day22.rs similarity index 100% rename from 2022/day22/day22.rs rename to src/year2022/day22/day22.rs diff --git a/2022/day22/test.txt b/src/year2022/day22/test.txt similarity index 100% rename from 2022/day22/test.txt rename to src/year2022/day22/test.txt diff --git a/2022/day23/day23.rs b/src/year2022/day23/day23.rs similarity index 100% rename from 2022/day23/day23.rs rename to src/year2022/day23/day23.rs diff --git a/2022/day23/test.txt b/src/year2022/day23/test.txt similarity index 100% rename from 2022/day23/test.txt rename to src/year2022/day23/test.txt diff --git a/2022/day24/day24.rs b/src/year2022/day24/day24.rs similarity index 100% rename from 2022/day24/day24.rs rename to src/year2022/day24/day24.rs diff --git a/2022/day24/demo.txt b/src/year2022/day24/demo.txt similarity index 100% rename from 2022/day24/demo.txt rename to src/year2022/day24/demo.txt diff --git a/2022/day24/test.txt b/src/year2022/day24/test.txt similarity index 100% rename from 2022/day24/test.txt rename to src/year2022/day24/test.txt diff --git a/2022/day25/day25.py b/src/year2022/day25/day25.py similarity index 100% rename from 2022/day25/day25.py rename to src/year2022/day25/day25.py diff --git a/2022/day25/day25.rs b/src/year2022/day25/day25.rs similarity index 100% rename from 2022/day25/day25.rs rename to src/year2022/day25/day25.rs diff --git a/2022/day25/test.txt b/src/year2022/day25/test.txt similarity index 100% rename from 2022/day25/test.txt rename to src/year2022/day25/test.txt diff --git a/2022/day3/day3.c b/src/year2022/day3/day3.c similarity index 100% rename from 2022/day3/day3.c rename to src/year2022/day3/day3.c diff --git a/2022/day3/day3.py b/src/year2022/day3/day3.py similarity index 100% rename from 2022/day3/day3.py rename to src/year2022/day3/day3.py diff --git a/2022/day3/day3.rs b/src/year2022/day3/day3.rs similarity index 100% rename from 2022/day3/day3.rs rename to src/year2022/day3/day3.rs diff --git a/2022/day3/test.txt b/src/year2022/day3/test.txt similarity index 100% rename from 2022/day3/test.txt rename to src/year2022/day3/test.txt diff --git a/2022/day4/day4.py b/src/year2022/day4/day4.py similarity index 100% rename from 2022/day4/day4.py rename to src/year2022/day4/day4.py diff --git a/2022/day4/day4.rs b/src/year2022/day4/day4.rs similarity index 100% rename from 2022/day4/day4.rs rename to src/year2022/day4/day4.rs diff --git a/2022/day4/test.txt b/src/year2022/day4/test.txt similarity index 100% rename from 2022/day4/test.txt rename to src/year2022/day4/test.txt diff --git a/2022/day5/day5.py b/src/year2022/day5/day5.py similarity index 100% rename from 2022/day5/day5.py rename to src/year2022/day5/day5.py diff --git a/2022/day5/day5.rs b/src/year2022/day5/day5.rs similarity index 100% rename from 2022/day5/day5.rs rename to src/year2022/day5/day5.rs diff --git a/2022/day5/test.txt b/src/year2022/day5/test.txt similarity index 100% rename from 2022/day5/test.txt rename to src/year2022/day5/test.txt diff --git a/2022/day6/day6.py b/src/year2022/day6/day6.py similarity index 100% rename from 2022/day6/day6.py rename to src/year2022/day6/day6.py diff --git a/2022/day6/day6.rs b/src/year2022/day6/day6.rs similarity index 100% rename from 2022/day6/day6.rs rename to src/year2022/day6/day6.rs diff --git a/2022/day6/test.txt b/src/year2022/day6/test.txt similarity index 100% rename from 2022/day6/test.txt rename to src/year2022/day6/test.txt diff --git a/2022/day7/day7.py b/src/year2022/day7/day7.py similarity index 100% rename from 2022/day7/day7.py rename to src/year2022/day7/day7.py diff --git a/2022/day7/day7.rs b/src/year2022/day7/day7.rs similarity index 100% rename from 2022/day7/day7.rs rename to src/year2022/day7/day7.rs diff --git a/2022/day7/test.txt b/src/year2022/day7/test.txt similarity index 100% rename from 2022/day7/test.txt rename to src/year2022/day7/test.txt diff --git a/2022/day8/day8.py b/src/year2022/day8/day8.py similarity index 100% rename from 2022/day8/day8.py rename to src/year2022/day8/day8.py diff --git a/2022/day8/day8.rs b/src/year2022/day8/day8.rs similarity index 100% rename from 2022/day8/day8.rs rename to src/year2022/day8/day8.rs diff --git a/2022/day8/test.txt b/src/year2022/day8/test.txt similarity index 100% rename from 2022/day8/test.txt rename to src/year2022/day8/test.txt diff --git a/2022/day9/day9.py b/src/year2022/day9/day9.py similarity index 100% rename from 2022/day9/day9.py rename to src/year2022/day9/day9.py diff --git a/2022/day9/day9.rs b/src/year2022/day9/day9.rs similarity index 100% rename from 2022/day9/day9.rs rename to src/year2022/day9/day9.rs diff --git a/2022/day9/test.txt b/src/year2022/day9/test.txt similarity index 100% rename from 2022/day9/test.txt rename to src/year2022/day9/test.txt diff --git a/2022/day9/test02.txt b/src/year2022/day9/test02.txt similarity index 100% rename from 2022/day9/test02.txt rename to src/year2022/day9/test02.txt diff --git a/2022/ocr/ocr.py b/src/year2022/ocr/ocr.py similarity index 100% rename from 2022/ocr/ocr.py rename to src/year2022/ocr/ocr.py diff --git a/2023/README.md b/src/year2023/README.md similarity index 100% rename from 2023/README.md rename to src/year2023/README.md diff --git a/2023/day1/day1.py b/src/year2023/day1/day1.py similarity index 100% rename from 2023/day1/day1.py rename to src/year2023/day1/day1.py diff --git a/2023/day1/day1.rs b/src/year2023/day1/day1.rs similarity index 100% rename from 2023/day1/day1.rs rename to src/year2023/day1/day1.rs diff --git a/2023/day1/sample_1.txt b/src/year2023/day1/sample_1.txt similarity index 100% rename from 2023/day1/sample_1.txt rename to src/year2023/day1/sample_1.txt diff --git a/2023/day1/sample_2.txt b/src/year2023/day1/sample_2.txt similarity index 100% rename from 2023/day1/sample_2.txt rename to src/year2023/day1/sample_2.txt diff --git a/2023/day10/README.md b/src/year2023/day10/README.md similarity index 100% rename from 2023/day10/README.md rename to src/year2023/day10/README.md diff --git a/2023/day10/day10.py b/src/year2023/day10/day10.py similarity index 100% rename from 2023/day10/day10.py rename to src/year2023/day10/day10.py diff --git a/2023/day10/day10.rs b/src/year2023/day10/day10.rs similarity index 100% rename from 2023/day10/day10.rs rename to src/year2023/day10/day10.rs diff --git a/2023/day10/pipemaze.sh b/src/year2023/day10/pipemaze.sh similarity index 100% rename from 2023/day10/pipemaze.sh rename to src/year2023/day10/pipemaze.sh diff --git a/2023/day10/test1.png b/src/year2023/day10/test1.png similarity index 100% rename from 2023/day10/test1.png rename to src/year2023/day10/test1.png diff --git a/2023/day10/test1.txt b/src/year2023/day10/test1.txt similarity index 100% rename from 2023/day10/test1.txt rename to src/year2023/day10/test1.txt diff --git a/2023/day10/test2.png b/src/year2023/day10/test2.png similarity index 100% rename from 2023/day10/test2.png rename to src/year2023/day10/test2.png diff --git a/2023/day10/test2.txt b/src/year2023/day10/test2.txt similarity index 100% rename from 2023/day10/test2.txt rename to src/year2023/day10/test2.txt diff --git a/2023/day10/test3.png b/src/year2023/day10/test3.png similarity index 100% rename from 2023/day10/test3.png rename to src/year2023/day10/test3.png diff --git a/2023/day10/test3.txt b/src/year2023/day10/test3.txt similarity index 100% rename from 2023/day10/test3.txt rename to src/year2023/day10/test3.txt diff --git a/2023/day10/test4.png b/src/year2023/day10/test4.png similarity index 100% rename from 2023/day10/test4.png rename to src/year2023/day10/test4.png diff --git a/2023/day10/test4.txt b/src/year2023/day10/test4.txt similarity index 100% rename from 2023/day10/test4.txt rename to src/year2023/day10/test4.txt diff --git a/2023/day10/test5.png b/src/year2023/day10/test5.png similarity index 100% rename from 2023/day10/test5.png rename to src/year2023/day10/test5.png diff --git a/2023/day10/test5.txt b/src/year2023/day10/test5.txt similarity index 100% rename from 2023/day10/test5.txt rename to src/year2023/day10/test5.txt diff --git a/2023/day10/test6.png b/src/year2023/day10/test6.png similarity index 100% rename from 2023/day10/test6.png rename to src/year2023/day10/test6.png diff --git a/2023/day10/test6.txt b/src/year2023/day10/test6.txt similarity index 100% rename from 2023/day10/test6.txt rename to src/year2023/day10/test6.txt diff --git a/2023/day11/day11.rs b/src/year2023/day11/day11.rs similarity index 100% rename from 2023/day11/day11.rs rename to src/year2023/day11/day11.rs diff --git a/2023/day11/test.txt b/src/year2023/day11/test.txt similarity index 100% rename from 2023/day11/test.txt rename to src/year2023/day11/test.txt diff --git a/2023/day12/day12.rs b/src/year2023/day12/day12.rs similarity index 100% rename from 2023/day12/day12.rs rename to src/year2023/day12/day12.rs diff --git a/2023/day12/test.txt b/src/year2023/day12/test.txt similarity index 100% rename from 2023/day12/test.txt rename to src/year2023/day12/test.txt diff --git a/2023/day13/day13.rs b/src/year2023/day13/day13.rs similarity index 100% rename from 2023/day13/day13.rs rename to src/year2023/day13/day13.rs diff --git a/2023/day13/test.txt b/src/year2023/day13/test.txt similarity index 100% rename from 2023/day13/test.txt rename to src/year2023/day13/test.txt diff --git a/2023/day14/day14.rs b/src/year2023/day14/day14.rs similarity index 100% rename from 2023/day14/day14.rs rename to src/year2023/day14/day14.rs diff --git a/2023/day14/test.txt b/src/year2023/day14/test.txt similarity index 100% rename from 2023/day14/test.txt rename to src/year2023/day14/test.txt diff --git a/2023/day15/day15.rs b/src/year2023/day15/day15.rs similarity index 100% rename from 2023/day15/day15.rs rename to src/year2023/day15/day15.rs diff --git a/2023/day15/test.txt b/src/year2023/day15/test.txt similarity index 100% rename from 2023/day15/test.txt rename to src/year2023/day15/test.txt diff --git a/2023/day16/day16.py b/src/year2023/day16/day16.py similarity index 100% rename from 2023/day16/day16.py rename to src/year2023/day16/day16.py diff --git a/2023/day16/day16.rs b/src/year2023/day16/day16.rs similarity index 100% rename from 2023/day16/day16.rs rename to src/year2023/day16/day16.rs diff --git a/2023/day16/test.txt b/src/year2023/day16/test.txt similarity index 100% rename from 2023/day16/test.txt rename to src/year2023/day16/test.txt diff --git a/2023/day17/day17.rs b/src/year2023/day17/day17.rs similarity index 100% rename from 2023/day17/day17.rs rename to src/year2023/day17/day17.rs diff --git a/2023/day17/test.txt b/src/year2023/day17/test.txt similarity index 100% rename from 2023/day17/test.txt rename to src/year2023/day17/test.txt diff --git a/2023/day17/test2.txt b/src/year2023/day17/test2.txt similarity index 100% rename from 2023/day17/test2.txt rename to src/year2023/day17/test2.txt diff --git a/2023/day18/day18.rs b/src/year2023/day18/day18.rs similarity index 100% rename from 2023/day18/day18.rs rename to src/year2023/day18/day18.rs diff --git a/2023/day18/test.txt b/src/year2023/day18/test.txt similarity index 100% rename from 2023/day18/test.txt rename to src/year2023/day18/test.txt diff --git a/2023/day19/day19.rs b/src/year2023/day19/day19.rs similarity index 100% rename from 2023/day19/day19.rs rename to src/year2023/day19/day19.rs diff --git a/2023/day19/test.txt b/src/year2023/day19/test.txt similarity index 100% rename from 2023/day19/test.txt rename to src/year2023/day19/test.txt diff --git a/2023/day2/day2.py b/src/year2023/day2/day2.py similarity index 100% rename from 2023/day2/day2.py rename to src/year2023/day2/day2.py diff --git a/2023/day2/day2.rs b/src/year2023/day2/day2.rs similarity index 100% rename from 2023/day2/day2.rs rename to src/year2023/day2/day2.rs diff --git a/2023/day2/test.txt b/src/year2023/day2/test.txt similarity index 100% rename from 2023/day2/test.txt rename to src/year2023/day2/test.txt diff --git a/2023/day20/day20.rs b/src/year2023/day20/day20.rs similarity index 100% rename from 2023/day20/day20.rs rename to src/year2023/day20/day20.rs diff --git a/2023/day20/test.txt b/src/year2023/day20/test.txt similarity index 100% rename from 2023/day20/test.txt rename to src/year2023/day20/test.txt diff --git a/2023/day20/test2.txt b/src/year2023/day20/test2.txt similarity index 100% rename from 2023/day20/test2.txt rename to src/year2023/day20/test2.txt diff --git a/2023/day21/day21.rs b/src/year2023/day21/day21.rs similarity index 100% rename from 2023/day21/day21.rs rename to src/year2023/day21/day21.rs diff --git a/2023/day21/test.txt b/src/year2023/day21/test.txt similarity index 100% rename from 2023/day21/test.txt rename to src/year2023/day21/test.txt diff --git a/2023/day22/day22.rs b/src/year2023/day22/day22.rs similarity index 100% rename from 2023/day22/day22.rs rename to src/year2023/day22/day22.rs diff --git a/2023/day22/test.txt b/src/year2023/day22/test.txt similarity index 100% rename from 2023/day22/test.txt rename to src/year2023/day22/test.txt diff --git a/2023/day23/day23.rs b/src/year2023/day23/day23.rs similarity index 100% rename from 2023/day23/day23.rs rename to src/year2023/day23/day23.rs diff --git a/2023/day23/naive_part2.c b/src/year2023/day23/naive_part2.c similarity index 100% rename from 2023/day23/naive_part2.c rename to src/year2023/day23/naive_part2.c diff --git a/2023/day23/test.txt b/src/year2023/day23/test.txt similarity index 100% rename from 2023/day23/test.txt rename to src/year2023/day23/test.txt diff --git a/2024/day13_z3/build.rs b/src/year2023/day24/build.rs similarity index 100% rename from 2024/day13_z3/build.rs rename to src/year2023/day24/build.rs diff --git a/2023/day24/day24.py b/src/year2023/day24/day24.py similarity index 100% rename from 2023/day24/day24.py rename to src/year2023/day24/day24.py diff --git a/2023/day24/day24.rs b/src/year2023/day24/day24.rs similarity index 100% rename from 2023/day24/day24.rs rename to src/year2023/day24/day24.rs diff --git a/2023/day24/test.txt b/src/year2023/day24/test.txt similarity index 100% rename from 2023/day24/test.txt rename to src/year2023/day24/test.txt diff --git a/2023/day25/day25.py b/src/year2023/day25/day25.py similarity index 100% rename from 2023/day25/day25.py rename to src/year2023/day25/day25.py diff --git a/2023/day25/day25.rs b/src/year2023/day25/day25.rs similarity index 100% rename from 2023/day25/day25.rs rename to src/year2023/day25/day25.rs diff --git a/2023/day25/test.txt b/src/year2023/day25/test.txt similarity index 100% rename from 2023/day25/test.txt rename to src/year2023/day25/test.txt diff --git a/2023/day3/day3.py b/src/year2023/day3/day3.py similarity index 100% rename from 2023/day3/day3.py rename to src/year2023/day3/day3.py diff --git a/2023/day3/day3.rs b/src/year2023/day3/day3.rs similarity index 100% rename from 2023/day3/day3.rs rename to src/year2023/day3/day3.rs diff --git a/2023/day3/test.txt b/src/year2023/day3/test.txt similarity index 100% rename from 2023/day3/test.txt rename to src/year2023/day3/test.txt diff --git a/2023/day4/day4.py b/src/year2023/day4/day4.py similarity index 100% rename from 2023/day4/day4.py rename to src/year2023/day4/day4.py diff --git a/2023/day4/day4.rs b/src/year2023/day4/day4.rs similarity index 100% rename from 2023/day4/day4.rs rename to src/year2023/day4/day4.rs diff --git a/2023/day4/test.txt b/src/year2023/day4/test.txt similarity index 100% rename from 2023/day4/test.txt rename to src/year2023/day4/test.txt diff --git a/2023/day5/day5.rs b/src/year2023/day5/day5.rs similarity index 100% rename from 2023/day5/day5.rs rename to src/year2023/day5/day5.rs diff --git a/2023/day5/day5_bruteforce.py b/src/year2023/day5/day5_bruteforce.py similarity index 100% rename from 2023/day5/day5_bruteforce.py rename to src/year2023/day5/day5_bruteforce.py diff --git a/2023/day5/test.txt b/src/year2023/day5/test.txt similarity index 100% rename from 2023/day5/test.txt rename to src/year2023/day5/test.txt diff --git a/2023/day6/day6.py b/src/year2023/day6/day6.py similarity index 100% rename from 2023/day6/day6.py rename to src/year2023/day6/day6.py diff --git a/2023/day6/day6.rs b/src/year2023/day6/day6.rs similarity index 100% rename from 2023/day6/day6.rs rename to src/year2023/day6/day6.rs diff --git a/2023/day6/test.txt b/src/year2023/day6/test.txt similarity index 100% rename from 2023/day6/test.txt rename to src/year2023/day6/test.txt diff --git a/2023/day7/day7.rs b/src/year2023/day7/day7.rs similarity index 100% rename from 2023/day7/day7.rs rename to src/year2023/day7/day7.rs diff --git a/2023/day7/test.txt b/src/year2023/day7/test.txt similarity index 100% rename from 2023/day7/test.txt rename to src/year2023/day7/test.txt diff --git a/2023/day8/day8.rs b/src/year2023/day8/day8.rs similarity index 100% rename from 2023/day8/day8.rs rename to src/year2023/day8/day8.rs diff --git a/2023/day8/test1.txt b/src/year2023/day8/test1.txt similarity index 100% rename from 2023/day8/test1.txt rename to src/year2023/day8/test1.txt diff --git a/2023/day8/test2.txt b/src/year2023/day8/test2.txt similarity index 100% rename from 2023/day8/test2.txt rename to src/year2023/day8/test2.txt diff --git a/2023/day9/day9.py b/src/year2023/day9/day9.py similarity index 100% rename from 2023/day9/day9.py rename to src/year2023/day9/day9.py diff --git a/2023/day9/day9.rs b/src/year2023/day9/day9.rs similarity index 100% rename from 2023/day9/day9.rs rename to src/year2023/day9/day9.rs diff --git a/2023/day9/test.txt b/src/year2023/day9/test.txt similarity index 100% rename from 2023/day9/test.txt rename to src/year2023/day9/test.txt diff --git a/2024/README.md b/src/year2024/README.md similarity index 100% rename from 2024/README.md rename to src/year2024/README.md diff --git a/2024/day1/day1.c b/src/year2024/day1/day1.c similarity index 100% rename from 2024/day1/day1.c rename to src/year2024/day1/day1.c diff --git a/2024/day1/day1.cpp b/src/year2024/day1/day1.cpp similarity index 100% rename from 2024/day1/day1.cpp rename to src/year2024/day1/day1.cpp diff --git a/2024/day1/day1.cs b/src/year2024/day1/day1.cs similarity index 100% rename from 2024/day1/day1.cs rename to src/year2024/day1/day1.cs diff --git a/2024/day1/day1.go b/src/year2024/day1/day1.go similarity index 100% rename from 2024/day1/day1.go rename to src/year2024/day1/day1.go diff --git a/2024/day1/day1.java b/src/year2024/day1/day1.java similarity index 100% rename from 2024/day1/day1.java rename to src/year2024/day1/day1.java diff --git a/2024/day1/day1.js b/src/year2024/day1/day1.js similarity index 100% rename from 2024/day1/day1.js rename to src/year2024/day1/day1.js diff --git a/2024/day1/day1.kernel/Makefile b/src/year2024/day1/day1.kernel/Makefile similarity index 100% rename from 2024/day1/day1.kernel/Makefile rename to src/year2024/day1/day1.kernel/Makefile diff --git a/2024/day1/day1.kernel/README.md b/src/year2024/day1/day1.kernel/README.md similarity index 100% rename from 2024/day1/day1.kernel/README.md rename to src/year2024/day1/day1.kernel/README.md diff --git a/2024/day1/day1.kernel/aoc.c b/src/year2024/day1/day1.kernel/aoc.c similarity index 100% rename from 2024/day1/day1.kernel/aoc.c rename to src/year2024/day1/day1.kernel/aoc.c diff --git a/2024/day1/day1.kernel/aoc.sh b/src/year2024/day1/day1.kernel/aoc.sh similarity index 100% rename from 2024/day1/day1.kernel/aoc.sh rename to src/year2024/day1/day1.kernel/aoc.sh diff --git a/2024/day1/day1.kernel/kaoc.png b/src/year2024/day1/day1.kernel/kaoc.png similarity index 100% rename from 2024/day1/day1.kernel/kaoc.png rename to src/year2024/day1/day1.kernel/kaoc.png diff --git a/2024/day1/day1.lua b/src/year2024/day1/day1.lua similarity index 100% rename from 2024/day1/day1.lua rename to src/year2024/day1/day1.lua diff --git a/2024/day1/day1.pl b/src/year2024/day1/day1.pl similarity index 100% rename from 2024/day1/day1.pl rename to src/year2024/day1/day1.pl diff --git a/2024/day1/day1.py b/src/year2024/day1/day1.py similarity index 100% rename from 2024/day1/day1.py rename to src/year2024/day1/day1.py diff --git a/2024/day1/day1.rb b/src/year2024/day1/day1.rb similarity index 100% rename from 2024/day1/day1.rb rename to src/year2024/day1/day1.rb diff --git a/2024/day1/day1.rs b/src/year2024/day1/day1.rs similarity index 100% rename from 2024/day1/day1.rs rename to src/year2024/day1/day1.rs diff --git a/2024/day1/day1.sh b/src/year2024/day1/day1.sh similarity index 100% rename from 2024/day1/day1.sh rename to src/year2024/day1/day1.sh diff --git a/2024/day1/day1.sql b/src/year2024/day1/day1.sql similarity index 100% rename from 2024/day1/day1.sql rename to src/year2024/day1/day1.sql diff --git a/2024/day1/day1.swift b/src/year2024/day1/day1.swift similarity index 100% rename from 2024/day1/day1.swift rename to src/year2024/day1/day1.swift diff --git a/2024/day1/test.txt b/src/year2024/day1/test.txt similarity index 100% rename from 2024/day1/test.txt rename to src/year2024/day1/test.txt diff --git a/2024/day10/day10.rs b/src/year2024/day10/day10.rs similarity index 100% rename from 2024/day10/day10.rs rename to src/year2024/day10/day10.rs diff --git a/2024/day10/sample_1.txt b/src/year2024/day10/sample_1.txt similarity index 100% rename from 2024/day10/sample_1.txt rename to src/year2024/day10/sample_1.txt diff --git a/2024/day10/sample_10.txt b/src/year2024/day10/sample_10.txt similarity index 100% rename from 2024/day10/sample_10.txt rename to src/year2024/day10/sample_10.txt diff --git a/2024/day10/sample_2.txt b/src/year2024/day10/sample_2.txt similarity index 100% rename from 2024/day10/sample_2.txt rename to src/year2024/day10/sample_2.txt diff --git a/2024/day10/sample_3.txt b/src/year2024/day10/sample_3.txt similarity index 100% rename from 2024/day10/sample_3.txt rename to src/year2024/day10/sample_3.txt diff --git a/2024/day10/sample_4.txt b/src/year2024/day10/sample_4.txt similarity index 100% rename from 2024/day10/sample_4.txt rename to src/year2024/day10/sample_4.txt diff --git a/2024/day10/sample_5.txt b/src/year2024/day10/sample_5.txt similarity index 100% rename from 2024/day10/sample_5.txt rename to src/year2024/day10/sample_5.txt diff --git a/2024/day10/sample_6.txt b/src/year2024/day10/sample_6.txt similarity index 100% rename from 2024/day10/sample_6.txt rename to src/year2024/day10/sample_6.txt diff --git a/2024/day10/sample_8.txt b/src/year2024/day10/sample_8.txt similarity index 100% rename from 2024/day10/sample_8.txt rename to src/year2024/day10/sample_8.txt diff --git a/2024/day10/sample_9.txt b/src/year2024/day10/sample_9.txt similarity index 100% rename from 2024/day10/sample_9.txt rename to src/year2024/day10/sample_9.txt diff --git a/2024/day11/day11.go b/src/year2024/day11/day11.go similarity index 100% rename from 2024/day11/day11.go rename to src/year2024/day11/day11.go diff --git a/2024/day11/day11.rs b/src/year2024/day11/day11.rs similarity index 100% rename from 2024/day11/day11.rs rename to src/year2024/day11/day11.rs diff --git a/2024/day11/test.txt b/src/year2024/day11/test.txt similarity index 100% rename from 2024/day11/test.txt rename to src/year2024/day11/test.txt diff --git a/2024/day12/day12.rs b/src/year2024/day12/day12.rs similarity index 100% rename from 2024/day12/day12.rs rename to src/year2024/day12/day12.rs diff --git a/2024/day12/sample_1.txt b/src/year2024/day12/sample_1.txt similarity index 100% rename from 2024/day12/sample_1.txt rename to src/year2024/day12/sample_1.txt diff --git a/2024/day12/sample_3.txt b/src/year2024/day12/sample_3.txt similarity index 100% rename from 2024/day12/sample_3.txt rename to src/year2024/day12/sample_3.txt diff --git a/2024/day12/sample_4.txt b/src/year2024/day12/sample_4.txt similarity index 100% rename from 2024/day12/sample_4.txt rename to src/year2024/day12/sample_4.txt diff --git a/2024/day12/sample_6.txt b/src/year2024/day12/sample_6.txt similarity index 100% rename from 2024/day12/sample_6.txt rename to src/year2024/day12/sample_6.txt diff --git a/2024/day12/sample_7.txt b/src/year2024/day12/sample_7.txt similarity index 100% rename from 2024/day12/sample_7.txt rename to src/year2024/day12/sample_7.txt diff --git a/2024/day13/day13.rs b/src/year2024/day13/day13.rs similarity index 100% rename from 2024/day13/day13.rs rename to src/year2024/day13/day13.rs diff --git a/2024/day13/test.txt b/src/year2024/day13/test.txt similarity index 100% rename from 2024/day13/test.txt rename to src/year2024/day13/test.txt diff --git a/one/build.rs b/src/year2024/day13_z3/build.rs similarity index 100% rename from one/build.rs rename to src/year2024/day13_z3/build.rs diff --git a/2024/day13_z3/day13.py b/src/year2024/day13_z3/day13.py similarity index 100% rename from 2024/day13_z3/day13.py rename to src/year2024/day13_z3/day13.py diff --git a/2024/day13_z3/day13.rs b/src/year2024/day13_z3/day13.rs similarity index 100% rename from 2024/day13_z3/day13.rs rename to src/year2024/day13_z3/day13.rs diff --git a/2024/day13_z3/test.txt b/src/year2024/day13_z3/test.txt similarity index 100% rename from 2024/day13_z3/test.txt rename to src/year2024/day13_z3/test.txt diff --git a/2024/day14/README.md b/src/year2024/day14/README.md similarity index 100% rename from 2024/day14/README.md rename to src/year2024/day14/README.md diff --git a/2024/day14/christmastree.gif b/src/year2024/day14/christmastree.gif similarity index 100% rename from 2024/day14/christmastree.gif rename to src/year2024/day14/christmastree.gif diff --git a/2024/day14/day14.py b/src/year2024/day14/day14.py similarity index 100% rename from 2024/day14/day14.py rename to src/year2024/day14/day14.py diff --git a/2024/day14/day14.rs b/src/year2024/day14/day14.rs similarity index 100% rename from 2024/day14/day14.rs rename to src/year2024/day14/day14.rs diff --git a/2024/day14/easteregg.py b/src/year2024/day14/easteregg.py similarity index 100% rename from 2024/day14/easteregg.py rename to src/year2024/day14/easteregg.py diff --git a/2024/day14/easteregg_anim.sh b/src/year2024/day14/easteregg_anim.sh similarity index 100% rename from 2024/day14/easteregg_anim.sh rename to src/year2024/day14/easteregg_anim.sh diff --git a/2024/day14/test.txt b/src/year2024/day14/test.txt similarity index 100% rename from 2024/day14/test.txt rename to src/year2024/day14/test.txt diff --git a/2024/day15/README.md b/src/year2024/day15/README.md similarity index 100% rename from 2024/day15/README.md rename to src/year2024/day15/README.md diff --git a/2024/day15/anim.sh b/src/year2024/day15/anim.sh similarity index 100% rename from 2024/day15/anim.sh rename to src/year2024/day15/anim.sh diff --git a/2024/day15/day15.rs b/src/year2024/day15/day15.rs similarity index 100% rename from 2024/day15/day15.rs rename to src/year2024/day15/day15.rs diff --git a/2024/day15/large1.gif b/src/year2024/day15/large1.gif similarity index 100% rename from 2024/day15/large1.gif rename to src/year2024/day15/large1.gif diff --git a/2024/day15/large2.gif b/src/year2024/day15/large2.gif similarity index 100% rename from 2024/day15/large2.gif rename to src/year2024/day15/large2.gif diff --git a/2024/day15/sample_1.txt b/src/year2024/day15/sample_1.txt similarity index 100% rename from 2024/day15/sample_1.txt rename to src/year2024/day15/sample_1.txt diff --git a/2024/day15/sample_2.txt b/src/year2024/day15/sample_2.txt similarity index 100% rename from 2024/day15/sample_2.txt rename to src/year2024/day15/sample_2.txt diff --git a/2024/day15/small1.gif b/src/year2024/day15/small1.gif similarity index 100% rename from 2024/day15/small1.gif rename to src/year2024/day15/small1.gif diff --git a/2024/day15/small2.gif b/src/year2024/day15/small2.gif similarity index 100% rename from 2024/day15/small2.gif rename to src/year2024/day15/small2.gif diff --git a/2024/day16/README.md b/src/year2024/day16/README.md similarity index 100% rename from 2024/day16/README.md rename to src/year2024/day16/README.md diff --git a/2024/day16/anim.gif b/src/year2024/day16/anim.gif similarity index 100% rename from 2024/day16/anim.gif rename to src/year2024/day16/anim.gif diff --git a/2024/day16/anim.sh b/src/year2024/day16/anim.sh similarity index 100% rename from 2024/day16/anim.sh rename to src/year2024/day16/anim.sh diff --git a/2024/day16/day16.rs b/src/year2024/day16/day16.rs similarity index 100% rename from 2024/day16/day16.rs rename to src/year2024/day16/day16.rs diff --git a/2024/day16/sample_1.txt b/src/year2024/day16/sample_1.txt similarity index 100% rename from 2024/day16/sample_1.txt rename to src/year2024/day16/sample_1.txt diff --git a/2024/day16/sample_3.txt b/src/year2024/day16/sample_3.txt similarity index 100% rename from 2024/day16/sample_3.txt rename to src/year2024/day16/sample_3.txt diff --git a/2024/day17/day17.rs b/src/year2024/day17/day17.rs similarity index 100% rename from 2024/day17/day17.rs rename to src/year2024/day17/day17.rs diff --git a/2024/day17/sample_1.txt b/src/year2024/day17/sample_1.txt similarity index 100% rename from 2024/day17/sample_1.txt rename to src/year2024/day17/sample_1.txt diff --git a/2024/day17/sample_2.txt b/src/year2024/day17/sample_2.txt similarity index 100% rename from 2024/day17/sample_2.txt rename to src/year2024/day17/sample_2.txt diff --git a/2024/day18/day18.cpp b/src/year2024/day18/day18.cpp similarity index 100% rename from 2024/day18/day18.cpp rename to src/year2024/day18/day18.cpp diff --git a/2024/day18/day18.go b/src/year2024/day18/day18.go similarity index 100% rename from 2024/day18/day18.go rename to src/year2024/day18/day18.go diff --git a/2024/day18/day18.rs b/src/year2024/day18/day18.rs similarity index 100% rename from 2024/day18/day18.rs rename to src/year2024/day18/day18.rs diff --git a/2024/day18/sample_1.txt b/src/year2024/day18/sample_1.txt similarity index 100% rename from 2024/day18/sample_1.txt rename to src/year2024/day18/sample_1.txt diff --git a/2024/day19/day19.rs b/src/year2024/day19/day19.rs similarity index 100% rename from 2024/day19/day19.rs rename to src/year2024/day19/day19.rs diff --git a/2024/day19/test.txt b/src/year2024/day19/test.txt similarity index 100% rename from 2024/day19/test.txt rename to src/year2024/day19/test.txt diff --git a/2024/day2/day2.go b/src/year2024/day2/day2.go similarity index 100% rename from 2024/day2/day2.go rename to src/year2024/day2/day2.go diff --git a/2024/day2/day2.py b/src/year2024/day2/day2.py similarity index 100% rename from 2024/day2/day2.py rename to src/year2024/day2/day2.py diff --git a/2024/day2/day2.rs b/src/year2024/day2/day2.rs similarity index 100% rename from 2024/day2/day2.rs rename to src/year2024/day2/day2.rs diff --git a/2024/day2/test.txt b/src/year2024/day2/test.txt similarity index 100% rename from 2024/day2/test.txt rename to src/year2024/day2/test.txt diff --git a/2024/day20/day20.rs b/src/year2024/day20/day20.rs similarity index 100% rename from 2024/day20/day20.rs rename to src/year2024/day20/day20.rs diff --git a/2024/day20/test.txt b/src/year2024/day20/test.txt similarity index 100% rename from 2024/day20/test.txt rename to src/year2024/day20/test.txt diff --git a/2024/day21/day21.rs b/src/year2024/day21/day21.rs similarity index 100% rename from 2024/day21/day21.rs rename to src/year2024/day21/day21.rs diff --git a/2024/day21/test.txt b/src/year2024/day21/test.txt similarity index 100% rename from 2024/day21/test.txt rename to src/year2024/day21/test.txt diff --git a/2024/day22/day22.rs b/src/year2024/day22/day22.rs similarity index 100% rename from 2024/day22/day22.rs rename to src/year2024/day22/day22.rs diff --git a/2024/day22/test.txt b/src/year2024/day22/test.txt similarity index 100% rename from 2024/day22/test.txt rename to src/year2024/day22/test.txt diff --git a/2024/day23/day23.py b/src/year2024/day23/day23.py similarity index 100% rename from 2024/day23/day23.py rename to src/year2024/day23/day23.py diff --git a/2024/day23/day23.rs b/src/year2024/day23/day23.rs similarity index 100% rename from 2024/day23/day23.rs rename to src/year2024/day23/day23.rs diff --git a/2024/day23/test.txt b/src/year2024/day23/test.txt similarity index 100% rename from 2024/day23/test.txt rename to src/year2024/day23/test.txt diff --git a/2024/day24/day24.rs b/src/year2024/day24/day24.rs similarity index 100% rename from 2024/day24/day24.rs rename to src/year2024/day24/day24.rs diff --git a/2024/day24/full_adder.png b/src/year2024/day24/full_adder.png similarity index 100% rename from 2024/day24/full_adder.png rename to src/year2024/day24/full_adder.png diff --git a/2024/day24/half_adder.png b/src/year2024/day24/half_adder.png similarity index 100% rename from 2024/day24/half_adder.png rename to src/year2024/day24/half_adder.png diff --git a/2024/day24/sample_1.txt b/src/year2024/day24/sample_1.txt similarity index 100% rename from 2024/day24/sample_1.txt rename to src/year2024/day24/sample_1.txt diff --git a/2024/day24/sample_2.txt b/src/year2024/day24/sample_2.txt similarity index 100% rename from 2024/day24/sample_2.txt rename to src/year2024/day24/sample_2.txt diff --git a/2024/day25/day25.go b/src/year2024/day25/day25.go similarity index 100% rename from 2024/day25/day25.go rename to src/year2024/day25/day25.go diff --git a/2024/day25/day25.py b/src/year2024/day25/day25.py similarity index 100% rename from 2024/day25/day25.py rename to src/year2024/day25/day25.py diff --git a/2024/day25/day25.rs b/src/year2024/day25/day25.rs similarity index 100% rename from 2024/day25/day25.rs rename to src/year2024/day25/day25.rs diff --git a/2024/day25/test.txt b/src/year2024/day25/test.txt similarity index 100% rename from 2024/day25/test.txt rename to src/year2024/day25/test.txt diff --git a/2024/day3/day3.go b/src/year2024/day3/day3.go similarity index 100% rename from 2024/day3/day3.go rename to src/year2024/day3/day3.go diff --git a/2024/day3/day3.pl b/src/year2024/day3/day3.pl similarity index 100% rename from 2024/day3/day3.pl rename to src/year2024/day3/day3.pl diff --git a/2024/day3/day3.py b/src/year2024/day3/day3.py similarity index 100% rename from 2024/day3/day3.py rename to src/year2024/day3/day3.py diff --git a/2024/day3/day3.rs b/src/year2024/day3/day3.rs similarity index 100% rename from 2024/day3/day3.rs rename to src/year2024/day3/day3.rs diff --git a/2024/day3/sample_1.txt b/src/year2024/day3/sample_1.txt similarity index 100% rename from 2024/day3/sample_1.txt rename to src/year2024/day3/sample_1.txt diff --git a/2024/day3/sample_2.txt b/src/year2024/day3/sample_2.txt similarity index 100% rename from 2024/day3/sample_2.txt rename to src/year2024/day3/sample_2.txt diff --git a/2024/day4/day4.py b/src/year2024/day4/day4.py similarity index 100% rename from 2024/day4/day4.py rename to src/year2024/day4/day4.py diff --git a/2024/day4/day4.rs b/src/year2024/day4/day4.rs similarity index 100% rename from 2024/day4/day4.rs rename to src/year2024/day4/day4.rs diff --git a/2024/day4/sample_1.txt b/src/year2024/day4/sample_1.txt similarity index 100% rename from 2024/day4/sample_1.txt rename to src/year2024/day4/sample_1.txt diff --git a/2024/day4/sample_2.txt b/src/year2024/day4/sample_2.txt similarity index 100% rename from 2024/day4/sample_2.txt rename to src/year2024/day4/sample_2.txt diff --git a/2024/day4/sample_3.txt b/src/year2024/day4/sample_3.txt similarity index 100% rename from 2024/day4/sample_3.txt rename to src/year2024/day4/sample_3.txt diff --git a/2024/day4/sample_4.txt b/src/year2024/day4/sample_4.txt similarity index 100% rename from 2024/day4/sample_4.txt rename to src/year2024/day4/sample_4.txt diff --git a/2024/day4/sample_5.txt b/src/year2024/day4/sample_5.txt similarity index 100% rename from 2024/day4/sample_5.txt rename to src/year2024/day4/sample_5.txt diff --git a/2024/day5/day5.rs b/src/year2024/day5/day5.rs similarity index 100% rename from 2024/day5/day5.rs rename to src/year2024/day5/day5.rs diff --git a/2024/day5/test.txt b/src/year2024/day5/test.txt similarity index 100% rename from 2024/day5/test.txt rename to src/year2024/day5/test.txt diff --git a/2024/day6/day6.rs b/src/year2024/day6/day6.rs similarity index 100% rename from 2024/day6/day6.rs rename to src/year2024/day6/day6.rs diff --git a/2024/day6/test.txt b/src/year2024/day6/test.txt similarity index 100% rename from 2024/day6/test.txt rename to src/year2024/day6/test.txt diff --git a/2024/day7/day7.go b/src/year2024/day7/day7.go similarity index 100% rename from 2024/day7/day7.go rename to src/year2024/day7/day7.go diff --git a/2024/day7/day7.py b/src/year2024/day7/day7.py similarity index 99% rename from 2024/day7/day7.py rename to src/year2024/day7/day7.py index f78a5d3a..f9793986 100755 --- a/2024/day7/day7.py +++ b/src/year2024/day7/day7.py @@ -1,9 +1,8 @@ #!/usr/bin/env python3 # [Day 7: Bridge Repair](https://adventofcode.com/2024/day/7) -from pathlib import Path import sys - +from pathlib import Path verbose = "-v" in sys.argv if verbose: diff --git a/2024/day7/day7.rs b/src/year2024/day7/day7.rs similarity index 100% rename from 2024/day7/day7.rs rename to src/year2024/day7/day7.rs diff --git a/2024/day7/test.txt b/src/year2024/day7/test.txt similarity index 100% rename from 2024/day7/test.txt rename to src/year2024/day7/test.txt diff --git a/2024/day8/day8.py b/src/year2024/day8/day8.py similarity index 100% rename from 2024/day8/day8.py rename to src/year2024/day8/day8.py diff --git a/2024/day8/day8.rs b/src/year2024/day8/day8.rs similarity index 100% rename from 2024/day8/day8.rs rename to src/year2024/day8/day8.rs diff --git a/2024/day8/test.txt b/src/year2024/day8/test.txt similarity index 100% rename from 2024/day8/test.txt rename to src/year2024/day8/test.txt diff --git a/2024/day9/day9.rs b/src/year2024/day9/day9.rs similarity index 100% rename from 2024/day9/day9.rs rename to src/year2024/day9/day9.rs diff --git a/2024/day9/test.txt b/src/year2024/day9/test.txt similarity index 100% rename from 2024/day9/test.txt rename to src/year2024/day9/test.txt From 9bd2add1aaf66c27154b5ca22a6c4939e696a4f5 Mon Sep 17 00:00:00 2001 From: rene-d Date: Fri, 24 Jan 2025 08:44:11 +0100 Subject: [PATCH 2/2] single --- .github/workflows/main.yml | 2 +- .justfile | 19 +- Cargo.toml | 3 + README.md | 84 +++--- build.rs | 5 + scripts/answers.py | 187 +++++-------- scripts/aoc.py | 16 +- scripts/bench.sh | 18 -- scripts/check.sh | 55 ---- scripts/puzzle.sh | 59 ++-- scripts/runall.py | 104 ++++--- src/lib.rs | 21 +- src/main.rs | 105 ++++++- src/year2015/README.md | 52 ++-- src/year2015/day10/day10.rs | 2 - src/year2015/day11/day11.rs | 2 - src/year2015/day12/day12.rs | 2 - src/year2015/day13/day13.rs | 2 - src/year2015/day14/day14.rs | 1 - src/year2015/day15/day15.rs | 2 - src/year2015/day16/day16.rs | 1 - src/year2015/day17/day17.rs | 2 - src/year2015/day18/day18.rs | 2 - src/year2015/day19/day19.rs | 1 - src/year2015/day2/day2.rs | 2 - src/year2015/day20/day20.rs | 1 - src/year2015/day21/day21.rs | 1 - src/year2015/day22/day22.rs | 1 - src/year2015/day23/day23.rs | 1 - src/year2015/day24/day24.rs | 1 - src/year2015/day25/day25.rs | 1 - src/year2015/day3/day3.rs | 2 - src/year2015/day4/day4.rs | 2 - src/year2015/day5/day5.rs | 2 - src/year2015/day6/day6.rs | 2 - src/year2015/day7/day7.rs | 2 - src/year2015/day8/day8.rs | 2 - src/year2015/day9/day9.rs | 2 - src/year2016/.bonus.md | 2 +- src/year2016/README.md | 52 ++-- src/year2016/day1/day1.rs | 1 - src/year2016/day10/day10.rs | 1 - src/year2016/day11/day11.rs | 1 - src/year2016/day12/day12.rs | 1 - src/year2016/day13/day13.rs | 1 - src/year2016/day14/day14.rs | 1 - src/year2016/day15/day15.rs | 1 - src/year2016/day16/day16.rs | 1 - src/year2016/day17/day17.rs | 1 - src/year2016/day18/day18.rs | 1 - src/year2016/day19/day19.rs | 1 - src/year2016/day2/day2.rs | 1 - src/year2016/day20/day20.rs | 1 - src/year2016/day21/day21.rs | 1 - src/year2016/day22/day22.rs | 1 - src/year2016/day23/day23.rs | 1 - src/year2016/day24/day24.rs | 49 ++-- src/year2016/day25/day25.rs | 1 - src/year2016/day3/day3.rs | 1 - src/year2016/day4/day4.rs | 1 - src/year2016/day5/day5.rs | 1 - src/year2016/day6/day6.rs | 1 - src/year2016/day7/day7.rs | 1 - src/year2016/day8/day8.rs | 1 - src/year2016/day9/day9.rs | 1 - src/year2017/README.md | 52 ++-- src/year2017/day1/day1.rs | 1 - src/year2017/day10/day10.rs | 1 - src/year2017/day11/day11.rs | 1 - src/year2017/day12/day12.rs | 1 - src/year2017/day13/day13.rs | 1 - src/year2017/day14/day14.rs | 1 - src/year2017/day15/day15.rs | 1 - src/year2017/day16/day16.rs | 1 - src/year2017/day17/day17.rs | 1 - src/year2017/day18/day18.rs | 1 - src/year2017/day19/day19.rs | 1 - src/year2017/day2/day2.rs | 1 - src/year2017/day20/day20.rs | 1 - src/year2017/day21/day21.rs | 1 - src/year2017/day22/day22.rs | 1 - src/year2017/day23/day23.rs | 1 - src/year2017/day24/day24.rs | 1 - src/year2017/day25/day25.rs | 1 - src/year2017/day3/day3.rs | 1 - src/year2017/day4/day4.rs | 1 - src/year2017/day5/day5.rs | 1 - src/year2017/day6/day6.rs | 1 - src/year2017/day7/day7.rs | 1 - src/year2017/day8/day8.rs | 1 - src/year2018/README.md | 52 ++-- src/year2018/day1/day1.rs | 1 - src/year2018/day10/day10.rs | 1 - src/year2018/day11/day11.rs | 1 - src/year2018/day12/day12.rs | 1 - src/year2018/day13/day13.rs | 1 - src/year2018/day14/day14.rs | 1 - src/year2018/day15/day15.rs | 1 - src/year2018/day16/day16.rs | 1 - src/year2018/day17/day17.rs | 1 - src/year2018/day18/day18.rs | 1 - src/year2018/day19/day19.rs | 1 - src/year2018/day2/day2.rs | 1 - src/year2018/day20/day20.rs | 1 - src/year2018/day21/day21.rs | 1 - src/year2018/day22/day22.rs | 1 - src/year2018/day23/day23.rs | 1 - .../day23_z3/{day23.rs => day23_z3.rs} | 1 - src/year2018/day24/day24.rs | 1 - src/year2018/day24/day24/army.rs | 104 +++++++ src/year2018/day24/day24/attacktype.rs | 25 ++ src/year2018/day24/day24/combat.rs | 86 ++++++ src/year2018/day24/day24/group.rs | 262 ++++++++++++++++++ src/year2018/day25/day25.rs | 1 - src/year2018/day3/day3.rs | 1 - src/year2018/day4/day4.rs | 1 - src/year2018/day5/day5.rs | 1 - src/year2018/day6/day6.rs | 1 - src/year2018/day7/day7.rs | 1 - src/year2018/day8/day8.rs | 1 - src/year2018/day9/day9.rs | 1 - src/year2018/day9_c/build.rs | 5 - src/year2018/day9_c/{day9.rs => day9_c.rs} | 1 - src/year2019/README.md | 52 ++-- src/year2019/day1/day1.rs | 1 - src/year2019/day10/day10.rs | 1 - src/year2019/day11/day11.rs | 1 - src/year2019/day12/day12.rs | 1 - src/year2019/day13/day13.rs | 1 - src/year2019/day14/day14.rs | 1 - src/year2019/day15/day15.rs | 1 - src/year2019/day16/day16.rs | 1 - src/year2019/day17/day17.rs | 1 - src/year2019/day18/day18.rs | 1 - src/year2019/day18/day18/mazecell.rs | 43 +++ src/year2019/day18/day18/mazette.rs | 145 ++++++++++ src/year2019/day18/day18/multirobot.rs | 61 ++++ src/year2019/day18/day18/path.rs | 31 +++ src/year2019/day18/day18/state.rs | 68 +++++ src/year2019/day19/day19.rs | 1 - src/year2019/day2/day2.rs | 1 - src/year2019/day20/day20.rs | 1 - src/year2019/day21/day21.rs | 1 - src/year2019/day22/day22.rs | 1 - src/year2019/day23/day23.rs | 1 - src/year2019/day24/day24.rs | 1 - src/year2019/day25/day25.rs | 1 - src/year2019/day3/day3.rs | 1 - src/year2019/day4/day4.rs | 1 - src/year2019/day5/day5.rs | 1 - src/year2019/day6/day6.rs | 1 - src/year2019/day7/day7.rs | 1 - src/year2019/day8/day8.rs | 1 - src/year2019/day9/day9.rs | 1 - src/year2019/ocr/ocr.py | 2 +- src/year2020/README.md | 52 ++-- src/year2020/day1/day1.rs | 1 - src/year2020/day10/day10.rs | 1 - src/year2020/day11/day11.rs | 1 - src/year2020/day12/day12.rs | 1 - src/year2020/day13/day13.rs | 1 - src/year2020/day14/day14.rs | 1 - src/year2020/day15/day15.rs | 1 - src/year2020/day16/day16.rs | 1 - src/year2020/day17/day17.rs | 1 - src/year2020/day18/day18.rs | 1 - src/year2020/day19/day19.rs | 1 - src/year2020/day2/day2.rs | 1 - src/year2020/day20/day20.rs | 1 - src/year2020/day21/day21.rs | 1 - src/year2020/day22/day22.rs | 1 - src/year2020/day23/day23.rs | 1 - src/year2020/day24/day24.rs | 1 - src/year2020/day25/day25.rs | 1 - src/year2020/day3/day3.rs | 1 - src/year2020/day4/day4.rs | 1 - src/year2020/day5/day5.rs | 1 - src/year2020/day6/day6.rs | 1 - src/year2020/day7/day7.rs | 1 - src/year2020/day8/day8.rs | 1 - src/year2020/day9/day9.rs | 1 - src/year2021/README.md | 52 ++-- src/year2021/day1/day1.rs | 1 - src/year2021/day10/day10.rs | 1 - src/year2021/day11/day11.rs | 1 - src/year2021/day12/day12.rs | 1 - src/year2021/day13/day13.rs | 1 - src/year2021/day14/day14.rs | 1 - src/year2021/day15/day15.rs | 1 - src/year2021/day16/day16.rs | 1 - src/year2021/day17/day17.rs | 1 - src/year2021/day18/day18.rs | 1 - src/year2021/day19/day19.rs | 1 - src/year2021/day2/day2.rs | 1 - src/year2021/day20/day20.rs | 1 - src/year2021/day21/day21.rs | 1 - src/year2021/day22/day22.rs | 1 - src/year2021/day23/day23.rs | 1 - src/year2021/day24/day24.rs | 1 - src/year2021/day25/day25.rs | 1 - src/year2021/day3/day3.rs | 1 - src/year2021/day4/day4.rs | 1 - src/year2021/day5/day5.rs | 1 - src/year2021/day6/day6.rs | 1 - src/year2021/day7/day7.rs | 1 - src/year2021/day8/day8.rs | 1 - src/year2021/day9/day9.rs | 1 - src/year2021/ocr/ocr.py | 2 +- src/year2022/README.md | 52 ++-- src/year2022/day1/day1.rs | 1 - src/year2022/{day13_pest => day13}/day13.py | 0 .../day13_pest/{day13.rs => day13_pest.rs} | 2 +- src/year2022/day15/day15.py | 8 +- src/year2022/day17/day17.rs | 1 - src/year2022/day2/day2.rs | 1 - src/year2022/day21/day21.rs | 14 +- src/year2022/day3/day3.rs | 1 - src/year2022/day4/day4.rs | 1 - src/year2022/day5/day5.rs | 1 - src/year2022/day7/day7.rs | 7 +- src/year2023/README.md | 52 ++-- src/year2023/day1/day1.rs | 1 - src/year2023/day10/day10.rs | 1 - src/year2023/day11/day11.rs | 1 - src/year2023/day12/day12.rs | 1 - src/year2023/day13/day13.rs | 1 - src/year2023/day14/day14.rs | 1 - src/year2023/day15/day15.rs | 1 - src/year2023/day16/day16.rs | 1 - src/year2023/day17/day17.rs | 1 - src/year2023/day18/day18.rs | 1 - src/year2023/day19/day19.rs | 1 - src/year2023/day2/day2.rs | 1 - src/year2023/day20/day20.rs | 1 - src/year2023/day21/day21.rs | 1 - src/year2023/day22/day22.rs | 1 - src/year2023/day23/day23.rs | 1 - src/year2023/day24/day24.rs | 1 - src/year2023/day25/day25.rs | 1 - src/year2023/day3/day3.rs | 1 - src/year2023/day4/day4.rs | 1 - src/year2023/day5/day5.rs | 1 - src/year2023/day6/day6.rs | 1 - src/year2023/day7/day7.rs | 1 - src/year2023/day8/day8.rs | 1 - src/year2023/day9/day9.rs | 1 - src/year2024/README.md | 52 ++-- src/year2024/day1/day1.rs | 1 - src/year2024/day10/day10.rs | 1 - src/year2024/day11/day11.rs | 1 - src/year2024/day12/day12.rs | 1 - src/year2024/day13/day13.rs | 1 - .../day13_z3/{day13.rs => day13_z3.rs} | 1 - src/year2024/day14/day14.rs | 1 - src/year2024/day15/day15.rs | 1 - src/year2024/day16/day16.rs | 1 - src/year2024/day17/day17.rs | 1 - src/year2024/day18/day18.rs | 1 - src/year2024/day19/day19.rs | 1 - src/year2024/day2/day2.rs | 1 - src/year2024/day20/day20.rs | 1 - src/year2024/day21/day21.rs | 1 - src/year2024/day22/day22.rs | 1 - src/year2024/day23/day23.rs | 1 - src/year2024/day24/day24.rs | 1 - src/year2024/day25/day25.rs | 1 - src/year2024/day3/day3.rs | 1 - src/year2024/day4/day4.rs | 1 - src/year2024/day5/day5.rs | 1 - src/year2024/day6/day6.rs | 1 - src/year2024/day7/day7.rs | 1 - src/year2024/day8/day8.rs | 1 - src/year2024/day9/day9.rs | 1 - 273 files changed, 1465 insertions(+), 895 deletions(-) delete mode 100755 scripts/bench.sh delete mode 100755 scripts/check.sh rename src/year2018/day23_z3/{day23.rs => day23_z3.rs} (99%) create mode 100644 src/year2018/day24/day24/army.rs create mode 100644 src/year2018/day24/day24/attacktype.rs create mode 100644 src/year2018/day24/day24/combat.rs create mode 100644 src/year2018/day24/day24/group.rs delete mode 100644 src/year2018/day9_c/build.rs rename src/year2018/day9_c/{day9.rs => day9_c.rs} (98%) create mode 100644 src/year2019/day18/day18/mazecell.rs create mode 100644 src/year2019/day18/day18/mazette.rs create mode 100644 src/year2019/day18/day18/multirobot.rs create mode 100644 src/year2019/day18/day18/path.rs create mode 100644 src/year2019/day18/day18/state.rs rename src/year2022/{day13_pest => day13}/day13.py (100%) rename src/year2022/day13_pest/{day13.rs => day13_pest.rs} (98%) rename src/year2024/day13_z3/{day13.rs => day13_z3.rs} (99%) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 60037ffb..1f29e3da 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,7 +31,7 @@ jobs: for manifest in `find . -maxdepth 3 ! -path '*/day*' -name Cargo.toml` do echo check clippy for $manifest - cargo clippy --manifest-path $manifest -- --no-deps -D clippy::all -A clippy::pedantic -A clippy::nursery + cargo clippy --manifest-path $manifest -- --no-deps -D clippy::all -D clippy::pedantic -F clippy::nursery done # Check non-regression tests diff --git a/.justfile b/.justfile index c2f7be1a..9f046228 100644 --- a/.justfile +++ b/.justfile @@ -2,21 +2,23 @@ set shell := ["bash", "-uc"] alias r := run -# export RUSTFLAGS := "-C target-cpu=native" - run: ./scripts/runall.py --working-dir {{invocation_directory()}} -lrust --verified +# make + clean: git clean -fd make-debug: - cargo build --manifest-path aoc/Cargo.toml --quiet - @for year in 20* ; do echo "cargo build $year" ; cargo build --manifest-path $year/Cargo.toml --quiet ; done + @for path in crates/*/Cargo.toml ; do cargo build --manifest-path $path --quiet ; done + cargo build --manifest-path ./Cargo.toml --quiet make: - cargo build --manifest-path aoc/Cargo.toml --release --quiet - @for year in 20* ; do echo "cargo build $year" ; cargo build --manifest-path $year/Cargo.toml --release --quiet ; done + @for path in crates/*/Cargo.toml ; do cargo build --manifest-path $path --quiet --release ; done + cargo build --manifest-path ./Cargo.toml --quiet --release + +# exec timings *ARGS: ./scripts/timings.py {{ ARGS }} @@ -27,6 +29,8 @@ run-all *ARGS: tmux kill-window -t aoc:0 tmux list-windows -t aoc +# GitHub + gh-fmt: #!/usr/bin/env bash for manifest in `find . -maxdepth 3 ! -path '*/day*' -name Cargo.toml` @@ -40,7 +44,7 @@ gh-clippy: for manifest in `find . -maxdepth 3 ! -path '*/day*' -name Cargo.toml` do echo check clippy for $manifest - cargo clippy --manifest-path $manifest -- --no-deps -D clippy::all -A clippy::pedantic -A clippy::nursery + cargo clippy --manifest-path $manifest -- --no-deps -D clippy::all -D clippy::pedantic -F clippy::nursery done gh-test: @@ -53,6 +57,7 @@ gh-test: gh: gh-fmt gh-clippy gh-test +# Docker stuff debian: docker build -f scripts/Dockerfile -t aoc scripts/ diff --git a/Cargo.toml b/Cargo.toml index 35d8c3e3..a3392134 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,6 +7,9 @@ edition = "2021" ascii = [] anim = ["image"] +[build-dependencies] +cc = "*" + [dependencies] aoc = { path = "crates/aoc" } assembunny = { path = "crates/assembunny" } diff --git a/README.md b/README.md index a531bbf2..fae2f382 100644 --- a/README.md +++ b/README.md @@ -10,61 +10,61 @@ Made for fun 😎 and to practice Rust. Many thanks to [Eric Wastl](https://twitter.com/ericwastl). -## 2024 (current event) ([Calendar](https://adventofcode.com/2024)) ([Solutions](2024/)) : 50⭐ +## 2024 (current event) ([Calendar](https://adventofcode.com/2024)) ([Solutions](src/year2015/)) : 50⭐ Puzzle | Stars | Languages ---------------------------------------------------------------------- | ----- | ----------- -[Day 1: Historian Hysteria](https://adventofcode.com/2024/day/1) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](./2024/day1/day1.rs) [![Python](./scripts/assets/python.png)](./2024/day1/day1.py) [![C](./scripts/assets/c.png)](./2024/day1/day1.c) [![C++](./scripts/assets/cpp.png)](./2024/day1/day1.cpp) [![Go](./scripts/assets/go.png)](./2024/day1/day1.go) [![Ruby](./scripts/assets/ruby.png)](./2024/day1/day1.rb) [![Perl](./scripts/assets/perl.png)](./2024/day1/day1.pl) [![Lua](./scripts/assets/lua.png)](./2024/day1/day1.lua) [![JS](./scripts/assets/javascript.png)](./2024/day1/day1.js) [![Bash](./scripts/assets/bash.png)](./2024/day1/day1.sh) [![Swift](./scripts/assets/swift.png)](./2024/day1/day1.swift) [![Java](./scripts/assets/java.png)](./2024/day1/day1.java) [![C#](./scripts/assets/csharp.png)](./2024/day1/day1.cs) [![SQLite](./scripts/assets/sqlite.png)](./2024/day1/day1.sql) [![Linux Kernel](./scripts/assets/kernel.png)](./2024/day1/day1.kernel) -[Day 2: Red-Nosed Reports](https://adventofcode.com/2024/day/2) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](./2024/day2/day2.rs) [![Python](./scripts/assets/python.png)](./2024/day2/day2.py) [![Go](./scripts/assets/go.png)](./2024/day2/day2.go) -[Day 3: Mull It Over](https://adventofcode.com/2024/day/3) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](./2024/day3/day3.rs) [![Python](./scripts/assets/python.png)](./2024/day3/day3.py) [![Go](./scripts/assets/go.png)](./2024/day3/day3.go) [![Perl](./scripts/assets/perl.png)](./2024/day3/day3.pl) -[Day 4: Ceres Search](https://adventofcode.com/2024/day/4) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](./2024/day4/day4.rs) [![Python](./scripts/assets/python.png)](./2024/day4/day4.py) -[Day 5: Print Queue](https://adventofcode.com/2024/day/5) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](./2024/day5/day5.rs) -[Day 6: Guard Gallivant](https://adventofcode.com/2024/day/6) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](./2024/day6/day6.rs) -[Day 7: Bridge Repair](https://adventofcode.com/2024/day/7) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](./2024/day7/day7.rs) [![Python](./scripts/assets/python.png)](./2024/day7/day7.py) [![Go](./scripts/assets/go.png)](./2024/day7/day7.go) -[Day 8: Resonant Collinearity](https://adventofcode.com/2024/day/8) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](./2024/day8/day8.rs) [![Python](./scripts/assets/python.png)](./2024/day8/day8.py) -[Day 9: Disk Fragmenter](https://adventofcode.com/2024/day/9) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](./2024/day9/day9.rs) -[Day 10: Hoof It](https://adventofcode.com/2024/day/10) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](./2024/day10/day10.rs) -[Day 11: Plutonian Pebbles](https://adventofcode.com/2024/day/11) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](./2024/day11/day11.rs) [![Go](./scripts/assets/go.png)](./2024/day11/day11.go) -[Day 12: Garden Groups](https://adventofcode.com/2024/day/12) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](./2024/day12/day12.rs) -[Day 13: Claw Contraption](https://adventofcode.com/2024/day/13) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](./2024/day13/day13.rs) [![Rust](./scripts/assets/rust.png)](./2024/day13_z3/day13.rs) [![Python](./scripts/assets/python.png)](./2024/day13_z3/day13.py) -[Day 14: Restroom Redoubt](https://adventofcode.com/2024/day/14) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](./2024/day14/day14.rs) [![Python](./scripts/assets/python.png)](./2024/day14/day14.py) [🎁](./2024/day14/README.md) -[Day 15: Warehouse Woes](https://adventofcode.com/2024/day/15) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](./2024/day15/day15.rs) [🎁](./2024/day15/README.md) -[Day 16: Reindeer Maze](https://adventofcode.com/2024/day/16) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](./2024/day16/day16.rs) [🎁](./2024/day16/README.md) -[Day 17: Chronospatial Computer](https://adventofcode.com/2024/day/17) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](./2024/day17/day17.rs) -[Day 18: RAM Run](https://adventofcode.com/2024/day/18) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](./2024/day18/day18.rs) [![C++](./scripts/assets/cpp.png)](./2024/day18/day18.cpp) [![Go](./scripts/assets/go.png)](./2024/day18/day18.go) -[Day 19: Linen Layout](https://adventofcode.com/2024/day/19) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](./2024/day19/day19.rs) -[Day 20: Race Condition](https://adventofcode.com/2024/day/20) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](./2024/day20/day20.rs) -[Day 21: Keypad Conundrum](https://adventofcode.com/2024/day/21) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](./2024/day21/day21.rs) -[Day 22: Monkey Market](https://adventofcode.com/2024/day/22) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](./2024/day22/day22.rs) -[Day 23: LAN Party](https://adventofcode.com/2024/day/23) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](./2024/day23/day23.rs) [![Python](./scripts/assets/python.png)](./2024/day23/day23.py) -[Day 24: Crossed Wires](https://adventofcode.com/2024/day/24) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](./2024/day24/day24.rs) -[Day 25: Code Chronicle](https://adventofcode.com/2024/day/25) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](./2024/day25/day25.rs) [![Python](./scripts/assets/python.png)](./2024/day25/day25.py) [![Go](./scripts/assets/go.png)](./2024/day25/day25.go) +[Day 1: Historian Hysteria](https://adventofcode.com/2024/day/1) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](src/year2024/day1/day1.rs) [![Python](./scripts/assets/python.png)](src/year2024/day1/day1.py) [![C](./scripts/assets/c.png)](src/year2024/day1/day1.c) [![C++](./scripts/assets/cpp.png)](src/year2024/day1/day1.cpp) [![Go](./scripts/assets/go.png)](src/year2024/day1/day1.go) [![Ruby](./scripts/assets/ruby.png)](src/year2024/day1/day1.rb) [![Perl](./scripts/assets/perl.png)](src/year2024/day1/day1.pl) [![Lua](./scripts/assets/lua.png)](src/year2024/day1/day1.lua) [![JS](./scripts/assets/javascript.png)](src/year2024/day1/day1.js) [![Bash](./scripts/assets/bash.png)](src/year2024/day1/day1.sh) [![Swift](./scripts/assets/swift.png)](src/year2024/day1/day1.swift) [![Java](./scripts/assets/java.png)](src/year2024/day1/day1.java) [![C#](./scripts/assets/csharp.png)](src/year2024/day1/day1.cs) [![SQLite](./scripts/assets/sqlite.png)](src/year2024/day1/day1.sql) +[Day 2: Red-Nosed Reports](https://adventofcode.com/2024/day/2) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](src/year2024/day2/day2.rs) [![Python](./scripts/assets/python.png)](src/year2024/day2/day2.py) [![Go](./scripts/assets/go.png)](src/year2024/day2/day2.go) +[Day 3: Mull It Over](https://adventofcode.com/2024/day/3) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](src/year2024/day3/day3.rs) [![Python](./scripts/assets/python.png)](src/year2024/day3/day3.py) [![Go](./scripts/assets/go.png)](src/year2024/day3/day3.go) [![Perl](./scripts/assets/perl.png)](src/year2024/day3/day3.pl) +[Day 4: Ceres Search](https://adventofcode.com/2024/day/4) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](src/year2024/day4/day4.rs) [![Python](./scripts/assets/python.png)](src/year2024/day4/day4.py) +[Day 5: Print Queue](https://adventofcode.com/2024/day/5) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](src/year2024/day5/day5.rs) +[Day 6: Guard Gallivant](https://adventofcode.com/2024/day/6) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](src/year2024/day6/day6.rs) +[Day 7: Bridge Repair](https://adventofcode.com/2024/day/7) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](src/year2024/day7/day7.rs) [![Python](./scripts/assets/python.png)](src/year2024/day7/day7.py) [![Go](./scripts/assets/go.png)](src/year2024/day7/day7.go) +[Day 8: Resonant Collinearity](https://adventofcode.com/2024/day/8) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](src/year2024/day8/day8.rs) [![Python](./scripts/assets/python.png)](src/year2024/day8/day8.py) +[Day 9: Disk Fragmenter](https://adventofcode.com/2024/day/9) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](src/year2024/day9/day9.rs) +[Day 10: Hoof It](https://adventofcode.com/2024/day/10) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](src/year2024/day10/day10.rs) +[Day 11: Plutonian Pebbles](https://adventofcode.com/2024/day/11) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](src/year2024/day11/day11.rs) [![Go](./scripts/assets/go.png)](src/year2024/day11/day11.go) +[Day 12: Garden Groups](https://adventofcode.com/2024/day/12) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](src/year2024/day12/day12.rs) +[Day 13: Claw Contraption](https://adventofcode.com/2024/day/13) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](src/year2024/day13/day13.rs) [![Rust](./scripts/assets/rust.png)](src/year2024/day13_z3/day13_z3.rs) [![Python](./scripts/assets/python.png)](src/year2024/day13_z3/day13.py) +[Day 14: Restroom Redoubt](https://adventofcode.com/2024/day/14) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](src/year2024/day14/day14.rs) [![Python](./scripts/assets/python.png)](src/year2024/day14/day14.py) [🎁](src/year2024/day14/README.md) +[Day 15: Warehouse Woes](https://adventofcode.com/2024/day/15) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](src/year2024/day15/day15.rs) [🎁](src/year2024/day15/README.md) +[Day 16: Reindeer Maze](https://adventofcode.com/2024/day/16) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](src/year2024/day16/day16.rs) [🎁](src/year2024/day16/README.md) +[Day 17: Chronospatial Computer](https://adventofcode.com/2024/day/17) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](src/year2024/day17/day17.rs) +[Day 18: RAM Run](https://adventofcode.com/2024/day/18) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](src/year2024/day18/day18.rs) [![C++](./scripts/assets/cpp.png)](src/year2024/day18/day18.cpp) [![Go](./scripts/assets/go.png)](src/year2024/day18/day18.go) +[Day 19: Linen Layout](https://adventofcode.com/2024/day/19) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](src/year2024/day19/day19.rs) +[Day 20: Race Condition](https://adventofcode.com/2024/day/20) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](src/year2024/day20/day20.rs) +[Day 21: Keypad Conundrum](https://adventofcode.com/2024/day/21) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](src/year2024/day21/day21.rs) +[Day 22: Monkey Market](https://adventofcode.com/2024/day/22) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](src/year2024/day22/day22.rs) +[Day 23: LAN Party](https://adventofcode.com/2024/day/23) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](src/year2024/day23/day23.rs) [![Python](./scripts/assets/python.png)](src/year2024/day23/day23.py) +[Day 24: Crossed Wires](https://adventofcode.com/2024/day/24) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](src/year2024/day24/day24.rs) +[Day 25: Code Chronicle](https://adventofcode.com/2024/day/25) | ⭐⭐ | [![Rust](./scripts/assets/rust.png)](src/year2024/day25/day25.rs) [![Python](./scripts/assets/python.png)](src/year2024/day25/day25.py) [![Go](./scripts/assets/go.png)](src/year2024/day25/day25.go) ## All years Calendar | Solutions | Stars | Rust | Python | 🎁 -------- | --------- | ----- | ---- | ------ | -- -[Advent of Code 2024](https://adventofcode.com/2024) | [Solutions](2024/README.md) | 50⭐ | 25 | 10 | 3 -[Advent of Code 2023](https://adventofcode.com/2023) | [Solutions](2023/README.md) | 50⭐ | 25 | 11 | 1 -[Advent of Code 2022](https://adventofcode.com/2022) | [Solutions](2022/README.md) | 50⭐ | 25 | 18 | 1 -[Advent of Code 2021](https://adventofcode.com/2021) | [Solutions](2021/README.md) | 50⭐ | 25 | 12 | -[Advent of Code 2020](https://adventofcode.com/2020) | [Solutions](2020/README.md) | 50⭐ | 25 | 23 | -[Advent of Code 2019](https://adventofcode.com/2019) | [Solutions](2019/README.md) | 50⭐ | 25 | 23 | 2 -[Advent of Code 2018](https://adventofcode.com/2018) | [Solutions](2018/README.md) | 50⭐ | 25 | 4 | 1 -[Advent of Code 2017](https://adventofcode.com/2017) | [Solutions](2017/README.md) | 50⭐ | 25 | 17 | -[Advent of Code 2016](https://adventofcode.com/2016) | [Solutions](2016/README.md) | 50⭐ | 25 | 0 | -[Advent of Code 2015](https://adventofcode.com/2015) | [Solutions](2015/README.md) | 50⭐ | 25 | 5 | 1 +[Advent of Code 2024](https://adventofcode.com/2024) | [Solutions](src/year2024/README.md) | 50⭐ | 25 | 10 | 3 +[Advent of Code 2023](https://adventofcode.com/2023) | [Solutions](src/year2023/README.md) | 50⭐ | 25 | 11 | 1 +[Advent of Code 2022](https://adventofcode.com/2022) | [Solutions](src/year2022/README.md) | 50⭐ | 25 | 18 | 1 +[Advent of Code 2021](https://adventofcode.com/2021) | [Solutions](src/year2021/README.md) | 50⭐ | 25 | 12 | +[Advent of Code 2020](https://adventofcode.com/2020) | [Solutions](src/year2020/README.md) | 50⭐ | 25 | 23 | +[Advent of Code 2019](https://adventofcode.com/2019) | [Solutions](src/year2019/README.md) | 50⭐ | 25 | 23 | 2 +[Advent of Code 2018](https://adventofcode.com/2018) | [Solutions](src/year2018/README.md) | 50⭐ | 25 | 4 | 1 +[Advent of Code 2017](https://adventofcode.com/2017) | [Solutions](src/year2017/README.md) | 50⭐ | 25 | 17 | +[Advent of Code 2016](https://adventofcode.com/2016) | [Solutions](src/year2016/README.md) | 50⭐ | 25 | 0 | +[Advent of Code 2015](https://adventofcode.com/2015) | [Solutions](src/year2015/README.md) | 50⭐ | 25 | 5 | 1 ## Bonus 🎁 Year | Count | Days ---- | ----- | -------------------- -2024 | 3 | [14](2024/day14/README.md) [15](2024/day15/README.md) [16](2024/day16/README.md) -2023 | 1 | [10](2023/day10/README.md) -2022 | 1 | [17](2022/day17/README.md) -2019 | 2 | [13](2019/day13/README.md) [15](2019/day15/README.md) -2018 | 1 | [18](2018/day18/README.md) -2015 | 1 | [18](2015/day18/README.md) +2024 | 3 | [14](src/year2024/day14/README.md) [15](src/year2024/day15/README.md) [16](src/year2024/day16/README.md) +2023 | 1 | [10](src/year2023/day10/README.md) +2022 | 1 | [17](src/year2022/day17/README.md) +2019 | 2 | [13](src/year2019/day13/README.md) [15](src/year2019/day15/README.md) +2018 | 1 | [18](src/year2018/day18/README.md) +2015 | 1 | [18](src/year2015/day18/README.md) ## Under the hood 🎄 diff --git a/build.rs b/build.rs index 2495fe1e..d9ed5519 100644 --- a/build.rs +++ b/build.rs @@ -1,4 +1,9 @@ fn main() { // Buy a Mac  println!(r"cargo:rustc-link-search=/opt/homebrew/lib"); + + println!("cargo:rerun-if-changed=src/year2018/day9_c/day9.c"); + cc::Build::new() + .file("src/year2018/day9_c/day9.c") + .compile("day9_c"); } diff --git a/scripts/answers.py b/scripts/answers.py index 274ef33b..33f1b014 100755 --- a/scripts/answers.py +++ b/scripts/answers.py @@ -2,6 +2,7 @@ import argparse import logging +import os import re import sqlite3 import subprocess @@ -20,12 +21,12 @@ class AocSession: rootdir = Path(__file__).parent.parent def __init__(self, cookie_session, force_update=False, dry_run=False) -> None: - self.data_dir = self.rootdir / "data" + self.stars = {} - self.data_dir.mkdir(exist_ok=True, parents=True) + (self.rootdir / "data").mkdir(exist_ok=True, parents=True) self.force_update = force_update self.dry_run = dry_run - self.db = sqlite3.connect(self.data_dir / "cache.db") + self.db = sqlite3.connect(self.rootdir / "data" / "cache.db") self.always_submit = False self.db.executescript( @@ -58,12 +59,16 @@ def __init__(self, cookie_session, force_update=False, dry_run=False) -> None: name = f"anon-{self.user_id}" self.user_name = name - self.user_dir = self.data_dir / self.user_id + self.user_dir = self.rootdir / "data" / self.user_id self.user_dir.mkdir(parents=True, exist_ok=True) - self.prefix = f"\033[1;36m[{name:<16} {self.user_id:<6}]\033[0m " + self.prefix = f"\033[1;36m[{name:<20} {self.user_id:<6}]\033[0m " + + def year_dir(self, year: int) -> Path: + + return self.rootdir / "src" / f"year{year}" - def get_cookie_sessions(): + def get_cookie_sessions() -> t.List[str]: """Return the list of cookie sessions from `session` file.""" f = AocSession.rootdir / ".session" sessions = [] @@ -113,8 +118,10 @@ def is_available(year, day): return False return True - def iter_all(func): + def iter_all(func, b=None): + def wrapper(self, year=None, day=None, *args, **kwargs): + if year is None: now = datetime.now(UTC) last_year = now.year @@ -132,6 +139,12 @@ def wrapper(self, year=None, day=None, *args, **kwargs): elif AocSession.is_available(year, day): return func(self, year, day) + # if b is not None: + # def wrapper2(year, day): + # return wrapper(func, year,day ) + + # return wrapper2 + return wrapper @iter_all @@ -324,7 +337,12 @@ def submit_parts(step, parts): cmd = [p.resolve().as_posix(), self.get_input(year, day).resolve().as_posix()] else: # run the program to solve the puzzle - cmd = [p.as_posix(), self.get_input(year, day).as_posix()] + cmd = [p.as_posix()] + if p.stem == "one": + cmd.append("-r") + cmd.append(f"{year}:{day}") + cmd.append(self.get_input(year, day).as_posix()) + try: start_time = datetime.now() parts = subprocess.check_output(cmd, stderr=subprocess.DEVNULL).decode().strip().split() @@ -337,7 +355,7 @@ def submit_parts(step, parts): if parts == answers and len(parts) > 0: print(f"{self.prefix} Solution {year} day {day:2} in {language:<6} \033[92mok\033[0m {remarks}") update_last_answers(parts) - return + return True if len(parts) == 2 and parts[1] == "???": parts.pop(1) @@ -361,8 +379,11 @@ def submit_parts(step, parts): # no solution yet or exec error pass - run(f"{year}/target/release/day{day}", "Rust") - # run(f"{year}/day{day}/day{day}.py", "Python") + ( + run(f"src/year{year}/day{day}/target/release/day{day}", "Rust") + or run("target/release/one", "Rust") + or run(f"src/year{year}/day{day}/day{day}.py", "Python") + ) @iter_all def print_stars(self, year=None, day=None): @@ -393,38 +414,19 @@ def get_title(self, year, day) -> str: def get_solutions(self, year, day) -> t.List[str]: """TODO.""" sols = [] - year_dir = Path(self.rootdir) / str(year) - days = [year_dir / f"day{day}"] - days.extend(year_dir.glob(f"day{day}_*")) - for day in days: - if day.is_dir(): - for f in day.glob("day*.*"): - if f.is_file() or (f.is_dir() and any(f.iterdir())): - sols.append(f) - f = day / "src" / "main.rs" - if f.is_file(): - sols.append(f) - return sols - - @iter_all - def set_titles(self, year=None, day=None): - """TODO.""" - markdown = self.get_title(year, day) + year_dir = self.year_dir(year) + days = [year_dir / f"day{day}"] + list(year_dir.glob(f"day{day}_*")) - for f in self.get_solutions(year, day): - original = f.read_text() - lines = original.splitlines() + [""] + for day_dir in days: + if day_dir.is_dir(): + for f in day_dir.glob("day*.*"): + if f.is_file(): + sols.append(f) - if f.suffix == ".py" and lines[1].startswith("# "): - lines[1] = f"# {markdown}" - elif f.suffix == ".rs" and lines[0].startswith("//! "): - lines[0] = f"//! {markdown}" + # print(f"solution for {year} {day}: {sols}") - content = "\n".join(lines) - if content != original: - print(f"set puzzle title in {f.relative_to(self.rootdir)}: {markdown}") - f.write_text(content) + return sols @iter_all def get_titles(self, year=None, day=None): @@ -433,40 +435,6 @@ def get_titles(self, year=None, day=None): print(self.get_title(year, day)) -def show_dstars(args): - sessions = AocSession.get_cookie_sessions() - - users = [] - - for session in sessions: - sess = AocSession(session, args.update, args.dry_run) - if args.user and args.user not in (sess.user_id, sess.user_name): - continue - users.append(sess) - - @AocSession.iter_all - def show_year(_self, year, _day): - stars = {} - for sess in users: - stars[sess.user_name] = [] - for day in range(1, 26): - stars[sess.user_name].append(sess.get_stars(year, day)) - - row = "|".join(f"\033[1;36m{sess.user_name:^12}\033[0m" for sess in users) - print(f" {year} |{row}") - separator = "+".join("-" * 12 for _ in users) - print(f"-------+{separator}") - for day in range(1, 26): - row = "|".join(f"\033[1;33m{'*' * stars[sess.user_name][day-1]:^12}\033[0m" for sess in users) - print(f"day {day:2} |{row}") - print(f"-------+{separator}") - print() - - show_year(None, args.year, 0) - - exit() - - def get_first_session(args): sessions = AocSession.get_cookie_sessions() @@ -481,9 +449,11 @@ def get_first_session(args): exit(2) -def get_languages(sols, year, year_dir, path_to_home): +def get_languages(sols, readme_dir: Path, rootdir: Path): files = [] + path_to_home = os.path.relpath(rootdir, readme_dir) + for lang, suffix, icon in ( ("Rust", ".rs", "rust"), ("Python", ".py", "python"), @@ -502,18 +472,16 @@ def get_languages(sols, year, year_dir, path_to_home): ("Linux Kernel", ".kernel", "kernel"), ): - files.extend( - f"[![{lang}]({path_to_home}/scripts/assets/{icon}.png)]({path_to_home}/{year}/{f.relative_to(year_dir)})" - for f in sols - if f.suffix == suffix - ) + for sol in sols: + if sol.suffix == suffix: + files.append(f"[![{lang}]({path_to_home}/scripts/assets/{icon}.png)]({sol.relative_to(readme_dir)})") sol_dir = sols[0].parent if sol_dir.name == "src": sol_dir = sol_dir.parent f = sol_dir / "README.md" if f.is_file(): - files.append(f"[🎁]({path_to_home}/{year}/{f.relative_to(year_dir)})") + files.append(f"[🎁]({f.relative_to(readme_dir)})") return " ".join(files) @@ -522,13 +490,15 @@ def make_readme(args): session = get_first_session(args) @AocSession.iter_all - def readme(_self, year, _day): + def readme(self, year, _day): + puzzles = [] now = datetime.now(UTC) for day in range(1, 26): available_date = datetime(year, 12, day, 5, 0, 0, 0, tzinfo=UTC) if available_date > now: continue + stars = session.get_stars(year, day) title = session.get_title(year, day) sols = session.get_solutions(year, day) @@ -538,6 +508,8 @@ def readme(_self, year, _day): rust = sum(1 for _, _, _, s in puzzles for f in s if f.suffix == ".rs") python = sum(1 for _, _, _, s in puzzles for f in s if f.suffix == ".py") + year_dir = self.year_dir(year) + md = [] md.append("# Advent of Code in Rust 🦀") md.append("") @@ -548,7 +520,7 @@ def readme(_self, year, _day): if python: md.append(f"![Python: {python}](https://img.shields.io/badge/Python-{python}-cyan?logo=Python)") md.append("") - md.append(f"## {year} ([Calendar](https://adventofcode.com/{year})) ([Solutions](../{year}/)) : {stars}⭐") + md.append(f"## {year} ([Calendar](https://adventofcode.com/{year})) ([Solutions](./)) : {stars}⭐") md.append("") width = max(len(title) for _, _, title, _ in puzzles) @@ -556,17 +528,15 @@ def readme(_self, year, _day): md.append(f"{'Puzzle':<{width}} | Stars | Languages") md.append("-" * width + " | ----- | -----------") - year_dir = session.rootdir / str(year) - for day, stars, title, sols in puzzles: if stars > 0: stars = "⭐" * stars - files = get_languages(sols, year, year_dir, "..") + files = get_languages(sols, year_dir, session.rootdir) md.append(f"{title:<{width}} | {stars:<2} | {files}") - bonus = Path(session.rootdir) / str(year) / ".bonus.md" + bonus = year_dir / ".bonus.md" if bonus.is_file(): md.append("") md.extend(bonus.read_text().strip().splitlines()) @@ -575,14 +545,14 @@ def readme(_self, year, _day): md = "\n".join(md) if args.write: - readme = Path(session.rootdir) / str(year) / "README.md" + readme = year_dir / "README.md" if not readme.is_file() or md != readme.read_text(): readme.write_text(md) print(f"{readme} written") else: print(md) - readme(None, args.year, 0) + readme(session, args.year, 0) def make_readme_main(args): @@ -591,7 +561,7 @@ def make_readme_main(args): puzzles = [] @AocSession.iter_all - def parse(_self, year, _day): + def parse(self, year, _day): now = datetime.now(UTC) for day in range(1, 26): available_date = datetime(year, 12, day, 5, 0, 0, 0, tzinfo=UTC) @@ -602,7 +572,7 @@ def parse(_self, year, _day): sols = session.get_solutions(year, day) puzzles.append((year, day, stars, title, sols)) - parse(None, None, 0) + parse(session, None, 0) stars = sum(n for _year, _day, n, _title, _sols in puzzles) # rust = sum(1 for _year, _day, _stars, _title, sols in puzzles for f in sols if f.suffix == ".rs") @@ -637,7 +607,7 @@ def parse(_self, year, _day): for year in sorted(all_stars.keys(), reverse=True): row = [ f"[Advent of Code {year}](https://adventofcode.com/{year})", - f"[Solutions]({year}/README.md)", + f"[Solutions]({session.year_dir(year).relative_to(session.rootdir)}/README.md)", f"{all_stars[year]:>3}⭐", f"{rust[year]:>3}", f"{python[year]:>3}", @@ -645,7 +615,7 @@ def parse(_self, year, _day): ] rows.append(" | ".join(row)) - readme = Path(__file__).parent.parent / "README.md" + readme = session.rootdir / "README.md" md = [] skip = False @@ -668,7 +638,7 @@ def parse(_self, year, _day): s = f"{year} | {len(bonus[year]):5} |" for b in bonus[year]: day = b.parent.stem.removeprefix("day") - s += f" [{day}]({b.relative_to(readme.parent)})" + s += f" [{day}]({b.relative_to(session.rootdir)})" md.append(s) md.append("") continue @@ -688,7 +658,7 @@ def parse(_self, year, _day): line = ( f"## {current_calendar} (current event)" f" ([Calendar](https://adventofcode.com/{current_calendar}))" - f" ([Solutions]({current_calendar}/)) :" + f" ([Solutions]({session.year_dir(year).relative_to(session.rootdir)}/)) :" f" {all_stars[current_calendar]}⭐" ) md.append(line) @@ -703,7 +673,6 @@ def parse(_self, year, _day): md.append(f"{'Puzzle':<{width}} | Stars | Languages") md.append("-" * width + " | ----- | -----------") - year_dir = session.rootdir / str(year) for year, day, stars, title, sols in puzzles: if year != current_calendar: continue @@ -711,7 +680,7 @@ def parse(_self, year, _day): if stars > 0: stars = "⭐" * stars - files = get_languages(sols, year, year_dir, ".") + files = get_languages(sols, session.rootdir, session.rootdir) md.append(f"{title:<{width}} | {stars:<2} | {files}") @@ -743,19 +712,14 @@ def parse(_self, year, _day): def main(): parser = argparse.ArgumentParser() parser.add_argument("-v", "--verbose", action="store_true", help="show request details") - parser.add_argument("-y", "--year", type=int, help="optional day, automatic if in ./\033[3mYEAR\033[0m") - parser.add_argument( - "-d", "--day", type=int, help="optional day, automatic if in ./\033[3mYEAR\033[0m/day\033[3mDAY\033[0m" - ) + parser.add_argument("-y", "--year", type=int, help="optional day") + parser.add_argument("-d", "--day", type=int, help="optional day") # parser.add_argument("-s", "--session", type=str, help="session cookie") parser.add_argument("--user", type=str, help="user") parser.add_argument("-u", "--update", action="store_true", help="force update") parser.add_argument("-n", "--dry-run", action="store_true", help="do nothing") - parser.add_argument("--dstars", action="store_true", help="show stars for each day") - parser.add_argument("--ystars", action="store_true", help="show stars by year") parser.add_argument("--yes", action="store_true", help="always yes") parser.add_argument("--inputs", action="store_true", help="download inputs") - parser.add_argument("--titles", action="store_true", help="set puzzle titles") parser.add_argument("--get-titles", action="store_true", help="get puzzle title") parser.add_argument("--readme", action="store_true", help="make readme") parser.add_argument("-w", "--write", action="store_true", help="write the readme") @@ -767,12 +731,12 @@ def main(): cwd = Path.cwd() if cwd.name.startswith("day") and args.day is None: - args.year = int(cwd.parent.name) + args.year = int(cwd.parent.name.removeprefix("year")) n = cwd.name.removeprefix("day") n = n[: n.find("_")] if "_" in n else n args.day = int(n) - if cwd.name.isdigit() and args.year is None: - args.year = int(cwd.name) + if cwd.name.startswith("year") and args.year is None: + args.year = int(cwd.name.removeprefix("year")) if args.readme: make_readme(args) @@ -783,13 +747,6 @@ def main(): session = get_first_session(args) session.get_titles(year=args.year, day=args.day) - elif args.titles: - session = get_first_session(args) - session.set_titles(year=args.year, day=args.day) - - elif args.dstars: - show_dstars(args) - else: for session in AocSession.get_cookie_sessions(): sess = AocSession(session, args.update, args.dry_run) @@ -799,10 +756,6 @@ def main(): if args.inputs: sess.get_input(year=args.year, day=args.day) - elif args.dstars: - sess.print_stars(year=args.year, day=args.day) - elif args.ystars: - sess.print_stars_year(args.year) else: sess.always_submit = args.yes sess.check(year=args.year, day=args.day) diff --git a/scripts/aoc.py b/scripts/aoc.py index eaedd1aa..b00dae45 100755 --- a/scripts/aoc.py +++ b/scripts/aoc.py @@ -163,13 +163,25 @@ def aoc_download(ctx: click.Context): @aoc.command(name="puzzle") +@click.option("-r", "--rust", is_flag=True, help="Create Rust stub") +@click.option("-p", "--python", is_flag=True, help="Create Python stub") +@click.option("-t", "--test", is_flag=True, help="Download input and test samples") @click.argument("day", type=int, default=0) @click.pass_context -def aoc_puzzle(ctx: click.Context, day: int): +def aoc_puzzle(ctx: click.Context, rust: bool, python: bool, test: bool, day: int): """ Get input and write templates. """ - ctx.obj.pass_thru("puzzle.sh", [str(day)]) + cmd = [] + if rust: + cmd.append("--rust") + if python: + cmd.append("--python") + if test: + cmd.append("--test") + if day > 0: + cmd.append(str(day)) + ctx.obj.pass_thru("puzzle.sh", cmd) @aoc.command(name="run", context_settings=dict(ignore_unknown_options=True, allow_extra_args=True)) diff --git a/scripts/bench.sh b/scripts/bench.sh deleted file mode 100755 index 05b090e1..00000000 --- a/scripts/bench.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -d=$(dirname $0) - -if [ -f /proc/cpuinfo ] ; then - cat /proc/cpuinfo > cpuinfo.txt -fi - -$d/runall.py -x 2019:25 -u me --no-slow --no-64 | tee results-fast-32-me -$d/runall.py -x 2019:25 -u me --no-slow | tee results-fast-me -$d/runall.py -x 2019:25 -u me | tee results-me -$d/runall.py -x 2019:25 --no-slow --no-64 | tee results-fast-32 -$d/runall.py -x 2019:25 --no-slow | tee results-fast -$d/runall.py -x 2019:25 | tee results - -if [ -f $d/../run.log ] ; then - cp $d/../run.log . -fi diff --git a/scripts/check.sh b/scripts/check.sh deleted file mode 100755 index c8b52796..00000000 --- a/scripts/check.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -script_dir=$(realpath $(dirname $0)) -opt_answers= - -usage() -{ - echo "Usage: $0 [options]" - echo "Options:" - echo " -a,--answers check answers too" - exit -} - -parse_args() -{ - for i ; do - case $i in - -h|--help) usage ;; - -a|--answers) opt_answers=1 ;; - *) usage ;; - esac - done -} - -c() -{ - local manifest=$1 - - cargo fmt --all --manifest-path $manifest -- - cargo fmt --all --manifest-path $manifest -- --check - cargo clippy --manifest-path $manifest -- --no-deps -W clippy::all - - cargo build --manifest-path $manifest --release - cargo test --manifest-path $manifest --release -} - -main() -{ - if [[ ! -f Cargo.toml ]] ; then - for manifest in `find . -maxdepth 2 -name Cargo.toml` ; do - c $manifest - done - else - c Cargo.toml - fi - - if [[ $opt_answers ]]; then - $script_dir/answers.py - fi -} - -parse_args "$@" -main diff --git a/scripts/puzzle.sh b/scripts/puzzle.sh index 38291937..6286c244 100755 --- a/scripts/puzzle.sh +++ b/scripts/puzzle.sh @@ -22,7 +22,7 @@ parse_args() -h|--help) usage ;; -r|--rs|--rust) features+=("rust") ;; -p|--py|--python) features+=("python") ;; - -c|--c) features+=("c") ;; + -t|--test) features+=("test_samples") ;; *) args+=$i ;; esac done @@ -30,8 +30,9 @@ parse_args() if [[ $(basename $PWD) =~ day* ]]; then day=$(basename $PWD) - day=${day/day/} + day=${day##day} year=$(basename $(realpath $PWD/..)) + year=${year##year} else if [ $# -eq 0 ]; then usage @@ -117,13 +118,11 @@ create_python() from pathlib import Path from argparse import ArgumentParser -import atexit -import time from copy import deepcopy from collections import defaultdict, deque, namedtuple, Counter -import sys, re, math, itertools, time, re from functools import reduce from operator import mul +import sys, re, math, itertools, time, atexit, re parser = ArgumentParser() parser.add_argument("-v", "--verbose", action="store_true") @@ -160,36 +159,38 @@ create_rust() cat <day$day.rs //! $title -struct Puzzle<'a> { - data: &'a str, +struct Puzzle { + // } -impl<'a> Puzzle<'a> { +impl Puzzle { /// Initialize from the puzzle input. - const fn new(data: &'a str) -> Self { - Self { data } + const fn new(data: &str) -> Self { + Self { } } /// Solve part one. - fn part1(&self) -> u64 { + fn part1(&self) -> i32 { 0 } /// Solve part two. - fn part2(&self) -> u64 { + fn part2(&self) -> i32 { 0 } } -fn main() { - let mut args = aoc::parse_args(); - - args.run(|data| { - let puzzle = Puzzle::new(data); - (puzzle.part1(), puzzle.part2()) - }); +/// # Panics +#[must_use] +pub fn solve(data: &str) -> (i32, i32) { + let puzzle = Puzzle::new(data); + (puzzle.part1(), puzzle.part2()) } +pub fn main() { + let args = aoc::parse_args(); + args.run(solve); +} #[cfg(test)] mod test { @@ -205,7 +206,6 @@ EOF EOF done - cat <>day$day.rs // #[test] @@ -216,8 +216,7 @@ EOF // #[test] // fn part2() { - // let data = aoc::load_input_data("test.txt"); - // let puzzle = Puzzle::new(data); + // let puzzle = Puzzle::new(TEST_INPUT); // assert_eq!(puzzle.part2(), 0); // } } @@ -233,7 +232,9 @@ version = "0.1.0" edition = "2021" [dependencies] -aoc = { path = "../../aoc" } +aoc = { path = "../../../crates/aoc" } +rustc-hash = "*" +itertools = "*" [[bin]] name = "day$day" @@ -242,17 +243,6 @@ EOF fi } -open_if_available() -{ - if [[ $available ]]; then - if [[ -f day$day.py ]]; then - code -n . day$day.py - else - code -n . - fi - open "https://adventofcode.com/$year/day/$day" - fi -} parse_args "$@" @@ -260,4 +250,3 @@ fetch_input fetch_samples create_python create_rust -# open_if_available diff --git a/scripts/runall.py b/scripts/runall.py index 92fe0939..d573fcb1 100755 --- a/scripts/runall.py +++ b/scripts/runall.py @@ -38,19 +38,19 @@ LANGUAGES = { - "Python": "{year}/day{day}/day{day}.py", - "Rust": "{year}/target/release/day{day}", - "C": "{year}/build/day{day}_c", - "C++": "{year}/build/day{day}_cpp", - "Lua": "{year}/day{day}/day{day}.lua", - "JavaScript": "{year}/day{day}/day{day}.js", - "Ruby": "{year}/day{day}/day{day}.rb", - "Perl": "{year}/day{day}/day{day}.pl", - "Bash": "{year}/day{day}/day{day}.sh", - "Java": "{year}/build/day{day}.class", - "Go": "{year}/build/day{day}_go", - "C#": "{year}/build/day{day}_cs.exe", - "Swift": "{year}/build/day{day}_swift", + "Rust": "src/year{year}/day{day}/day{day}.rs", + "Python": "src/year{year}/day{day}/day{day}.py", + "C": "src/year{year}/build/day{day}_c", + "C++": "src/year{year}/build/day{day}_cpp", + "Lua": "src/year{year}/day{day}/day{day}.lua", + "JavaScript": "src/year{year}/day{day}/day{day}.js", + "Ruby": "src/year{year}/day{day}/day{day}.rb", + "Perl": "src/year{year}/day{day}/day{day}.pl", + "Bash": "src/year{year}/day{day}/day{day}.sh", + "Java": "src/year{year}/build/day{day}.class", + "Go": "src/year{year}/build/day{day}_go", + "C#": "src/year{year}/build/day{day}_cs.exe", + "Swift": "src/year{year}/build/day{day}_swift", } INTERPRETERS = { @@ -154,30 +154,50 @@ def run( file: Path, expected: t.List, nb_expected: int, + year: int, + day: int, ) -> t.Dict[str, t.Any]: """ TODO """ - if prog.suffix == ".class": - cmd = ["java", "-cp", prog.parent, prog.stem] - elif prog.suffix == ".exe": - cmd = ["mono", prog.absolute().as_posix()] + if lang == "Rust": + + cmd = [] + + f = Path("src/year{year}/day{day}/day{day}/target/release/day{day}") + if f.is_file(): + cmd.append(f) + else: + cmd.append("target/release/one") + cmd.append("-r") + cmd.append(f"{year}:{day}") + else: - cmd = [prog.absolute().as_posix()] - # add the interpreter - if interpreter: - cmd.insert(0, interpreter) + if prog.suffix == ".class": + cmd = ["java", "-cp", prog.parent, prog.stem] + elif prog.suffix == ".exe": + cmd = ["mono", prog.absolute().as_posix()] + else: + cmd = [prog.absolute().as_posix()] + + # add the interpreter + if interpreter: + cmd.insert(0, interpreter) cmd.append(file.absolute().as_posix()) - cmd.append("--elapsed") + env = os.environ + env["NO_COLOR"] = "1" + cmdline = " ".join(map(str, cmd)) + cmdline = cmdline.replace(Path(__file__).parent.parent.as_posix() + "/", "") + cmdline = cmdline.replace(Path.home().as_posix(), "~") + print(f"{FEINT}{cmdline}{RESET}", end=CR) + start = time.time_ns() try: - env = os.environ - env["NO_COLOR"] = "1" out = subprocess.run(cmd, stdout=subprocess.PIPE, env=env) elapsed = time.time_ns() - start @@ -281,6 +301,16 @@ def build_all(filter_year: int, filter_lang: t.Iterable[str]): print(f"{FEINT}{ITALIC}cargo build {m}{RESET}", end=TRANSIENT) subprocess.check_call(["cargo", "build", "--manifest-path", m, "--release", "--quiet"], env=env_copy) + else: + m = Path(__file__).parent.parent / "Cargo.toml" + if m.is_file(): + env_copy = os.environ.copy() + # env_copy["RUSTFLAGS"] = "-C target-cpu=native" + print(f"{FEINT}{ITALIC}cargo build {m}{RESET}", end=TRANSIENT) + subprocess.check_call( + ["cargo", "build", "--manifest-path", m, "--release", "--quiet"], env=env_copy + ) + for day in range(1, 26): if not filter_lang or "c" in filter_lang: src = Path(str(year)) / f"day{day}" / f"day{day}.c" @@ -411,6 +441,7 @@ def run_day( results = set() for lang, (pattern, interpreter) in languages.items(): + prog = Path(pattern.format(year=year, day=mday)) key = ":".join(map(str, (year, day, crc, prog, lang.lower()))) @@ -418,6 +449,7 @@ def run_day( # special case for day13_alt/day13.py if "_" in prog.stem and prog.stem == prog.parent.name: prog = prog.with_stem(prog.stem[: prog.stem.find("_")]) + if not prog.is_file(): continue @@ -432,7 +464,7 @@ def run_day( nb_expected = 1 if day == 25 else 2 - e = run(prog, lang, interpreter, file, day_answers.get(crc), nb_expected) + e = run(prog, lang, interpreter, file, day_answers.get(crc), nb_expected, year, day) if e: update_cache(key, prog, "solutions", e) @@ -704,23 +736,6 @@ def main(): if args.consistency: return consistency(filter_year, filter_day) - # WTF ? why I have kept this ? get_languages() seems to do the job - # # resolve interpreters - # for lang, variants in INTERPRETERS.items(): - # for variant in list(variants.keys()): - # interpreters = variants[variant] - # if isinstance(interpreters, tuple) or isinstance(interpreters, list): - # for prog in interpreters: - # prog = shutil.which(prog) - # if prog: - # variants[variant] = prog - # break - # else: - # variants.pop(variant) - # else: - # if not shutil.which(interpreters): - # variants.pop(variant) - # prepare the language filtering filter_lang = set(map(str.casefold, args.language or ())) languages = get_languages(filter_lang) @@ -762,7 +777,10 @@ def main(): if filter_day and day not in filter_day: continue - for mday in list(Path(f"{year}").glob(f"day{day}")) + list(Path(f"{year}").glob(f"day{day}_*")): + day_solutions = list(Path(f"src/year{year}").glob(f"day{day}")) + day_solutions += Path(f"src/year{year}").glob(f"day{day}_*") + + for mday in day_solutions: mday = mday.name.removeprefix("day") elapsed, nb_samples = run_day( diff --git a/src/lib.rs b/src/lib.rs index 76d6805d..58ded279 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,7 @@ use std::iter::empty; +use itertools::Itertools; + /// Get the array of all available solutions. #[must_use] pub fn solutions() -> Vec { @@ -12,7 +14,9 @@ pub fn solutions() -> Vec { .chain(year2020()) .chain(year2021()) .chain(year2022()) + .chain(year2023()) .chain(year2024()) + .sorted_unstable_by_key(|sol| (sol.year, sol.day, sol.alt.is_some())) .collect() } @@ -24,6 +28,7 @@ pub fn solutions() -> Vec { pub struct Solution { pub year: u16, pub day: u8, + pub alt: Option, pub solve: fn(&str) -> (String, String), pub main: fn() -> (), } @@ -38,7 +43,10 @@ macro_rules! make_year { pub fn $year() -> Vec { vec![$({ let year = stringify!($year)[4..].parse().unwrap(); - let day = stringify!($day)[3..].parse().unwrap(); + let day = &stringify!($day)[3..]; + + let (day, alt) = day.split_once('_').map_or((day,None), |(day,alt)| (day,Some(alt.to_string())) ); + let day = day.parse().unwrap(); let solve = |data: &str| { use crate::$year::$day::$day::solve; @@ -51,7 +59,7 @@ macro_rules! make_year { main(); }; - Solution { year, day, solve, main } + Solution { year, day, alt, solve, main } },)*] } } @@ -74,7 +82,8 @@ make_year!(year2017 make_year!(year2018 day1,day2,day3,day4,day5,day6,day7,day8,day9,day10,day11,day12,day13, - day14,day15,day16,day17,day18,day19,day20,day21,day22,day23,day24,day25 + day14,day15,day16,day17,day18,day19,day20,day21,day22,day23,day24,day25, + day9_c,day23_z3 ); make_year!(year2019 @@ -94,7 +103,8 @@ make_year!(year2021 make_year!(year2022 day1,day2,day3,day4,day5,day6,day7,day8,day9,day10,day11,day12,day13, - day14,day15,day16,day17,day18,day19,day20,day21,day22,day23,day24,day25 + day14,day15,day16,day17,day18,day19,day20,day21,day22,day23,day24,day25, + day13_pest ); make_year!(year2023 @@ -104,5 +114,6 @@ make_year!(year2023 make_year!(year2024 day1,day2,day3,day4,day5,day6,day7,day8,day9,day10,day11,day12,day13, - day14,day15,day16,day17,day18,day19,day20,day21,day22,day23,day24,day25 + day14,day15,day16,day17,day18,day19,day20,day21,day22,day23,day24,day25, + day13_z3 ); diff --git a/src/main.rs b/src/main.rs index 6f85c1ef..275b3c1f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,16 +1,18 @@ use colored::Colorize; +use itertools::Itertools; use one::{solutions, Solution}; -use std::path::Path; +use std::os::unix::ffi::OsStrExt; +use std::path::{Path, PathBuf}; use std::time::{Duration, Instant}; fn main() -> std::io::Result<()> { + let args = aoc::parse_args_raw(); + // in a YEAR/dayDAY directory, we act as the standalone binary - if run_day()? { + if !args.has_option("-r") && !args.has_option("-l") && run_day()? { return Ok(()); } - let args = aoc::parse_args_raw(); - // get the year or year/day filter let mut year: Option = None; let mut day: Option = None; @@ -36,10 +38,19 @@ fn main() -> std::io::Result<()> { .cloned() .collect::>(); + // print list of solutions, can be filtered + if args.has_option("-l") { + for sol in &sols { + println!("Year {} day {:2} {:?}", sol.year, sol.day, sol.alt); + } + } // in raw mode (for runall.py) we need a file input path - if args.has_option("-r") { + else if args.has_option("-r") { + // remove alternative solutions, if any + let sols: Vec<_> = sols.iter().filter(|sol| sol.alt.is_none()).collect(); + if sols.len() != 1 { - println!("-r requires a filter"); + println!("-r requires a filter ({})", sols.len()); return Ok(()); } @@ -53,8 +64,11 @@ fn main() -> std::io::Result<()> { let sol = &sols[0]; args.run_data(sol.solve, &data); - } else { - run_all(&sols); + } + // else run all solutions + else { + let alt = args.has_option("-a"); + run_all(&sols, alt); } Ok(()) @@ -65,6 +79,11 @@ fn run_day() -> std::io::Result { if let Some(day) = path.file_name() { if let Some(day) = day.to_str().unwrap().strip_prefix("day") { + // + let (day, alt) = day + .split_once('_') + .map_or((day, None), |(day, alt)| (day, Some(alt.to_string()))); + if let Some(year) = path.parent() { if let Some(year) = year .file_name() @@ -77,7 +96,7 @@ fn run_day() -> std::io::Result { let day: u8 = day.parse().unwrap(); for sol in &solutions() { - if sol.day == day && sol.year == year { + if sol.day == day && sol.year == year && sol.alt == alt { (sol.main)(); break; } @@ -111,7 +130,54 @@ fn print_part_result(part: u8, answer: &str, ok: &str, day: u8) { } } -fn run_all(sols: &[Solution]) { +fn find_path(sol: &Solution) -> PathBuf { + let hint = Path::new("input") + .join(sol.year.to_string()) + .join(sol.day.to_string()) + .with_extension("in"); + + let mut path = hint.clone(); + + if !path.is_file() { + path = Path::new("input") + .join(sol.year.to_string()) + .join(format!("day{}", sol.day)) + .with_extension("txt"); + } + + if !path.is_file() { + let manifest_dir = std::env::var("CARGO_MANIFEST_DIR") + .ok() + .unwrap_or_else(|| ".".to_string()); + + let data_dir = Path::new(&manifest_dir).join("data"); + + if let Ok(data_dir) = std::fs::read_dir(data_dir) { + let user_sol = data_dir + .filter_map(std::result::Result::ok) + .filter(|f| f.path().is_dir()) + .filter(|f| f.file_name().as_bytes().iter().all(u8::is_ascii_digit)) + .sorted_by_key(std::fs::DirEntry::file_name) + .next(); + + if let Some(user_sol) = user_sol { + path = user_sol + .path() + .join(sol.year.to_string()) + .join(sol.day.to_string()) + .with_extension("in"); + } + } + } + + if path.is_file() { + path + } else { + hint + } +} + +fn run_all(sols: &[Solution], alt: bool) { println!("💫 {} 🎄✨ 💫", "Advent of Code".green()); let mut total_elapsed = Duration::ZERO; @@ -120,15 +186,24 @@ fn run_all(sols: &[Solution]) { let mut failed = 0; for sol in sols { - let path = Path::new("input") - .join(sol.year.to_string()) - .join(sol.day.to_string()) - .with_extension("in"); + if sol.alt.is_some() && !alt { + continue; + } + + // if sol.alt.is_none() { + // continue; + // } + + let path = find_path(sol); let ok = path.with_extension("ok"); println!(); - println!("{} day {}:", sol.year, sol.day); + if let Some(alt) = &sol.alt { + println!("{} day {} ({}):", sol.year, sol.day, alt.magenta()); + } else { + println!("{} day {}:", sol.year, sol.day); + } if path.is_file() { if let Ok(data) = std::fs::read_to_string(&path) { diff --git a/src/year2015/README.md b/src/year2015/README.md index cb668147..ee67ec46 100644 --- a/src/year2015/README.md +++ b/src/year2015/README.md @@ -5,32 +5,32 @@ ![Rust: 25](https://img.shields.io/badge/Rust-25-cyan?logo=Rust) ![Python: 5](https://img.shields.io/badge/Python-5-cyan?logo=Python) -## 2015 ([Calendar](https://adventofcode.com/2015)) ([Solutions](../2015/)) : 50⭐ +## 2015 ([Calendar](https://adventofcode.com/2015)) ([Solutions](./)) : 50⭐ Puzzle | Stars | Languages ------------------------------------------------------------------------------------ | ----- | ----------- -[Day 1: Not Quite Lisp](https://adventofcode.com/2015/day/1) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2015/day1/day1.rs) -[Day 2: I Was Told There Would Be No Math](https://adventofcode.com/2015/day/2) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2015/day2/day2.rs) -[Day 3: Perfectly Spherical Houses in a Vacuum](https://adventofcode.com/2015/day/3) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2015/day3/day3.rs) -[Day 4: The Ideal Stocking Stuffer](https://adventofcode.com/2015/day/4) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2015/day4/day4.rs) -[Day 5: Doesn't He Have Intern-Elves For This?](https://adventofcode.com/2015/day/5) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2015/day5/day5.rs) -[Day 6: Probably a Fire Hazard](https://adventofcode.com/2015/day/6) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2015/day6/day6.rs) -[Day 7: Some Assembly Required](https://adventofcode.com/2015/day/7) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2015/day7/day7.rs) -[Day 8: Matchsticks](https://adventofcode.com/2015/day/8) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2015/day8/day8.rs) -[Day 9: All in a Single Night](https://adventofcode.com/2015/day/9) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2015/day9/day9.rs) -[Day 10: Elves Look, Elves Say](https://adventofcode.com/2015/day/10) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2015/day10/day10.rs) -[Day 11: Corporate Policy](https://adventofcode.com/2015/day/11) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2015/day11/day11.rs) -[Day 12: JSAbacusFramework.io](https://adventofcode.com/2015/day/12) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2015/day12/day12.rs) -[Day 13: Knights of the Dinner Table](https://adventofcode.com/2015/day/13) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2015/day13/day13.rs) [![Python](../scripts/assets/python.png)](../2015/day13/day13.py) -[Day 14: Reindeer Olympics](https://adventofcode.com/2015/day/14) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2015/day14/day14.rs) -[Day 15: Science for Hungry People](https://adventofcode.com/2015/day/15) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2015/day15/day15.rs) -[Day 16: Aunt Sue](https://adventofcode.com/2015/day/16) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2015/day16/day16.rs) [![Python](../scripts/assets/python.png)](../2015/day16/day16.py) -[Day 17: No Such Thing as Too Much](https://adventofcode.com/2015/day/17) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2015/day17/day17.rs) -[Day 18: Like a GIF For Your Yard](https://adventofcode.com/2015/day/18) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2015/day18/day18.rs) [🎁](../2015/day18/README.md) -[Day 19: Medicine for Rudolph](https://adventofcode.com/2015/day/19) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2015/day19/day19.rs) -[Day 20: Infinite Elves and Infinite Houses](https://adventofcode.com/2015/day/20) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2015/day20/day20.rs) -[Day 21: RPG Simulator 20XX](https://adventofcode.com/2015/day/21) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2015/day21/day21.rs) [![Python](../scripts/assets/python.png)](../2015/day21/day21.py) -[Day 22: Wizard Simulator 20XX](https://adventofcode.com/2015/day/22) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2015/day22/day22.rs) -[Day 23: Opening the Turing Lock](https://adventofcode.com/2015/day/23) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2015/day23/day23.rs) [![Python](../scripts/assets/python.png)](../2015/day23/day23.py) -[Day 24: It Hangs in the Balance](https://adventofcode.com/2015/day/24) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2015/day24/day24.rs) [![Python](../scripts/assets/python.png)](../2015/day24/day24.py) -[Day 25: Let It Snow](https://adventofcode.com/2015/day/25) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2015/day25/day25.rs) +[Day 1: Not Quite Lisp](https://adventofcode.com/2015/day/1) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day1/day1.rs) +[Day 2: I Was Told There Would Be No Math](https://adventofcode.com/2015/day/2) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day2/day2.rs) +[Day 3: Perfectly Spherical Houses in a Vacuum](https://adventofcode.com/2015/day/3) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day3/day3.rs) +[Day 4: The Ideal Stocking Stuffer](https://adventofcode.com/2015/day/4) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day4/day4.rs) +[Day 5: Doesn't He Have Intern-Elves For This?](https://adventofcode.com/2015/day/5) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day5/day5.rs) +[Day 6: Probably a Fire Hazard](https://adventofcode.com/2015/day/6) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day6/day6.rs) +[Day 7: Some Assembly Required](https://adventofcode.com/2015/day/7) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day7/day7.rs) +[Day 8: Matchsticks](https://adventofcode.com/2015/day/8) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day8/day8.rs) +[Day 9: All in a Single Night](https://adventofcode.com/2015/day/9) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day9/day9.rs) +[Day 10: Elves Look, Elves Say](https://adventofcode.com/2015/day/10) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day10/day10.rs) +[Day 11: Corporate Policy](https://adventofcode.com/2015/day/11) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day11/day11.rs) +[Day 12: JSAbacusFramework.io](https://adventofcode.com/2015/day/12) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day12/day12.rs) +[Day 13: Knights of the Dinner Table](https://adventofcode.com/2015/day/13) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day13/day13.rs) [![Python](../../scripts/assets/python.png)](day13/day13.py) +[Day 14: Reindeer Olympics](https://adventofcode.com/2015/day/14) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day14/day14.rs) +[Day 15: Science for Hungry People](https://adventofcode.com/2015/day/15) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day15/day15.rs) +[Day 16: Aunt Sue](https://adventofcode.com/2015/day/16) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day16/day16.rs) [![Python](../../scripts/assets/python.png)](day16/day16.py) +[Day 17: No Such Thing as Too Much](https://adventofcode.com/2015/day/17) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day17/day17.rs) +[Day 18: Like a GIF For Your Yard](https://adventofcode.com/2015/day/18) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day18/day18.rs) [🎁](day18/README.md) +[Day 19: Medicine for Rudolph](https://adventofcode.com/2015/day/19) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day19/day19.rs) +[Day 20: Infinite Elves and Infinite Houses](https://adventofcode.com/2015/day/20) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day20/day20.rs) +[Day 21: RPG Simulator 20XX](https://adventofcode.com/2015/day/21) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day21/day21.rs) [![Python](../../scripts/assets/python.png)](day21/day21.py) +[Day 22: Wizard Simulator 20XX](https://adventofcode.com/2015/day/22) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day22/day22.rs) +[Day 23: Opening the Turing Lock](https://adventofcode.com/2015/day/23) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day23/day23.rs) [![Python](../../scripts/assets/python.png)](day23/day23.py) +[Day 24: It Hangs in the Balance](https://adventofcode.com/2015/day/24) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day24/day24.rs) [![Python](../../scripts/assets/python.png)](day24/day24.py) +[Day 25: Let It Snow](https://adventofcode.com/2015/day/25) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day25/day25.rs) diff --git a/src/year2015/day10/day10.rs b/src/year2015/day10/day10.rs index 2c9d4df8..8fe811fd 100644 --- a/src/year2015/day10/day10.rs +++ b/src/year2015/day10/day10.rs @@ -1,13 +1,11 @@ //! [Day 10: Elves Look, Elves Say](https://adventofcode.com/2015/day/10) -/// main function pub fn main() { let args = aoc::parse_args(); args.run(solve); } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let data = data.trim_ascii(); diff --git a/src/year2015/day11/day11.rs b/src/year2015/day11/day11.rs index 71e26059..45b72d81 100644 --- a/src/year2015/day11/day11.rs +++ b/src/year2015/day11/day11.rs @@ -91,7 +91,6 @@ impl fmt::Display for Password { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (Password, Password) { let mut pwd: Password = Password::new(data.trim_ascii()); @@ -99,7 +98,6 @@ pub fn solve(data: &str) -> (Password, Password) { (pwd.next_valid(), pwd.next_valid()) } -/// main function pub fn main() { let args = aoc::parse_args(); args.run(solve); diff --git a/src/year2015/day12/day12.rs b/src/year2015/day12/day12.rs index 579cc7cb..3728fe5b 100644 --- a/src/year2015/day12/day12.rs +++ b/src/year2015/day12/day12.rs @@ -3,14 +3,12 @@ use regex::Regex; use serde_json::Value; -/// main function pub fn main() { let args = aoc::parse_args(); args.run(solve); } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, i32) { (part1(data), part2(data)) diff --git a/src/year2015/day13/day13.rs b/src/year2015/day13/day13.rs index 49b316f7..7f677958 100644 --- a/src/year2015/day13/day13.rs +++ b/src/year2015/day13/day13.rs @@ -25,7 +25,6 @@ fn calc<'a>(names: &FxHashSet<&'a str>, happiness: &FxHashMap<(&'a str, &'a str) } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, i32) { let mut names: FxHashSet<&str> = FxHashSet::default(); @@ -66,7 +65,6 @@ pub fn solve(data: &str) -> (i32, i32) { (part1, part2) } -/// main function pub fn main() { let args = aoc::parse_args(); args.run(solve); diff --git a/src/year2015/day14/day14.rs b/src/year2015/day14/day14.rs index f1e689df..4df64602 100644 --- a/src/year2015/day14/day14.rs +++ b/src/year2015/day14/day14.rs @@ -81,7 +81,6 @@ fn solve_duration(data: &str, max_duration: u32) -> (u32, u32) { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { solve_duration(data, 2503) diff --git a/src/year2015/day15/day15.rs b/src/year2015/day15/day15.rs index 80616605..4258f405 100644 --- a/src/year2015/day15/day15.rs +++ b/src/year2015/day15/day15.rs @@ -13,7 +13,6 @@ struct Ingredient { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i64, i64) { // load data @@ -108,7 +107,6 @@ pub fn solve(data: &str) -> (i64, i64) { (score(1), score(2)) } -/// main function pub fn main() { let args = aoc::parse_args(); args.run(solve); diff --git a/src/year2015/day16/day16.rs b/src/year2015/day16/day16.rs index 3a9304e1..ca27dfc4 100644 --- a/src/year2015/day16/day16.rs +++ b/src/year2015/day16/day16.rs @@ -66,7 +66,6 @@ impl<'a> Puzzle<'a> { } } -/// main function #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2015/day17/day17.rs b/src/year2015/day17/day17.rs index dd56aa67..730b56ad 100644 --- a/src/year2015/day17/day17.rs +++ b/src/year2015/day17/day17.rs @@ -3,14 +3,12 @@ use itertools::Itertools; use rustc_hash::FxHashMap; -/// main function pub fn main() { let args = aoc::parse_args(); args.run(solve); } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, usize) { solve_eggnot(data, 150) diff --git a/src/year2015/day18/day18.rs b/src/year2015/day18/day18.rs index f08e6333..52de5d88 100644 --- a/src/year2015/day18/day18.rs +++ b/src/year2015/day18/day18.rs @@ -3,14 +3,12 @@ type Grid = [[u8; 100]; 100]; const STEPS: u32 = 100; -/// main function pub fn main() { let args = aoc::parse_args(); args.run(solve); } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { (part1(data), part2(data)) diff --git a/src/year2015/day19/day19.rs b/src/year2015/day19/day19.rs index c54af16d..4a59447f 100644 --- a/src/year2015/day19/day19.rs +++ b/src/year2015/day19/day19.rs @@ -98,7 +98,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2015/day2/day2.rs b/src/year2015/day2/day2.rs index 101d8280..1688c5ca 100644 --- a/src/year2015/day2/day2.rs +++ b/src/year2015/day2/day2.rs @@ -1,7 +1,6 @@ //! [Day 2: I Was Told There Would Be No Math](https://adventofcode.com/2015/day/2) /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let mut total_paper = 0; @@ -45,7 +44,6 @@ pub fn solve(data: &str) -> (u32, u32) { (total_paper, total_ribbon) } -/// main function pub fn main() { let args = aoc::parse_args(); args.run(solve); diff --git a/src/year2015/day20/day20.rs b/src/year2015/day20/day20.rs index aa177c9b..9763febc 100644 --- a/src/year2015/day20/day20.rs +++ b/src/year2015/day20/day20.rs @@ -68,7 +68,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2015/day21/day21.rs b/src/year2015/day21/day21.rs index 77f64268..fab4e810 100644 --- a/src/year2015/day21/day21.rs +++ b/src/year2015/day21/day21.rs @@ -153,7 +153,6 @@ Defense +3 80 0 3 } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, i32) { let mut boss = Character::new("boss", 0, 0, 0); diff --git a/src/year2015/day22/day22.rs b/src/year2015/day22/day22.rs index 8e9d5d31..34fa6ad0 100644 --- a/src/year2015/day22/day22.rs +++ b/src/year2015/day22/day22.rs @@ -212,7 +212,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, i32) { let puzzle = Puzzle::new(data); diff --git a/src/year2015/day23/day23.rs b/src/year2015/day23/day23.rs index 048796f6..c879f7aa 100644 --- a/src/year2015/day23/day23.rs +++ b/src/year2015/day23/day23.rs @@ -111,7 +111,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2015/day24/day24.rs b/src/year2015/day24/day24.rs index 3a432dfa..b26f6515 100644 --- a/src/year2015/day24/day24.rs +++ b/src/year2015/day24/day24.rs @@ -43,7 +43,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, u64) { let puzzle = Puzzle::new(data); diff --git a/src/year2015/day25/day25.rs b/src/year2015/day25/day25.rs index 91a96d4a..022e8315 100644 --- a/src/year2015/day25/day25.rs +++ b/src/year2015/day25/day25.rs @@ -6,7 +6,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, aoc::Christmas) { let (row, column) = read_data(data); diff --git a/src/year2015/day3/day3.rs b/src/year2015/day3/day3.rs index c5e06851..b68937a7 100644 --- a/src/year2015/day3/day3.rs +++ b/src/year2015/day3/day3.rs @@ -2,14 +2,12 @@ use rustc_hash::FxHashSet; -/// main function pub fn main() { let args = aoc::parse_args(); args.run(solve); } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let line = data.trim_ascii(); diff --git a/src/year2015/day4/day4.rs b/src/year2015/day4/day4.rs index 0437e9d8..d0370d19 100644 --- a/src/year2015/day4/day4.rs +++ b/src/year2015/day4/day4.rs @@ -1,6 +1,5 @@ //! [Day 4: The Ideal Stocking Stuffer](https://adventofcode.com/2015/day/4) -/// main function pub fn main() { let args = aoc::parse_args(); @@ -8,7 +7,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let mut secret = [0u8; 32]; diff --git a/src/year2015/day5/day5.rs b/src/year2015/day5/day5.rs index 151b95fc..0a50996a 100644 --- a/src/year2015/day5/day5.rs +++ b/src/year2015/day5/day5.rs @@ -1,13 +1,11 @@ //! [Day 5: Doesn't He Have Intern-Elves For This?](https://adventofcode.com/2015/day/5) -/// main function pub fn main() { let args = aoc::parse_args(); args.run(solve); } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { (part1(data), part2(data)) diff --git a/src/year2015/day6/day6.rs b/src/year2015/day6/day6.rs index 721ddba8..37018076 100644 --- a/src/year2015/day6/day6.rs +++ b/src/year2015/day6/day6.rs @@ -2,14 +2,12 @@ use regex::Regex; -/// main function pub fn main() { let args = aoc::parse_args(); args.run(solve); } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let data = data.lines().collect::>(); diff --git a/src/year2015/day7/day7.rs b/src/year2015/day7/day7.rs index 2f7c2474..08efcb50 100644 --- a/src/year2015/day7/day7.rs +++ b/src/year2015/day7/day7.rs @@ -109,7 +109,6 @@ fn wires(parser: &Parser, opcodes: &FxHashMap, wire: &str) -> u1 } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u16, u16) { let parser = Parser::new(); @@ -132,7 +131,6 @@ pub fn solve(data: &str) -> (u16, u16) { (wire_a, wire_a_bis) } -/// main function pub fn main() { let args = aoc::parse_args(); diff --git a/src/year2015/day8/day8.rs b/src/year2015/day8/day8.rs index a3df6c28..642649cc 100644 --- a/src/year2015/day8/day8.rs +++ b/src/year2015/day8/day8.rs @@ -1,13 +1,11 @@ //! [Day 8: Matchsticks](https://adventofcode.com/2015/day/8) -/// main function pub fn main() { let args = aoc::parse_args(); args.run(solve); } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let mut total_raw = 0; diff --git a/src/year2015/day9/day9.rs b/src/year2015/day9/day9.rs index 56112ca6..d6d0b576 100644 --- a/src/year2015/day9/day9.rs +++ b/src/year2015/day9/day9.rs @@ -5,14 +5,12 @@ use regex::Regex; use rustc_hash::{FxHashMap, FxHashSet}; /// # Panics -/// over malformed input pub fn main() { let args = aoc::parse_args(); args.run(solve); } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let mut places: FxHashSet = FxHashSet::default(); diff --git a/src/year2016/.bonus.md b/src/year2016/.bonus.md index a1caa275..b2690c6c 100644 --- a/src/year2016/.bonus.md +++ b/src/year2016/.bonus.md @@ -1,3 +1,3 @@ ## Bonus -[Assembunny assembler](../2016/assembunny/assembler/asm.py) \ No newline at end of file +[Assembunny assembler](../../crates/assembunny/assembler/asm.py) \ No newline at end of file diff --git a/src/year2016/README.md b/src/year2016/README.md index 89c04b37..5fd15712 100644 --- a/src/year2016/README.md +++ b/src/year2016/README.md @@ -4,35 +4,35 @@ ![Stars: 50](https://img.shields.io/badge/Stars-50⭐-blue) ![Rust: 25](https://img.shields.io/badge/Rust-25-cyan?logo=Rust) -## 2016 ([Calendar](https://adventofcode.com/2016)) ([Solutions](../2016/)) : 50⭐ +## 2016 ([Calendar](https://adventofcode.com/2016)) ([Solutions](./)) : 50⭐ Puzzle | Stars | Languages -------------------------------------------------------------------------------------- | ----- | ----------- -[Day 1: No Time for a Taxicab](https://adventofcode.com/2016/day/1) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2016/day1/day1.rs) -[Day 2: Bathroom Security](https://adventofcode.com/2016/day/2) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2016/day2/day2.rs) -[Day 3: Squares With Three Sides](https://adventofcode.com/2016/day/3) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2016/day3/day3.rs) -[Day 4: Security Through Obscurity](https://adventofcode.com/2016/day/4) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2016/day4/day4.rs) -[Day 5: How About a Nice Game of Chess?](https://adventofcode.com/2016/day/5) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2016/day5/day5.rs) -[Day 6: Signals and Noise](https://adventofcode.com/2016/day/6) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2016/day6/day6.rs) -[Day 7: Internet Protocol Version 7](https://adventofcode.com/2016/day/7) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2016/day7/day7.rs) -[Day 8: Two-Factor Authentication](https://adventofcode.com/2016/day/8) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2016/day8/day8.rs) -[Day 9: Explosives in Cyberspace](https://adventofcode.com/2016/day/9) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2016/day9/day9.rs) -[Day 10: Balance Bots](https://adventofcode.com/2016/day/10) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2016/day10/day10.rs) -[Day 11: Radioisotope Thermoelectric Generators](https://adventofcode.com/2016/day/11) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2016/day11/day11.rs) -[Day 12: Leonardo's Monorail](https://adventofcode.com/2016/day/12) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2016/day12/day12.rs) -[Day 13: A Maze of Twisty Little Cubicles](https://adventofcode.com/2016/day/13) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2016/day13/day13.rs) -[Day 14: One-Time Pad](https://adventofcode.com/2016/day/14) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2016/day14/day14.rs) -[Day 15: Timing is Everything](https://adventofcode.com/2016/day/15) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2016/day15/day15.rs) -[Day 16: Dragon Checksum](https://adventofcode.com/2016/day/16) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2016/day16/day16.rs) -[Day 17: Two Steps Forward](https://adventofcode.com/2016/day/17) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2016/day17/day17.rs) -[Day 18: Like a Rogue](https://adventofcode.com/2016/day/18) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2016/day18/day18.rs) -[Day 19: An Elephant Named Joseph](https://adventofcode.com/2016/day/19) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2016/day19/day19.rs) -[Day 20: Firewall Rules](https://adventofcode.com/2016/day/20) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2016/day20/day20.rs) -[Day 21: Scrambled Letters and Hash](https://adventofcode.com/2016/day/21) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2016/day21/day21.rs) -[Day 22: Grid Computing](https://adventofcode.com/2016/day/22) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2016/day22/day22.rs) -[Day 23: Safe Cracking](https://adventofcode.com/2016/day/23) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2016/day23/day23.rs) -[Day 24: Air Duct Spelunking](https://adventofcode.com/2016/day/24) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2016/day24/day24.rs) -[Day 25: Clock Signal](https://adventofcode.com/2016/day/25) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2016/day25/day25.rs) +[Day 1: No Time for a Taxicab](https://adventofcode.com/2016/day/1) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day1/day1.rs) +[Day 2: Bathroom Security](https://adventofcode.com/2016/day/2) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day2/day2.rs) +[Day 3: Squares With Three Sides](https://adventofcode.com/2016/day/3) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day3/day3.rs) +[Day 4: Security Through Obscurity](https://adventofcode.com/2016/day/4) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day4/day4.rs) +[Day 5: How About a Nice Game of Chess?](https://adventofcode.com/2016/day/5) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day5/day5.rs) +[Day 6: Signals and Noise](https://adventofcode.com/2016/day/6) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day6/day6.rs) +[Day 7: Internet Protocol Version 7](https://adventofcode.com/2016/day/7) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day7/day7.rs) +[Day 8: Two-Factor Authentication](https://adventofcode.com/2016/day/8) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day8/day8.rs) +[Day 9: Explosives in Cyberspace](https://adventofcode.com/2016/day/9) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day9/day9.rs) +[Day 10: Balance Bots](https://adventofcode.com/2016/day/10) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day10/day10.rs) +[Day 11: Radioisotope Thermoelectric Generators](https://adventofcode.com/2016/day/11) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day11/day11.rs) +[Day 12: Leonardo's Monorail](https://adventofcode.com/2016/day/12) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day12/day12.rs) +[Day 13: A Maze of Twisty Little Cubicles](https://adventofcode.com/2016/day/13) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day13/day13.rs) +[Day 14: One-Time Pad](https://adventofcode.com/2016/day/14) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day14/day14.rs) +[Day 15: Timing is Everything](https://adventofcode.com/2016/day/15) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day15/day15.rs) +[Day 16: Dragon Checksum](https://adventofcode.com/2016/day/16) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day16/day16.rs) +[Day 17: Two Steps Forward](https://adventofcode.com/2016/day/17) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day17/day17.rs) +[Day 18: Like a Rogue](https://adventofcode.com/2016/day/18) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day18/day18.rs) +[Day 19: An Elephant Named Joseph](https://adventofcode.com/2016/day/19) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day19/day19.rs) +[Day 20: Firewall Rules](https://adventofcode.com/2016/day/20) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day20/day20.rs) +[Day 21: Scrambled Letters and Hash](https://adventofcode.com/2016/day/21) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day21/day21.rs) +[Day 22: Grid Computing](https://adventofcode.com/2016/day/22) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day22/day22.rs) +[Day 23: Safe Cracking](https://adventofcode.com/2016/day/23) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day23/day23.rs) +[Day 24: Air Duct Spelunking](https://adventofcode.com/2016/day/24) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day24/day24.rs) +[Day 25: Clock Signal](https://adventofcode.com/2016/day/25) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day25/day25.rs) ## Bonus diff --git a/src/year2016/day1/day1.rs b/src/year2016/day1/day1.rs index 0ba22e81..da0ae365 100644 --- a/src/year2016/day1/day1.rs +++ b/src/year2016/day1/day1.rs @@ -8,7 +8,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, i32) { let mut x = 0_i32; diff --git a/src/year2016/day10/day10.rs b/src/year2016/day10/day10.rs index 1a7456ec..c32a477c 100644 --- a/src/year2016/day10/day10.rs +++ b/src/year2016/day10/day10.rs @@ -43,7 +43,6 @@ struct BotInstruction { /// First, it loads the move instructions and initializes the bots. /// Then, it runs the instructions until the puzzle is done. /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let re_init = Regex::new(r"value ([\d]+) goes to bot (\d+)").unwrap(); diff --git a/src/year2016/day11/day11.rs b/src/year2016/day11/day11.rs index 99b611d5..e00e8785 100644 --- a/src/year2016/day11/day11.rs +++ b/src/year2016/day11/day11.rs @@ -214,7 +214,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2016/day12/day12.rs b/src/year2016/day12/day12.rs index 50c6802a..ffe3a4c6 100644 --- a/src/year2016/day12/day12.rs +++ b/src/year2016/day12/day12.rs @@ -12,7 +12,6 @@ fn run_program(bunny_vm: &mut BunnyVM, c: i32) -> i32 { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, i32) { let mut bunny_vm = BunnyVM::new(data); diff --git a/src/year2016/day13/day13.rs b/src/year2016/day13/day13.rs index 2c464abc..fa58f0a2 100644 --- a/src/year2016/day13/day13.rs +++ b/src/year2016/day13/day13.rs @@ -99,7 +99,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2016/day14/day14.rs b/src/year2016/day14/day14.rs index a5595469..d1e3e0b8 100644 --- a/src/year2016/day14/day14.rs +++ b/src/year2016/day14/day14.rs @@ -9,7 +9,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { (find_key(data, 0), find_key(data, 2016)) diff --git a/src/year2016/day15/day15.rs b/src/year2016/day15/day15.rs index 6bdb24fd..a75657a6 100644 --- a/src/year2016/day15/day15.rs +++ b/src/year2016/day15/day15.rs @@ -8,7 +8,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let mut discs = Vec::new(); diff --git a/src/year2016/day16/day16.rs b/src/year2016/day16/day16.rs index cd05feca..7a3d49c6 100644 --- a/src/year2016/day16/day16.rs +++ b/src/year2016/day16/day16.rs @@ -6,7 +6,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (String, String) { let data = data.trim_ascii(); diff --git a/src/year2016/day17/day17.rs b/src/year2016/day17/day17.rs index c2df9ea9..0125241c 100644 --- a/src/year2016/day17/day17.rs +++ b/src/year2016/day17/day17.rs @@ -124,7 +124,6 @@ impl<'a> Puzzle<'a> { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (String, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2016/day18/day18.rs b/src/year2016/day18/day18.rs index dbe912e8..e4a2f075 100644 --- a/src/year2016/day18/day18.rs +++ b/src/year2016/day18/day18.rs @@ -51,7 +51,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2016/day19/day19.rs b/src/year2016/day19/day19.rs index 2e378cd8..1929108e 100644 --- a/src/year2016/day19/day19.rs +++ b/src/year2016/day19/day19.rs @@ -6,7 +6,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let elves = data.trim_ascii().parse().unwrap(); diff --git a/src/year2016/day2/day2.rs b/src/year2016/day2/day2.rs index b6b96573..5f526b06 100644 --- a/src/year2016/day2/day2.rs +++ b/src/year2016/day2/day2.rs @@ -6,7 +6,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (String, String) { (part1(data), part2(data)) diff --git a/src/year2016/day20/day20.rs b/src/year2016/day20/day20.rs index 92ce373c..f6f5f205 100644 --- a/src/year2016/day20/day20.rs +++ b/src/year2016/day20/day20.rs @@ -6,7 +6,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { // load the blacklist and sort it ascending diff --git a/src/year2016/day21/day21.rs b/src/year2016/day21/day21.rs index 528b8fd5..6182df32 100644 --- a/src/year2016/day21/day21.rs +++ b/src/year2016/day21/day21.rs @@ -175,7 +175,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (String, String) { let puzzle = Puzzle::new(data); diff --git a/src/year2016/day22/day22.rs b/src/year2016/day22/day22.rs index 4074ee01..e42d932c 100644 --- a/src/year2016/day22/day22.rs +++ b/src/year2016/day22/day22.rs @@ -110,7 +110,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2016/day23/day23.rs b/src/year2016/day23/day23.rs index 2994d45a..462bfe89 100644 --- a/src/year2016/day23/day23.rs +++ b/src/year2016/day23/day23.rs @@ -24,7 +24,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(program: &str) -> (i32, i32) { let part1 = compute_until_safe(7, program); diff --git a/src/year2016/day24/day24.rs b/src/year2016/day24/day24.rs index 67281d5a..8e8461f5 100644 --- a/src/year2016/day24/day24.rs +++ b/src/year2016/day24/day24.rs @@ -1,51 +1,55 @@ //! [Day 24: Air Duct Spelunking](https://adventofcode.com/2016/day/24) -#![allow(clippy::cast_possible_truncation)] -#![allow(clippy::cast_possible_wrap)] - use itertools::Itertools; use rustc_hash::FxHashSet; use std::collections::VecDeque; +fn digit_usize(c: u8) -> Option { + match c { + b'0'..=b'9' => Some(usize::from(c - b'0')), + _ => None, + } +} + struct Puzzle { - grid: aoc::Grid, + grid: aoc::GridU, } impl Puzzle { fn new(data: &str) -> Self { Self { - grid: aoc::Grid::::parse(data), + grid: aoc::GridU::::parse(data), } } - fn solve(&self) -> (u32, u32) { + fn solve(&self) -> (usize, usize) { let mut points = vec![]; - for (xy, c) in &self.grid { + for (xy, c) in self.grid.iter() { if c.is_ascii_digit() { points.push(xy); } } let n = points.len(); - let mut distances = aoc::Grid::::with_size(n as i32, n as i32, 0, 0); + let mut distances = aoc::GridU::::with_size(n, n); for &start in &points { - let from = self.grid[start].to_digit(10).unwrap(); + let from = digit_usize(self.grid[start]).unwrap(); let mut seen = FxHashSet::default(); let mut q = VecDeque::new(); - q.push_back((start, 0u32)); + q.push_back((start, 0)); while let Some((point, steps)) = q.pop_front() { // distance from 'start' to current point - if let Some(to) = self.grid[point].to_digit(10) { - distances[(from as i32, to as i32)] = steps; + if let Some(to) = digit_usize(self.grid[point]) { + distances[(from, to)] = steps; } // walk if possible north, east, south and west - self.grid.iter_directions(point).for_each(|(_, p)| { - if self.grid[p] != '#' && !seen.contains(&p) { + self.grid.iter_directions(point).for_each(|p| { + if self.grid[p] != b'#' && !seen.contains(&p) { seen.insert(p); q.push_back((p, steps + 1)); } @@ -53,13 +57,13 @@ impl Puzzle { } } - let mut part1 = u32::MAX; - let mut part2 = u32::MAX; + let mut part1 = usize::MAX; + let mut part2 = usize::MAX; (1..n).permutations(n - 1).for_each(|path| { - let first = distances[(0, path[0] as i32)]; - let middle: u32 = path.windows(2).map(|x| distances[(x[0] as i32, x[1] as i32)]).sum(); - let last = distances[(path[n - 2] as i32, 0)]; + let first = distances[(0, path[0])]; + let middle: usize = path.windows(2).map(|x| distances[(x[0], x[1])]).sum(); + let last = distances[(path[n - 2], 0)]; part1 = part1.min(first + middle); part2 = part2.min(first + middle + last); @@ -69,20 +73,19 @@ impl Puzzle { } /// Solve part one. - fn part1(&self) -> u32 { + fn part1(&self) -> usize { self.solve().0 } /// Solve part two. - fn part2(&self) -> u32 { + fn part2(&self) -> usize { self.solve().1 } } /// # Panics -/// over malformed input #[must_use] -pub fn solve(data: &str) -> (u32, u32) { +pub fn solve(data: &str) -> (usize, usize) { let puzzle = Puzzle::new(data); (puzzle.part1(), puzzle.part2()) } diff --git a/src/year2016/day25/day25.rs b/src/year2016/day25/day25.rs index 6331a827..f694927f 100644 --- a/src/year2016/day25/day25.rs +++ b/src/year2016/day25/day25.rs @@ -26,7 +26,6 @@ fn run_clock_signal(bunny_vm: &mut BunnyVM, a: i32) -> bool { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, aoc::Christmas) { let mut bunny_vm = BunnyVM::new(data); diff --git a/src/year2016/day3/day3.rs b/src/year2016/day3/day3.rs index 22c4a81f..61584e6d 100644 --- a/src/year2016/day3/day3.rs +++ b/src/year2016/day3/day3.rs @@ -8,7 +8,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { (part1(data), part2(data)) diff --git a/src/year2016/day4/day4.rs b/src/year2016/day4/day4.rs index ae01ed3a..7ca4682f 100644 --- a/src/year2016/day4/day4.rs +++ b/src/year2016/day4/day4.rs @@ -16,7 +16,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { (part1(data), part2(data)) diff --git a/src/year2016/day5/day5.rs b/src/year2016/day5/day5.rs index 914c6587..a43ad364 100644 --- a/src/year2016/day5/day5.rs +++ b/src/year2016/day5/day5.rs @@ -15,7 +15,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (String, String) { solve_verbose(data, false) diff --git a/src/year2016/day6/day6.rs b/src/year2016/day6/day6.rs index 084fd534..785e4822 100644 --- a/src/year2016/day6/day6.rs +++ b/src/year2016/day6/day6.rs @@ -6,7 +6,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (String, String) { let mut freq = [[0; 26]; 8]; diff --git a/src/year2016/day7/day7.rs b/src/year2016/day7/day7.rs index b225c19d..574eb288 100644 --- a/src/year2016/day7/day7.rs +++ b/src/year2016/day7/day7.rs @@ -8,7 +8,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { (part1(data), part2(data)) diff --git a/src/year2016/day8/day8.rs b/src/year2016/day8/day8.rs index d491e039..a8528581 100644 --- a/src/year2016/day8/day8.rs +++ b/src/year2016/day8/day8.rs @@ -12,7 +12,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, String) { const WIDTH: usize = 50; diff --git a/src/year2016/day9/day9.rs b/src/year2016/day9/day9.rs index 764bd966..a24b05e4 100644 --- a/src/year2016/day9/day9.rs +++ b/src/year2016/day9/day9.rs @@ -6,7 +6,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, u64) { (part1(data), part2(data)) diff --git a/src/year2017/README.md b/src/year2017/README.md index 48aa7755..1f9f7c58 100644 --- a/src/year2017/README.md +++ b/src/year2017/README.md @@ -5,32 +5,32 @@ ![Rust: 25](https://img.shields.io/badge/Rust-25-cyan?logo=Rust) ![Python: 17](https://img.shields.io/badge/Python-17-cyan?logo=Python) -## 2017 ([Calendar](https://adventofcode.com/2017)) ([Solutions](../2017/)) : 50⭐ +## 2017 ([Calendar](https://adventofcode.com/2017)) ([Solutions](./)) : 50⭐ Puzzle | Stars | Languages ------------------------------------------------------------------------------------- | ----- | ----------- -[Day 1: Inverse Captcha](https://adventofcode.com/2017/day/1) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2017/day1/day1.rs) [![Python](../scripts/assets/python.png)](../2017/day1/day1.py) -[Day 2: Corruption Checksum](https://adventofcode.com/2017/day/2) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2017/day2/day2.rs) [![Python](../scripts/assets/python.png)](../2017/day2/day2.py) -[Day 3: Spiral Memory](https://adventofcode.com/2017/day/3) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2017/day3/day3.rs) [![Python](../scripts/assets/python.png)](../2017/day3/day3.py) -[Day 4: High-Entropy Passphrases](https://adventofcode.com/2017/day/4) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2017/day4/day4.rs) [![Python](../scripts/assets/python.png)](../2017/day4/day4.py) -[Day 5: A Maze of Twisty Trampolines, All Alike](https://adventofcode.com/2017/day/5) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2017/day5/day5.rs) [![Python](../scripts/assets/python.png)](../2017/day5/day5.py) -[Day 6: Memory Reallocation](https://adventofcode.com/2017/day/6) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2017/day6/day6.rs) [![Python](../scripts/assets/python.png)](../2017/day6/day6.py) -[Day 7: Recursive Circus](https://adventofcode.com/2017/day/7) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2017/day7/day7.rs) [![Python](../scripts/assets/python.png)](../2017/day7/day7.py) -[Day 8: I Heard You Like Registers](https://adventofcode.com/2017/day/8) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2017/day8/day8.rs) [![Python](../scripts/assets/python.png)](../2017/day8/day8.py) -[Day 9: Stream Processing](https://adventofcode.com/2017/day/9) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2017/day9/day9.rs) [![Python](../scripts/assets/python.png)](../2017/day9/day9.py) -[Day 10: Knot Hash](https://adventofcode.com/2017/day/10) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2017/day10/day10.rs) -[Day 11: Hex Ed](https://adventofcode.com/2017/day/11) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2017/day11/day11.rs) [![Python](../scripts/assets/python.png)](../2017/day11/day11.py) -[Day 12: Digital Plumber](https://adventofcode.com/2017/day/12) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2017/day12/day12.rs) [![Python](../scripts/assets/python.png)](../2017/day12/day12.py) -[Day 13: Packet Scanners](https://adventofcode.com/2017/day/13) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2017/day13/day13.rs) -[Day 14: Disk Defragmentation](https://adventofcode.com/2017/day/14) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2017/day14/day14.rs) -[Day 15: Dueling Generators](https://adventofcode.com/2017/day/15) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2017/day15/day15.rs) -[Day 16: Permutation Promenade](https://adventofcode.com/2017/day/16) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2017/day16/day16.rs) -[Day 17: Spinlock](https://adventofcode.com/2017/day/17) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2017/day17/day17.rs) -[Day 18: Duet](https://adventofcode.com/2017/day/18) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2017/day18/day18.rs) -[Day 19: A Series of Tubes](https://adventofcode.com/2017/day/19) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2017/day19/day19.rs) [![Python](../scripts/assets/python.png)](../2017/day19/day19.py) -[Day 20: Particle Swarm](https://adventofcode.com/2017/day/20) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2017/day20/day20.rs) [![Python](../scripts/assets/python.png)](../2017/day20/day20.py) -[Day 21: Fractal Art](https://adventofcode.com/2017/day/21) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2017/day21/day21.rs) [![Python](../scripts/assets/python.png)](../2017/day21/day21.py) -[Day 22: Sporifica Virus](https://adventofcode.com/2017/day/22) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2017/day22/day22.rs) [![Python](../scripts/assets/python.png)](../2017/day22/day22.py) -[Day 23: Coprocessor Conflagration](https://adventofcode.com/2017/day/23) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2017/day23/day23.rs) -[Day 24: Electromagnetic Moat](https://adventofcode.com/2017/day/24) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2017/day24/day24.rs) [![Python](../scripts/assets/python.png)](../2017/day24/day24.py) -[Day 25: The Halting Problem](https://adventofcode.com/2017/day/25) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2017/day25/day25.rs) [![Python](../scripts/assets/python.png)](../2017/day25/day25.py) +[Day 1: Inverse Captcha](https://adventofcode.com/2017/day/1) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day1/day1.rs) [![Python](../../scripts/assets/python.png)](day1/day1.py) +[Day 2: Corruption Checksum](https://adventofcode.com/2017/day/2) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day2/day2.rs) [![Python](../../scripts/assets/python.png)](day2/day2.py) +[Day 3: Spiral Memory](https://adventofcode.com/2017/day/3) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day3/day3.rs) [![Python](../../scripts/assets/python.png)](day3/day3.py) +[Day 4: High-Entropy Passphrases](https://adventofcode.com/2017/day/4) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day4/day4.rs) [![Python](../../scripts/assets/python.png)](day4/day4.py) +[Day 5: A Maze of Twisty Trampolines, All Alike](https://adventofcode.com/2017/day/5) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day5/day5.rs) [![Python](../../scripts/assets/python.png)](day5/day5.py) +[Day 6: Memory Reallocation](https://adventofcode.com/2017/day/6) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day6/day6.rs) [![Python](../../scripts/assets/python.png)](day6/day6.py) +[Day 7: Recursive Circus](https://adventofcode.com/2017/day/7) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day7/day7.rs) [![Python](../../scripts/assets/python.png)](day7/day7.py) +[Day 8: I Heard You Like Registers](https://adventofcode.com/2017/day/8) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day8/day8.rs) [![Python](../../scripts/assets/python.png)](day8/day8.py) +[Day 9: Stream Processing](https://adventofcode.com/2017/day/9) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day9/day9.rs) [![Python](../../scripts/assets/python.png)](day9/day9.py) +[Day 10: Knot Hash](https://adventofcode.com/2017/day/10) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day10/day10.rs) +[Day 11: Hex Ed](https://adventofcode.com/2017/day/11) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day11/day11.rs) [![Python](../../scripts/assets/python.png)](day11/day11.py) +[Day 12: Digital Plumber](https://adventofcode.com/2017/day/12) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day12/day12.rs) [![Python](../../scripts/assets/python.png)](day12/day12.py) +[Day 13: Packet Scanners](https://adventofcode.com/2017/day/13) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day13/day13.rs) +[Day 14: Disk Defragmentation](https://adventofcode.com/2017/day/14) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day14/day14.rs) +[Day 15: Dueling Generators](https://adventofcode.com/2017/day/15) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day15/day15.rs) +[Day 16: Permutation Promenade](https://adventofcode.com/2017/day/16) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day16/day16.rs) +[Day 17: Spinlock](https://adventofcode.com/2017/day/17) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day17/day17.rs) +[Day 18: Duet](https://adventofcode.com/2017/day/18) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day18/day18.rs) +[Day 19: A Series of Tubes](https://adventofcode.com/2017/day/19) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day19/day19.rs) [![Python](../../scripts/assets/python.png)](day19/day19.py) +[Day 20: Particle Swarm](https://adventofcode.com/2017/day/20) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day20/day20.rs) [![Python](../../scripts/assets/python.png)](day20/day20.py) +[Day 21: Fractal Art](https://adventofcode.com/2017/day/21) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day21/day21.rs) [![Python](../../scripts/assets/python.png)](day21/day21.py) +[Day 22: Sporifica Virus](https://adventofcode.com/2017/day/22) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day22/day22.rs) [![Python](../../scripts/assets/python.png)](day22/day22.py) +[Day 23: Coprocessor Conflagration](https://adventofcode.com/2017/day/23) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day23/day23.rs) +[Day 24: Electromagnetic Moat](https://adventofcode.com/2017/day/24) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day24/day24.rs) [![Python](../../scripts/assets/python.png)](day24/day24.py) +[Day 25: The Halting Problem](https://adventofcode.com/2017/day/25) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day25/day25.rs) [![Python](../../scripts/assets/python.png)](day25/day25.py) diff --git a/src/year2017/day1/day1.rs b/src/year2017/day1/day1.rs index 64a7f816..cde596ba 100644 --- a/src/year2017/day1/day1.rs +++ b/src/year2017/day1/day1.rs @@ -38,7 +38,6 @@ impl<'a> Puzzle<'a> { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2017/day10/day10.rs b/src/year2017/day10/day10.rs index 14f6f443..da43482a 100644 --- a/src/year2017/day10/day10.rs +++ b/src/year2017/day10/day10.rs @@ -37,7 +37,6 @@ impl<'a> Puzzle<'a> { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, String) { let puzzle = Puzzle::new(data); diff --git a/src/year2017/day11/day11.rs b/src/year2017/day11/day11.rs index 390c938e..21212a53 100644 --- a/src/year2017/day11/day11.rs +++ b/src/year2017/day11/day11.rs @@ -74,7 +74,6 @@ impl<'a> Puzzle<'a> { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let mut puzzle = Puzzle::new(data); diff --git a/src/year2017/day12/day12.rs b/src/year2017/day12/day12.rs index c8d0fa1f..8c910d2d 100644 --- a/src/year2017/day12/day12.rs +++ b/src/year2017/day12/day12.rs @@ -59,7 +59,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, u64) { let puzzle = Puzzle::new(data); diff --git a/src/year2017/day13/day13.rs b/src/year2017/day13/day13.rs index 98f6df4a..8f1e23af 100644 --- a/src/year2017/day13/day13.rs +++ b/src/year2017/day13/day13.rs @@ -45,7 +45,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2017/day14/day14.rs b/src/year2017/day14/day14.rs index 7c37c4cf..91cc84e7 100644 --- a/src/year2017/day14/day14.rs +++ b/src/year2017/day14/day14.rs @@ -90,7 +90,6 @@ impl<'a> Puzzle<'a> { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2017/day15/day15.rs b/src/year2017/day15/day15.rs index eef8060c..5545c36f 100644 --- a/src/year2017/day15/day15.rs +++ b/src/year2017/day15/day15.rs @@ -65,7 +65,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2017/day16/day16.rs b/src/year2017/day16/day16.rs index 58ddee63..3abeb8d1 100644 --- a/src/year2017/day16/day16.rs +++ b/src/year2017/day16/day16.rs @@ -75,7 +75,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (String, String) { let puzzle = Puzzle::new(data); diff --git a/src/year2017/day17/day17.rs b/src/year2017/day17/day17.rs index 82e4a9c6..9d0c46c8 100644 --- a/src/year2017/day17/day17.rs +++ b/src/year2017/day17/day17.rs @@ -43,7 +43,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2017/day18/day18.rs b/src/year2017/day18/day18.rs index 986107be..923638fe 100644 --- a/src/year2017/day18/day18.rs +++ b/src/year2017/day18/day18.rs @@ -168,7 +168,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i64, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2017/day19/day19.rs b/src/year2017/day19/day19.rs index 9adb4a6c..e1aeac47 100644 --- a/src/year2017/day19/day19.rs +++ b/src/year2017/day19/day19.rs @@ -67,7 +67,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (String, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2017/day2/day2.rs b/src/year2017/day2/day2.rs index 986e4a8f..6e4099d6 100644 --- a/src/year2017/day2/day2.rs +++ b/src/year2017/day2/day2.rs @@ -44,7 +44,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2017/day20/day20.rs b/src/year2017/day20/day20.rs index f0aa6594..ab95e926 100644 --- a/src/year2017/day20/day20.rs +++ b/src/year2017/day20/day20.rs @@ -96,7 +96,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2017/day21/day21.rs b/src/year2017/day21/day21.rs index 9d2ffe17..8f3e6a5d 100644 --- a/src/year2017/day21/day21.rs +++ b/src/year2017/day21/day21.rs @@ -78,7 +78,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2017/day22/day22.rs b/src/year2017/day22/day22.rs index 0c726723..60eb8a1d 100644 --- a/src/year2017/day22/day22.rs +++ b/src/year2017/day22/day22.rs @@ -111,7 +111,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2017/day23/day23.rs b/src/year2017/day23/day23.rs index 8a8411cb..a9239c6e 100644 --- a/src/year2017/day23/day23.rs +++ b/src/year2017/day23/day23.rs @@ -130,7 +130,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, i64) { let puzzle = Puzzle::new(data); diff --git a/src/year2017/day24/day24.rs b/src/year2017/day24/day24.rs index 65da9fed..d7486194 100644 --- a/src/year2017/day24/day24.rs +++ b/src/year2017/day24/day24.rs @@ -3,7 +3,6 @@ use std::collections::VecDeque; /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let ports: Vec<_> = data diff --git a/src/year2017/day25/day25.rs b/src/year2017/day25/day25.rs index 56fe8865..082aad09 100644 --- a/src/year2017/day25/day25.rs +++ b/src/year2017/day25/day25.rs @@ -10,7 +10,6 @@ struct Blueprint<'a> { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, aoc::Christmas) { let mut blueprints: FxHashMap<&str, Blueprint> = FxHashMap::default(); diff --git a/src/year2017/day3/day3.rs b/src/year2017/day3/day3.rs index 6cac5013..54814bdf 100644 --- a/src/year2017/day3/day3.rs +++ b/src/year2017/day3/day3.rs @@ -115,7 +115,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, i32) { let puzzle = Puzzle::new(data); diff --git a/src/year2017/day4/day4.rs b/src/year2017/day4/day4.rs index f231bf5c..ab4ddc6f 100644 --- a/src/year2017/day4/day4.rs +++ b/src/year2017/day4/day4.rs @@ -47,7 +47,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2017/day5/day5.rs b/src/year2017/day5/day5.rs index da9a6eae..d79386ce 100644 --- a/src/year2017/day5/day5.rs +++ b/src/year2017/day5/day5.rs @@ -57,7 +57,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2017/day6/day6.rs b/src/year2017/day6/day6.rs index 184c6ef5..4f62c677 100644 --- a/src/year2017/day6/day6.rs +++ b/src/year2017/day6/day6.rs @@ -3,7 +3,6 @@ use rustc_hash::FxHashSet; /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let mut banks: Vec = data diff --git a/src/year2017/day7/day7.rs b/src/year2017/day7/day7.rs index ea3a7168..7b453705 100644 --- a/src/year2017/day7/day7.rs +++ b/src/year2017/day7/day7.rs @@ -136,7 +136,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (String, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2017/day8/day8.rs b/src/year2017/day8/day8.rs index ea799e70..57177658 100644 --- a/src/year2017/day8/day8.rs +++ b/src/year2017/day8/day8.rs @@ -59,7 +59,6 @@ impl Cpu { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, i32) { let mut cpu = Cpu { diff --git a/src/year2018/README.md b/src/year2018/README.md index 00a059b6..933b92ad 100644 --- a/src/year2018/README.md +++ b/src/year2018/README.md @@ -5,32 +5,32 @@ ![Rust: 27](https://img.shields.io/badge/Rust-27-cyan?logo=Rust) ![Python: 4](https://img.shields.io/badge/Python-4-cyan?logo=Python) -## 2018 ([Calendar](https://adventofcode.com/2018)) ([Solutions](../2018/)) : 50⭐ +## 2018 ([Calendar](https://adventofcode.com/2018)) ([Solutions](./)) : 50⭐ Puzzle | Stars | Languages ------------------------------------------------------------------------------------ | ----- | ----------- -[Day 1: Chronal Calibration](https://adventofcode.com/2018/day/1) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2018/day1/day1.rs) -[Day 2: Inventory Management System](https://adventofcode.com/2018/day/2) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2018/day2/day2.rs) -[Day 3: No Matter How You Slice It](https://adventofcode.com/2018/day/3) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2018/day3/day3.rs) -[Day 4: Repose Record](https://adventofcode.com/2018/day/4) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2018/day4/day4.rs) [![Python](../scripts/assets/python.png)](../2018/day4/day4.py) -[Day 5: Alchemical Reduction](https://adventofcode.com/2018/day/5) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2018/day5/day5.rs) -[Day 6: Chronal Coordinates](https://adventofcode.com/2018/day/6) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2018/day6/day6.rs) -[Day 7: The Sum of Its Parts](https://adventofcode.com/2018/day/7) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2018/day7/day7.rs) -[Day 8: Memory Maneuver](https://adventofcode.com/2018/day/8) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2018/day8/day8.rs) [![Python](../scripts/assets/python.png)](../2018/day8/day8.py) -[Day 9: Marble Mania](https://adventofcode.com/2018/day/9) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2018/day9/day9.rs) [![Rust](../scripts/assets/rust.png)](../2018/day9_c/day9.rs) [![C](../scripts/assets/c.png)](../2018/day9_c/day9.c) -[Day 10: The Stars Align](https://adventofcode.com/2018/day/10) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2018/day10/day10.rs) -[Day 11: Chronal Charge](https://adventofcode.com/2018/day/11) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2018/day11/day11.rs) -[Day 12: Subterranean Sustainability](https://adventofcode.com/2018/day/12) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2018/day12/day12.rs) -[Day 13: Mine Cart Madness](https://adventofcode.com/2018/day/13) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2018/day13/day13.rs) -[Day 14: Chocolate Charts](https://adventofcode.com/2018/day/14) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2018/day14/day14.rs) -[Day 15: Beverage Bandits](https://adventofcode.com/2018/day/15) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2018/day15/day15.rs) -[Day 16: Chronal Classification](https://adventofcode.com/2018/day/16) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2018/day16/day16.rs) [![Python](../scripts/assets/python.png)](../2018/day16/day16.py) -[Day 17: Reservoir Research](https://adventofcode.com/2018/day/17) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2018/day17/day17.rs) -[Day 18: Settlers of The North Pole](https://adventofcode.com/2018/day/18) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2018/day18/day18.rs) [![Python](../scripts/assets/python.png)](../2018/day18/day18.py) [🎁](../2018/day18/README.md) -[Day 19: Go With The Flow](https://adventofcode.com/2018/day/19) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2018/day19/day19.rs) -[Day 20: A Regular Map](https://adventofcode.com/2018/day/20) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2018/day20/day20.rs) -[Day 21: Chronal Conversion](https://adventofcode.com/2018/day/21) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2018/day21/day21.rs) -[Day 22: Mode Maze](https://adventofcode.com/2018/day/22) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2018/day22/day22.rs) -[Day 23: Experimental Emergency Teleportation](https://adventofcode.com/2018/day/23) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2018/day23/day23.rs) [![Rust](../scripts/assets/rust.png)](../2018/day23_z3/day23.rs) -[Day 24: Immune System Simulator 20XX](https://adventofcode.com/2018/day/24) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2018/day24/day24.rs) -[Day 25: Four-Dimensional Adventure](https://adventofcode.com/2018/day/25) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2018/day25/day25.rs) +[Day 1: Chronal Calibration](https://adventofcode.com/2018/day/1) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day1/day1.rs) +[Day 2: Inventory Management System](https://adventofcode.com/2018/day/2) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day2/day2.rs) +[Day 3: No Matter How You Slice It](https://adventofcode.com/2018/day/3) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day3/day3.rs) +[Day 4: Repose Record](https://adventofcode.com/2018/day/4) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day4/day4.rs) [![Python](../../scripts/assets/python.png)](day4/day4.py) +[Day 5: Alchemical Reduction](https://adventofcode.com/2018/day/5) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day5/day5.rs) +[Day 6: Chronal Coordinates](https://adventofcode.com/2018/day/6) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day6/day6.rs) +[Day 7: The Sum of Its Parts](https://adventofcode.com/2018/day/7) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day7/day7.rs) +[Day 8: Memory Maneuver](https://adventofcode.com/2018/day/8) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day8/day8.rs) [![Python](../../scripts/assets/python.png)](day8/day8.py) +[Day 9: Marble Mania](https://adventofcode.com/2018/day/9) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day9/day9.rs) [![Rust](../../scripts/assets/rust.png)](day9_c/day9_c.rs) [![C](../../scripts/assets/c.png)](day9_c/day9.c) +[Day 10: The Stars Align](https://adventofcode.com/2018/day/10) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day10/day10.rs) +[Day 11: Chronal Charge](https://adventofcode.com/2018/day/11) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day11/day11.rs) +[Day 12: Subterranean Sustainability](https://adventofcode.com/2018/day/12) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day12/day12.rs) +[Day 13: Mine Cart Madness](https://adventofcode.com/2018/day/13) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day13/day13.rs) +[Day 14: Chocolate Charts](https://adventofcode.com/2018/day/14) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day14/day14.rs) +[Day 15: Beverage Bandits](https://adventofcode.com/2018/day/15) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day15/day15.rs) +[Day 16: Chronal Classification](https://adventofcode.com/2018/day/16) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day16/day16.rs) [![Python](../../scripts/assets/python.png)](day16/day16.py) +[Day 17: Reservoir Research](https://adventofcode.com/2018/day/17) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day17/day17.rs) +[Day 18: Settlers of The North Pole](https://adventofcode.com/2018/day/18) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day18/day18.rs) [![Python](../../scripts/assets/python.png)](day18/day18.py) [🎁](day18/README.md) +[Day 19: Go With The Flow](https://adventofcode.com/2018/day/19) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day19/day19.rs) +[Day 20: A Regular Map](https://adventofcode.com/2018/day/20) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day20/day20.rs) +[Day 21: Chronal Conversion](https://adventofcode.com/2018/day/21) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day21/day21.rs) +[Day 22: Mode Maze](https://adventofcode.com/2018/day/22) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day22/day22.rs) +[Day 23: Experimental Emergency Teleportation](https://adventofcode.com/2018/day/23) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day23/day23.rs) [![Rust](../../scripts/assets/rust.png)](day23_z3/day23_z3.rs) +[Day 24: Immune System Simulator 20XX](https://adventofcode.com/2018/day/24) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day24/day24.rs) +[Day 25: Four-Dimensional Adventure](https://adventofcode.com/2018/day/25) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day25/day25.rs) diff --git a/src/year2018/day1/day1.rs b/src/year2018/day1/day1.rs index 9f5fbba3..9fce7544 100644 --- a/src/year2018/day1/day1.rs +++ b/src/year2018/day1/day1.rs @@ -33,7 +33,6 @@ impl<'a> Puzzle<'a> { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, i32) { let puzzle = Puzzle::new(data); diff --git a/src/year2018/day10/day10.rs b/src/year2018/day10/day10.rs index 07416fff..3bca4bdf 100644 --- a/src/year2018/day10/day10.rs +++ b/src/year2018/day10/day10.rs @@ -116,7 +116,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (String, u32) { let mut puzzle = Puzzle::new(data); diff --git a/src/year2018/day11/day11.rs b/src/year2018/day11/day11.rs index 91c12aaf..fa9ac306 100644 --- a/src/year2018/day11/day11.rs +++ b/src/year2018/day11/day11.rs @@ -66,7 +66,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (String, String) { let puzzle = Puzzle::new(data); diff --git a/src/year2018/day12/day12.rs b/src/year2018/day12/day12.rs index cb336d93..d3217a67 100644 --- a/src/year2018/day12/day12.rs +++ b/src/year2018/day12/day12.rs @@ -133,7 +133,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, i64) { let puzzle = Puzzle::new(data); diff --git a/src/year2018/day13/day13.rs b/src/year2018/day13/day13.rs index 0f8ddbda..cc3ffe03 100644 --- a/src/year2018/day13/day13.rs +++ b/src/year2018/day13/day13.rs @@ -267,7 +267,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (String, String) { let puzzle = Puzzle::new(data); diff --git a/src/year2018/day14/day14.rs b/src/year2018/day14/day14.rs index d614c4a3..20ea7bce 100644 --- a/src/year2018/day14/day14.rs +++ b/src/year2018/day14/day14.rs @@ -84,7 +84,6 @@ fn appear(recipes: &str) -> usize { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (String, usize) { (score(data), appear(data)) diff --git a/src/year2018/day15/day15.rs b/src/year2018/day15/day15.rs index 8166b9e7..c78e39d9 100644 --- a/src/year2018/day15/day15.rs +++ b/src/year2018/day15/day15.rs @@ -250,7 +250,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2018/day16/day16.rs b/src/year2018/day16/day16.rs index 9f0be6b9..808fcd5e 100644 --- a/src/year2018/day16/day16.rs +++ b/src/year2018/day16/day16.rs @@ -35,7 +35,6 @@ fn emulate(opcode: &str, a: u32, b: u32, c: u32, regs: &[u32]) -> Vec { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let (samples, program) = data.split_once("\n\n\n\n").unwrap(); diff --git a/src/year2018/day17/day17.rs b/src/year2018/day17/day17.rs index aa0d4801..16023bea 100644 --- a/src/year2018/day17/day17.rs +++ b/src/year2018/day17/day17.rs @@ -192,7 +192,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let mut puzzle = Puzzle::new(data); diff --git a/src/year2018/day18/day18.rs b/src/year2018/day18/day18.rs index 53421762..b2f03cf7 100644 --- a/src/year2018/day18/day18.rs +++ b/src/year2018/day18/day18.rs @@ -143,7 +143,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2018/day19/day19.rs b/src/year2018/day19/day19.rs index e58812f2..01c1bdab 100644 --- a/src/year2018/day19/day19.rs +++ b/src/year2018/day19/day19.rs @@ -134,7 +134,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2018/day2/day2.rs b/src/year2018/day2/day2.rs index e052a206..574f43f1 100644 --- a/src/year2018/day2/day2.rs +++ b/src/year2018/day2/day2.rs @@ -51,7 +51,6 @@ impl<'a> Puzzle<'a> { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, String) { let puzzle = Puzzle::new(data); diff --git a/src/year2018/day20/day20.rs b/src/year2018/day20/day20.rs index 557434f8..5bf0d886 100644 --- a/src/year2018/day20/day20.rs +++ b/src/year2018/day20/day20.rs @@ -4,7 +4,6 @@ use rustc_hash::{FxHashMap, FxHashSet}; use std::collections::VecDeque; /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let mut edges: FxHashMap<(i32, i32), FxHashSet<(i32, i32)>> = FxHashMap::default(); diff --git a/src/year2018/day21/day21.rs b/src/year2018/day21/day21.rs index e169f51c..1a6a67b3 100644 --- a/src/year2018/day21/day21.rs +++ b/src/year2018/day21/day21.rs @@ -235,7 +235,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, u64) { let puzzle: Puzzle = Puzzle::new(data); diff --git a/src/year2018/day22/day22.rs b/src/year2018/day22/day22.rs index f701ef73..eb9240e4 100644 --- a/src/year2018/day22/day22.rs +++ b/src/year2018/day22/day22.rs @@ -243,7 +243,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let mut puzzle = Puzzle::new(data); diff --git a/src/year2018/day23/day23.rs b/src/year2018/day23/day23.rs index 5b40e01f..7bd913cd 100644 --- a/src/year2018/day23/day23.rs +++ b/src/year2018/day23/day23.rs @@ -212,7 +212,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, i32) { let puzzle = Puzzle::new(data); diff --git a/src/year2018/day23_z3/day23.rs b/src/year2018/day23_z3/day23_z3.rs similarity index 99% rename from src/year2018/day23_z3/day23.rs rename to src/year2018/day23_z3/day23_z3.rs index bc4918e2..4446db22 100644 --- a/src/year2018/day23_z3/day23.rs +++ b/src/year2018/day23_z3/day23_z3.rs @@ -118,7 +118,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, i64) { let puzzle = Puzzle::new(data); diff --git a/src/year2018/day24/day24.rs b/src/year2018/day24/day24.rs index 5bcae613..29f87c50 100644 --- a/src/year2018/day24/day24.rs +++ b/src/year2018/day24/day24.rs @@ -54,7 +54,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2018/day24/day24/army.rs b/src/year2018/day24/day24/army.rs new file mode 100644 index 00000000..bae55ed0 --- /dev/null +++ b/src/year2018/day24/day24/army.rs @@ -0,0 +1,104 @@ +use std::ops::AddAssign; + +use super::group::Fight; +use super::group::Group; + +#[derive(Debug, Clone)] +pub struct Army { + name: String, + groups: Vec, +} + +impl Army { + #[must_use] + pub const fn new() -> Self { + Self { + name: String::new(), + groups: vec![], + } + } +} + +impl Default for Army { + fn default() -> Self { + Self::new() + } +} + +impl std::str::FromStr for Army { + type Err = Box; + + fn from_str(s: &str) -> Result { + let mut a = Self::new(); + let mut id = 0; + + for line in s.lines() { + if let Some(line) = line.strip_suffix(':') { + a.name = line.to_string(); + } else { + let mut g: Group = line.parse()?; + id.add_assign(1); + g.set_id(&a.name, id); + a.groups.push(g); + } + } + + Ok(a) + } +} + +impl Army { + pub fn set_boost(&mut self, boost: u32) { + for group in &mut self.groups { + group.set_boost(boost); + } + } + + #[must_use] + pub fn is_alive(&self) -> bool { + self.groups.iter().any(Group::is_alive) + } + + #[must_use] + pub fn alive_units(&self) -> u32 { + self.groups.iter().map(Group::alive_units).sum() + } + + #[must_use] + pub fn select_fights<'a>(&'a self, other: &'a Self) -> Vec> { + let mut fights: Vec> = vec![]; + + let mut attackers = self.alive_groups(); + let mut targets = other.alive_groups(); + + // sort by effective power then initiative + attackers.sort_unstable(); + + for attacker in &attackers { + if let Some(i) = attacker.select_target(&targets) { + fights.push(Fight { + attacker, + opponent: targets[i], + }); + + targets.remove(i); + } + } + + fights + } + + #[must_use] + pub fn alive_groups(&self) -> Vec<&Group> { + self.groups.iter().filter(|g| g.is_alive()).collect() + } +} + +impl std::fmt::Display for Army { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + for g in &self.groups { + writeln!(f, "{g}")?; + } + Ok(()) + } +} diff --git a/src/year2018/day24/day24/attacktype.rs b/src/year2018/day24/day24/attacktype.rs new file mode 100644 index 00000000..21f70f7b --- /dev/null +++ b/src/year2018/day24/day24/attacktype.rs @@ -0,0 +1,25 @@ +use std::string::ParseError; + +/// Kind of attacks. Units can deal damage with these attacks, can be immune or weak. +#[derive(PartialEq, Eq, Debug, Clone)] +pub enum AttackType { + Fire, + Radiation, + Slashing, + Bludgeoning, + Cold, +} + +impl std::str::FromStr for AttackType { + type Err = ParseError; + fn from_str(s: &str) -> Result { + Ok(match s { + "fire" => Self::Fire, + "radiation" => Self::Radiation, + "slashing" => Self::Slashing, + "bludgeoning" => Self::Bludgeoning, + "cold" => Self::Cold, + _ => panic!(), + }) + } +} diff --git a/src/year2018/day24/day24/combat.rs b/src/year2018/day24/day24/combat.rs new file mode 100644 index 00000000..2644ff17 --- /dev/null +++ b/src/year2018/day24/day24/combat.rs @@ -0,0 +1,86 @@ +use super::army::Army; + +const MAX_FIGHTS: usize = 10000; + +#[derive(Clone)] +pub struct Combat { + army1: Army, + army2: Army, +} + +impl Default for Combat { + fn default() -> Self { + Self::new() + } +} + +impl Combat { + #[must_use] + pub const fn new() -> Self { + Self { + army1: Army::new(), + army2: Army::new(), + } + } + + #[must_use] + pub const fn with_armies(army1: Army, army2: Army) -> Self { + Self { army1, army2 } + } + + pub fn set_army1_boost(&mut self, boost: u32) { + self.army1.set_boost(boost); + } + + #[must_use] + pub fn immune_alive_units(&self) -> u32 { + self.army1.alive_units() + } + + #[must_use] + pub fn infection_alive_units(&self) -> u32 { + self.army2.alive_units() + } + + #[must_use] + pub fn fight_to_death(&self) -> u32 { + for _ in 0..MAX_FIGHTS { + if let Some(winner) = self.fight() { + return winner.alive_units(); + } + } + 0 + } + + /// # Panics + /// si both armies are alive + #[must_use] + pub fn fight(&self) -> Option<&Army> { + let mut fights = self.army1.select_fights(&self.army2); + fights.extend(self.army2.select_fights(&self.army1)); + + // sort by initiative, greater first + fights.sort_unstable(); + + for f in &fights { + f.fight(); + } + + assert!(self.army1.is_alive() || self.army2.is_alive()); + + if !self.army1.is_alive() { + Some(&self.army2) + } else if !self.army2.is_alive() { + Some(&self.army1) + } else { + None + } + } +} + +impl std::fmt::Display for Combat { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.army1)?; + write!(f, "{}", self.army2) + } +} diff --git a/src/year2018/day24/day24/group.rs b/src/year2018/day24/day24/group.rs new file mode 100644 index 00000000..94aa4b32 --- /dev/null +++ b/src/year2018/day24/day24/group.rs @@ -0,0 +1,262 @@ +use regex::Regex; +use std::cell::Cell; +use std::error::Error; + +use super::attacktype::AttackType; + +// __ +// /__.__ ._ +// \_||(_)|_||_) +// | + +/// A group of soldiers. Each unit shares the same number of hit points, has the same immunities and weaknesses, and deals the same damage. +/// The initiative is the unit's preferred rank for attacking. +#[derive(Debug, Clone)] +pub struct Group { + army: String, + id: u32, + num_units: Cell, + hp: u32, + immunities: Vec, + weaknesses: Vec, + damage: u32, + damage_type: AttackType, + initiative: u32, +} + +impl std::str::FromStr for Group { + type Err = Box; + + fn from_str(s: &str) -> Result { + let re = Regex::new(r"^(\d+) units each with (\d+) hit points( \(.+\))? with an attack that does (\d+) (\w+) damage at initiative (\d+)$").unwrap(); + + let m = re.captures(s).ok_or("cannot parse line")?; + + let mut g = Self { + army: String::new(), + id: 0, + num_units: Cell::new(m[1].parse()?), + hp: m[2].parse()?, + immunities: vec![], + weaknesses: vec![], + damage: m[4].parse()?, + damage_type: m[5].parse()?, + initiative: m[6].parse()?, + }; + + if let Some(s) = m.get(3) { + for s in s + .as_str() + .strip_prefix(" (") + .ok_or("missing (")? + .strip_suffix(')') + .ok_or("missing )")? + .split(';') + { + let s = s.trim_start(); + + if let Some(weak) = s.strip_prefix("weak to ") { + g.weaknesses = weak.split(", ").map(|s| s.parse().unwrap()).collect(); + } else if let Some(immune) = s.strip_prefix("immune to ") { + g.immunities = immune.split(", ").map(|s| s.parse().unwrap()).collect(); + } else { + return Err("bad input".into()); + } + } + } + + Ok(g) + } +} + +impl std::fmt::Display for Group { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!( + f, + "{}#{:X} ({} hp {} dmg {} {:?})", + self.army, + self.id, + self.num_units.get(), + self.hp, + self.damage, + self.damage_type + ) + } +} + +impl Group { + pub fn set_id(&mut self, army: &str, id: u32) { + self.army = army.to_string(); + self.id = id; + } + + #[allow(dead_code)] + pub fn abbrev(&self) -> String { + if self.army == "Infection" { + format!("i{}", self.id) + } else { + format!("u{}", self.id) + } + } + + pub fn set_boost(&mut self, boost: u32) { + self.damage += boost; + } + + pub fn alive_units(&self) -> u32 { + self.num_units.get() + } + + pub fn is_alive(&self) -> bool { + self.num_units.get() != 0 + } + + fn effective_power(&self) -> u32 { + self.num_units.get() * self.damage + } + + fn is_immune(&self, attack: &AttackType) -> bool { + self.immunities.contains(attack) + } + + fn is_weak(&self, attack: &AttackType) -> bool { + self.weaknesses.contains(attack) + } + + pub fn attack_damage(&self, other: &Self) -> u32 { + if other.is_immune(&self.damage_type) { + return 0; + } + + let damage = self.effective_power(); + if other.is_weak(&self.damage_type) { + damage * 2 + } else { + damage + } + } + + fn take_damage(&self, damage: u32) { + let units_lost = damage / self.hp; + let old = self.num_units.get(); + self.num_units.set(old.saturating_sub(units_lost)); + } + + pub fn select_target(&self, others: &[&Self]) -> Option { + // filter with + // - alive units + // - can deal damage + // sort by + // - damage + // - effective power + // - initiative + + let target = others + .iter() + .enumerate() + .filter(|(_, &other)| other.is_alive() && self.attack_damage(other) != 0) + .max_by_key(|(_, &other)| { + ( + self.attack_damage(other), + other.effective_power(), + other.initiative, + ) + }) + .map(|(i, _)| i); + + target + } +} + +impl PartialOrd for Group { + fn partial_cmp(&self, other: &Self) -> Option { + Some(self.cmp(other)) + } +} + +impl Ord for Group { + fn cmp(&self, other: &Self) -> std::cmp::Ordering { + self.effective_power() + .cmp(&other.effective_power()) + .reverse() + .then(self.initiative.cmp(&other.initiative).reverse()) + } +} + +impl PartialEq for Group { + fn eq(&self, other: &Self) -> bool { + self.effective_power().eq(&other.effective_power()) && self.initiative.eq(&other.initiative) + } +} + +impl Eq for Group {} + +// _ +// |_o _ |__|_ +// | |(_|| ||_ +// _| + +pub struct Fight<'a> { + pub attacker: &'a Group, + pub opponent: &'a Group, +} + +impl Fight<'_> { + pub fn fight(&self) { + if self.attacker.is_alive() { + let damage = self.attacker.attack_damage(self.opponent); + self.opponent.take_damage(damage); + } + } +} + +impl PartialOrd for Fight<'_> { + fn partial_cmp(&self, other: &Self) -> Option { + Some(self.cmp(other)) + } +} + +impl Ord for Fight<'_> { + fn cmp(&self, other: &Self) -> std::cmp::Ordering { + self.attacker + .initiative + .cmp(&other.attacker.initiative) + .reverse() + } +} + +impl PartialEq for Fight<'_> { + fn eq(&self, other: &Self) -> bool { + self.attacker.initiative.eq(&other.attacker.initiative) + } +} + +impl Eq for Fight<'_> {} + +#[cfg(test)] +mod test { + use super::*; + + #[test] + fn test_group() { + let g1: Group = "17 units each with 5390 hit points (weak to radiation, bludgeoning) with an attack that does 4507 fire damage at initiative 2".parse().unwrap(); + let g2: Group = "989 units each with 1274 hit points (immune to fire; weak to bludgeoning, slashing) with an attack that does 25 slashing damage at initiative 3".parse().unwrap(); + let g3: Group = "801 units each with 4706 hit points (weak to radiation) with an attack that does 116 bludgeoning damage at initiative 1".parse().unwrap(); + let g4: Group = "4485 units each with 2961 hit points (immune to radiation; weak to fire, cold) with an attack that does 12 slashing damage at initiative 4".parse().unwrap(); + + assert!(g1.is_alive()); + assert!(g2.is_alive()); + assert!(g3.is_alive()); + assert!(g4.is_alive()); + + assert_eq!(g1.effective_power(), 17 * 4507); + + assert_eq!(g1.attack_damage(&g2), 0); // g1 deals fire damage but g2 is immune to fire + assert_eq!(g1.attack_damage(&g3), 4507 * 17); // g3 + assert_eq!(g1.attack_damage(&g4), 2 * 4507 * 17); // g4 is weak to fire, damage are doubled + + let others = [&g2, &g3, &g4]; + let target = g1.select_target(&others); + assert_eq!(target, Some(2)); + } +} diff --git a/src/year2018/day25/day25.rs b/src/year2018/day25/day25.rs index 7259e350..0caed51e 100644 --- a/src/year2018/day25/day25.rs +++ b/src/year2018/day25/day25.rs @@ -55,7 +55,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, aoc::Christmas) { let puzzle = Puzzle::new(data); diff --git a/src/year2018/day3/day3.rs b/src/year2018/day3/day3.rs index cd8e192b..5747e368 100644 --- a/src/year2018/day3/day3.rs +++ b/src/year2018/day3/day3.rs @@ -91,7 +91,6 @@ impl<'a> Puzzle<'a> { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2018/day4/day4.rs b/src/year2018/day4/day4.rs index 35192aa9..81faeff1 100644 --- a/src/year2018/day4/day4.rs +++ b/src/year2018/day4/day4.rs @@ -83,7 +83,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2018/day5/day5.rs b/src/year2018/day5/day5.rs index 45b447cc..49ba2141 100644 --- a/src/year2018/day5/day5.rs +++ b/src/year2018/day5/day5.rs @@ -59,7 +59,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2018/day6/day6.rs b/src/year2018/day6/day6.rs index dd5cfc35..db93102b 100644 --- a/src/year2018/day6/day6.rs +++ b/src/year2018/day6/day6.rs @@ -123,7 +123,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2018/day7/day7.rs b/src/year2018/day7/day7.rs index a93ba1e4..c3c0e623 100644 --- a/src/year2018/day7/day7.rs +++ b/src/year2018/day7/day7.rs @@ -126,7 +126,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (String, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2018/day8/day8.rs b/src/year2018/day8/day8.rs index 67f0f029..7278a4e8 100644 --- a/src/year2018/day8/day8.rs +++ b/src/year2018/day8/day8.rs @@ -68,7 +68,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2018/day9/day9.rs b/src/year2018/day9/day9.rs index 46d09333..c9a04ea1 100644 --- a/src/year2018/day9/day9.rs +++ b/src/year2018/day9/day9.rs @@ -68,7 +68,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2018/day9_c/build.rs b/src/year2018/day9_c/build.rs deleted file mode 100644 index 95ac01c4..00000000 --- a/src/year2018/day9_c/build.rs +++ /dev/null @@ -1,5 +0,0 @@ -fn main() { - println!("cargo:rerun-if-changed=day9.c"); - - cc::Build::new().file("day9.c").compile("day9"); -} diff --git a/src/year2018/day9_c/day9.rs b/src/year2018/day9_c/day9_c.rs similarity index 98% rename from src/year2018/day9_c/day9.rs rename to src/year2018/day9_c/day9_c.rs index 590239cc..182f628e 100644 --- a/src/year2018/day9_c/day9.rs +++ b/src/year2018/day9_c/day9_c.rs @@ -57,7 +57,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2019/README.md b/src/year2019/README.md index 4793b9fa..3e408baa 100644 --- a/src/year2019/README.md +++ b/src/year2019/README.md @@ -5,32 +5,32 @@ ![Rust: 25](https://img.shields.io/badge/Rust-25-cyan?logo=Rust) ![Python: 23](https://img.shields.io/badge/Python-23-cyan?logo=Python) -## 2019 ([Calendar](https://adventofcode.com/2019)) ([Solutions](../2019/)) : 50⭐ +## 2019 ([Calendar](https://adventofcode.com/2019)) ([Solutions](./)) : 50⭐ Puzzle | Stars | Languages -------------------------------------------------------------------------------- | ----- | ----------- -[Day 1: The Tyranny of the Rocket Equation](https://adventofcode.com/2019/day/1) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2019/day1/day1.rs) [![Python](../scripts/assets/python.png)](../2019/day1/day1.py) -[Day 2: 1202 Program Alarm](https://adventofcode.com/2019/day/2) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2019/day2/day2.rs) [![Python](../scripts/assets/python.png)](../2019/day2/day2.py) -[Day 3: Crossed Wires](https://adventofcode.com/2019/day/3) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2019/day3/day3.rs) [![Python](../scripts/assets/python.png)](../2019/day3/day3.py) -[Day 4: Secure Container](https://adventofcode.com/2019/day/4) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2019/day4/day4.rs) [![Python](../scripts/assets/python.png)](../2019/day4/day4.py) -[Day 5: Sunny with a Chance of Asteroids](https://adventofcode.com/2019/day/5) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2019/day5/day5.rs) [![Python](../scripts/assets/python.png)](../2019/day5/day5.py) -[Day 6: Universal Orbit Map](https://adventofcode.com/2019/day/6) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2019/day6/day6.rs) [![Python](../scripts/assets/python.png)](../2019/day6/day6.py) -[Day 7: Amplification Circuit](https://adventofcode.com/2019/day/7) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2019/day7/day7.rs) [![Python](../scripts/assets/python.png)](../2019/day7/day7.py) -[Day 8: Space Image Format](https://adventofcode.com/2019/day/8) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2019/day8/day8.rs) [![Python](../scripts/assets/python.png)](../2019/day8/day8.py) -[Day 9: Sensor Boost](https://adventofcode.com/2019/day/9) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2019/day9/day9.rs) [![Python](../scripts/assets/python.png)](../2019/day9/day9.py) -[Day 10: Monitoring Station](https://adventofcode.com/2019/day/10) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2019/day10/day10.rs) [![Python](../scripts/assets/python.png)](../2019/day10/day10.py) -[Day 11: Space Police](https://adventofcode.com/2019/day/11) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2019/day11/day11.rs) [![Python](../scripts/assets/python.png)](../2019/day11/day11.py) -[Day 12: The N-Body Problem](https://adventofcode.com/2019/day/12) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2019/day12/day12.rs) [![Python](../scripts/assets/python.png)](../2019/day12/day12.py) -[Day 13: Care Package](https://adventofcode.com/2019/day/13) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2019/day13/day13.rs) [![Python](../scripts/assets/python.png)](../2019/day13/day13.py) [🎁](../2019/day13/README.md) -[Day 14: Space Stoichiometry](https://adventofcode.com/2019/day/14) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2019/day14/day14.rs) [![Python](../scripts/assets/python.png)](../2019/day14/day14.py) -[Day 15: Oxygen System](https://adventofcode.com/2019/day/15) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2019/day15/day15.rs) [![Python](../scripts/assets/python.png)](../2019/day15/day15.py) [🎁](../2019/day15/README.md) -[Day 16: Flawed Frequency Transmission](https://adventofcode.com/2019/day/16) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2019/day16/day16.rs) [![Python](../scripts/assets/python.png)](../2019/day16/day16.py) [![C](../scripts/assets/c.png)](../2019/day16/day16.c) -[Day 17: Set and Forget](https://adventofcode.com/2019/day/17) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2019/day17/day17.rs) [![Python](../scripts/assets/python.png)](../2019/day17/day17.py) -[Day 18: Many-Worlds Interpretation](https://adventofcode.com/2019/day/18) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2019/day18/day18.rs) -[Day 19: Tractor Beam](https://adventofcode.com/2019/day/19) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2019/day19/day19.rs) [![Python](../scripts/assets/python.png)](../2019/day19/day19.py) -[Day 20: Donut Maze](https://adventofcode.com/2019/day/20) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2019/day20/day20.rs) [![Python](../scripts/assets/python.png)](../2019/day20/day20.py) -[Day 21: Springdroid Adventure](https://adventofcode.com/2019/day/21) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2019/day21/day21.rs) [![Python](../scripts/assets/python.png)](../2019/day21/day21.py) -[Day 22: Slam Shuffle](https://adventofcode.com/2019/day/22) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2019/day22/day22.rs) -[Day 23: Category Six](https://adventofcode.com/2019/day/23) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2019/day23/day23.rs) [![Python](../scripts/assets/python.png)](../2019/day23/day23.py) -[Day 24: Planet of Discord](https://adventofcode.com/2019/day/24) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2019/day24/day24.rs) [![Python](../scripts/assets/python.png)](../2019/day24/day24.py) -[Day 25: Cryostasis](https://adventofcode.com/2019/day/25) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2019/day25/day25.rs) [![Python](../scripts/assets/python.png)](../2019/day25/day25.py) +[Day 1: The Tyranny of the Rocket Equation](https://adventofcode.com/2019/day/1) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day1/day1.rs) [![Python](../../scripts/assets/python.png)](day1/day1.py) +[Day 2: 1202 Program Alarm](https://adventofcode.com/2019/day/2) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day2/day2.rs) [![Python](../../scripts/assets/python.png)](day2/day2.py) +[Day 3: Crossed Wires](https://adventofcode.com/2019/day/3) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day3/day3.rs) [![Python](../../scripts/assets/python.png)](day3/day3.py) +[Day 4: Secure Container](https://adventofcode.com/2019/day/4) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day4/day4.rs) [![Python](../../scripts/assets/python.png)](day4/day4.py) +[Day 5: Sunny with a Chance of Asteroids](https://adventofcode.com/2019/day/5) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day5/day5.rs) [![Python](../../scripts/assets/python.png)](day5/day5.py) +[Day 6: Universal Orbit Map](https://adventofcode.com/2019/day/6) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day6/day6.rs) [![Python](../../scripts/assets/python.png)](day6/day6.py) +[Day 7: Amplification Circuit](https://adventofcode.com/2019/day/7) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day7/day7.rs) [![Python](../../scripts/assets/python.png)](day7/day7.py) +[Day 8: Space Image Format](https://adventofcode.com/2019/day/8) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day8/day8.rs) [![Python](../../scripts/assets/python.png)](day8/day8.py) +[Day 9: Sensor Boost](https://adventofcode.com/2019/day/9) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day9/day9.rs) [![Python](../../scripts/assets/python.png)](day9/day9.py) +[Day 10: Monitoring Station](https://adventofcode.com/2019/day/10) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day10/day10.rs) [![Python](../../scripts/assets/python.png)](day10/day10.py) +[Day 11: Space Police](https://adventofcode.com/2019/day/11) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day11/day11.rs) [![Python](../../scripts/assets/python.png)](day11/day11.py) +[Day 12: The N-Body Problem](https://adventofcode.com/2019/day/12) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day12/day12.rs) [![Python](../../scripts/assets/python.png)](day12/day12.py) +[Day 13: Care Package](https://adventofcode.com/2019/day/13) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day13/day13.rs) [![Python](../../scripts/assets/python.png)](day13/day13.py) [🎁](day13/README.md) +[Day 14: Space Stoichiometry](https://adventofcode.com/2019/day/14) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day14/day14.rs) [![Python](../../scripts/assets/python.png)](day14/day14.py) +[Day 15: Oxygen System](https://adventofcode.com/2019/day/15) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day15/day15.rs) [![Python](../../scripts/assets/python.png)](day15/day15.py) [🎁](day15/README.md) +[Day 16: Flawed Frequency Transmission](https://adventofcode.com/2019/day/16) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day16/day16.rs) [![Python](../../scripts/assets/python.png)](day16/day16.py) [![C](../../scripts/assets/c.png)](day16/day16.c) +[Day 17: Set and Forget](https://adventofcode.com/2019/day/17) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day17/day17.rs) [![Python](../../scripts/assets/python.png)](day17/day17.py) +[Day 18: Many-Worlds Interpretation](https://adventofcode.com/2019/day/18) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day18/day18.rs) +[Day 19: Tractor Beam](https://adventofcode.com/2019/day/19) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day19/day19.rs) [![Python](../../scripts/assets/python.png)](day19/day19.py) +[Day 20: Donut Maze](https://adventofcode.com/2019/day/20) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day20/day20.rs) [![Python](../../scripts/assets/python.png)](day20/day20.py) +[Day 21: Springdroid Adventure](https://adventofcode.com/2019/day/21) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day21/day21.rs) [![Python](../../scripts/assets/python.png)](day21/day21.py) +[Day 22: Slam Shuffle](https://adventofcode.com/2019/day/22) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day22/day22.rs) +[Day 23: Category Six](https://adventofcode.com/2019/day/23) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day23/day23.rs) [![Python](../../scripts/assets/python.png)](day23/day23.py) +[Day 24: Planet of Discord](https://adventofcode.com/2019/day/24) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day24/day24.rs) [![Python](../../scripts/assets/python.png)](day24/day24.py) +[Day 25: Cryostasis](https://adventofcode.com/2019/day/25) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day25/day25.rs) [![Python](../../scripts/assets/python.png)](day25/day25.py) diff --git a/src/year2019/day1/day1.rs b/src/year2019/day1/day1.rs index 2d690641..8440c35d 100644 --- a/src/year2019/day1/day1.rs +++ b/src/year2019/day1/day1.rs @@ -34,7 +34,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, i32) { let puzzle = Puzzle::new(data); diff --git a/src/year2019/day10/day10.rs b/src/year2019/day10/day10.rs index bc54e387..7f0d977f 100644 --- a/src/year2019/day10/day10.rs +++ b/src/year2019/day10/day10.rs @@ -120,7 +120,6 @@ fn find_nth_vaporized(asteroids: &[Coord], station: Coord, mut vaporized: u32) - } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, i32) { let asteroids = load_asteroids(data); diff --git a/src/year2019/day11/day11.rs b/src/year2019/day11/day11.rs index 2048ea8b..0aa76d25 100644 --- a/src/year2019/day11/day11.rs +++ b/src/year2019/day11/day11.rs @@ -138,7 +138,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, String) { let puzzle = Puzzle::new(data); diff --git a/src/year2019/day12/day12.rs b/src/year2019/day12/day12.rs index 84435f00..0dd41245 100644 --- a/src/year2019/day12/day12.rs +++ b/src/year2019/day12/day12.rs @@ -121,7 +121,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, u64) { let puzzle = Puzzle::new(data); diff --git a/src/year2019/day13/day13.rs b/src/year2019/day13/day13.rs index 847a9a4f..f116af36 100644 --- a/src/year2019/day13/day13.rs +++ b/src/year2019/day13/day13.rs @@ -96,7 +96,6 @@ impl ArcadeCabinet { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, i64) { let mut cab = ArcadeCabinet::new(data); diff --git a/src/year2019/day14/day14.rs b/src/year2019/day14/day14.rs index da5ffcb7..a26fe071 100644 --- a/src/year2019/day14/day14.rs +++ b/src/year2019/day14/day14.rs @@ -108,7 +108,6 @@ impl<'a> Puzzle<'a> { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i64, i64) { let puzzle = Puzzle::new(data); diff --git a/src/year2019/day15/day15.rs b/src/year2019/day15/day15.rs index 5d44480f..aff8af48 100644 --- a/src/year2019/day15/day15.rs +++ b/src/year2019/day15/day15.rs @@ -66,7 +66,6 @@ fn bfs(droid: &Computer) -> (Computer, i64, i64) { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i64, i64) { let droid = Computer::load(data); diff --git a/src/year2019/day16/day16.rs b/src/year2019/day16/day16.rs index 98ab08dc..a564bb00 100644 --- a/src/year2019/day16/day16.rs +++ b/src/year2019/day16/day16.rs @@ -67,7 +67,6 @@ fn part2(data: &[u8]) -> u32 { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let data = parse_data(data); diff --git a/src/year2019/day17/day17.rs b/src/year2019/day17/day17.rs index 30369736..6706d148 100644 --- a/src/year2019/day17/day17.rs +++ b/src/year2019/day17/day17.rs @@ -210,7 +210,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, i64) { let puzzle = Puzzle::new(data); diff --git a/src/year2019/day18/day18.rs b/src/year2019/day18/day18.rs index 7f505bae..bb1fda72 100644 --- a/src/year2019/day18/day18.rs +++ b/src/year2019/day18/day18.rs @@ -95,7 +95,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, usize) { let mut puzzle = Puzzle::new(data); diff --git a/src/year2019/day18/day18/mazecell.rs b/src/year2019/day18/day18/mazecell.rs new file mode 100644 index 00000000..bbcb2c20 --- /dev/null +++ b/src/year2019/day18/day18/mazecell.rs @@ -0,0 +1,43 @@ +pub trait MazeCell { + fn is_wall(&self) -> bool; + fn is_key(&self) -> bool; + fn is_door(&self) -> bool; + fn is_entrance(&self) -> bool; + // fn is_robot(&self) -> bool; + + fn set_wall(&mut self); + fn set_entrance(&mut self); +} + +impl MazeCell for u8 { + fn is_wall(&self) -> bool { + self == &b'#' + } + + fn is_key(&self) -> bool { + self.is_ascii_lowercase() + // (b'a'..=b'z').contains(self) + } + + fn is_door(&self) -> bool { + self.is_ascii_uppercase() + // (b'A'..=b'Z').contains(self) + } + + fn is_entrance(&self) -> bool { + self == &b'@' + } + + // fn is_robot(&self) -> bool { + // // valid after maze update in part 2 + // (b'1'..=b'4').contains(self) + // } + + fn set_wall(&mut self) { + *self = b'#'; + } + + fn set_entrance(&mut self) { + *self = b'@'; + } +} diff --git a/src/year2019/day18/day18/mazette.rs b/src/year2019/day18/day18/mazette.rs new file mode 100644 index 00000000..3ec6bc56 --- /dev/null +++ b/src/year2019/day18/day18/mazette.rs @@ -0,0 +1,145 @@ +use rustc_hash::{FxHashMap, FxHashSet}; +use std::cmp::Reverse; +use std::collections::{BinaryHeap, VecDeque}; + +use super::mazecell::MazeCell; +use super::path::Path; +use super::state::State; + +pub trait Dijkstra { + fn search(&self) -> usize; +} + +/// Calculate distances to keys and seen keys and doors from the given cell of the maze. +fn get_paths_from(maze: &aoc::GridU, start: (usize, usize)) -> Vec { + let mut paths = vec![]; + + let mut seen = FxHashSet::default(); + let mut q = VecDeque::new(); + + q.push_back((start, 0, 0, 0)); + while let Some((pos, steps, mut keys_set, mut doors_set)) = q.pop_front() { + // + if pos != start && maze[pos].is_key() { + paths.push(Path { + destination: maze[pos], + steps, + keys: keys_set, + doors: doors_set, + }); + } + + for np in maze.iter_directions(pos) { + let c = maze[np]; + + if !c.is_wall() && !seen.contains(&np) { + seen.insert(np); + + if c.is_key() { + keys_set |= 1 << (c - b'a'); + } + if c.is_door() { + doors_set |= 1 << (c - b'A'); + } + + q.push_back((np, steps + 1, keys_set, doors_set)); + } + } + } + + paths +} + +fn get_all_paths(maze: &aoc::GridU) -> (u8, FxHashMap>) { + let mut all_paths = FxHashMap::default(); + + let mut num_robots = 0; + + for (xy, c) in maze.iter() { + let mut c = *c; + + if c.is_entrance() || c.is_key() { + if c.is_entrance() { + num_robots += 1; + c = b'0' + num_robots; + } + + all_paths.insert(c, get_paths_from(maze, xy)); + } + } + + (num_robots, all_paths) +} + +impl Dijkstra for aoc::GridU { + fn search(&self) -> usize { + let all_keys = self + .iter() + .filter(|(_, c)| c.is_key()) + .fold(0, |all_keys, (_, c)| all_keys | 1 << (c - b'a')); + + let (num_robots, all_paths) = get_all_paths(self); + + let state = State::new(num_robots); + + let mut scores = FxHashMap::default(); + scores.insert(state.clone(), 0usize); + + let mut closed = FxHashSet::default(); + + let mut open = FxHashSet::default(); + open.insert(state.clone()); + + let mut q = BinaryHeap::new(); + q.push((Reverse(0), state)); + + while let Some((_, current)) = q.pop() { + if current.keys == all_keys { + return *scores.get(¤t).unwrap(); + } + + open.remove(¤t); + closed.insert(current.clone()); + + for (neighbor, steps) in current.next(&all_paths) { + if closed.contains(&neighbor) { + continue; + } + + let score = scores[¤t] + steps; + + if score < *scores.get(&neighbor).unwrap_or(&usize::MAX) { + scores.insert(neighbor.clone(), score); + + if !open.contains(&neighbor) { + q.push((Reverse(score), neighbor)); + } + } + } + } + + 0 + } +} + +#[cfg(test)] +mod test { + use super::*; + + #[test] + fn test1() { + let maze = "\ +############### +#d.ABC.#.....a# +######@#@###### +############### +######@#@###### +#b.....#.....c# +############### +"; + + let maze = aoc::GridU::::parse(maze); + + assert_eq!(maze.search(), 24); + } +} diff --git a/src/year2019/day18/day18/multirobot.rs b/src/year2019/day18/day18/multirobot.rs new file mode 100644 index 00000000..6a9a23dc --- /dev/null +++ b/src/year2019/day18/day18/multirobot.rs @@ -0,0 +1,61 @@ +use super::mazecell::MazeCell; // needed for trait + +pub trait Multirobot { + fn update(&mut self); +} + +impl Multirobot for aoc::GridU { + /// Update the maze for part 2: the main entrance becomes four robots + fn update(&mut self) { + let (x, y) = self + .iter() + .find_map(|(xy, c)| if c.is_entrance() { Some(xy) } else { None }) + .unwrap(); + + self[(x, y)].set_wall(); + self[(x - 1, y)].set_wall(); + self[(x + 1, y)].set_wall(); + self[(x, y - 1)].set_wall(); + self[(x, y + 1)].set_wall(); + + self[(x - 1, y - 1)].set_entrance(); + self[(x + 1, y - 1)].set_entrance(); + self[(x - 1, y + 1)].set_entrance(); + self[(x + 1, y + 1)].set_entrance(); + } +} + +#[cfg(test)] +mod test { + use super::*; + + #[test] + fn update() { + let mut maze = aoc::GridU::::parse( + "\ +####### +#a.#Cd# +##...## +##.@.## +##...## +#cB#Ab# +####### +", + ); + + maze.update(); + + assert_eq!( + maze.to_string(), + "\ +####### +#a.#Cd# +##@#@## +####### +##@#@## +#cB#Ab# +####### +" + ); + } +} diff --git a/src/year2019/day18/day18/path.rs b/src/year2019/day18/day18/path.rs new file mode 100644 index 00000000..ad06a592 --- /dev/null +++ b/src/year2019/day18/day18/path.rs @@ -0,0 +1,31 @@ +pub struct Path { + pub destination: u8, // key: 'a'..'z' + pub steps: usize, + pub keys: u32, // bit = key 'a'+ + pub doors: u32, // bit = door 'A'+ +} + +impl std::fmt::Display for Path { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut keys = String::new(); + let mut doors = String::new(); + + for i in 0..26 { + if self.keys & (1 << i) != 0 { + keys.push((i + b'a') as char); + } + if self.doors & (1 << i) != 0 { + doors.push((i + b'A') as char); + } + } + + write!( + f, + "[dest:{} keys:{}, doors:{}, steps:{}]", + (self.destination) as char, + keys, + doors, + self.steps + ) + } +} diff --git a/src/year2019/day18/day18/state.rs b/src/year2019/day18/day18/state.rs new file mode 100644 index 00000000..aa1e9a2a --- /dev/null +++ b/src/year2019/day18/day18/state.rs @@ -0,0 +1,68 @@ +use super::{mazecell::MazeCell, path::Path}; +use rustc_hash::FxHashMap; + +#[derive(Hash, Eq, PartialEq, Ord, PartialOrd, Clone)] +pub struct State { + pub keys: u32, + robots: Vec, +} + +impl State { + #[must_use] + pub fn new(num_robots: u8) -> Self { + Self { + keys: 0, + robots: (b'1'..=(b'0' + num_robots)).collect(), + } + } + + /// Find the next states + /// # Panics + /// may be... + #[must_use] + pub fn next(&self, paths: &FxHashMap>) -> Vec<(Self, usize)> { + // impl Iterator { + + let mut result = vec![]; + + for (index, pos) in self.robots.iter().enumerate() { + for path in paths.get(pos).unwrap() { + // we already have the key + if path.destination.is_key() && self.keys & (1 << (path.destination - b'a')) != 0 { + continue; + } + + // not all doors of path are open + if path.doors & self.keys != path.doors { + continue; + } + + let mut robots = self.robots.clone(); + robots[index] = path.destination; + + result.push(( + Self { + keys: self.keys | path.keys, + robots, + }, + path.steps, + )); + } + } + result + } +} + +impl std::fmt::Display for State { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut keys = String::new(); + let robots: String = self.robots.iter().map(|c| *c as char).collect(); + + for i in 0..26 { + if self.keys & (1 << i) != 0 { + keys.push((i + b'a') as char); + } + } + write!(f, "State[keys:{keys} robots:{robots}]") + } +} diff --git a/src/year2019/day19/day19.rs b/src/year2019/day19/day19.rs index 9c6cb970..a4d37b40 100644 --- a/src/year2019/day19/day19.rs +++ b/src/year2019/day19/day19.rs @@ -144,7 +144,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i64, i64) { let puzzle = Puzzle::new(data); diff --git a/src/year2019/day2/day2.rs b/src/year2019/day2/day2.rs index 7e138f7d..15f3b53e 100644 --- a/src/year2019/day2/day2.rs +++ b/src/year2019/day2/day2.rs @@ -78,7 +78,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2019/day20/day20.rs b/src/year2019/day20/day20.rs index 9fa721b8..2a87dbcf 100644 --- a/src/year2019/day20/day20.rs +++ b/src/year2019/day20/day20.rs @@ -205,7 +205,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, u64) { let puzzle = Puzzle::new(data); diff --git a/src/year2019/day21/day21.rs b/src/year2019/day21/day21.rs index 58158302..05b18e9b 100644 --- a/src/year2019/day21/day21.rs +++ b/src/year2019/day21/day21.rs @@ -59,7 +59,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i64, i64) { let puzzle = Puzzle::new(data); diff --git a/src/year2019/day22/day22.rs b/src/year2019/day22/day22.rs index e304daad..c00b64f3 100644 --- a/src/year2019/day22/day22.rs +++ b/src/year2019/day22/day22.rs @@ -168,7 +168,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i128, i128) { let puzzle = Puzzle::new(data); diff --git a/src/year2019/day23/day23.rs b/src/year2019/day23/day23.rs index 1f27c10e..507cd52d 100644 --- a/src/year2019/day23/day23.rs +++ b/src/year2019/day23/day23.rs @@ -213,7 +213,6 @@ impl Task for Node { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i64, i64) { Network::new(data).run() diff --git a/src/year2019/day24/day24.rs b/src/year2019/day24/day24.rs index 0ff1b279..8f63b1e5 100644 --- a/src/year2019/day24/day24.rs +++ b/src/year2019/day24/day24.rs @@ -168,7 +168,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2019/day25/day25.rs b/src/year2019/day25/day25.rs index 6bf11607..d3397a8d 100644 --- a/src/year2019/day25/day25.rs +++ b/src/year2019/day25/day25.rs @@ -179,7 +179,6 @@ fn find_weight(computer: &mut Computer, inventory: &[&str], checkpoint_dir: &str } /// # Panics -/// over malformed input #[must_use] pub fn solve(program: &str) -> (u64, aoc::Christmas) { let mut computer = Computer::load(program); diff --git a/src/year2019/day3/day3.rs b/src/year2019/day3/day3.rs index 62d8f1fa..080c6a7a 100644 --- a/src/year2019/day3/day3.rs +++ b/src/year2019/day3/day3.rs @@ -101,7 +101,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2019/day4/day4.rs b/src/year2019/day4/day4.rs index f560e717..83a1f921 100644 --- a/src/year2019/day4/day4.rs +++ b/src/year2019/day4/day4.rs @@ -67,7 +67,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2019/day5/day5.rs b/src/year2019/day5/day5.rs index c25d1853..667f9e57 100644 --- a/src/year2019/day5/day5.rs +++ b/src/year2019/day5/day5.rs @@ -3,7 +3,6 @@ use intcode::{Computer, State}; /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i64, i64) { let mut program = Computer::load(data); diff --git a/src/year2019/day6/day6.rs b/src/year2019/day6/day6.rs index b41517db..8298766b 100644 --- a/src/year2019/day6/day6.rs +++ b/src/year2019/day6/day6.rs @@ -63,7 +63,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2019/day7/day7.rs b/src/year2019/day7/day7.rs index 2ffd8931..668247a2 100644 --- a/src/year2019/day7/day7.rs +++ b/src/year2019/day7/day7.rs @@ -82,7 +82,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i64, i64) { let puzzle = Puzzle::new(data); diff --git a/src/year2019/day8/day8.rs b/src/year2019/day8/day8.rs index 84b0f1b8..292efcb0 100644 --- a/src/year2019/day8/day8.rs +++ b/src/year2019/day8/day8.rs @@ -68,7 +68,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, String) { let puzzle = Puzzle::new(data); diff --git a/src/year2019/day9/day9.rs b/src/year2019/day9/day9.rs index 6b30a402..02a2ddbc 100644 --- a/src/year2019/day9/day9.rs +++ b/src/year2019/day9/day9.rs @@ -3,7 +3,6 @@ use intcode::{Computer, State}; /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i64, i64) { let mut program = Computer::load(data); diff --git a/src/year2019/ocr/ocr.py b/src/year2019/ocr/ocr.py index f908f680..244b4f93 120000 --- a/src/year2019/ocr/ocr.py +++ b/src/year2019/ocr/ocr.py @@ -1 +1 @@ -../../2022/ocr/ocr.py \ No newline at end of file +../../year2022/ocr/ocr.py \ No newline at end of file diff --git a/src/year2020/README.md b/src/year2020/README.md index d927b886..b06e1ac5 100644 --- a/src/year2020/README.md +++ b/src/year2020/README.md @@ -5,32 +5,32 @@ ![Rust: 25](https://img.shields.io/badge/Rust-25-cyan?logo=Rust) ![Python: 23](https://img.shields.io/badge/Python-23-cyan?logo=Python) -## 2020 ([Calendar](https://adventofcode.com/2020)) ([Solutions](../2020/)) : 50⭐ +## 2020 ([Calendar](https://adventofcode.com/2020)) ([Solutions](./)) : 50⭐ Puzzle | Stars | Languages ----------------------------------------------------------------------- | ----- | ----------- -[Day 1: Report Repair](https://adventofcode.com/2020/day/1) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2020/day1/day1.rs) [![Python](../scripts/assets/python.png)](../2020/day1/day1.py) -[Day 2: Password Philosophy](https://adventofcode.com/2020/day/2) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2020/day2/day2.rs) [![Python](../scripts/assets/python.png)](../2020/day2/day2.py) -[Day 3: Toboggan Trajectory](https://adventofcode.com/2020/day/3) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2020/day3/day3.rs) [![Python](../scripts/assets/python.png)](../2020/day3/day3.py) -[Day 4: Passport Processing](https://adventofcode.com/2020/day/4) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2020/day4/day4.rs) [![Python](../scripts/assets/python.png)](../2020/day4/day4.py) -[Day 5: Binary Boarding](https://adventofcode.com/2020/day/5) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2020/day5/day5.rs) [![Python](../scripts/assets/python.png)](../2020/day5/day5.py) -[Day 6: Custom Customs](https://adventofcode.com/2020/day/6) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2020/day6/day6.rs) [![Python](../scripts/assets/python.png)](../2020/day6/day6.py) -[Day 7: Handy Haversacks](https://adventofcode.com/2020/day/7) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2020/day7/day7.rs) [![Python](../scripts/assets/python.png)](../2020/day7/day7.py) -[Day 8: Handheld Halting](https://adventofcode.com/2020/day/8) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2020/day8/day8.rs) [![Python](../scripts/assets/python.png)](../2020/day8/day8.py) -[Day 9: Encoding Error](https://adventofcode.com/2020/day/9) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2020/day9/day9.rs) [![Python](../scripts/assets/python.png)](../2020/day9/day9.py) -[Day 10: Adapter Array](https://adventofcode.com/2020/day/10) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2020/day10/day10.rs) [![Python](../scripts/assets/python.png)](../2020/day10/day10.py) -[Day 11: Seating System](https://adventofcode.com/2020/day/11) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2020/day11/day11.rs) [![Python](../scripts/assets/python.png)](../2020/day11/day11.py) -[Day 12: Rain Risk](https://adventofcode.com/2020/day/12) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2020/day12/day12.rs) [![Python](../scripts/assets/python.png)](../2020/day12/day12.py) -[Day 13: Shuttle Search](https://adventofcode.com/2020/day/13) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2020/day13/day13.rs) [![Python](../scripts/assets/python.png)](../2020/day13/day13.py) -[Day 14: Docking Data](https://adventofcode.com/2020/day/14) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2020/day14/day14.rs) [![Python](../scripts/assets/python.png)](../2020/day14/day14.py) -[Day 15: Rambunctious Recitation](https://adventofcode.com/2020/day/15) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2020/day15/day15.rs) [![Python](../scripts/assets/python.png)](../2020/day15/day15.py) -[Day 16: Ticket Translation](https://adventofcode.com/2020/day/16) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2020/day16/day16.rs) [![Python](../scripts/assets/python.png)](../2020/day16/day16.py) -[Day 17: Conway Cubes](https://adventofcode.com/2020/day/17) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2020/day17/day17.rs) [![Python](../scripts/assets/python.png)](../2020/day17/day17.py) -[Day 18: Operation Order](https://adventofcode.com/2020/day/18) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2020/day18/day18.rs) [![Python](../scripts/assets/python.png)](../2020/day18/day18.py) -[Day 19: Monster Messages](https://adventofcode.com/2020/day/19) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2020/day19/day19.rs) -[Day 20: Jurassic Jigsaw](https://adventofcode.com/2020/day/20) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2020/day20/day20.rs) [![Python](../scripts/assets/python.png)](../2020/day20/day20.py) -[Day 21: Allergen Assessment](https://adventofcode.com/2020/day/21) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2020/day21/day21.rs) [![Python](../scripts/assets/python.png)](../2020/day21/day21.py) -[Day 22: Crab Combat](https://adventofcode.com/2020/day/22) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2020/day22/day22.rs) [![Python](../scripts/assets/python.png)](../2020/day22/day22.py) -[Day 23: Crab Cups](https://adventofcode.com/2020/day/23) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2020/day23/day23.rs) -[Day 24: Lobby Layout](https://adventofcode.com/2020/day/24) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2020/day24/day24.rs) [![Python](../scripts/assets/python.png)](../2020/day24/day24.py) -[Day 25: Combo Breaker](https://adventofcode.com/2020/day/25) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2020/day25/day25.rs) [![Python](../scripts/assets/python.png)](../2020/day25/day25.py) +[Day 1: Report Repair](https://adventofcode.com/2020/day/1) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day1/day1.rs) [![Python](../../scripts/assets/python.png)](day1/day1.py) +[Day 2: Password Philosophy](https://adventofcode.com/2020/day/2) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day2/day2.rs) [![Python](../../scripts/assets/python.png)](day2/day2.py) +[Day 3: Toboggan Trajectory](https://adventofcode.com/2020/day/3) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day3/day3.rs) [![Python](../../scripts/assets/python.png)](day3/day3.py) +[Day 4: Passport Processing](https://adventofcode.com/2020/day/4) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day4/day4.rs) [![Python](../../scripts/assets/python.png)](day4/day4.py) +[Day 5: Binary Boarding](https://adventofcode.com/2020/day/5) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day5/day5.rs) [![Python](../../scripts/assets/python.png)](day5/day5.py) +[Day 6: Custom Customs](https://adventofcode.com/2020/day/6) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day6/day6.rs) [![Python](../../scripts/assets/python.png)](day6/day6.py) +[Day 7: Handy Haversacks](https://adventofcode.com/2020/day/7) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day7/day7.rs) [![Python](../../scripts/assets/python.png)](day7/day7.py) +[Day 8: Handheld Halting](https://adventofcode.com/2020/day/8) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day8/day8.rs) [![Python](../../scripts/assets/python.png)](day8/day8.py) +[Day 9: Encoding Error](https://adventofcode.com/2020/day/9) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day9/day9.rs) [![Python](../../scripts/assets/python.png)](day9/day9.py) +[Day 10: Adapter Array](https://adventofcode.com/2020/day/10) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day10/day10.rs) [![Python](../../scripts/assets/python.png)](day10/day10.py) +[Day 11: Seating System](https://adventofcode.com/2020/day/11) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day11/day11.rs) [![Python](../../scripts/assets/python.png)](day11/day11.py) +[Day 12: Rain Risk](https://adventofcode.com/2020/day/12) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day12/day12.rs) [![Python](../../scripts/assets/python.png)](day12/day12.py) +[Day 13: Shuttle Search](https://adventofcode.com/2020/day/13) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day13/day13.rs) [![Python](../../scripts/assets/python.png)](day13/day13.py) +[Day 14: Docking Data](https://adventofcode.com/2020/day/14) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day14/day14.rs) [![Python](../../scripts/assets/python.png)](day14/day14.py) +[Day 15: Rambunctious Recitation](https://adventofcode.com/2020/day/15) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day15/day15.rs) [![Python](../../scripts/assets/python.png)](day15/day15.py) +[Day 16: Ticket Translation](https://adventofcode.com/2020/day/16) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day16/day16.rs) [![Python](../../scripts/assets/python.png)](day16/day16.py) +[Day 17: Conway Cubes](https://adventofcode.com/2020/day/17) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day17/day17.rs) [![Python](../../scripts/assets/python.png)](day17/day17.py) +[Day 18: Operation Order](https://adventofcode.com/2020/day/18) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day18/day18.rs) [![Python](../../scripts/assets/python.png)](day18/day18.py) +[Day 19: Monster Messages](https://adventofcode.com/2020/day/19) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day19/day19.rs) +[Day 20: Jurassic Jigsaw](https://adventofcode.com/2020/day/20) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day20/day20.rs) [![Python](../../scripts/assets/python.png)](day20/day20.py) +[Day 21: Allergen Assessment](https://adventofcode.com/2020/day/21) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day21/day21.rs) [![Python](../../scripts/assets/python.png)](day21/day21.py) +[Day 22: Crab Combat](https://adventofcode.com/2020/day/22) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day22/day22.rs) [![Python](../../scripts/assets/python.png)](day22/day22.py) +[Day 23: Crab Cups](https://adventofcode.com/2020/day/23) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day23/day23.rs) +[Day 24: Lobby Layout](https://adventofcode.com/2020/day/24) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day24/day24.rs) [![Python](../../scripts/assets/python.png)](day24/day24.py) +[Day 25: Combo Breaker](https://adventofcode.com/2020/day/25) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day25/day25.rs) [![Python](../../scripts/assets/python.png)](day25/day25.py) diff --git a/src/year2020/day1/day1.rs b/src/year2020/day1/day1.rs index 616a5211..7f92b01b 100644 --- a/src/year2020/day1/day1.rs +++ b/src/year2020/day1/day1.rs @@ -39,7 +39,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, u64) { let puzzle = Puzzle::new(data); diff --git a/src/year2020/day10/day10.rs b/src/year2020/day10/day10.rs index 708ffb3b..58a79838 100644 --- a/src/year2020/day10/day10.rs +++ b/src/year2020/day10/day10.rs @@ -52,7 +52,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, i64) { let puzzle = Puzzle::new(data); diff --git a/src/year2020/day11/day11.rs b/src/year2020/day11/day11.rs index e48c3c4f..7fa0b0f3 100644 --- a/src/year2020/day11/day11.rs +++ b/src/year2020/day11/day11.rs @@ -96,7 +96,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2020/day12/day12.rs b/src/year2020/day12/day12.rs index ee02aae5..a6f90846 100644 --- a/src/year2020/day12/day12.rs +++ b/src/year2020/day12/day12.rs @@ -83,7 +83,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, i32) { let puzzle = Puzzle::new(data); diff --git a/src/year2020/day13/day13.rs b/src/year2020/day13/day13.rs index 94ef3603..f56667d1 100644 --- a/src/year2020/day13/day13.rs +++ b/src/year2020/day13/day13.rs @@ -63,7 +63,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, i64) { let puzzle = Puzzle::new(data); diff --git a/src/year2020/day14/day14.rs b/src/year2020/day14/day14.rs index b1ebc46a..331b6746 100644 --- a/src/year2020/day14/day14.rs +++ b/src/year2020/day14/day14.rs @@ -80,7 +80,6 @@ impl<'a> Puzzle<'a> { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, u64) { let puzzle = Puzzle::new(data); diff --git a/src/year2020/day15/day15.rs b/src/year2020/day15/day15.rs index 937eb53c..4b922aef 100644 --- a/src/year2020/day15/day15.rs +++ b/src/year2020/day15/day15.rs @@ -62,7 +62,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2020/day16/day16.rs b/src/year2020/day16/day16.rs index 46b73ba9..7a6ddfd0 100644 --- a/src/year2020/day16/day16.rs +++ b/src/year2020/day16/day16.rs @@ -173,7 +173,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u64) { let puzzle = Puzzle::new(data); diff --git a/src/year2020/day17/day17.rs b/src/year2020/day17/day17.rs index bda758e6..aa89a19d 100644 --- a/src/year2020/day17/day17.rs +++ b/src/year2020/day17/day17.rs @@ -125,7 +125,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2020/day18/day18.rs b/src/year2020/day18/day18.rs index 1949972f..70c84c5e 100644 --- a/src/year2020/day18/day18.rs +++ b/src/year2020/day18/day18.rs @@ -116,7 +116,6 @@ impl Expr { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, u64) { let mut part1 = 0; diff --git a/src/year2020/day19/day19.rs b/src/year2020/day19/day19.rs index 6f0248ed..5c1048a5 100644 --- a/src/year2020/day19/day19.rs +++ b/src/year2020/day19/day19.rs @@ -153,7 +153,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let mut puzzle = Puzzle::new(data); diff --git a/src/year2020/day2/day2.rs b/src/year2020/day2/day2.rs index 532bc403..78d776b4 100644 --- a/src/year2020/day2/day2.rs +++ b/src/year2020/day2/day2.rs @@ -60,7 +60,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2020/day20/day20.rs b/src/year2020/day20/day20.rs index d0a93482..9e4dd995 100644 --- a/src/year2020/day20/day20.rs +++ b/src/year2020/day20/day20.rs @@ -273,7 +273,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2020/day21/day21.rs b/src/year2020/day21/day21.rs index 4e4acc3b..e702172f 100644 --- a/src/year2020/day21/day21.rs +++ b/src/year2020/day21/day21.rs @@ -103,7 +103,6 @@ impl<'a> Puzzle<'a> { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, String) { let puzzle = Puzzle::new(data); diff --git a/src/year2020/day22/day22.rs b/src/year2020/day22/day22.rs index 32eb04c6..d2fcc40c 100644 --- a/src/year2020/day22/day22.rs +++ b/src/year2020/day22/day22.rs @@ -167,7 +167,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2020/day23/day23.rs b/src/year2020/day23/day23.rs index 2a7b2e82..8c696606 100644 --- a/src/year2020/day23/day23.rs +++ b/src/year2020/day23/day23.rs @@ -88,7 +88,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, u64) { let puzzle = Puzzle::new(data); diff --git a/src/year2020/day24/day24.rs b/src/year2020/day24/day24.rs index 6d14f3fc..c58256c6 100644 --- a/src/year2020/day24/day24.rs +++ b/src/year2020/day24/day24.rs @@ -130,7 +130,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2020/day25/day25.rs b/src/year2020/day25/day25.rs index 965c2b8e..dca28499 100644 --- a/src/year2020/day25/day25.rs +++ b/src/year2020/day25/day25.rs @@ -41,7 +41,6 @@ fn discrete_log(a: u64, mut b: u64, order_n: u64) -> Option { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, aoc::Christmas) { let (a, b) = data.split_once('\n').unwrap(); diff --git a/src/year2020/day3/day3.rs b/src/year2020/day3/day3.rs index ac987f6a..a7ac257a 100644 --- a/src/year2020/day3/day3.rs +++ b/src/year2020/day3/day3.rs @@ -42,7 +42,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, u64) { let puzzle = Puzzle::new(data); diff --git a/src/year2020/day4/day4.rs b/src/year2020/day4/day4.rs index 3dfb4dfd..d750e561 100644 --- a/src/year2020/day4/day4.rs +++ b/src/year2020/day4/day4.rs @@ -95,7 +95,6 @@ impl<'a> Puzzle<'a> { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2020/day5/day5.rs b/src/year2020/day5/day5.rs index ce0a12d1..2201ca67 100644 --- a/src/year2020/day5/day5.rs +++ b/src/year2020/day5/day5.rs @@ -56,7 +56,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2020/day6/day6.rs b/src/year2020/day6/day6.rs index 136dfab1..afab42cf 100644 --- a/src/year2020/day6/day6.rs +++ b/src/year2020/day6/day6.rs @@ -46,7 +46,6 @@ impl<'a> Puzzle<'a> { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2020/day7/day7.rs b/src/year2020/day7/day7.rs index 285f24a2..acefd0a9 100644 --- a/src/year2020/day7/day7.rs +++ b/src/year2020/day7/day7.rs @@ -71,7 +71,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2020/day8/day8.rs b/src/year2020/day8/day8.rs index f6331a07..5c172cb3 100644 --- a/src/year2020/day8/day8.rs +++ b/src/year2020/day8/day8.rs @@ -74,7 +74,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, i32) { let puzzle = Puzzle::new(data); diff --git a/src/year2020/day9/day9.rs b/src/year2020/day9/day9.rs index cb20965a..73773f89 100644 --- a/src/year2020/day9/day9.rs +++ b/src/year2020/day9/day9.rs @@ -58,7 +58,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, u64) { let puzzle = Puzzle::new(data); diff --git a/src/year2021/README.md b/src/year2021/README.md index 20af5248..c1af513a 100644 --- a/src/year2021/README.md +++ b/src/year2021/README.md @@ -5,32 +5,32 @@ ![Rust: 25](https://img.shields.io/badge/Rust-25-cyan?logo=Rust) ![Python: 13](https://img.shields.io/badge/Python-13-cyan?logo=Python) -## 2021 ([Calendar](https://adventofcode.com/2021)) ([Solutions](../2021/)) : 50⭐ +## 2021 ([Calendar](https://adventofcode.com/2021)) ([Solutions](./)) : 50⭐ Puzzle | Stars | Languages ----------------------------------------------------------------------- | ----- | ----------- -[Day 1: Sonar Sweep](https://adventofcode.com/2021/day/1) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2021/day1/day1.rs) [![Python](../scripts/assets/python.png)](../2021/day1/day1.py) -[Day 2: Dive!](https://adventofcode.com/2021/day/2) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2021/day2/day2.rs) -[Day 3: Binary Diagnostic](https://adventofcode.com/2021/day/3) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2021/day3/day3.rs) -[Day 4: Giant Squid](https://adventofcode.com/2021/day/4) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2021/day4/day4.rs) [![Python](../scripts/assets/python.png)](../2021/day4/day4_bug.py) -[Day 5: Hydrothermal Venture](https://adventofcode.com/2021/day/5) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2021/day5/day5.rs) [![Python](../scripts/assets/python.png)](../2021/day5/day5.py) -[Day 6: Lanternfish](https://adventofcode.com/2021/day/6) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2021/day6/day6.rs) [![Python](../scripts/assets/python.png)](../2021/day6/day6.py) -[Day 7: The Treachery of Whales](https://adventofcode.com/2021/day/7) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2021/day7/day7.rs) -[Day 8: Seven Segment Search](https://adventofcode.com/2021/day/8) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2021/day8/day8.rs) [![Python](../scripts/assets/python.png)](../2021/day8/day8.py) -[Day 9: Smoke Basin](https://adventofcode.com/2021/day/9) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2021/day9/day9.rs) [![Python](../scripts/assets/python.png)](../2021/day9/day9.py) -[Day 10: Syntax Scoring](https://adventofcode.com/2021/day/10) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2021/day10/day10.rs) [![Python](../scripts/assets/python.png)](../2021/day10/day10.py) -[Day 11: Dumbo Octopus](https://adventofcode.com/2021/day/11) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2021/day11/day11.rs) -[Day 12: Passage Pathing](https://adventofcode.com/2021/day/12) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2021/day12/day12.rs) [![Python](../scripts/assets/python.png)](../2021/day12/day12.py) -[Day 13: Transparent Origami](https://adventofcode.com/2021/day/13) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2021/day13/day13.rs) [![Python](../scripts/assets/python.png)](../2021/day13/day13.py) -[Day 14: Extended Polymerization](https://adventofcode.com/2021/day/14) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2021/day14/day14.rs) -[Day 15: Chiton](https://adventofcode.com/2021/day/15) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2021/day15/day15.rs) -[Day 16: Packet Decoder](https://adventofcode.com/2021/day/16) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2021/day16/day16.rs) [![Python](../scripts/assets/python.png)](../2021/day16/day16.py) -[Day 17: Trick Shot](https://adventofcode.com/2021/day/17) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2021/day17/day17.rs) -[Day 18: Snailfish](https://adventofcode.com/2021/day/18) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2021/day18/day18.rs) [![Python](../scripts/assets/python.png)](../2021/day18/day18_eval.py) [![Python](../scripts/assets/python.png)](../2021/day18/day18.py) -[Day 19: Beacon Scanner](https://adventofcode.com/2021/day/19) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2021/day19/day19.rs) -[Day 20: Trench Map](https://adventofcode.com/2021/day/20) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2021/day20/day20.rs) -[Day 21: Dirac Dice](https://adventofcode.com/2021/day/21) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2021/day21/day21.rs) -[Day 22: Reactor Reboot](https://adventofcode.com/2021/day/22) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2021/day22/day22.rs) -[Day 23: Amphipod](https://adventofcode.com/2021/day/23) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2021/day23/day23.rs) -[Day 24: Arithmetic Logic Unit](https://adventofcode.com/2021/day/24) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2021/day24/day24.rs) -[Day 25: Sea Cucumber](https://adventofcode.com/2021/day/25) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2021/day25/day25.rs) [![Python](../scripts/assets/python.png)](../2021/day25/day25.py) +[Day 1: Sonar Sweep](https://adventofcode.com/2021/day/1) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day1/day1.rs) [![Python](../../scripts/assets/python.png)](day1/day1.py) +[Day 2: Dive!](https://adventofcode.com/2021/day/2) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day2/day2.rs) +[Day 3: Binary Diagnostic](https://adventofcode.com/2021/day/3) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day3/day3.rs) +[Day 4: Giant Squid](https://adventofcode.com/2021/day/4) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day4/day4.rs) [![Python](../../scripts/assets/python.png)](day4/day4_bug.py) +[Day 5: Hydrothermal Venture](https://adventofcode.com/2021/day/5) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day5/day5.rs) [![Python](../../scripts/assets/python.png)](day5/day5.py) +[Day 6: Lanternfish](https://adventofcode.com/2021/day/6) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day6/day6.rs) [![Python](../../scripts/assets/python.png)](day6/day6.py) +[Day 7: The Treachery of Whales](https://adventofcode.com/2021/day/7) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day7/day7.rs) +[Day 8: Seven Segment Search](https://adventofcode.com/2021/day/8) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day8/day8.rs) [![Python](../../scripts/assets/python.png)](day8/day8.py) +[Day 9: Smoke Basin](https://adventofcode.com/2021/day/9) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day9/day9.rs) [![Python](../../scripts/assets/python.png)](day9/day9.py) +[Day 10: Syntax Scoring](https://adventofcode.com/2021/day/10) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day10/day10.rs) [![Python](../../scripts/assets/python.png)](day10/day10.py) +[Day 11: Dumbo Octopus](https://adventofcode.com/2021/day/11) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day11/day11.rs) +[Day 12: Passage Pathing](https://adventofcode.com/2021/day/12) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day12/day12.rs) [![Python](../../scripts/assets/python.png)](day12/day12.py) +[Day 13: Transparent Origami](https://adventofcode.com/2021/day/13) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day13/day13.rs) [![Python](../../scripts/assets/python.png)](day13/day13.py) +[Day 14: Extended Polymerization](https://adventofcode.com/2021/day/14) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day14/day14.rs) +[Day 15: Chiton](https://adventofcode.com/2021/day/15) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day15/day15.rs) +[Day 16: Packet Decoder](https://adventofcode.com/2021/day/16) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day16/day16.rs) [![Python](../../scripts/assets/python.png)](day16/day16.py) +[Day 17: Trick Shot](https://adventofcode.com/2021/day/17) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day17/day17.rs) +[Day 18: Snailfish](https://adventofcode.com/2021/day/18) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day18/day18.rs) [![Python](../../scripts/assets/python.png)](day18/day18_eval.py) [![Python](../../scripts/assets/python.png)](day18/day18.py) +[Day 19: Beacon Scanner](https://adventofcode.com/2021/day/19) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day19/day19.rs) +[Day 20: Trench Map](https://adventofcode.com/2021/day/20) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day20/day20.rs) +[Day 21: Dirac Dice](https://adventofcode.com/2021/day/21) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day21/day21.rs) +[Day 22: Reactor Reboot](https://adventofcode.com/2021/day/22) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day22/day22.rs) +[Day 23: Amphipod](https://adventofcode.com/2021/day/23) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day23/day23.rs) +[Day 24: Arithmetic Logic Unit](https://adventofcode.com/2021/day/24) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day24/day24.rs) +[Day 25: Sea Cucumber](https://adventofcode.com/2021/day/25) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day25/day25.rs) [![Python](../../scripts/assets/python.png)](day25/day25.py) diff --git a/src/year2021/day1/day1.rs b/src/year2021/day1/day1.rs index 9e65def9..07fa7b62 100644 --- a/src/year2021/day1/day1.rs +++ b/src/year2021/day1/day1.rs @@ -6,7 +6,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, i32) { let mut prev_num = 999_999_999_u32; diff --git a/src/year2021/day10/day10.rs b/src/year2021/day10/day10.rs index b9d16568..87f30a29 100644 --- a/src/year2021/day10/day10.rs +++ b/src/year2021/day10/day10.rs @@ -6,7 +6,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, u64) { let mut part1 = 0; diff --git a/src/year2021/day11/day11.rs b/src/year2021/day11/day11.rs index de4f958b..b4b4af9a 100644 --- a/src/year2021/day11/day11.rs +++ b/src/year2021/day11/day11.rs @@ -6,7 +6,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, i32) { let data = data diff --git a/src/year2021/day12/day12.rs b/src/year2021/day12/day12.rs index aaa92914..a3886b7e 100644 --- a/src/year2021/day12/day12.rs +++ b/src/year2021/day12/day12.rs @@ -71,7 +71,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let small_once = compute_paths(data, false); diff --git a/src/year2021/day13/day13.rs b/src/year2021/day13/day13.rs index bb97f679..4665d334 100644 --- a/src/year2021/day13/day13.rs +++ b/src/year2021/day13/day13.rs @@ -8,7 +8,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, String) { let n = 2000; diff --git a/src/year2021/day14/day14.rs b/src/year2021/day14/day14.rs index eb236d0b..e0bba4cb 100644 --- a/src/year2021/day14/day14.rs +++ b/src/year2021/day14/day14.rs @@ -154,7 +154,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, u64) { let puzzle = Puzzle::new(data); diff --git a/src/year2021/day15/day15.rs b/src/year2021/day15/day15.rs index ec2c9161..0e5faf63 100644 --- a/src/year2021/day15/day15.rs +++ b/src/year2021/day15/day15.rs @@ -135,7 +135,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2021/day16/day16.rs b/src/year2021/day16/day16.rs index 3ce68afa..d57a85f4 100644 --- a/src/year2021/day16/day16.rs +++ b/src/year2021/day16/day16.rs @@ -76,7 +76,6 @@ fn read_packet(packet: &str, mut offset: usize, sum_of_versions: &mut u32) -> (u } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u64) { let bin_data: String = data diff --git a/src/year2021/day17/day17.rs b/src/year2021/day17/day17.rs index e4c6face..1b09c763 100644 --- a/src/year2021/day17/day17.rs +++ b/src/year2021/day17/day17.rs @@ -9,7 +9,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, i32) { let abs_min: i32; diff --git a/src/year2021/day18/day18.rs b/src/year2021/day18/day18.rs index 539efd70..46fbd22a 100644 --- a/src/year2021/day18/day18.rs +++ b/src/year2021/day18/day18.rs @@ -162,7 +162,6 @@ impl fmt::Display for Snailfish { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let numbers: Vec = data.lines().map(Snailfish::from_str).collect(); diff --git a/src/year2021/day19/day19.rs b/src/year2021/day19/day19.rs index 6eb66173..18a0c76b 100644 --- a/src/year2021/day19/day19.rs +++ b/src/year2021/day19/day19.rs @@ -29,7 +29,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, i32) { // load puzzle data diff --git a/src/year2021/day2/day2.rs b/src/year2021/day2/day2.rs index ff66dc50..eccc3c77 100644 --- a/src/year2021/day2/day2.rs +++ b/src/year2021/day2/day2.rs @@ -6,7 +6,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, i32) { (part1(data), part2(data)) diff --git a/src/year2021/day20/day20.rs b/src/year2021/day20/day20.rs index 3911c8da..9819e99d 100644 --- a/src/year2021/day20/day20.rs +++ b/src/year2021/day20/day20.rs @@ -12,7 +12,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let data = data diff --git a/src/year2021/day21/day21.rs b/src/year2021/day21/day21.rs index 9a110e4f..6ac5a4bf 100644 --- a/src/year2021/day21/day21.rs +++ b/src/year2021/day21/day21.rs @@ -8,7 +8,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u64) { let players = data.trim_ascii().split_once('\n').unwrap(); diff --git a/src/year2021/day22/day22.rs b/src/year2021/day22/day22.rs index 988ce3ce..50f832ce 100644 --- a/src/year2021/day22/day22.rs +++ b/src/year2021/day22/day22.rs @@ -129,7 +129,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, i64) { (part1(data), part2(data)) diff --git a/src/year2021/day23/day23.rs b/src/year2021/day23/day23.rs index 9046504e..3c2e90a1 100644 --- a/src/year2021/day23/day23.rs +++ b/src/year2021/day23/day23.rs @@ -264,7 +264,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let mut puzzle = Puzzle::new(data); diff --git a/src/year2021/day24/day24.rs b/src/year2021/day24/day24.rs index feb955c9..ca371739 100644 --- a/src/year2021/day24/day24.rs +++ b/src/year2021/day24/day24.rs @@ -178,7 +178,6 @@ const fn run_box(w: i64, z: i64, div: i64, n1: i64, n2: i64) -> i64 { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i64, i64) { let data = data diff --git a/src/year2021/day25/day25.rs b/src/year2021/day25/day25.rs index 57c1591d..ce6a5d36 100644 --- a/src/year2021/day25/day25.rs +++ b/src/year2021/day25/day25.rs @@ -6,7 +6,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, aoc::Christmas) { let data = data.lines().collect::>(); diff --git a/src/year2021/day3/day3.rs b/src/year2021/day3/day3.rs index 98c40631..e65b0bcf 100644 --- a/src/year2021/day3/day3.rs +++ b/src/year2021/day3/day3.rs @@ -6,7 +6,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, isize) { let data: Vec<_> = data.lines().collect(); diff --git a/src/year2021/day4/day4.rs b/src/year2021/day4/day4.rs index 2f308afc..2fe4d364 100644 --- a/src/year2021/day4/day4.rs +++ b/src/year2021/day4/day4.rs @@ -6,7 +6,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, i32) { let data = data diff --git a/src/year2021/day5/day5.rs b/src/year2021/day5/day5.rs index 633fcd74..3b70680b 100644 --- a/src/year2021/day5/day5.rs +++ b/src/year2021/day5/day5.rs @@ -8,7 +8,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, i32) { let re = Regex::new(r"^(\d+),(\d+) -> (\d+),(\d+)$").unwrap(); diff --git a/src/year2021/day6/day6.rs b/src/year2021/day6/day6.rs index 7ad890a1..4cb6f8ac 100644 --- a/src/year2021/day6/day6.rs +++ b/src/year2021/day6/day6.rs @@ -6,7 +6,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, u64) { let mut timers = [0u64; 9]; diff --git a/src/year2021/day7/day7.rs b/src/year2021/day7/day7.rs index b701e239..fe5f44b3 100644 --- a/src/year2021/day7/day7.rs +++ b/src/year2021/day7/day7.rs @@ -6,7 +6,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, i32) { let positions = data diff --git a/src/year2021/day8/day8.rs b/src/year2021/day8/day8.rs index c01644cd..b77a68f9 100644 --- a/src/year2021/day8/day8.rs +++ b/src/year2021/day8/day8.rs @@ -9,7 +9,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, u32) { (part1(data), part2(data)) diff --git a/src/year2021/day9/day9.rs b/src/year2021/day9/day9.rs index f413ace5..ad1f83a7 100644 --- a/src/year2021/day9/day9.rs +++ b/src/year2021/day9/day9.rs @@ -6,7 +6,6 @@ pub fn main() { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, i32) { let data = data diff --git a/src/year2021/ocr/ocr.py b/src/year2021/ocr/ocr.py index f908f680..244b4f93 120000 --- a/src/year2021/ocr/ocr.py +++ b/src/year2021/ocr/ocr.py @@ -1 +1 @@ -../../2022/ocr/ocr.py \ No newline at end of file +../../year2022/ocr/ocr.py \ No newline at end of file diff --git a/src/year2022/README.md b/src/year2022/README.md index d4cefd57..ca8d27d3 100644 --- a/src/year2022/README.md +++ b/src/year2022/README.md @@ -5,32 +5,32 @@ ![Rust: 26](https://img.shields.io/badge/Rust-26-cyan?logo=Rust) ![Python: 19](https://img.shields.io/badge/Python-19-cyan?logo=Python) -## 2022 ([Calendar](https://adventofcode.com/2022)) ([Solutions](../2022/)) : 50⭐ +## 2022 ([Calendar](https://adventofcode.com/2022)) ([Solutions](./)) : 50⭐ Puzzle | Stars | Languages ------------------------------------------------------------------------ | ----- | ----------- -[Day 1: Calorie Counting](https://adventofcode.com/2022/day/1) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2022/day1/day1.rs) [![Python](../scripts/assets/python.png)](../2022/day1/day1_oneliner.py) [![Python](../scripts/assets/python.png)](../2022/day1/day1.py) -[Day 2: Rock Paper Scissors](https://adventofcode.com/2022/day/2) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2022/day2/day2.rs) [![Python](../scripts/assets/python.png)](../2022/day2/day2.py) -[Day 3: Rucksack Reorganization](https://adventofcode.com/2022/day/3) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2022/day3/day3.rs) [![Python](../scripts/assets/python.png)](../2022/day3/day3.py) [![C](../scripts/assets/c.png)](../2022/day3/day3.c) -[Day 4: Camp Cleanup](https://adventofcode.com/2022/day/4) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2022/day4/day4.rs) [![Python](../scripts/assets/python.png)](../2022/day4/day4.py) -[Day 5: Supply Stacks](https://adventofcode.com/2022/day/5) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2022/day5/day5.rs) [![Python](../scripts/assets/python.png)](../2022/day5/day5.py) -[Day 6: Tuning Trouble](https://adventofcode.com/2022/day/6) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2022/day6/day6.rs) [![Python](../scripts/assets/python.png)](../2022/day6/day6.py) -[Day 7: No Space Left On Device](https://adventofcode.com/2022/day/7) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2022/day7/day7.rs) [![Python](../scripts/assets/python.png)](../2022/day7/day7.py) -[Day 8: Treetop Tree House](https://adventofcode.com/2022/day/8) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2022/day8/day8.rs) [![Python](../scripts/assets/python.png)](../2022/day8/day8.py) -[Day 9: Rope Bridge](https://adventofcode.com/2022/day/9) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2022/day9/day9.rs) [![Python](../scripts/assets/python.png)](../2022/day9/day9.py) -[Day 10: Cathode-Ray Tube](https://adventofcode.com/2022/day/10) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2022/day10/day10.rs) [![Python](../scripts/assets/python.png)](../2022/day10/day10.py) -[Day 11: Monkey in the Middle](https://adventofcode.com/2022/day/11) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2022/day11/day11.rs) [![Python](../scripts/assets/python.png)](../2022/day11/day11.py) [![C++](../scripts/assets/cpp.png)](../2022/day11/day11.cpp) -[Day 12: Hill Climbing Algorithm](https://adventofcode.com/2022/day/12) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2022/day12/day12.rs) [![Python](../scripts/assets/python.png)](../2022/day12/day12.py) -[Day 13: Distress Signal](https://adventofcode.com/2022/day/13) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2022/day13/day13.rs) [![Rust](../scripts/assets/rust.png)](../2022/day13_pest/day13.rs) [![Python](../scripts/assets/python.png)](../2022/day13_pest/day13.py) -[Day 14: Regolith Reservoir](https://adventofcode.com/2022/day/14) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2022/day14/day14.rs) [![Python](../scripts/assets/python.png)](../2022/day14/day14.py) -[Day 15: Beacon Exclusion Zone](https://adventofcode.com/2022/day/15) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2022/day15/day15.rs) [![Python](../scripts/assets/python.png)](../2022/day15/day15.py) -[Day 16: Proboscidea Volcanium](https://adventofcode.com/2022/day/16) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2022/day16/day16.rs) -[Day 17: Pyroclastic Flow](https://adventofcode.com/2022/day/17) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2022/day17/day17.rs) [![Python](../scripts/assets/python.png)](../2022/day17/day17.py) [🎁](../2022/day17/README.md) -[Day 18: Boiling Boulders](https://adventofcode.com/2022/day/18) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2022/day18/day18.rs) -[Day 19: Not Enough Minerals](https://adventofcode.com/2022/day/19) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2022/day19/day19.rs) -[Day 20: Grove Positioning System](https://adventofcode.com/2022/day/20) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2022/day20/day20.rs) -[Day 21: Monkey Math](https://adventofcode.com/2022/day/21) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2022/day21/day21.rs) [![Python](../scripts/assets/python.png)](../2022/day21/day21.py) -[Day 22: Monkey Map](https://adventofcode.com/2022/day/22) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2022/day22/day22.rs) -[Day 23: Unstable Diffusion](https://adventofcode.com/2022/day/23) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2022/day23/day23.rs) -[Day 24: Blizzard Basin](https://adventofcode.com/2022/day/24) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2022/day24/day24.rs) -[Day 25: Full of Hot Air](https://adventofcode.com/2022/day/25) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2022/day25/day25.rs) [![Python](../scripts/assets/python.png)](../2022/day25/day25.py) +[Day 1: Calorie Counting](https://adventofcode.com/2022/day/1) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day1/day1.rs) [![Python](../../scripts/assets/python.png)](day1/day1_oneliner.py) [![Python](../../scripts/assets/python.png)](day1/day1.py) +[Day 2: Rock Paper Scissors](https://adventofcode.com/2022/day/2) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day2/day2.rs) [![Python](../../scripts/assets/python.png)](day2/day2.py) +[Day 3: Rucksack Reorganization](https://adventofcode.com/2022/day/3) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day3/day3.rs) [![Python](../../scripts/assets/python.png)](day3/day3.py) [![C](../../scripts/assets/c.png)](day3/day3.c) +[Day 4: Camp Cleanup](https://adventofcode.com/2022/day/4) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day4/day4.rs) [![Python](../../scripts/assets/python.png)](day4/day4.py) +[Day 5: Supply Stacks](https://adventofcode.com/2022/day/5) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day5/day5.rs) [![Python](../../scripts/assets/python.png)](day5/day5.py) +[Day 6: Tuning Trouble](https://adventofcode.com/2022/day/6) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day6/day6.rs) [![Python](../../scripts/assets/python.png)](day6/day6.py) +[Day 7: No Space Left On Device](https://adventofcode.com/2022/day/7) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day7/day7.rs) [![Python](../../scripts/assets/python.png)](day7/day7.py) +[Day 8: Treetop Tree House](https://adventofcode.com/2022/day/8) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day8/day8.rs) [![Python](../../scripts/assets/python.png)](day8/day8.py) +[Day 9: Rope Bridge](https://adventofcode.com/2022/day/9) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day9/day9.rs) [![Python](../../scripts/assets/python.png)](day9/day9.py) +[Day 10: Cathode-Ray Tube](https://adventofcode.com/2022/day/10) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day10/day10.rs) [![Python](../../scripts/assets/python.png)](day10/day10.py) +[Day 11: Monkey in the Middle](https://adventofcode.com/2022/day/11) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day11/day11.rs) [![Python](../../scripts/assets/python.png)](day11/day11.py) [![C++](../../scripts/assets/cpp.png)](day11/day11.cpp) +[Day 12: Hill Climbing Algorithm](https://adventofcode.com/2022/day/12) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day12/day12.rs) [![Python](../../scripts/assets/python.png)](day12/day12.py) +[Day 13: Distress Signal](https://adventofcode.com/2022/day/13) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day13/day13.rs) [![Rust](../../scripts/assets/rust.png)](day13_pest/day13_pest.rs) [![Python](../../scripts/assets/python.png)](day13/day13.py) +[Day 14: Regolith Reservoir](https://adventofcode.com/2022/day/14) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day14/day14.rs) [![Python](../../scripts/assets/python.png)](day14/day14.py) +[Day 15: Beacon Exclusion Zone](https://adventofcode.com/2022/day/15) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day15/day15.rs) [![Python](../../scripts/assets/python.png)](day15/day15.py) +[Day 16: Proboscidea Volcanium](https://adventofcode.com/2022/day/16) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day16/day16.rs) +[Day 17: Pyroclastic Flow](https://adventofcode.com/2022/day/17) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day17/day17.rs) [![Python](../../scripts/assets/python.png)](day17/day17.py) [🎁](day17/README.md) +[Day 18: Boiling Boulders](https://adventofcode.com/2022/day/18) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day18/day18.rs) +[Day 19: Not Enough Minerals](https://adventofcode.com/2022/day/19) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day19/day19.rs) +[Day 20: Grove Positioning System](https://adventofcode.com/2022/day/20) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day20/day20.rs) +[Day 21: Monkey Math](https://adventofcode.com/2022/day/21) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day21/day21.rs) [![Python](../../scripts/assets/python.png)](day21/day21.py) +[Day 22: Monkey Map](https://adventofcode.com/2022/day/22) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day22/day22.rs) +[Day 23: Unstable Diffusion](https://adventofcode.com/2022/day/23) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day23/day23.rs) +[Day 24: Blizzard Basin](https://adventofcode.com/2022/day/24) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day24/day24.rs) +[Day 25: Full of Hot Air](https://adventofcode.com/2022/day/25) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day25/day25.rs) [![Python](../../scripts/assets/python.png)](day25/day25.py) diff --git a/src/year2022/day1/day1.rs b/src/year2022/day1/day1.rs index 8cc2a11c..959cc4b8 100644 --- a/src/year2022/day1/day1.rs +++ b/src/year2022/day1/day1.rs @@ -32,7 +32,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2022/day13_pest/day13.py b/src/year2022/day13/day13.py similarity index 100% rename from src/year2022/day13_pest/day13.py rename to src/year2022/day13/day13.py diff --git a/src/year2022/day13_pest/day13.rs b/src/year2022/day13_pest/day13_pest.rs similarity index 98% rename from src/year2022/day13_pest/day13.rs rename to src/year2022/day13_pest/day13_pest.rs index 24226e75..f61d6e0a 100644 --- a/src/year2022/day13_pest/day13.rs +++ b/src/year2022/day13_pest/day13_pest.rs @@ -6,7 +6,7 @@ use pest_derive::Parser; use std::cmp::Ordering; #[derive(Parser)] -#[grammar = "day13.pest"] +#[grammar = "./src/year2022/day13_pest/day13.pest"] struct PacketParser; fn cmp(a: &str, b: &str) -> Ordering { diff --git a/src/year2022/day15/day15.py b/src/year2022/day15/day15.py index ff3d8303..dfa169bb 100755 --- a/src/year2022/day15/day15.py +++ b/src/year2022/day15/day15.py @@ -96,12 +96,12 @@ def __init__(self, start, end): else: pass - assert union[0].start <= 0 - assert union[-1].end >= max_y + # assert union[0].start <= 0 + # assert union[-1].end >= max_y if len(union) > 1: - assert len(union) == 2 - assert union[0].end + 1 == union[1].start + # assert len(union) == 2 + # assert union[0].end + 1 == union[1].start x = union[0].end part2 = x * 4_000_000 + y break diff --git a/src/year2022/day17/day17.rs b/src/year2022/day17/day17.rs index b7281177..bfd098c8 100644 --- a/src/year2022/day17/day17.rs +++ b/src/year2022/day17/day17.rs @@ -122,7 +122,6 @@ impl Cave { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let jets: Vec = data.trim().bytes().collect(); diff --git a/src/year2022/day2/day2.rs b/src/year2022/day2/day2.rs index c1feaa40..46cab94a 100644 --- a/src/year2022/day2/day2.rs +++ b/src/year2022/day2/day2.rs @@ -85,7 +85,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2022/day21/day21.rs b/src/year2022/day21/day21.rs index 2f5f905d..34b92b10 100644 --- a/src/year2022/day21/day21.rs +++ b/src/year2022/day21/day21.rs @@ -1,6 +1,5 @@ //! [Day 21: Monkey Math](https://adventofcode.com/2022/day/21) -#![allow(clippy::option_if_let_else)] use num::Rational64; use rustc_hash::FxHashMap; @@ -51,8 +50,11 @@ impl Puzzle { } fn eval(&self, var: &str) -> i64 { - if let Some(m) = self.monkeys.get(var) { - match m { + self.monkeys.get(var).map_or_else( + || { + panic!("???"); + }, + |m| match m { Job::Number(n) => *n, Job::Operation((l, o, r)) => { let l = self.eval(l); @@ -66,10 +68,8 @@ impl Puzzle { _ => panic!("unknown operation"), } } - } - } else { - panic!("???"); - } + }, + ) } fn eval_sym(&self, var: &str) -> Affine { diff --git a/src/year2022/day3/day3.rs b/src/year2022/day3/day3.rs index fe9a20b8..c6615789 100644 --- a/src/year2022/day3/day3.rs +++ b/src/year2022/day3/day3.rs @@ -56,7 +56,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2022/day4/day4.rs b/src/year2022/day4/day4.rs index af22caa0..3a1c5373 100644 --- a/src/year2022/day4/day4.rs +++ b/src/year2022/day4/day4.rs @@ -4,7 +4,6 @@ use regex::Regex; use std::cmp::{max, min}; /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let re = Regex::new(r"^(\d+)-(\d+),(\d+)-(\d+)").unwrap(); diff --git a/src/year2022/day5/day5.rs b/src/year2022/day5/day5.rs index cbccacd7..d73d01ec 100644 --- a/src/year2022/day5/day5.rs +++ b/src/year2022/day5/day5.rs @@ -97,7 +97,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (String, String) { let puzzle = Puzzle::new(data); diff --git a/src/year2022/day7/day7.rs b/src/year2022/day7/day7.rs index d3cee31b..ff83991e 100644 --- a/src/year2022/day7/day7.rs +++ b/src/year2022/day7/day7.rs @@ -1,12 +1,9 @@ //! [Day 7: No Space Left On Device](https://adventofcode.com/2022/day/7) -#![allow(clippy::if_same_then_else)] - use rustc_hash::FxHashMap; use std::path::PathBuf; struct Puzzle { - // Puzzle input total_dir_size: FxHashMap, } @@ -32,9 +29,7 @@ impl Puzzle { let key = current_path.as_path().to_str().unwrap().to_string(); dir_size.entry(key).or_insert(0); - } else if line == "$ ls" { - // nothing to do - } else if line.starts_with("dir ") { + } else if line == "$ ls" || line.starts_with("dir ") { // nothing to do } else if !line.is_empty() { // diff --git a/src/year2023/README.md b/src/year2023/README.md index be23d232..9592796b 100644 --- a/src/year2023/README.md +++ b/src/year2023/README.md @@ -5,32 +5,32 @@ ![Rust: 25](https://img.shields.io/badge/Rust-25-cyan?logo=Rust) ![Python: 11](https://img.shields.io/badge/Python-11-cyan?logo=Python) -## 2023 ([Calendar](https://adventofcode.com/2023)) ([Solutions](../2023/)) : 50⭐ +## 2023 ([Calendar](https://adventofcode.com/2023)) ([Solutions](./)) : 50⭐ Puzzle | Stars | Languages ----------------------------------------------------------------------------- | ----- | ----------- -[Day 1: Trebuchet?!](https://adventofcode.com/2023/day/1) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2023/day1/day1.rs) [![Python](../scripts/assets/python.png)](../2023/day1/day1.py) -[Day 2: Cube Conundrum](https://adventofcode.com/2023/day/2) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2023/day2/day2.rs) [![Python](../scripts/assets/python.png)](../2023/day2/day2.py) -[Day 3: Gear Ratios](https://adventofcode.com/2023/day/3) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2023/day3/day3.rs) [![Python](../scripts/assets/python.png)](../2023/day3/day3.py) -[Day 4: Scratchcards](https://adventofcode.com/2023/day/4) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2023/day4/day4.rs) [![Python](../scripts/assets/python.png)](../2023/day4/day4.py) -[Day 5: If You Give A Seed A Fertilizer](https://adventofcode.com/2023/day/5) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2023/day5/day5.rs) [![Python](../scripts/assets/python.png)](../2023/day5/day5_bruteforce.py) -[Day 6: Wait For It](https://adventofcode.com/2023/day/6) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2023/day6/day6.rs) [![Python](../scripts/assets/python.png)](../2023/day6/day6.py) -[Day 7: Camel Cards](https://adventofcode.com/2023/day/7) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2023/day7/day7.rs) -[Day 8: Haunted Wasteland](https://adventofcode.com/2023/day/8) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2023/day8/day8.rs) -[Day 9: Mirage Maintenance](https://adventofcode.com/2023/day/9) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2023/day9/day9.rs) [![Python](../scripts/assets/python.png)](../2023/day9/day9.py) -[Day 10: Pipe Maze](https://adventofcode.com/2023/day/10) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2023/day10/day10.rs) [![Python](../scripts/assets/python.png)](../2023/day10/day10.py) [🎁](../2023/day10/README.md) -[Day 11: Cosmic Expansion](https://adventofcode.com/2023/day/11) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2023/day11/day11.rs) -[Day 12: Hot Springs](https://adventofcode.com/2023/day/12) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2023/day12/day12.rs) -[Day 13: Point of Incidence](https://adventofcode.com/2023/day/13) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2023/day13/day13.rs) -[Day 14: Parabolic Reflector Dish](https://adventofcode.com/2023/day/14) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2023/day14/day14.rs) -[Day 15: Lens Library](https://adventofcode.com/2023/day/15) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2023/day15/day15.rs) -[Day 16: The Floor Will Be Lava](https://adventofcode.com/2023/day/16) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2023/day16/day16.rs) [![Python](../scripts/assets/python.png)](../2023/day16/day16.py) -[Day 17: Clumsy Crucible](https://adventofcode.com/2023/day/17) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2023/day17/day17.rs) -[Day 18: Lavaduct Lagoon](https://adventofcode.com/2023/day/18) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2023/day18/day18.rs) -[Day 19: Aplenty](https://adventofcode.com/2023/day/19) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2023/day19/day19.rs) -[Day 20: Pulse Propagation](https://adventofcode.com/2023/day/20) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2023/day20/day20.rs) -[Day 21: Step Counter](https://adventofcode.com/2023/day/21) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2023/day21/day21.rs) -[Day 22: Sand Slabs](https://adventofcode.com/2023/day/22) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2023/day22/day22.rs) -[Day 23: A Long Walk](https://adventofcode.com/2023/day/23) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2023/day23/day23.rs) -[Day 24: Never Tell Me The Odds](https://adventofcode.com/2023/day/24) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2023/day24/day24.rs) [![Python](../scripts/assets/python.png)](../2023/day24/day24.py) -[Day 25: Snowverload](https://adventofcode.com/2023/day/25) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2023/day25/day25.rs) [![Python](../scripts/assets/python.png)](../2023/day25/day25.py) +[Day 1: Trebuchet?!](https://adventofcode.com/2023/day/1) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day1/day1.rs) [![Python](../../scripts/assets/python.png)](day1/day1.py) +[Day 2: Cube Conundrum](https://adventofcode.com/2023/day/2) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day2/day2.rs) [![Python](../../scripts/assets/python.png)](day2/day2.py) +[Day 3: Gear Ratios](https://adventofcode.com/2023/day/3) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day3/day3.rs) [![Python](../../scripts/assets/python.png)](day3/day3.py) +[Day 4: Scratchcards](https://adventofcode.com/2023/day/4) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day4/day4.rs) [![Python](../../scripts/assets/python.png)](day4/day4.py) +[Day 5: If You Give A Seed A Fertilizer](https://adventofcode.com/2023/day/5) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day5/day5.rs) [![Python](../../scripts/assets/python.png)](day5/day5_bruteforce.py) +[Day 6: Wait For It](https://adventofcode.com/2023/day/6) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day6/day6.rs) [![Python](../../scripts/assets/python.png)](day6/day6.py) +[Day 7: Camel Cards](https://adventofcode.com/2023/day/7) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day7/day7.rs) +[Day 8: Haunted Wasteland](https://adventofcode.com/2023/day/8) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day8/day8.rs) +[Day 9: Mirage Maintenance](https://adventofcode.com/2023/day/9) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day9/day9.rs) [![Python](../../scripts/assets/python.png)](day9/day9.py) +[Day 10: Pipe Maze](https://adventofcode.com/2023/day/10) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day10/day10.rs) [![Python](../../scripts/assets/python.png)](day10/day10.py) [🎁](day10/README.md) +[Day 11: Cosmic Expansion](https://adventofcode.com/2023/day/11) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day11/day11.rs) +[Day 12: Hot Springs](https://adventofcode.com/2023/day/12) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day12/day12.rs) +[Day 13: Point of Incidence](https://adventofcode.com/2023/day/13) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day13/day13.rs) +[Day 14: Parabolic Reflector Dish](https://adventofcode.com/2023/day/14) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day14/day14.rs) +[Day 15: Lens Library](https://adventofcode.com/2023/day/15) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day15/day15.rs) +[Day 16: The Floor Will Be Lava](https://adventofcode.com/2023/day/16) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day16/day16.rs) [![Python](../../scripts/assets/python.png)](day16/day16.py) +[Day 17: Clumsy Crucible](https://adventofcode.com/2023/day/17) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day17/day17.rs) +[Day 18: Lavaduct Lagoon](https://adventofcode.com/2023/day/18) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day18/day18.rs) +[Day 19: Aplenty](https://adventofcode.com/2023/day/19) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day19/day19.rs) +[Day 20: Pulse Propagation](https://adventofcode.com/2023/day/20) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day20/day20.rs) +[Day 21: Step Counter](https://adventofcode.com/2023/day/21) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day21/day21.rs) +[Day 22: Sand Slabs](https://adventofcode.com/2023/day/22) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day22/day22.rs) +[Day 23: A Long Walk](https://adventofcode.com/2023/day/23) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day23/day23.rs) +[Day 24: Never Tell Me The Odds](https://adventofcode.com/2023/day/24) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day24/day24.rs) [![Python](../../scripts/assets/python.png)](day24/day24.py) +[Day 25: Snowverload](https://adventofcode.com/2023/day/25) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day25/day25.rs) [![Python](../../scripts/assets/python.png)](day25/day25.py) diff --git a/src/year2023/day1/day1.rs b/src/year2023/day1/day1.rs index b8c66a7b..75b86dfb 100644 --- a/src/year2023/day1/day1.rs +++ b/src/year2023/day1/day1.rs @@ -75,7 +75,6 @@ impl<'a> Puzzle<'a> { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2023/day10/day10.rs b/src/year2023/day10/day10.rs index 4a23d91e..cc1c8c17 100644 --- a/src/year2023/day10/day10.rs +++ b/src/year2023/day10/day10.rs @@ -128,7 +128,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2023/day11/day11.rs b/src/year2023/day11/day11.rs index b60c7465..d92a6af2 100644 --- a/src/year2023/day11/day11.rs +++ b/src/year2023/day11/day11.rs @@ -82,7 +82,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, u64) { let puzzle = Puzzle::new(data); diff --git a/src/year2023/day12/day12.rs b/src/year2023/day12/day12.rs index 3ea00b40..19f2d771 100644 --- a/src/year2023/day12/day12.rs +++ b/src/year2023/day12/day12.rs @@ -111,7 +111,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, u64) { let puzzle = Puzzle::new(data); diff --git a/src/year2023/day13/day13.rs b/src/year2023/day13/day13.rs index b2c10bc1..fc7dd69c 100644 --- a/src/year2023/day13/day13.rs +++ b/src/year2023/day13/day13.rs @@ -107,7 +107,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2023/day14/day14.rs b/src/year2023/day14/day14.rs index b37da8d2..36cd09f7 100644 --- a/src/year2023/day14/day14.rs +++ b/src/year2023/day14/day14.rs @@ -257,7 +257,6 @@ impl<'a> Puzzle<'a> { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2023/day15/day15.rs b/src/year2023/day15/day15.rs index 643964f6..be2f560c 100644 --- a/src/year2023/day15/day15.rs +++ b/src/year2023/day15/day15.rs @@ -65,7 +65,6 @@ impl<'a> Puzzle<'a> { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2023/day16/day16.rs b/src/year2023/day16/day16.rs index 93baefec..fdd52b60 100644 --- a/src/year2023/day16/day16.rs +++ b/src/year2023/day16/day16.rs @@ -146,7 +146,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let mut puzzle = Puzzle::new(data); diff --git a/src/year2023/day17/day17.rs b/src/year2023/day17/day17.rs index 72bcd568..297f6133 100644 --- a/src/year2023/day17/day17.rs +++ b/src/year2023/day17/day17.rs @@ -182,7 +182,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2023/day18/day18.rs b/src/year2023/day18/day18.rs index 558a5965..ee4e8581 100644 --- a/src/year2023/day18/day18.rs +++ b/src/year2023/day18/day18.rs @@ -86,7 +86,6 @@ impl<'a> Puzzle<'a> { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i64, i64) { let puzzle = Puzzle::new(data); diff --git a/src/year2023/day19/day19.rs b/src/year2023/day19/day19.rs index a288efd5..09ba5e47 100644 --- a/src/year2023/day19/day19.rs +++ b/src/year2023/day19/day19.rs @@ -303,7 +303,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, u64) { let puzzle = Puzzle::new(data); diff --git a/src/year2023/day2/day2.rs b/src/year2023/day2/day2.rs index e762edea..ca393759 100644 --- a/src/year2023/day2/day2.rs +++ b/src/year2023/day2/day2.rs @@ -99,7 +99,6 @@ impl<'a> Puzzle<'a> { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2023/day20/day20.rs b/src/year2023/day20/day20.rs index 6aa56e6f..72fe1677 100644 --- a/src/year2023/day20/day20.rs +++ b/src/year2023/day20/day20.rs @@ -253,7 +253,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u64) { let mut puzzle = Puzzle::new(data); diff --git a/src/year2023/day21/day21.rs b/src/year2023/day21/day21.rs index ca3f65ba..c7640618 100644 --- a/src/year2023/day21/day21.rs +++ b/src/year2023/day21/day21.rs @@ -92,7 +92,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, u64) { let puzzle = Puzzle::new(data); diff --git a/src/year2023/day22/day22.rs b/src/year2023/day22/day22.rs index edc6313b..c03a414e 100644 --- a/src/year2023/day22/day22.rs +++ b/src/year2023/day22/day22.rs @@ -148,7 +148,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2023/day23/day23.rs b/src/year2023/day23/day23.rs index 9d8746e3..4039df8f 100644 --- a/src/year2023/day23/day23.rs +++ b/src/year2023/day23/day23.rs @@ -136,7 +136,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, i32) { let puzzle = Puzzle::new(data); diff --git a/src/year2023/day24/day24.rs b/src/year2023/day24/day24.rs index c531b0d4..58cb240e 100644 --- a/src/year2023/day24/day24.rs +++ b/src/year2023/day24/day24.rs @@ -160,7 +160,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, i64) { let puzzle = Puzzle::new(data); diff --git a/src/year2023/day25/day25.rs b/src/year2023/day25/day25.rs index 04f3e256..54a126c7 100644 --- a/src/year2023/day25/day25.rs +++ b/src/year2023/day25/day25.rs @@ -46,7 +46,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, aoc::Christmas) { let puzzle = Puzzle::new(data); diff --git a/src/year2023/day3/day3.rs b/src/year2023/day3/day3.rs index 24069359..7b39700a 100644 --- a/src/year2023/day3/day3.rs +++ b/src/year2023/day3/day3.rs @@ -105,7 +105,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, u64) { let mut puzzle = Puzzle::new(data); diff --git a/src/year2023/day4/day4.rs b/src/year2023/day4/day4.rs index b1949e2e..c42b4286 100644 --- a/src/year2023/day4/day4.rs +++ b/src/year2023/day4/day4.rs @@ -61,7 +61,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2023/day5/day5.rs b/src/year2023/day5/day5.rs index 63a3632f..98019e4a 100644 --- a/src/year2023/day5/day5.rs +++ b/src/year2023/day5/day5.rs @@ -166,7 +166,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, u64) { let puzzle = Puzzle::new(data); diff --git a/src/year2023/day6/day6.rs b/src/year2023/day6/day6.rs index 687866d8..ee6016d3 100644 --- a/src/year2023/day6/day6.rs +++ b/src/year2023/day6/day6.rs @@ -67,7 +67,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, u64) { let puzzle = Puzzle::new(data); diff --git a/src/year2023/day7/day7.rs b/src/year2023/day7/day7.rs index a8cb43f0..3f9e7ebb 100644 --- a/src/year2023/day7/day7.rs +++ b/src/year2023/day7/day7.rs @@ -104,7 +104,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2023/day8/day8.rs b/src/year2023/day8/day8.rs index 9cf3b506..40cda206 100644 --- a/src/year2023/day8/day8.rs +++ b/src/year2023/day8/day8.rs @@ -101,7 +101,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, u64) { let puzzle = Puzzle::new(data); diff --git a/src/year2023/day9/day9.rs b/src/year2023/day9/day9.rs index d5af9560..a44fc68f 100644 --- a/src/year2023/day9/day9.rs +++ b/src/year2023/day9/day9.rs @@ -72,7 +72,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i64, i64) { let puzzle = Puzzle::new(data); diff --git a/src/year2024/README.md b/src/year2024/README.md index 9c530af5..c71043fd 100644 --- a/src/year2024/README.md +++ b/src/year2024/README.md @@ -5,32 +5,32 @@ ![Rust: 26](https://img.shields.io/badge/Rust-26-cyan?logo=Rust) ![Python: 10](https://img.shields.io/badge/Python-10-cyan?logo=Python) -## 2024 ([Calendar](https://adventofcode.com/2024)) ([Solutions](../2024/)) : 50⭐ +## 2024 ([Calendar](https://adventofcode.com/2024)) ([Solutions](./)) : 50⭐ Puzzle | Stars | Languages ---------------------------------------------------------------------- | ----- | ----------- -[Day 1: Historian Hysteria](https://adventofcode.com/2024/day/1) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2024/day1/day1.rs) [![Python](../scripts/assets/python.png)](../2024/day1/day1.py) [![C](../scripts/assets/c.png)](../2024/day1/day1.c) [![C++](../scripts/assets/cpp.png)](../2024/day1/day1.cpp) [![Go](../scripts/assets/go.png)](../2024/day1/day1.go) [![Ruby](../scripts/assets/ruby.png)](../2024/day1/day1.rb) [![Perl](../scripts/assets/perl.png)](../2024/day1/day1.pl) [![Lua](../scripts/assets/lua.png)](../2024/day1/day1.lua) [![JS](../scripts/assets/javascript.png)](../2024/day1/day1.js) [![Bash](../scripts/assets/bash.png)](../2024/day1/day1.sh) [![Swift](../scripts/assets/swift.png)](../2024/day1/day1.swift) [![Java](../scripts/assets/java.png)](../2024/day1/day1.java) [![C#](../scripts/assets/csharp.png)](../2024/day1/day1.cs) [![SQLite](../scripts/assets/sqlite.png)](../2024/day1/day1.sql) [![Linux Kernel](../scripts/assets/kernel.png)](../2024/day1/day1.kernel) -[Day 2: Red-Nosed Reports](https://adventofcode.com/2024/day/2) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2024/day2/day2.rs) [![Python](../scripts/assets/python.png)](../2024/day2/day2.py) [![Go](../scripts/assets/go.png)](../2024/day2/day2.go) -[Day 3: Mull It Over](https://adventofcode.com/2024/day/3) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2024/day3/day3.rs) [![Python](../scripts/assets/python.png)](../2024/day3/day3.py) [![Go](../scripts/assets/go.png)](../2024/day3/day3.go) [![Perl](../scripts/assets/perl.png)](../2024/day3/day3.pl) -[Day 4: Ceres Search](https://adventofcode.com/2024/day/4) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2024/day4/day4.rs) [![Python](../scripts/assets/python.png)](../2024/day4/day4.py) -[Day 5: Print Queue](https://adventofcode.com/2024/day/5) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2024/day5/day5.rs) -[Day 6: Guard Gallivant](https://adventofcode.com/2024/day/6) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2024/day6/day6.rs) -[Day 7: Bridge Repair](https://adventofcode.com/2024/day/7) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2024/day7/day7.rs) [![Python](../scripts/assets/python.png)](../2024/day7/day7.py) [![Go](../scripts/assets/go.png)](../2024/day7/day7.go) -[Day 8: Resonant Collinearity](https://adventofcode.com/2024/day/8) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2024/day8/day8.rs) [![Python](../scripts/assets/python.png)](../2024/day8/day8.py) -[Day 9: Disk Fragmenter](https://adventofcode.com/2024/day/9) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2024/day9/day9.rs) -[Day 10: Hoof It](https://adventofcode.com/2024/day/10) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2024/day10/day10.rs) -[Day 11: Plutonian Pebbles](https://adventofcode.com/2024/day/11) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2024/day11/day11.rs) [![Go](../scripts/assets/go.png)](../2024/day11/day11.go) -[Day 12: Garden Groups](https://adventofcode.com/2024/day/12) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2024/day12/day12.rs) -[Day 13: Claw Contraption](https://adventofcode.com/2024/day/13) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2024/day13/day13.rs) [![Rust](../scripts/assets/rust.png)](../2024/day13_z3/day13.rs) [![Python](../scripts/assets/python.png)](../2024/day13_z3/day13.py) -[Day 14: Restroom Redoubt](https://adventofcode.com/2024/day/14) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2024/day14/day14.rs) [![Python](../scripts/assets/python.png)](../2024/day14/day14.py) [🎁](../2024/day14/README.md) -[Day 15: Warehouse Woes](https://adventofcode.com/2024/day/15) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2024/day15/day15.rs) [🎁](../2024/day15/README.md) -[Day 16: Reindeer Maze](https://adventofcode.com/2024/day/16) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2024/day16/day16.rs) [🎁](../2024/day16/README.md) -[Day 17: Chronospatial Computer](https://adventofcode.com/2024/day/17) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2024/day17/day17.rs) -[Day 18: RAM Run](https://adventofcode.com/2024/day/18) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2024/day18/day18.rs) [![C++](../scripts/assets/cpp.png)](../2024/day18/day18.cpp) [![Go](../scripts/assets/go.png)](../2024/day18/day18.go) -[Day 19: Linen Layout](https://adventofcode.com/2024/day/19) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2024/day19/day19.rs) -[Day 20: Race Condition](https://adventofcode.com/2024/day/20) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2024/day20/day20.rs) -[Day 21: Keypad Conundrum](https://adventofcode.com/2024/day/21) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2024/day21/day21.rs) -[Day 22: Monkey Market](https://adventofcode.com/2024/day/22) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2024/day22/day22.rs) -[Day 23: LAN Party](https://adventofcode.com/2024/day/23) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2024/day23/day23.rs) [![Python](../scripts/assets/python.png)](../2024/day23/day23.py) -[Day 24: Crossed Wires](https://adventofcode.com/2024/day/24) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2024/day24/day24.rs) -[Day 25: Code Chronicle](https://adventofcode.com/2024/day/25) | ⭐⭐ | [![Rust](../scripts/assets/rust.png)](../2024/day25/day25.rs) [![Python](../scripts/assets/python.png)](../2024/day25/day25.py) [![Go](../scripts/assets/go.png)](../2024/day25/day25.go) +[Day 1: Historian Hysteria](https://adventofcode.com/2024/day/1) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day1/day1.rs) [![Python](../../scripts/assets/python.png)](day1/day1.py) [![C](../../scripts/assets/c.png)](day1/day1.c) [![C++](../../scripts/assets/cpp.png)](day1/day1.cpp) [![Go](../../scripts/assets/go.png)](day1/day1.go) [![Ruby](../../scripts/assets/ruby.png)](day1/day1.rb) [![Perl](../../scripts/assets/perl.png)](day1/day1.pl) [![Lua](../../scripts/assets/lua.png)](day1/day1.lua) [![JS](../../scripts/assets/javascript.png)](day1/day1.js) [![Bash](../../scripts/assets/bash.png)](day1/day1.sh) [![Swift](../../scripts/assets/swift.png)](day1/day1.swift) [![Java](../../scripts/assets/java.png)](day1/day1.java) [![C#](../../scripts/assets/csharp.png)](day1/day1.cs) [![SQLite](../../scripts/assets/sqlite.png)](day1/day1.sql) +[Day 2: Red-Nosed Reports](https://adventofcode.com/2024/day/2) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day2/day2.rs) [![Python](../../scripts/assets/python.png)](day2/day2.py) [![Go](../../scripts/assets/go.png)](day2/day2.go) +[Day 3: Mull It Over](https://adventofcode.com/2024/day/3) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day3/day3.rs) [![Python](../../scripts/assets/python.png)](day3/day3.py) [![Go](../../scripts/assets/go.png)](day3/day3.go) [![Perl](../../scripts/assets/perl.png)](day3/day3.pl) +[Day 4: Ceres Search](https://adventofcode.com/2024/day/4) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day4/day4.rs) [![Python](../../scripts/assets/python.png)](day4/day4.py) +[Day 5: Print Queue](https://adventofcode.com/2024/day/5) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day5/day5.rs) +[Day 6: Guard Gallivant](https://adventofcode.com/2024/day/6) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day6/day6.rs) +[Day 7: Bridge Repair](https://adventofcode.com/2024/day/7) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day7/day7.rs) [![Python](../../scripts/assets/python.png)](day7/day7.py) [![Go](../../scripts/assets/go.png)](day7/day7.go) +[Day 8: Resonant Collinearity](https://adventofcode.com/2024/day/8) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day8/day8.rs) [![Python](../../scripts/assets/python.png)](day8/day8.py) +[Day 9: Disk Fragmenter](https://adventofcode.com/2024/day/9) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day9/day9.rs) +[Day 10: Hoof It](https://adventofcode.com/2024/day/10) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day10/day10.rs) +[Day 11: Plutonian Pebbles](https://adventofcode.com/2024/day/11) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day11/day11.rs) [![Go](../../scripts/assets/go.png)](day11/day11.go) +[Day 12: Garden Groups](https://adventofcode.com/2024/day/12) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day12/day12.rs) +[Day 13: Claw Contraption](https://adventofcode.com/2024/day/13) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day13/day13.rs) [![Rust](../../scripts/assets/rust.png)](day13_z3/day13_z3.rs) [![Python](../../scripts/assets/python.png)](day13_z3/day13.py) +[Day 14: Restroom Redoubt](https://adventofcode.com/2024/day/14) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day14/day14.rs) [![Python](../../scripts/assets/python.png)](day14/day14.py) [🎁](day14/README.md) +[Day 15: Warehouse Woes](https://adventofcode.com/2024/day/15) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day15/day15.rs) [🎁](day15/README.md) +[Day 16: Reindeer Maze](https://adventofcode.com/2024/day/16) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day16/day16.rs) [🎁](day16/README.md) +[Day 17: Chronospatial Computer](https://adventofcode.com/2024/day/17) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day17/day17.rs) +[Day 18: RAM Run](https://adventofcode.com/2024/day/18) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day18/day18.rs) [![C++](../../scripts/assets/cpp.png)](day18/day18.cpp) [![Go](../../scripts/assets/go.png)](day18/day18.go) +[Day 19: Linen Layout](https://adventofcode.com/2024/day/19) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day19/day19.rs) +[Day 20: Race Condition](https://adventofcode.com/2024/day/20) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day20/day20.rs) +[Day 21: Keypad Conundrum](https://adventofcode.com/2024/day/21) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day21/day21.rs) +[Day 22: Monkey Market](https://adventofcode.com/2024/day/22) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day22/day22.rs) +[Day 23: LAN Party](https://adventofcode.com/2024/day/23) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day23/day23.rs) [![Python](../../scripts/assets/python.png)](day23/day23.py) +[Day 24: Crossed Wires](https://adventofcode.com/2024/day/24) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day24/day24.rs) +[Day 25: Code Chronicle](https://adventofcode.com/2024/day/25) | ⭐⭐ | [![Rust](../../scripts/assets/rust.png)](day25/day25.rs) [![Python](../../scripts/assets/python.png)](day25/day25.py) [![Go](../../scripts/assets/go.png)](day25/day25.go) diff --git a/src/year2024/day1/day1.rs b/src/year2024/day1/day1.rs index 135dcb14..2fc68118 100644 --- a/src/year2024/day1/day1.rs +++ b/src/year2024/day1/day1.rs @@ -55,7 +55,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, i32) { let puzzle = Puzzle::new(data); diff --git a/src/year2024/day10/day10.rs b/src/year2024/day10/day10.rs index cb04bea6..90f06c66 100644 --- a/src/year2024/day10/day10.rs +++ b/src/year2024/day10/day10.rs @@ -74,7 +74,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2024/day11/day11.rs b/src/year2024/day11/day11.rs index f95ad3e6..32650d7e 100644 --- a/src/year2024/day11/day11.rs +++ b/src/year2024/day11/day11.rs @@ -80,7 +80,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, u64) { let puzzle = Puzzle::new(data); diff --git a/src/year2024/day12/day12.rs b/src/year2024/day12/day12.rs index 5ce36bb8..917387fc 100644 --- a/src/year2024/day12/day12.rs +++ b/src/year2024/day12/day12.rs @@ -7,7 +7,6 @@ use std::collections::VecDeque; type Grid = aoc::Grid; /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let grid = Grid::parse(data); diff --git a/src/year2024/day13/day13.rs b/src/year2024/day13/day13.rs index 3ca9dc9e..fe435d1b 100644 --- a/src/year2024/day13/day13.rs +++ b/src/year2024/day13/day13.rs @@ -75,7 +75,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i64, i64) { let puzzle = Puzzle::new(data); diff --git a/src/year2024/day13_z3/day13.rs b/src/year2024/day13_z3/day13_z3.rs similarity index 99% rename from src/year2024/day13_z3/day13.rs rename to src/year2024/day13_z3/day13_z3.rs index 692fcf5e..eb4e9096 100644 --- a/src/year2024/day13_z3/day13.rs +++ b/src/year2024/day13_z3/day13_z3.rs @@ -88,7 +88,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, u64) { let puzzle = Puzzle::new(data); diff --git a/src/year2024/day14/day14.rs b/src/year2024/day14/day14.rs index 8675d4ba..2ec3c01b 100644 --- a/src/year2024/day14/day14.rs +++ b/src/year2024/day14/day14.rs @@ -99,7 +99,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, i32) { let puzzle = Puzzle::new(data); diff --git a/src/year2024/day15/day15.rs b/src/year2024/day15/day15.rs index 9942a138..7432d844 100644 --- a/src/year2024/day15/day15.rs +++ b/src/year2024/day15/day15.rs @@ -289,7 +289,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, i32) { let puzzle = Puzzle::new(data); diff --git a/src/year2024/day16/day16.rs b/src/year2024/day16/day16.rs index 36c9d6c8..f72f6af9 100644 --- a/src/year2024/day16/day16.rs +++ b/src/year2024/day16/day16.rs @@ -276,7 +276,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2024/day17/day17.rs b/src/year2024/day17/day17.rs index cf4dceb5..4144405c 100644 --- a/src/year2024/day17/day17.rs +++ b/src/year2024/day17/day17.rs @@ -195,7 +195,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (String, u64) { let puzzle = Puzzle::new(data); diff --git a/src/year2024/day18/day18.rs b/src/year2024/day18/day18.rs index 5e2db1cf..a83abb88 100644 --- a/src/year2024/day18/day18.rs +++ b/src/year2024/day18/day18.rs @@ -98,7 +98,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, String) { let puzzle = Puzzle::new(data); diff --git a/src/year2024/day19/day19.rs b/src/year2024/day19/day19.rs index f500498f..d65b8007 100644 --- a/src/year2024/day19/day19.rs +++ b/src/year2024/day19/day19.rs @@ -50,7 +50,6 @@ impl<'a> Puzzle<'a> { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, u64) { let puzzle = Puzzle::new(data); diff --git a/src/year2024/day2/day2.rs b/src/year2024/day2/day2.rs index 5db7d423..b52ee1e8 100644 --- a/src/year2024/day2/day2.rs +++ b/src/year2024/day2/day2.rs @@ -57,7 +57,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2024/day20/day20.rs b/src/year2024/day20/day20.rs index 0cf283a1..c3737601 100644 --- a/src/year2024/day20/day20.rs +++ b/src/year2024/day20/day20.rs @@ -118,7 +118,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2024/day21/day21.rs b/src/year2024/day21/day21.rs index 1d5a2caf..b42e27c1 100644 --- a/src/year2024/day21/day21.rs +++ b/src/year2024/day21/day21.rs @@ -251,7 +251,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, u64) { let puzzle = Puzzle::new(data); diff --git a/src/year2024/day22/day22.rs b/src/year2024/day22/day22.rs index d28865fa..1507a80c 100644 --- a/src/year2024/day22/day22.rs +++ b/src/year2024/day22/day22.rs @@ -56,7 +56,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i64, i64) { let puzzle = Puzzle::new(data); diff --git a/src/year2024/day23/day23.rs b/src/year2024/day23/day23.rs index 854695a0..fc010b5e 100644 --- a/src/year2024/day23/day23.rs +++ b/src/year2024/day23/day23.rs @@ -129,7 +129,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, String) { let puzzle = Puzzle::new(data); diff --git a/src/year2024/day24/day24.rs b/src/year2024/day24/day24.rs index 60985c4c..193db799 100644 --- a/src/year2024/day24/day24.rs +++ b/src/year2024/day24/day24.rs @@ -226,7 +226,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, String) { let puzzle = Puzzle::new(data); diff --git a/src/year2024/day25/day25.rs b/src/year2024/day25/day25.rs index c24b47da..01e565e2 100644 --- a/src/year2024/day25/day25.rs +++ b/src/year2024/day25/day25.rs @@ -37,7 +37,6 @@ fn part1(data: &str) -> u64 { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, aoc::Christmas) { (part1(data), aoc::CHRISTMAS) diff --git a/src/year2024/day3/day3.rs b/src/year2024/day3/day3.rs index 0e92f6f1..b81891fe 100644 --- a/src/year2024/day3/day3.rs +++ b/src/year2024/day3/day3.rs @@ -26,7 +26,6 @@ fn calc(data: &str, part: u8) -> i32 { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, i32) { (calc(data, 1), calc(data, 2)) diff --git a/src/year2024/day4/day4.rs b/src/year2024/day4/day4.rs index d2acebd0..cf00061c 100644 --- a/src/year2024/day4/day4.rs +++ b/src/year2024/day4/day4.rs @@ -85,7 +85,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u32, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2024/day5/day5.rs b/src/year2024/day5/day5.rs index 3ce1feab..b4afd5d5 100644 --- a/src/year2024/day5/day5.rs +++ b/src/year2024/day5/day5.rs @@ -105,7 +105,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (i32, i32) { let puzzle = Puzzle::new(data); diff --git a/src/year2024/day6/day6.rs b/src/year2024/day6/day6.rs index ba2f1f1c..46c0080c 100644 --- a/src/year2024/day6/day6.rs +++ b/src/year2024/day6/day6.rs @@ -139,7 +139,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, u32) { let puzzle = Puzzle::new(data); diff --git a/src/year2024/day7/day7.rs b/src/year2024/day7/day7.rs index cfadc2e5..50bc2db9 100644 --- a/src/year2024/day7/day7.rs +++ b/src/year2024/day7/day7.rs @@ -124,7 +124,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, u64) { let puzzle = Puzzle::new(data); diff --git a/src/year2024/day8/day8.rs b/src/year2024/day8/day8.rs index ec051982..b93689b7 100644 --- a/src/year2024/day8/day8.rs +++ b/src/year2024/day8/day8.rs @@ -98,7 +98,6 @@ impl Puzzle { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (usize, usize) { let puzzle = Puzzle::new(data); diff --git a/src/year2024/day9/day9.rs b/src/year2024/day9/day9.rs index d9f1efa7..ebbeabcf 100644 --- a/src/year2024/day9/day9.rs +++ b/src/year2024/day9/day9.rs @@ -129,7 +129,6 @@ impl<'a> Puzzle<'a> { } /// # Panics -/// over malformed input #[must_use] pub fn solve(data: &str) -> (u64, u64) { let puzzle = Puzzle::new(data);