Home

Awesome

My solutions to the 2021 edition of Advent of Code.

Previous participations

Problem statements & solutions

<div align="center">
DayCodePart 1Part 2
01solution00:01:33 / 31900:14:03 / 3652
02solution00:02:18 / 41400:05:03 / 899
03solution00:12:08 / 394900:36:11 / 3416
04solution00:15:35 / 67800:22:21 / 807
05solution
06solution00:04:39 / 48600:10:34 / 535
07solution00:04:27 / 111700:06:07 / 557
08solution00:13:22 / 332600:21:17 / 106
09solution00:05:45 / 45600:19:51 / 716
10solution00:07:37 / 82600:26:13 / 2916
11solution00:21:48 / 148300:23:34 / 1315
12solution00:23:24 / 195900:36:16 / 1698
13solution00:14:32 / 95000:15:15 / 410
14solution00:11:07 / 105501:02:12 / 2966
15solution00:51:52 / 346901:19:39 / 2672
16solution00:24:39 / 17100:44:47 / 576
17solution00:12:12 / 32100:19:30 / 401
18solution01:50:25 / 138901:52:16 / 1259
19solution03:20:15 / 151603:32:21 / 1432
20solution00:16:42 / 10701:12:12 / 2295
21solution00:09:42 / 61500:26:00 / 237
22solution00:11:01 / 63605:16:46 / 3011
23solution01:25:24 / 122509:57:37 / 3452
24solution
25solution
</div>

The third and last row indicate the time and rank I obtained for that part. Empty cells mean no participation.

In order to make the challenge more interesting, I set myself the following rules:

Note that these rules do not necessarily apply while solving a problem, but rather when committing the code to this repository.

(*): this rule could be subject to modification, for instance if the puzzles implicitly require it (Intcode in 2019).

Usage

This project runs on Scala 3.0.2 and sbt 1.5.5.

Use the following template to write a solution for a given day:

package adventofcode.solutions

import adventofcode.Definitions.*

@main def Day01 = Day(1) { (input, part) =>

  part(1) = ???

  part(2) = ???

}

(change 1 to the current day number and fill in the ???)

Paste your input as a file named 01.txt in input/.

To run the code, enter sbt run Day01.

The output(s) will be printed to the console and stored in output/ as 01-1.txt and 01-2.txt.

Additionally, the command sbt test will run all the implemented solutions and compare their result against the currently stored output, to detect any potential regression.

License

MIT