by @npanuhin
This is a repository of my Advent of Code solutions. Some puzzles are accompanied by concise descriptions π
I try to optimize each solution as much as possible, so although they are written in Python, many run in less than a second!
Also check out these cool animated annual AoC images!
2020 | 2021 | 2023 | |
---|---|---|---|
Day 1 | ππ | ββ | ββ |
Day 2 | ππ | ββ | ββ |
Day 3 | ππ | ββ | ββ |
Day 4 | ππ | ββ | ββ |
Day 5 | ππ | ββ | ββ |
Day 6 | ππ | ββ | ββ |
Day 7 | ππ | ββ | ββ |
Day 8 | ππ | ββ | ββ |
Day 9 | ππ | ββ | ββ |
Day 10 | ππ | ββ | ββ |
Day 11 | ππ | ββ | ββ |
Day 12 | ππ | ββ | ββ |
Day 13 | ββ | ββ | ββ |
Day 14 | ππ | ββ | ββ |
Day 15 | ππ | ββ | ββ |
Day 16 | ββ | ββ | ββ |
Day 17 | ββ | ββ | ββ |
Day 18 | ββ | ββ | ββ |
Day 19 | ββ | ββ | ββ |
Day 20 | ββ | ββ | ββ |
Day 21 | ββ | ββ | ββ |
Day 22 | ββ | ββ | ββ |
Day 23 | ββ | ββ | ββ |
Day 24 | ββ | ββ | ββ |
Day 25 | ββ | ββ | ββ |
π β A brief description is available
- My goal is to keep solutions as close to the original as possible, so I generally do not edit past solutions. Sometimes I correct the code style (without even remembering what the task was about), but in the future I will try not to do this
-
The entire repository is PEP8 compliant, as verified by the
flake8
linter (with the exception of some rules) -
Input files may contain any number of empty lines, especially at the end. In some cases, this also applies to whitespace characters.
Currently I like to handle this rule using the following general snippet to read files:with open('input.txt') as file: lines = list(filter(None, map(str.strip, file)))
If you computer scruggles to render smooth animations, buy a new one1 :)
2020 | 2021 |
2022 | 2023 |
Wanna know how I automatically created animated vector images with transparent gradient borders within GitHub Markdown? Check out this folder
Footnotes
-
Joking of course! It's just that almost all annual AoC images contain a ton of HTML objects, each with its own animation. Rendering one image on a modern hardware is easy, but when there are many of them, it becomes a mess)
In all seriousness, I'm not sure if I want to hold on to these animations or drop some of them β©