repositorypackage
0.0.0-20241201152928-f20f93fc2c32
Repository: https://github.com/haralambov/aoc.git
Documentation: pkg.go.dev
# README
šš Advent of Code šš
My solutions to the Advent of Code puzzles, written in Go
Disclaimer: I am not a professional Go developer.
The goal of solving AoC problems is to gain knowledge in that language.
Progress
Day\Year | 2024 | 2023 | 2022 | 2021 | 2020 | 2019 | 2018 | 2017 | 2016 | 2015 |
---|---|---|---|---|---|---|---|---|---|---|
01 | ā | ā | ā | |||||||
02 | ā | ā | ||||||||
03 | ā | ā | ||||||||
04 | ā | ā | ||||||||
05 | ā | |||||||||
06 | ā | ā | ||||||||
07 | ā | ā | ||||||||
08 | ā | |||||||||
09 | ā | |||||||||
10 | ||||||||||
11 | ||||||||||
12 | ||||||||||
13 | ||||||||||
14 | ||||||||||
15 | ||||||||||
16 | ||||||||||
17 | ||||||||||
18 | ||||||||||
19 | ||||||||||
20 | ||||||||||
21 | ||||||||||
22 | ||||||||||
23 | ||||||||||
24 | ||||||||||
25 |
Legend: š§ First part ā Both parts
Building and running
go build
./aoc --help
Usage of ./aoc:
-day int
Selected day. Must be between 1 and 25 (default 1)
-part int
Selected part. Must be either 1 or 2 (default 1)
-year int
Selected year. Must be between 2015 and 2024 (default 2024)
Examples
Running for a specific year, day and part with my input
# Command
./aoc --year 2024 --day 1 --part 1
# Ouotput
53334
Running for a specific year, day and part with external input
With input redirection
# Sample command
./aoc --year 2024 --day 1 --part 1 < /path/to/input_file
# e.g. external file containing the input for that day
./aoc --year 2024 --day 1 --part 1 < /home/zlatomir/Documents/external_input
# Output
53334
With a pipe
# Sample command
cat /path/to/input_file | ./aoc --year 2024 --day 1 --part 1
# e.g. external file containing the input for that day
cat /home/zlatomir/Documents/external_input | ./aoc --year 2024 --day 1 --part 1
# Output
53334