项目作者: lorenzleutgeb

项目描述 :
:snowflake::evergreen_tree::calendar::santa:
高级语言: Haskell
项目地址: git://github.com/lorenzleutgeb/aoc.git
创建时间: 2017-12-01T11:22:08Z
项目社区:https://github.com/lorenzleutgeb/aoc

开源协议:

下载


Advent of Code

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.

My Solutions

This repository contains my solutions. The problem statements can be found on
the Advent of Code website.

2022

Lean 4 (solutions are in /AdventOfCode/Y2022/Dx/Solve.lean), maybe some Rust.

2021

Haskell, maybe some Rust.

2020

Haskell, again.

2019

I used Haskell.

  1. cd $YEAR/$DAY/$LEVEL
  2. stack solve.hs < ../input.txt

2018

Mostly Python, again with some Answer Set Programming like in 2017.

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).

How to run solutions implemented in Answer Set Programming

Solving

For example, to obtain the solution for part one of day four:

  1. python3 4/1/translate.py < 4/input.txt | dlv -cautious -silent ../query.lp 4/solve.lp --
Testing

Occasionally you will find tests, which are to be executed as follows:

  1. 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.

Others Solutions

My Leaderboard

2021

2020

Developers in Vienna Leaderboard

2021

2020