2021-12-01 13:13:23 +00:00
|
|
|
# awk aoc 2021
|
|
|
|
|
2021-12-02 13:48:28 +00:00
|
|
|
got caught in the thrill of wanting to solve the puzzles fast :)
|
|
|
|
|
|
|
|
[advent of code 2021: awk](https://compudanzas.net/advent_of_code_2021.html)
|
|
|
|
|
|
|
|
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](https://adventofcode.com/2021/)
|
|
|
|
|
|
|
|
# run
|
|
|
|
|
|
|
|
to run a program, e.g. `01.awk`:
|
|
|
|
|
|
|
|
```
|
|
|
|
awk -f 01.awk inputfile
|
|
|
|
```
|
|
|
|
|
2021-12-10 05:30:39 +00:00
|
|
|
if using gawk, you should be able to use compatibility/traditional mode (except for day 03, and 09)
|
2021-12-02 13:48:28 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
awk -c -f 01.awk inputfile
|
|
|
|
```
|
2021-12-01 13:13:23 +00:00
|
|
|
|
|
|
|
# stats
|
|
|
|
|
|
|
|
```
|
|
|
|
-------Part 1-------- -------Part 2--------
|
|
|
|
Day Time Rank Score Time Rank Score
|
2021-12-22 05:55:05 +00:00
|
|
|
22 00:19:18 1596 0 - - -
|
2021-12-21 15:32:19 +00:00
|
|
|
21 00:29:17 3064 0 - - -
|
2021-12-20 18:16:07 +00:00
|
|
|
20 12:59:28 11947 0 13:14:02 11669 0 --- same as 18
|
2021-12-20 04:28:26 +00:00
|
|
|
18 >24h 16659 0 >24h 16484 0 --- solved it afterwards
|
2021-12-17 05:59:10 +00:00
|
|
|
17 00:41:03 2839 0 00:56:57 2841 0
|
2021-12-16 07:26:28 +00:00
|
|
|
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!
|
2021-12-14 06:14:39 +00:00
|
|
|
14 00:27:53 4878 0 01:07:47 3311 0
|
2021-12-13 07:24:55 +00:00
|
|
|
13 02:02:33 9507 0 02:19:53 9225 0 --- started late
|
2021-12-12 07:19:19 +00:00
|
|
|
12 01:57:59 7241 0 02:16:49 6447 0
|
2021-12-11 05:52:24 +00:00
|
|
|
11 00:46:21 4284 0 00:49:55 4145 0
|
2021-12-10 05:30:39 +00:00
|
|
|
10 00:19:04 4202 0 00:28:32 3347 0
|
2021-12-09 05:57:02 +00:00
|
|
|
9 00:12:52 2598 0 00:55:08 4504 0
|
2021-12-08 06:04:02 +00:00
|
|
|
8 00:06:26 580 0 01:02:03 2196 0
|
2021-12-07 19:08:14 +00:00
|
|
|
7 00:06:50 2657 0 00:12:29 2665 0
|
2021-12-06 05:43:05 +00:00
|
|
|
6 00:10:35 3339 0 00:36:30 4445 0
|
2021-12-05 05:28:56 +00:00
|
|
|
5 00:08:39 464 0 00:19:44 917 0
|
2021-12-04 05:54:11 +00:00
|
|
|
4 00:42:46 4241 0 00:45:01 3008 0
|
2021-12-03 05:42:39 +00:00
|
|
|
3 00:12:37 4213 0 00:38:29 3758 0
|
2021-12-02 05:12:41 +00:00
|
|
|
2 00:02:08 324 0 00:06:30 1842 0
|
2021-12-01 13:13:23 +00:00
|
|
|
1 00:03:11 1556 0 00:08:18 1774 0
|
|
|
|
```
|