advent-of-code-2018-rs icon indicating copy to clipboard operation
advent-of-code-2018-rs copied to clipboard

Advent of Code 2018 in Rust.

OUTDATED

See https://github.com/fornwall/advent-of-code instead.

Build Status

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 Reddit
Day 2 src/day2.rs Reddit
Day 3 src/day3.rs Reddit
Day 4 src/day4.rs Reddit
Day 5 src/day5.rs Reddit
Day 6 src/day6.rs Reddit
Day 7 src/day7.rs Reddit
Day 8 src/day8.rs Reddit
Day 9 src/day9.rs Reddit
Day 10 src/day10.rs Reddit
Day 11 src/day11.rs Reddit
Day 12 src/day12.rs Reddit
Day 13 src/day13.rs Reddit
Day 14 src/day14.rs Reddit
Day 15 src/day15.rs Reddit
Day 16 src/day16.rs Reddit
Day 17 src/day17.rs Reddit
Day 18 src/day18.rs Reddit
Day 19 src/day19.rs Reddit
Day 20 src/day20.rs Reddit
Day 21 src/day21.rs Reddit
Day 22 src/day22.rs Reddit
Day 23 src/day23.rs Reddit
Day 24 src/day24.rs Reddit
Day 25 src/day25.rs Reddit