advent of code 2021 in awk
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
sejo 19f704f4ee day 22 pt1 stats 1 year ago
01 set up directories 1 year ago
02 set up directories 1 year ago
03 more clean up 1 year ago
04 removed 2nd part from makefile (both are in the same file) 1 year ago
05 even nicer day 5, pt 2 1 year ago
06 corrected typo 1 year ago
07 day 7, more compact 1 year ago
08 day 8! 1 year ago
09 corrected to use FS 1 year ago
10 day 10! 1 year ago
11 day 11, parts 1 & 2, cleaner 1 year ago
12 removed test files 1 year ago
13 stats day 13 (started late) 1 year ago
14 14_2 solves part 1 and 2 1 year ago
15 day 15, part 2 - thanks again alderwick! 1 year ago
16 part 1 and 2 in the same file 1 year ago
17 day 17 part 2! 1 year ago
18 day 18, part 2! 1 year ago
19 starting day 19 1 year ago
20 day 2, part 2! 1 year ago
21 stats day 21, pt 1 1 year ago
22 day 22, pt 1 1 year ago
README.md day 22 pt1 stats 1 year ago

README.md

awk aoc 2021

got caught in the thrill of wanting to solve the puzzles fast :)

advent of code 2021: awk

the NUM.awk and NUM_2.awk files are the original ones written under pressure. the *_new.awk files are improved versions written afterwards.

you can see the puzzles and get the input files at advent of code 2021

run

to run a program, e.g. 01.awk:

awk -f 01.awk inputfile

if using gawk, you should be able to use compatibility/traditional mode (except for day 03, and 09)

awk -c -f 01.awk inputfile

stats

      -------Part 1--------   -------Part 2--------
Day       Time  Rank  Score       Time  Rank  Score
 22   00:19:18  1596      0          -     -      -
 21   00:29:17  3064      0          -     -      -
 20   12:59:28 11947      0   13:14:02 11669      0 --- same as 18
 18      >24h  16659      0      >24h  16484      0 --- solved it afterwards
 17   00:41:03  2839      0   00:56:57  2841      0
 16   00:34:15   550      0   02:21:09  3657      0
 15   16:52:00 24420      0   17:30:02 20656      0 --- thanks alderwick for your help!
 14   00:27:53  4878      0   01:07:47  3311      0
 13   02:02:33  9507      0   02:19:53  9225      0 --- started late
 12   01:57:59  7241      0   02:16:49  6447      0
 11   00:46:21  4284      0   00:49:55  4145      0
 10   00:19:04  4202      0   00:28:32  3347      0
  9   00:12:52  2598      0   00:55:08  4504      0
  8   00:06:26   580      0   01:02:03  2196      0
  7   00:06:50  2657      0   00:12:29  2665      0
  6   00:10:35  3339      0   00:36:30  4445      0
  5   00:08:39   464      0   00:19:44   917      0
  4   00:42:46  4241      0   00:45:01  3008      0
  3   00:12:37  4213      0   00:38:29  3758      0
  2   00:02:08   324      0   00:06:30  1842      0
  1   00:03:11  1556      0   00:08:18  1774      0