My solutions for Advent of Code.
Run solutions by passing the year, day and puzzle input like so:
$ python aoc <year> <day> [input]
If no input is provided, and you have a .token
file in the root
of the project, the script will attempt to automatically download
your puzzle input from the Advent of Code website. Steps to get
your session token are in the Puzzle Input Tip
section below.
2015
- Day 01: Not Quite Lisp | solution
- Day 02: I Was Told There Would Be No Math | solution
- Day 03: Perfectly Spherical Houses in a Vacuum | solution
- Day 04: The Ideal Stocking Stuffer | solution
- Day 05: Doesn't He Have Intern-Elves For This? | solution
- Day 06: Probably a Fire Hazard | solution
- Day 07: Some Assembly Required | solution
- Day 08: Matchsticks | solution
2019
- Day 01: The Tyranny of the Rocket Equation | solution
- Day 02: 1202 Program Alarm | solution
- Day 03: Crossed Wires | solution
- Day 04: Secure Container | solution
- Day 05: Sunny with a Chance of Asteroids | solution
- Day 06: Universal Orbit Map | solution
- Day 07: Amplification Circuit | solution
2021
- Day 01: Sonar Sweep | solution
- Day 02: Dive! | solution
- Day 03: Binary Diagnostic | solution
- Day 04: Giant Squid | solution
- Day 05: Hydrothermal Venture | solution
- Day 06: Lanternfish | solution
- Day 07: The Treachery of Whales | solution
- Day 08: Seven Segment Search | solution
- Day 09: Smoke Basin | solution
- Day 10: Syntax Scoring | solution
- Day 11: Dumbo Octopus | solution
- Day 12: Passage Pathing | solution
- Day 13: Transparent Origami | solution
- Day 14: Extended Polymerization | solution
- Day 15: Chiton | solution
- Day 16: Packet Decoder | solution
- Day 17: Trick Shot | solution
- Day 18: Snailfish | solution
- Day 19: Beacon Scanner | solution
- Day 20: Trench Map | solution
- Day 21: Dirac Dice | solution
- Day 22: Reactor Reboot | solution
2022
- Day 01: Calorie Counting | solution
- Day 02: Rock Paper Scissors | solution
- Day 03: Rucksack Reorganization | solution
- Day 04: Camp Cleanup | solution
- Day 05: Supply Stacks | solution
- Day 06: Tuning Trouble | solution
- Day 07: No Space Left On Device | solution
- Day 08: Treetop Tree House | solution
- Day 09: Rope Bridge | solution
- Day 10: Cathode-Ray Tube | solution
- Day 11: Monkey in the Middle | solution
- Day 12: Hill Climbing Algorithm | solution
- Day 13: Distress Signal | solution
- Day 14: Regolith Reservoir | solution
- Day 15: Beacon Exclusion Zone | solution
- Day 16: Proboscidea Volcanium | solution
- Day 17: Pyroclastic Flow | solution
- Day 18: Boiling Boulders | solution
- Day 19: Not Enough Minerals | solution
- Day 20: Grove Positioning System | solution
- Day 21: Monkey Math | solution
- Day 22: Monkey Map | solution
- Day 23: Unstable Diffusion | solution
2023
- Day 01: Trebuchet?! | solution
- Day 02: Cube Conundrum | solution
- Day 03: Gear Ratios | solution
- Day 04: Scratchcards | solution
- Day 05: If You Give A Seed A Fertilizer | solution
- Day 06: Wait For It | solution
- Day 07: Camel Cards | solution
- Day 08: Haunted Wasteland | solution
- Day 09: Mirage Maintenance | solution
- Day 10: Pipe Maze | solution
- Day 11: Cosmic Expansion | solution
- Day 12: Hot Springs | solution
- Day 13: Point of Incidence | solution
- Day 14: Parabolic Reflector Dish | solution
- Day 15: Lens Library | solution
- Day 16: The Floor Will Be Lava | solution
If you have your Advent of Code session token saved to a file like .token
, you can download your test input with curl:
$ curl "https://adventofcode.com/2022/day/1/input" \
--header "Cookie: $(cat .token)"
You can find your session token by looking at the Cookie
header in the network tab
in your browser tools when navigating to https://adventofcode.com/2022/day/1/input.
Save the value of this Cookie
header in .token
. e.g.
session=XXXX