adventofcode

module
v0.0.0-...-13cd2e5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2023 License: MIT

README

Advent of Code

Repository with my solutions of Advent of Code programming puzzles.

Usage

I restrict myself to use of Go standard library (and sometimes exp). All solutions are meant as standalone binaries that read input from stdin and print usually 2 lines (solutions of part 1 and 2) to the stdout.

To run any of the solutions do simply run: cat ./YYYY/DD/test.txt | go run ./YYYY/DD

Disclaimer

These solutions are only as good so I can call it a (solved) day. They are absolutely not a showcase of my skills nor a good learning material. I do this for fun and joy during my lunchbreaks as the new puzzles pop up at 2PM JST.

Christmas tend to be a bit hectic in general (I am a married man, an expat living 8000km away from relatives and a fresh dad); so excuse me for brute force, unhandled corner cases, poor parsing of input or false assumption here and there.

Have a Merry Christmas and Happy New Year!

Directories

Path Synopsis
2022
01 command
02 command
03 command
04 command
05 command
06 command
07 command
08 command
09 command
10 command
Read input from stdin, interpret the instructions; oputput sum of signal strengths at given cycle counts and render 40px scanlines.
Read input from stdin, interpret the instructions; oputput sum of signal strengths at given cycle counts and render 40px scanlines.
11 command
12 command
13 command
14 command
15 command
16 command
17 command
18 command
Read input from stdin.
Read input from stdin.
19 command
20 command
21 command
22 command
23 command
24 command
25 command
2023
01 command
02 command
Parse each line as game, produce sum of possible game ids and sum of minimum power of minimum cube numbers.
Parse each line as game, produce sum of possible game ids and sum of minimum power of minimum cube numbers.
03 command
Find sum of all numbers adjacent (diagonally too) to non '.' characters and sum of all gear ratios (2 numbers adjacent to '*' multiplied).
Find sum of all numbers adjacent (diagonally too) to non '.' characters and sum of all gear ratios (2 numbers adjacent to '*' multiplied).
04 command
Find sum of points of winning cards in original deck and count all cards in won cards deck.
Find sum of points of winning cards in original deck and count all cards in won cards deck.
05 command
Parse almanac and find lowest seed destination.
Parse almanac and find lowest seed destination.
06 command
Find multiplication of record beating attempts for three rides and number of ways to beat final race.
Find multiplication of record beating attempts for three rides and number of ways to beat final race.
07 command
08 command
Find number of steps from AAA to ZZZ and from all **A to all **Z.
Find number of steps from AAA to ZZZ and from all **A to all **Z.
09 command
Find sums of extrapolated history numbers on right and left side of dataset.
Find sums of extrapolated history numbers on right and left side of dataset.
10 command
Find half of length of the loop and number of contained tiles in it.
Find half of length of the loop and number of contained tiles in it.
11 command
12 command
Find sum of valid arrangements of working and non-working springs according to given stencil.
Find sum of valid arrangements of working and non-working springs according to given stencil.
13 command
Find reflection line in given pattern either without smudge or with one smudge.
Find reflection line in given pattern either without smudge or with one smudge.
14 command
Find board load after tilting north once and after 1000000000 all direction tilts.
Find board load after tilting north once and after 1000000000 all direction tilts.
15 command
Find sum of step hashes and sum of lens powers.
Find sum of step hashes and sum of lens powers.
16 command
Find number of lightbeam energized tiles, find maximum possible energized tiles possible when starting from any edge tile.
Find number of lightbeam energized tiles, find maximum possible energized tiles possible when starting from any edge tile.
17 command
Find most heat-loss eficient path for up to 3 consecutive straight moves and for no less than 4 but up to 10 consecutive straight moves.
Find most heat-loss eficient path for up to 3 consecutive straight moves and for no less than 4 but up to 10 consecutive straight moves.
18 command
Find area of polygon given as set of direction + length plotting instructions.
Find area of polygon given as set of direction + length plotting instructions.
19 command
20 command
Simulate circuit and find number of high and low signals after 1000 button presses; find number of button presses needed to get rx low.
Simulate circuit and find number of high and low signals after 1000 button presses; find number of button presses needed to get rx low.
21 command
Find number of covered garden plots given the number of steps.
Find number of covered garden plots given the number of steps.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL