https://github.com/daniel5151/aoc19
My solutions to Advent of Code 2019 (in Rust)
https://github.com/daniel5151/aoc19
Last synced: about 1 year ago
JSON representation
My solutions to Advent of Code 2019 (in Rust)
- Host: GitHub
- URL: https://github.com/daniel5151/aoc19
- Owner: daniel5151
- Created: 2019-12-02T18:19:33.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-17T01:37:20.000Z (over 6 years ago)
- Last Synced: 2025-05-15T00:39:16.438Z (about 1 year ago)
- Language: Rust
- Size: 166 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Advent of Code 2019
My solutions to Advent of Code 2019.
Some goals:
- Solve the questions (duh)
- Keep the code clean (comments when applicable, using idiomatic Rust, etc...)
- Solutions should have _reasonable_ (i.e: not strictly the _best_) space and time complexity
- Solutions should run fairly quickly (on modern PCs)
Some non-goals:
- Scoring super high on the leaderboard (timezones give people an unfair advantage, and late-night-coding isn't prime-time for me)
## Running
(Assuming that the desired day's input has already been downloaded)
```bash
cargo run --release --features extras --
```
The `"extras"` feature enables several cool-but-slow-to-compile answers to certain questions (e.g: a multithreaded day7 q2).
## Running (for speed)
```bash
./aoc19.sh
# e.g: ./aoc19 3 1
```
The harness will automatically download question input if a `cookie.txt` is provided. It's contents should look something like this:
```
ru=53616c...; session=53616c...
```
Getting this cookie is fairly straightforward:
- Open Chrome
- Navigate to _any_ day's input URL (e.g: https://adventofcode.com/2019/day/1/input)
- Open the Chrome Network Inspector
- Refresh the URL
- Right click the `input` request, and "copy > copy as cURL"
- the string should include a `-H 'cookie: '` component.
Alternatively, you can just invoke `cargo run --release -- ` manually, though it will not automatically download input data.