Advent of Code is an annual set of Christmas-themed computer programming challenges that follow an Advent calendar. It has been running since 2015.
2022
- See https://adventofcode.com/2022
- 01/25: Calorie Counting, code: py; data
- 02/25: Rock Paper Scissors, code: py; data
- 03/25: Rucksack Reorganization, code: py; data
- 04/25: Camp Cleanup, code: py; data
- Other people solutions (Watch after you finish your solution!):
- 01/25: Jonathan Paulson (py)
- 02/25: Jonathan Paulson (py)
- 03/25: Jonathan Paulson (py)
- 04/25: Jonathan Paulson (py)
2023
My code is quite dense. I usually end up with a solution without explicit loops, I use
comprehension where possible without intermediate variables. This is hard to debug, so
I usually start with some loop and then refactor it on the way. The variable names are usually abbreviated
as follows: t
: table, s
: solution (sometimes intermediate), s1
, s2
: solutions (parts 1 and 2), xs
, ys
: input data.
py aoc{yy}{dd}.py
e.g.
py aoc2201.py
C:\q\w64\q.exe
q)system "cd C:/path/to/advent-of-code"
q)\l aoc{yy}{dd}.q
e.g.
q)\l aoc2201.q
Use PowerShell?
- download data from
https://adventofcode.com/{yyyy}/day/{d}/input
- create a file with proper name, defaults, and comment
aoc{yy}{dd}.{ex}