2021-12-07 16:04:40 +00:00
2021-12-05 17:32:17 +00:00
2021-12-04 14:03:47 +00:00
2021-12-01 14:03:38 +00:00
2021-12-07 16:04:40 +00:00
2021-12-06 14:08:30 +00:00
2021-12-03 14:14:36 +00:00
2021-12-02 14:01:30 +00:00
2021-11-07 18:55:18 +00:00
2021-11-07 18:51:32 +00:00
2021-12-07 16:04:40 +00:00
2021-12-07 16:04:40 +00:00

Advent of Code 2021

The 2021 iteration of Advent of Code. This year I am going to try and accomplish it all on my iPad using GitPod

Adding a new day

When starting to solve for a new day run the following command in the root of the repo where <day> is the go lang compatible package name (i.e. four or five) and <noun> represents the item the day's problem revolves around (i.e. radar or bingo).

./setup.sh <day> <noun>

After generating a new package update main.go to include a <day> flag in the switch statement on line 28

  case "<day>":
		day = <day>.Init("<day>/input.txt")

My Solutions

Day 1

$ ./aoc2021 --one
The solution for "one" is:
There were 1715 increases in depth
There were 1739 increases in depth when sampling a window

Day 2

$ ./aoc2021 --two
The solution for "two" is:
Horizontal is 1832, depth is 1172, answer is 2147104
Horizontal is 1832, depth is 1116059, answer is 2044620088

Day 3

$ ./aoc2021 --three
The solution for "three" is:
The power rates are gamma: 1143, epsilon: 2952, for 3374136 total
The oxygen rating is 1909 and CO2 rating is 2322, for a life support rating of 4432698

Day 4

$ ./aoc2021 --four
The solution for "four" is:
The winning score is 668 on call 66. Final score 44088
The last winning score is 263 on call 90. Final score 23670

Day five

$ ./aoc2021 --five
The solution for "five" is:
There are 5585 overlapping vents

There are 17193 overlapping vents

Day six

$ ./aoc2021 --six
The solution for "six" is:
After 80 days there are 377263 fish
After 256 days there are 1695929023803 fish

Day seven

$ ./aoc2021 --seven
The solution for "seven" is:
Used 357353 fuel to align
Used 104822130 fuel to align
Description
The 2021 iteration of Advent of Code. This year I am going to try and accomplish it all on my iPad using GitPod
Readme 1.1 MiB
Languages
Go 98.5%
Shell 1.5%