# Advent of Code 2019 Solutions [![Crates.io](https://img.shields.io/crates/v/codetrotter_aoc_2019_solutions.svg)](https://crates.io/crates/codetrotter_aoc_2019_solutions) My solutions for [Advent of Code 2019](https://adventofcode.com/2019/). You'll need the Rust toolchain to build from source – get it from the official site at https://rustup.rs. I am currently using Rust stable version 1.40.0 (cargo 1.40.0 bc8e4c8be 2019-11-22 + rustc 1.40.0 73528e339 2019-12-16). See also: [AoC'19 Puzzle Description HTML `
` Fragment to Markdown Converter](https://github.com/ctsrc/puzzle-desc-md). ## Solved puzzles | Day | Puzzle name | Part 1 in Rust | Part 2 in Rust | Part 1 in Intcode | Part 2 in Intcode | |-----|-------------|----------------|----------------|-------------------|-------------------| | 1 | [The Tyranny of the Rocket Equation][1] | [Solved][D01P1] ⭐️ | [Solved][D01P2] ⭐️ | Pending | Pending | | 2 | [1202 Program Alarm][2] | [Solved][D02P1] ⭐️ | [Solved][D02P2] ⭐️ | Pending | Pending | | 3 | [Crossed Wires][3] | [Solved][D03P1] ⭐️ | [Solved][D03P2] ⭐️ | Pending | Pending | | 4 | [Secure Container][4] | [Solved][D04P1] ⭐️ | [Solved][D04P2] ⭐️ | Pending | Pending | | 5 | [Sunny with a Chance of Asteroids][5] | [Solved][D05P1] ⭐️ | [Solved][D05P2] ⭐️ | Pending | Pending | | 6 | [Universal Orbit Map][6] | [Solved][D06P1] ⭐️ | [Solved][D06P2] ⭐️ | Pending | Pending | | 7 | [Amplification Circuit][7] | [Solved][D07P1] ⭐️ | [Solved][D07P2] ⭐️ | Pending | Pending | | 8 | [Space Image Format][8] | [Solved][D08P1] ⭐️ | [Solved][D08P2] ⭐️ | Pending | Pending | | 9 | [Sensor Boost][9] | [Solved][D09P1] ⭐️ | [Solved][D09P2] ⭐️ | Pending | Pending | | 10 | | Pending | Pending | Pending | Pending | | 11 | | Pending | Pending | Pending | Pending | | 12 | | Pending | Pending | Pending | Pending | | 13 | | Pending | Pending | Pending | Pending | | 14 | | Pending | Pending | Pending | Pending | | 15 | | Pending | Pending | Pending | Pending | | 16 | | Pending | Pending | Pending | Pending | | 17 | | Pending | Pending | Pending | Pending | | 18 | | Pending | Pending | Pending | Pending | | 19 | | Pending | Pending | Pending | Pending | | 20 | | Pending | Pending | Pending | Pending | | 21 | | Pending | Pending | Pending | Pending | | 22 | | Pending | Pending | Pending | Pending | | 23 | | Pending | Pending | Pending | Pending | | 24 | | Pending | Pending | Pending | Pending | | 25 | | Pending | Pending | Pending | Pending | ## Docs ```bash cargo doc --lib --no-deps --release --target-dir ../aoc-2019-docs/ --open ``` https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/ ## Running tests ```bash cargo test ``` ## Clippy lints ```bash cargo clean ; cargo clippy -- \ -A clippy::suspicious_else_formatting \ -A clippy::unreadable_literal \ -A clippy::unnecessary_mut_passed ``` Then pick one of the things it complains about and look at all instances of only that. For example: ```bash touch src/lib.rs ; cargo clippy -- -A clippy::all -W clippy::trivially_copy_pass_by_ref ``` ## Running solutions ### Running solution for highest day number solved ```bash cargo run ``` ### Running solutions for all solved days with both parts ```bash cargo run -- -a ``` ### Running solutions for selected days Both parts of some day, for example day 3 ```bash cargo run -- days 3 ``` Part one of some day, for example day 3 part 1 ```bash cargo run -- days 3.1 ``` Part two of some day, for example day 3 part 2 ```bash cargo run -- days 3.2 ``` Both parts of each of multiple days, for example days 1, 2 and 3 ```bash cargo run -- days 1 2 3 ``` Selected parts of multiple days, for example day 3 part 1 and day 2 part 2 along with both parts of day 1. ```bash cargo run -- days 3.1 2.2 1 ``` [1]: https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/day_01/ [2]: https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/day_02/ [3]: https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/day_03/ [4]: https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/day_04/ [5]: https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/day_05/ [6]: https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/day_06/ [7]: https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/day_07/ [8]: https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/day_08/ [9]: https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/day_09/ [D01P1]: https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/day_01/fn.solve_part_1.html [D01P2]: https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/day_01/fn.solve_part_2.html [D02P1]: https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/day_02/fn.solve_part_1.html [D02P2]: https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/day_02/fn.solve_part_2.html [D03P1]: https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/day_03/fn.solve_part_1.html [D03P2]: https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/day_03/fn.solve_part_2.html [D04P1]: https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/day_04/fn.solve_part_1.html [D04P2]: https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/day_04/fn.solve_part_2.html [D05P1]: https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/day_05/fn.solve_part_1.html [D05P2]: https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/day_05/fn.solve_part_2.html [D06P1]: https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/day_06/fn.solve_part_1.html [D06P2]: https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/day_06/fn.solve_part_2.html [D07P1]: https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/day_07/fn.solve_part_1.html [D07P2]: https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/day_07/fn.solve_part_2.html [D08P1]: https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/day_08/fn.solve_part_1.html [D08P2]: https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/day_08/fn.solve_part_2.html [D09P1]: https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/day_09/fn.solve_part_1.html [D09P2]: https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/day_09/fn.solve_part_2.html