aoc/README.md

35 lines
1.0 KiB
Markdown
Raw Normal View History

2021-07-14 13:50:33 -07:00
# aoc
2022-09-09 11:15:05 -07:00
Advent Of Code solutions using C99. Builds and runs on macOS, Linux, and OpenBSD.
2021-07-14 13:50:33 -07:00
## Building
Be sure to clone the project with its submodules:
2021-09-08 11:19:24 -07:00
git clone --recurse-submodules https://git.fputs.com/fputs/advent
2022-09-09 11:15:05 -07:00
This project relies on several BSD extensions to the stdlib. OpenBSD and macOS users should be able to build the project out of the box. Linux users will need `libbsd` installed. The package is called `libbsd-dev` on Debian-based systems.
2021-07-14 13:50:33 -07:00
2021-09-02 15:04:19 -07:00
Build the project using Cmake:
mkdir build
cd build
cmake ..
make
2021-07-14 13:50:33 -07:00
2021-09-08 12:12:11 -07:00
The supplied `build.sh` script does the above for you.
2021-09-08 11:19:24 -07:00
2021-07-14 13:50:33 -07:00
## Inputs
Inputs can be generated from `get_input.sh`. You will need to get your session cookie from the Advent of Code website. The easiest way to do this is to inspect any input page in your browser.
The script can then be run with `bash get_input.sh SESSIONCOOKIE`, with `SESSIONCOOKIE` replaced by your unique session cookie's hash.
2021-12-10 11:01:51 -08:00
## Usage
```bash
./advent $YEAR $DAY
```
For example, `./advent 15 1` will run Day 01 from the 2015 problems