advent-of-code-2018-rs
advent-of-code-2018-rs copied to clipboard
Advent of Code 2018 in Rust.
OUTDATED
See https://github.com/fornwall/advent-of-code instead.
Advent of Code 2018 in Rust
These are solutions to the problems in Advent of Code 2018 in Rust.
Running the solutions against a file
The test can be run to read from stdin:
cargo run <day> <part> < path/to/input.txt
# Example:
cargo run 2 1 < path/to/input_day2_part1.txt
Running using Docker
There is also a Docker image published for running the tests:
docker run -i fredrikfornwall/advent-of-code-2018-rs:latest <day> <part> < path/to/input.txt
# Example
curl https://public.infinisil.com/aoc18/day2/10000.txt | \
docker run -i fredrikfornwall/advent-of-code-2018-rs:latest 2 2
Days
Puzzle | Solution | Alternatives |
---|---|---|
Day 1 | src/day1.rs | |
Day 2 | src/day2.rs | |
Day 3 | src/day3.rs | |
Day 4 | src/day4.rs | |
Day 5 | src/day5.rs | |
Day 6 | src/day6.rs | |
Day 7 | src/day7.rs | |
Day 8 | src/day8.rs | |
Day 9 | src/day9.rs | |
Day 10 | src/day10.rs | |
Day 11 | src/day11.rs | |
Day 12 | src/day12.rs | |
Day 13 | src/day13.rs | |
Day 14 | src/day14.rs | |
Day 15 | src/day15.rs | |
Day 16 | src/day16.rs | |
Day 17 | src/day17.rs | |
Day 18 | src/day18.rs | |
Day 19 | src/day19.rs | |
Day 20 | src/day20.rs | |
Day 21 | src/day21.rs | |
Day 22 | src/day22.rs | |
Day 23 | src/day23.rs | |
Day 24 | src/day24.rs | |
Day 25 | src/day25.rs |