Advent of Code is a recreational programming puzzle. It is held yearly from the first to the twentyfifth of December, with a new puzzle consisting of two parts released every day.
This repository contains my solutions. The problem statements can be found on the Advent of Code website.
Lean 4 (solutions are in /AdventOfCode/Y2022/Dx/Solve.lean
), maybe some Rust.
Haskell, maybe some Rust.
Haskell, again.
I used Haskell.
cd $YEAR/$DAY/$LEVEL
stack solve.hs < ../input.txt
Mostly Python, again with some Answer Set Programming like in 2017.
I used a mix of Python (look for solve.py
), Answer Set Programming (DLV)
fed by Python scripts (look for solve.lp
and translate.py
) as well as plain
math and Go (both for Day 3).
For example, to obtain the solution for part one of day four:
python3 4/1/translate.py < 4/input.txt | dlv -cautious -silent ../query.lp 4/solve.lp --
Occasionally you will find tests, which are to be executed as follows:
dlv -silent 1/1/test-1.lp 1/1/solve.lp
I write tests in such a way that they are inconsistent together with the program, so no answer is good in this case. Contrary if there are answers, then these are the cases that need to be investigated.
- https://github.com/kaivogelgesang/aoc
- https://github.com/haaase/advent-of-code-2021
- https://github.com/vgautam/advent-of-code
- https://github.com/mkmc/AdventOfCode
- https://github.com/PeterZainzinger/aoc_2020
- https://github.com/riginding/advent-of-code-2019