Compare commits

...

40 Commits

Author SHA1 Message Date
c07c38f17a day25 2020-12-24 21:29:17 -08:00
c9e4d63abe day24 part 2 2020-12-24 00:15:05 -08:00
c0b03656c1 day24 part1 2020-12-23 21:59:25 -08:00
8abb183072 day23 part 2 2020-12-23 21:05:33 -08:00
ca51acbec6 day23 part 1 2020-12-23 20:58:53 -08:00
f004fa549f day22 2020-12-21 22:02:16 -08:00
3f8af0c1e8 day18 now with some comments 2020-12-21 15:24:56 -08:00
00ec9c2867 day18 without nom 2020-12-21 15:11:43 -08:00
ee5ee9447a Fix day18 part1. It was broken when writing part2. 2020-12-21 13:22:18 -08:00
393bd7a7d7 day21 2020-12-21 11:15:18 -08:00
5b051a8ff9 day20 part 1 2020-12-21 09:25:15 -08:00
769937bf97 day19 working part1, not working part2.
I don't really understand what's expected of part2 and the example is
not simple enough for me to step through in my brain so I'm probably not
going to get it.
2020-12-19 16:41:28 -08:00
2448b9a538 rename some fn's 2020-12-18 21:58:49 -08:00
62601e0782 day18 simplification. No subtraction of division necessary 2020-12-18 16:31:35 -08:00
40b618593f cargo fmt 2020-12-18 16:08:29 -08:00
9e2e317f8d day17 part2 2020-12-18 16:08:14 -08:00
3a7cada1f9 day17 part1 2020-12-18 16:03:23 -08:00
bd0fd7663f day18 part2 2020-12-18 15:02:24 -08:00
f756bc105f day18 part1 2020-12-18 14:47:38 -08:00
d21b0dbe7b day16 avx2 2020-12-17 14:15:18 -08:00
20e7d9c512 day16 2020-12-16 16:52:43 -08:00
8c537e610f day15 2020-12-15 09:13:25 -08:00
499f6ad008 fix day9 overflow 2020-12-15 07:58:09 -08:00
c37bb9dd63 day14 2020-12-14 21:41:06 -08:00
6a4ac7008b day13 only part 1 2020-12-13 15:18:50 -08:00
d504254ecf day12 2020-12-12 15:05:48 -08:00
ff8c6f7156 day11 2020-12-11 13:33:44 -08:00
0d372dfdb1 some cleanup 2020-12-10 11:03:09 -08:00
99ed36f50a day10 2020-12-10 10:49:48 -08:00
24a9f1324a day9 2020-12-09 06:33:34 -08:00
c1aadc4143 day 8 2020-12-08 05:58:15 -08:00
3d84c3e8dc Merge branch 'master' of wathiede/aoc into master 2020-12-08 04:02:37 +00:00
82786157de Add main.rs to run all solutions and update README.md. 2020-12-07 19:50:21 -08:00
0d6b16a46a day7 2020-12-07 09:47:07 -08:00
7c0bc429c9 day 6 2020-12-06 13:56:31 -08:00
c08646fc79 day5 part2 2020-12-05 15:29:38 -08:00
3711652475 day 5 part 1 2020-12-05 09:45:08 -08:00
77febf6a0c day4 2020-12-04 16:50:04 -08:00
2fcb0d6c4e day3 2020-12-03 07:49:40 -08:00
90ba45dd52 cleanup 2020-12-02 13:04:15 -08:00
52 changed files with 15067 additions and 73 deletions

2
.cargo/config.toml Normal file
View File

@@ -0,0 +1,2 @@
[build]
rustflags = ["-Ctarget-cpu=native"]

62
README.md Normal file
View File

@@ -0,0 +1,62 @@
```
Advent of code 2020
Day 1 - Part 1: 1016964
generator: 122.086µs,
runner: 4.434µs
Day 1 - Part 2: 182588480
generator: 99.356µs,
runner: 7.318µs
Day 2 - Part 1: 586
generator: 233ns,
runner: 1.453395ms
Day 2 - Part 2: 352
generator: 423ns,
runner: 922.764µs
Day 3 - Part 1: 265
generator: 964.093µs,
runner: 9.734488ms
Day 3 - Part 2: 3154761400
generator: 938.153µs,
runner: 52.66926ms
Day 4 - Part 2: 186
generator: 697ns,
runner: 2.760526ms
Day 5 - Part 1: SeatId(933)
generator: 489ns,
runner: 776.127µs
Day 5 - Part 2: SeatId(711)
generator: 443ns,
runner: 800.487µs
Day 6 - Part 1: 6633
generator: 336ns,
runner: 1.669623ms
Day 6 - Part 2: 3202
generator: 448ns,
runner: 1.538626ms
Day 7 - Part 1: 208
generator: 379ns,
runner: 6.340596ms
Day 7 - Part 2: 1664
generator: 660ns,
runner: 5.171311ms
Day 8 - Part 1: 1723
generator: 541ns,
runner: 564.443µs
Day 8 - Part 2: 846
generator: 412ns,
runner: 714.064µs
```

96
input/2020/day10.txt Normal file
View File

@@ -0,0 +1,96 @@
70
102
148
9
99
63
40
52
91
39
55
28
54
22
95
61
118
35
14
21
129
82
137
45
7
87
81
25
3
108
41
11
145
18
65
80
115
29
136
42
97
104
117
141
62
121
23
96
24
128
48
1
112
8
34
144
134
116
58
147
51
84
17
126
64
68
135
10
77
105
127
73
111
90
16
103
109
98
146
123
130
69
133
110
30
122
15
74
33
38
83
92
2
53
140
4

93
input/2020/day11.txt Normal file
View File

@@ -0,0 +1,93 @@
LLLLLLLLL.L.LLLL.LLLL.LLLLLLLL.LLLLLLLLLLLLL.LLLL.LLLLLL.LLLL..LLLLLL.LLLLLLLL.LLLLL.LL.LLLLLLLLLL
LLLLLLLLL.LLLLLLLLLL..LLLLLLLL.LLLLLLLL.LLLL.LLLL.LLLL.LLLLLL.LLLLLLLLLLLLLLL..LL.LLLLLLLLLLLLLLLL
LLLLLLLLL.LLLLLL.LLL..LLLLLLLL.LLLLLLLL.LLLL.LLLL.LLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
LLLLLLLLL.LLLLLL.LLLLLLLLLLLLL.LLLLLLLL.LLLLLLLLL.LLLLLL.LLLL.LLLLLLL.LLLLLLL.LLLLLLLLL.LLLLLLLLLL
LLL.LLLLL.LLLLLLLLLL..LLLLLLLL.LLLLLLLL.LLLL.LLLL.LLLLLL.LLLL.LLLLLLLLLLLLLLL.LLLLLLLLL.LLLLLLLLLL
LLLLLLLLL.LLLLLLLLLLLLLLLLLLLLLL.LLLLLL.LLLL.LLLL.LLLLLL.LLLLLLLLLLLL.LLLLLLL.LLLLLLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLLLLLLLLLLLLLL.L.LLLLLLLL.LLLL.LLLLLLLLLL..LLLL.L.LLLLL.LLLLLLL.LLLLLLLLL.LLLLLLLLLL
LL.LLLLLL.LLLLLL.LLLLLLLLLLL.LLLLLLLLLL.L.LLLLLLL.LLLLLL.LLLLLLLLLLLLLLLLLLLL.LLLLLLLLL.LLLL.LLL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LLLL.LLLLLL..LLLLLLLLLL..LLLLLLL.LLLLLLLLLLLLLLLLLLLL
.LL...............L..L.L.LL...L.LL.....LL..L.LL.L.L...L.......L..L.LL..L.L...LL...L...............
LLLLLLLLL.LLLLLL..LLL.LLLLLLLL.LLLLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
LLLLLLLLL.LLLLLL.LLLL.LLLLLLLLLLLLL.LLL.LLLL.LLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLL.LLLLLLLLLLLLLLLLLLLL
LLLLLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLL.L.LLLLLLLLLLL.LL.LLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLLLLL
LLL.LLLLLLLLLLLL.LLLL.LLLLLLLLLLLLLLLLL.L.LLL.LLLLLL.LLL.LLLL.L.LLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLLL
LLLLLLLLL.LLLLLLLLLLLLLLLLLLLL.LLLLLLLLLLLLL.LLLL.LLLLLLLL.LL.LLL.LLL.LLLLLLLLLLLLLLLLLLLLLLLLLLLL
LLLLLLLLL.LLLLLLLLLLLLL.LLLLLL.LL.LLLLL.LLLLLLLLLLLLLLLL.LLLL.LLLLLLL.LLLLLLL.LLLLLLLLL.LLLLLLLLLL
L.LLLLLLLLLLLLLLLLLLL.LLLLLLLL.LLLLLLLL.LLLL.LLLL.LLLLLL.LLLL.LLLLLL..LLLLLLL.LLLLLLLLL.LLLLLLLLLL

786
input/2020/day12.txt Normal file
View File

@@ -0,0 +1,786 @@
S2
W5
F20
E3
S5
R90
W5
F48
R180
E3
S3
E5
S3
F83
S1
W5
F81
W3
R90
F88
S2
R90
E2
L90
W4
F77
E1
R90
S4
E2
F89
N2
L90
N2
N2
E3
L180
N1
F82
R90
S3
F64
W1
R180
S2
R180
F28
L180
S3
F100
E1
S4
S5
R90
F3
W5
N4
F9
N5
E4
R90
F83
L180
W3
N5
W2
R180
W1
S4
L90
S5
R90
R90
F36
L180
W1
F88
E3
R90
F13
W1
F13
W4
R90
E3
F98
S4
E5
R90
F77
E5
L180
N5
R90
E1
F70
L180
F54
E5
F9
L180
N3
F77
E2
F81
E2
S1
F41
L90
F32
S3
F66
N2
E4
R90
F80
R90
W1
R90
S3
F65
S4
R90
W4
S4
R90
W4
S2
E1
F44
R90
F53
E3
F67
S5
L90
R90
W2
S2
E3
N5
F97
N3
E1
R90
W4
N5
S4
F38
N5
N1
W4
S3
E1
S3
F87
E1
R90
E2
L180
S1
L90
F29
R90
S2
F95
N2
E5
F24
W1
F71
E3
L90
F16
L90
S5
L90
W1
F95
L90
W2
F97
E4
R90
N5
F77
E2
L90
F71
L90
W2
R90
F75
E1
S1
F28
F86
R90
E3
F9
N2
W4
S1
L90
F10
W4
L90
S5
E1
L90
W2
S3
F41
L90
S5
F73
L90
S4
F80
W4
R180
S4
E3
F89
E5
N5
L90
F66
N4
W1
F93
W1
F27
F68
N4
F23
L90
F14
S3
F74
N2
E2
R90
S4
F85
N2
L180
L180
F55
S5
E5
F42
N2
R90
F53
S4
F70
E2
F73
S4
F71
L90
E1
S3
E5
N3
E2
N5
L270
F69
E5
F30
N1
R90
N4
F15
E4
R180
F12
E2
F95
E2
S4
F13
S1
E1
N4
E3
L270
E4
S5
E3
N2
R180
S2
W2
L90
S3
W4
R90
E1
L180
W5
F23
E5
F67
R90
N2
W4
L90
S1
L90
F17
W2
F80
E1
F13
S2
E3
S4
F46
F70
R180
E3
L90
E4
L90
S3
F31
W5
R90
F21
S5
L90
F12
L90
F70
S1
R180
W5
F14
S5
W5
S1
F56
L90
F43
S4
N4
E1
R180
S1
R90
E3
N4
R90
S2
E5
S4
W4
R90
F88
S4
R90
F79
L90
N2
E3
F74
L90
F72
W1
N3
R90
E2
F38
W3
L90
E3
N2
R90
E2
L90
N3
E1
F96
E3
S4
R180
F28
S2
F93
L270
N3
R90
N2
E4
S1
F47
L270
F9
N2
F80
S4
L180
N5
W2
L90
W4
N5
L90
F82
R90
N3
F4
R90
F96
W5
R90
F28
W2
S2
F16
S4
R90
F9
N5
W4
F78
E3
F84
L90
F42
W2
F43
W4
L90
F95
E1
R90
F59
L90
F82
W1
F17
S4
R180
F91
L180
N1
R90
N3
F57
L90
F90
N3
R90
F98
N5
R90
N2
R90
F4
S2
F80
S2
N2
W4
L90
E2
F67
R90
W4
L180
F22
L90
S3
F9
N5
W2
L180
S3
F23
S4
W4
F90
S2
F32
S3
E5
R90
E1
F64
R180
F17
E3
R90
N2
E1
F90
W3
N5
F19
S5
E4
N5
R90
W1
F18
R180
E2
R90
F76
L90
N2
F96
F38
R180
F94
S4
W4
S4
F63
E4
L90
F69
S2
W3
N1
L270
N1
L90
N4
R90
E5
F67
F85
S1
F2
F68
W2
R90
E4
R90
S3
W4
S2
N5
F13
R180
W1
F31
S1
F23
S1
R90
F86
L90
N5
W3
F47
R90
R270
S1
L90
S1
F40
N4
R180
N1
L180
W3
S1
W5
L90
W5
F41
S4
E2
N5
E4
N1
F97
L90
F62
N5
R90
F98
R180
S5
L270
N5
W5
N4
E3
F38
L90
S2
F79
R270
E1
F14
W1
F38
E3
L180
N4
L90
S5
F90
S1
F7
N1
F11
W4
R180
F73
L90
F54
F25
W5
S3
F39
E2
F37
E2
S4
F94
W5
S2
L180
W3
F70
S3
R180
W1
N5
R90
S4
F12
S3
F45
E1
N3
R90
S2
L180
E4
S3
W5
F9
S4
R90
F19
W3
N4
W5
R90
F16
W3
S4
W1
S3
R180
S4
E4
N1
W3
F10
N5
E2
F61
E4
S1
W3
N5
W2
L90
W5
N2
W1
F8
W4
S5
L180
F76
N1
R180
S3
R180
S3
E1
R90
W1
F38
R90
F74
N2
F60
L90
E2
S3
F78
W1
F57
R90
F39
N5
F2
E3
R90
F81
E2
F2
S3
R90
F95
S4
F1
E2
N5
L270
F59
W2
R90
S1
F42
E2
N5
E4
L90
W1
F17
E2
F91
R90
E3
F30
S1
R90
W5
F74
W5
N1
N4
R180
S5
R180
F92
N4
N3
E3
R90
F60
S4
L90
E4
R270
F3
E1
L180
E1
S5
F84
E3
L90
N3
F27
W1
F58
N1
F93
N2
F30
L90
N2
L90
N2
F99
W4
S2
F13
L90
N3
W4
F100

2
input/2020/day13.txt Normal file
View File

@@ -0,0 +1,2 @@
1004345
41,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,37,x,x,x,x,x,379,x,x,x,x,x,x,x,23,x,x,x,x,13,x,x,x,17,x,x,x,x,x,x,x,x,x,x,x,29,x,557,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,19

580
input/2020/day14.txt Normal file
View File

@@ -0,0 +1,580 @@
mask = 1X000X0101XX101101X01X101X1000111X00
mem[10004] = 3787163
mem[18866] = 665403
mem[13466] = 175657346
mem[21836] = 99681152
mask = 110X1001110110X10100010X0000X010X11X
mem[14957] = 51287
mem[47879] = 1706397
mem[60036] = 139731
mask = 0100X011110X11111100000010X1XXX1X100
mem[13312] = 473519
mem[45712] = 11576
mem[65077] = 499111
mem[20582] = 970
mem[57647] = 30626762
mem[5265] = 14655010
mask = 11X010010X010011X110X00X1XX0001101X1
mem[45904] = 324397
mem[33792] = 56494291
mem[35775] = 597
mem[58036] = 267391350
mem[10448] = 77300
mem[49376] = 12095094
mask = XX000001100001100X0X10000X010X111110
mem[17484] = 382723
mem[58181] = 58
mem[51203] = 253
mem[36984] = 552006
mask = 110XXX010X011X100X00110X101010110000
mem[46734] = 272208
mem[50532] = 1071505732
mem[42057] = 18023379
mem[40723] = 203396667
mem[60376] = 24255
mask = 1110X001010010110X00XX0110X1X00000X0
mem[6373] = 509708
mem[12417] = 1586323
mem[35427] = 457
mem[14175] = 2420631
mem[28822] = 749
mem[52248] = 12324270
mask = X1X000111X0100100X00XX10X00011X1X000
mem[26803] = 500540
mem[7065] = 8843071
mem[55118] = 40141309
mem[2804] = 3136584
mask = 110X1X0001XX100101001110XX0010X100X0
mem[19256] = 7428
mem[13879] = 1353915
mem[43372] = 5882
mem[6447] = 4535
mask = 100X11X01001XX01110X001001000X010X10
mem[55173] = 21377
mem[12745] = 125083
mem[311] = 602879
mem[39306] = 2711255
mask = 1X10X001100010110100101100110X0X0111
mem[65528] = 672476373
mem[40933] = 15862
mem[20739] = 128727771
mem[30419] = 29600646
mem[26253] = 3206153
mask = 1XX00X011101X01101X0X001110X1XX10100
mem[59482] = 66620
mem[41885] = 399931609
mem[22336] = 62900
mem[8106] = 1106171
mem[5796] = 37170431
mem[17413] = 15524
mem[15447] = 28761
mask = 11000001X10X00110XX1100000011011X100
mem[43397] = 16642
mem[24122] = 173985292
mem[10901] = 6397292
mem[7385] = 7495847
mask = X1000001X00010110100X0010000111X0100
mem[38664] = 43195
mem[17708] = 56326435
mem[47879] = 3654030
mem[26738] = 6346961
mem[22210] = 118801717
mem[56703] = 13588355
mem[65252] = 262312
mask = 1X0XXX000100X0X101001100001X101X1X00
mem[62976] = 82374293
mem[64638] = 14434
mem[43964] = 13761
mask = 01000001X00110110X00XX00X10010X10X11
mem[4724] = 2903
mem[5158] = 164937
mem[35328] = 30334
mem[46966] = 2759991
mem[52761] = 25675
mask = X1101000XX1X00X10100001011X01101XXX1
mem[4392] = 118555033
mem[23892] = 4622396
mem[65088] = 1887562
mem[13476] = 226944
mask = 11X0X001X1X1001101101X0X110X000X01X0
mem[311] = 290524064
mem[54164] = 1109593
mask = 100X100001000X0101000X010XX11011110X
mem[62632] = 2370
mem[52805] = 3829934
mem[40012] = 9175340
mem[37847] = 117719078
mask = X110000X010000X10100001X1011010X0X00
mem[37404] = 3551660
mem[15104] = 527114796
mem[49376] = 968
mem[56095] = 316752
mem[6747] = 1807
mask = 11000X010101101X01000X001X011XXX10X0
mem[41840] = 2775
mem[60125] = 182425209
mask = 10011000010XX011X100101010XX1X1X0100
mem[6747] = 4044
mem[16920] = 114852
mem[4128] = 41260
mask = X10000X11001X01X010000X000XX10X0X111
mem[14175] = 16258730
mem[41484] = 2757
mem[37593] = 33406295
mem[8317] = 415217155
mem[51008] = 2636
mem[21446] = 259080582
mem[15515] = 2734
mask = 11X0X001X10X100X01000110101X101X00X0
mem[61143] = 129
mem[23860] = 247
mem[47879] = 22784315
mask = 01000011110X111XX1000XX0110100X10X0X
mem[2435] = 1973
mem[23908] = 133875113
mem[12460] = 103067
mem[6211] = 1359103
mem[7534] = 23782
mask = 111000010100X0X10100001010X1XX000XXX
mem[53221] = 4273517
mem[13255] = 3334
mem[31239] = 113778111
mem[32900] = 6938492
mask = 1110XX010110X1XX011011000111100X1101
mem[9359] = 8377654
mem[52805] = 3549344
mask = 0X1000X01100X1XXX00X0011001010000101
mem[28303] = 227915
mem[257] = 1876777
mem[63555] = 192083072
mem[56391] = 147544840
mem[63072] = 6915
mask = XX0000111X011111010X0001100000010110
mem[10311] = 16038309
mem[41484] = 30818
mem[54410] = 3229
mem[2435] = 10793289
mem[26631] = 87736025
mem[13639] = 7253
mask = 0100101XX1X01111X1XXX0001100010101X0
mem[2028] = 6656580
mem[29799] = 2772
mem[64020] = 958010
mem[5974] = 569
mem[8667] = 2023725
mem[16595] = 25313923
mem[35402] = 558
mask = 1X0X00001X01100X1X0000010100001111X1
mem[41459] = 12342565
mem[23672] = 36167
mem[10300] = 65046557
mem[56503] = 62989647
mem[37993] = 217162
mask = 1111101100000X01X1011X111111X1100X10
mem[21085] = 15851
mem[25194] = 6075854
mem[42984] = 435548
mem[8346] = 978945
mem[5661] = 4981
mask = 0X0000011X0X0010010X1XXXX01010001X01
mem[27985] = 234997
mem[14463] = 45760
mem[15023] = 17580
mask = 110000110X01X00101X01X1X10001101X000
mem[63245] = 6018482
mem[30940] = 257367431
mem[10617] = 1134348
mem[57343] = 284899785
mem[21373] = 1004097
mask = 1100100XX10X00111X101001X10100101101
mem[54836] = 45353796
mem[43493] = 1827049
mem[790] = 48270178
mem[42104] = 67747
mem[33977] = 222196
mem[56552] = 21306885
mem[63222] = 64849326
mask = XXX00101011110110100010010111000X01X
mem[33756] = 4616
mem[44216] = 6220360
mem[25526] = 811292762
mem[59209] = 6509
mem[13255] = 2140854
mask = 1110000110X0X11X0100000110100X010110
mem[7764] = 3574
mem[872] = 16596
mem[5555] = 763
mem[59969] = 25416012
mask = 0X000001100X0010010X1X1110X0X0101010
mem[64638] = 2350
mem[36949] = 3170
mem[41641] = 2041278
mask = 11101001X1X01X0X01X01000101110000101
mem[63222] = 998162428
mem[36105] = 58286575
mem[36644] = 6605534
mem[64290] = 352783
mem[52428] = 72931
mem[1450] = 460492
mask = 00X0000111X10XX00101111XX00001XX001X
mem[47375] = 1428142
mem[12574] = 262115
mem[1393] = 215199811
mem[2729] = 53399
mem[1417] = 163417802
mem[13888] = 30705
mem[52121] = 629932866
mask = 1X00010X01X01X01010X10111X1100101000
mem[63515] = 22411
mem[23091] = 909249
mem[21738] = 438843570
mem[44851] = 181
mem[10095] = 4014
mask = 010X0X11100X1X100100000101000111011X
mem[19759] = 29570
mem[2970] = 191037
mem[9604] = 4079
mem[657] = 465
mask = 1X000X01X1X10011010X1XX11100X0111100
mem[43949] = 478212819
mem[5597] = 63092
mem[58361] = 5457568
mem[41459] = 187363
mask = XX1X0011X100011X00101X11000XX101100X
mem[13888] = 638337993
mem[37934] = 4985
mem[55575] = 76330
mem[10257] = 3056
mem[9744] = 4917501
mem[32361] = 63127
mask = 11X00011X001001X010001000010011X0X0X
mem[43761] = 6764398
mem[24646] = 30592
mem[36456] = 799
mem[42057] = 1771
mem[35165] = 2871
mask = 110000010X01X00101X01XX01X1001X00100
mem[30294] = 30942244
mem[34398] = 1382102
mem[63222] = 260411654
mem[39566] = 133753617
mem[4818] = 4462832
mem[36866] = 52
mem[14603] = 244236
mask = 1100010XX101101X01XX111X0001X1111110
mem[33984] = 490757
mem[29144] = 42516
mem[12171] = 11800
mem[35282] = 19533
mem[30399] = 14796
mem[19650] = 158686001
mem[6447] = 177
mask = X100001X1001X011X10001000110111001X0
mem[62632] = 98281297
mem[57359] = 3527162
mem[12082] = 171252979
mask = 11000011110100XX0X000001X11000100000
mem[35211] = 130598799
mem[28482] = 85586
mem[55217] = 240324
mem[6740] = 92413135
mem[1291] = 79746542
mask = 1000010XX101101101X000101X0010010110
mem[45328] = 3595262
mem[3490] = 877
mem[36826] = 11235
mem[110] = 1713
mem[7313] = 13261628
mem[17524] = 263660940
mem[40227] = 14071730
mask = 1101110X00011X10000001011110X10X0100
mem[26215] = 3075603
mem[2028] = 2167
mem[36320] = 586
mem[8270] = 71526
mem[44216] = 5252007
mask = 1110100100010011111X00X0X000X0000111
mem[50149] = 58998983
mem[47879] = 1944464
mem[19922] = 3875
mem[42517] = 43875909
mem[18735] = 7318682
mem[26678] = 17877212
mask = 0100001101X1X10101001011011X0X000100
mem[56402] = 14747004
mem[29737] = 15131100
mem[15515] = 2942003
mask = 110000X10XX110X10110111110XX01000110
mem[54032] = 100009547
mem[15057] = 5910646
mem[62982] = 135495807
mem[41840] = 44565248
mem[43139] = 14110
mem[37411] = 434104731
mask = 1100000XX10110X101000XX11010XX100100
mem[29795] = 954605601
mem[13364] = 402011
mem[22468] = 778482653
mem[46818] = 25125
mem[5527] = 101
mem[9814] = 306208600
mem[43397] = 239110
mask = X1X00011X10100X10100111010X110X00X00
mem[43405] = 4234874
mem[49758] = 5465414
mem[20027] = 12031953
mem[52428] = 2873
mem[23261] = 117091570
mem[54960] = 1624
mem[1039] = 22719
mask = X1101001011X110001X011110101011X0011
mem[14463] = 92010258
mem[61143] = 11340
mem[1450] = 15947
mask = X10000X1X1010011X10000X01011X0X1010X
mem[45367] = 1060810121
mem[26527] = 23928
mem[15407] = 30081582
mem[8768] = 7626
mask = 100X1X001001000111000011X001XX0X1X1X
mem[57779] = 1222
mem[60458] = 507523
mem[9438] = 2655
mem[11306] = 32130962
mem[13120] = 212870
mem[18699] = 32470
mask = 11X0XXX0110100X101000100100000100111
mem[50532] = 6760
mem[65458] = 1921851
mem[50231] = 1055316713
mem[11611] = 82996
mem[32408] = 1879545
mem[56334] = 6421
mem[19546] = 1572
mask = 0101101101011001X0001X111X1100010X00
mem[11808] = 39158
mem[13364] = 3686
mem[58181] = 3954
mask = 11X000110X0100110100X1XXX010011001X0
mem[18996] = 10869875
mem[9359] = 11905624
mem[10037] = 675
mem[63666] = 1335625
mask = 10011000100X000111000XX000010000X110
mem[30987] = 168211
mem[2059] = 19013
mem[36287] = 21065
mem[55613] = 24671374
mask = 01110X11000X0XX101100111111101X11010
mem[27985] = 1661941
mem[33107] = 921718
mem[23617] = 16368
mem[41120] = 74
mask = 11000001100X1X11010000X001X0X1X101X0
mem[39739] = 63291061
mem[52804] = 15173
mem[14981] = 648
mem[65088] = 1644
mem[47873] = 43267217
mask = 11X000XX100X11110XX01X001X0001010000
mem[39631] = 19215077
mem[17524] = 513536515
mem[49990] = 109517
mask = X000X000100X0001110000X1010011010001
mem[13466] = 124984033
mem[12574] = 260829
mem[1403] = 115889305
mask = 0110XX1X11010X10000X00XX01X01011001X
mem[37593] = 173042
mem[49988] = 200423
mem[52823] = 7747994
mem[2391] = 611579
mask = X01XX00X11X100100X011111010011000010
mem[50986] = 277302
mem[48505] = 2276386
mem[28286] = 12419937
mem[35832] = 7585
mem[44379] = 340032079
mask = X1X0X011000111110X000001111000100100
mem[26228] = 1347384
mem[46316] = 35047
mem[50294] = 7049
mem[31571] = 5511
mem[6747] = 2881667
mem[55522] = 239714
mask = X11XX0100101X110001001100010X1X01X00
mem[63523] = 3173
mem[15717] = 1059
mem[1039] = 1756
mem[652] = 74372
mem[52561] = 1253065
mem[34744] = 12
mem[36103] = 67545913
mask = X11X001X0X0X00110100010X0101X101X100
mem[43915] = 2312924
mem[625] = 52614
mem[16137] = 3337
mem[33395] = 56449350
mem[57004] = 9401213
mem[22475] = 273016261
mask = 11X000X1100X1X110100X10000XX0X000111
mem[17020] = 461488870
mem[64339] = 76903
mem[12489] = 1867
mem[40021] = 416088
mem[45893] = 941080
mask = 010XX0110X0X1XX10X000111101000X101X0
mem[1347] = 27142438
mem[56404] = 28056
mem[15515] = 13463506
mem[34610] = 408788
mem[23768] = 4390
mask = 0X0X000X10000X100X000001X0X00X11111X
mem[34140] = 2486
mem[45229] = 219957
mask = 1X010X0X11X1100X01000001010100110000
mem[63207] = 214605819
mem[3120] = 975024
mask = X100000100011XXX00000000110010X0X010
mem[36039] = 1351
mem[24280] = 1529
mem[54240] = 438022
mem[49990] = 7079087
mem[21713] = 14792683
mem[52177] = 1961
mem[7345] = 406699254
mask = 1X00010X01X010110X001110100X00101100
mem[27536] = 12551
mem[7678] = 10576
mem[17936] = 1475
mem[9814] = 99131792
mem[41885] = 96156
mem[13120] = 35225
mask = X111X011000X00X101XX01X10111X1X11010
mem[60152] = 82433112
mem[22477] = 4090530
mem[16768] = 58352433
mem[7764] = 192408366
mem[51535] = 69751
mem[850] = 131
mem[48467] = 377832323
mask = 0100001110010010X10X1X111101001100X1
mem[23672] = 1931
mem[6708] = 469
mem[16775] = 2368
mem[12502] = 115896934
mask = 100X0000X00XX0011100X01X010111X11011
mem[24733] = 936
mem[269] = 362232
mem[60475] = 322199998
mem[14404] = 1261
mem[42303] = 27351706
mem[13699] = 34315
mask = 0111101100X10X11010X010X0101X00X10X0
mem[11893] = 62548
mem[57647] = 237349
mem[21200] = 14649
mem[27128] = 80169
mem[32969] = 725133
mem[31032] = 131322
mask = 0100XX01100X1010010000000X01X0110110
mem[18930] = 68333625
mem[6819] = 341
mem[26253] = 220435
mem[15909] = 79688
mem[21059] = 2671693
mask = X11XX00X11XX001101X00XX0110000100111
mem[34832] = 248
mem[11532] = 708205
mem[654] = 7796300
mem[46941] = 94124
mem[49206] = 109
mem[31987] = 1877
mask = 11000X01X1001X0X01X011X00000X0000101
mem[60475] = 67279
mem[14929] = 3073
mem[38463] = 6762244
mem[47778] = 173399092
mem[62317] = 57461236
mask = 110XX000110X1001X100000001000X110000
mem[15407] = 249
mem[7202] = 55714
mem[48800] = 25528109
mem[20959] = 4106091
mem[6496] = 1976005
mem[6708] = 3013607
mask = 110000011XX1X011X1001101010XXX010X10
mem[64787] = 469608465
mem[41416] = 59853
mem[10680] = 16299
mem[19394] = 56413
mem[39572] = 25343
mem[19686] = 277550
mask = 01X0001X1100001X00101110111X1001X000
mem[4228] = 590408603
mem[62269] = 394
mem[60694] = 483056
mem[25301] = 664548494
mask = 110X00001101100101000101X1X1X00100X1
mem[29136] = 3854559
mem[24118] = 486135
mem[34398] = 430609446
mem[12782] = 3721785
mask = 110001001101X0X10100110000X0010100X0
mem[5661] = 13272
mem[2012] = 38954
mem[60732] = 7014
mask = 0100X0X1X00100100100100111111001100X
mem[49716] = 284158681
mem[12224] = 10628127
mem[32900] = 7796903
mask = 0110001XX10X0X1000X0011X00X0110X00X0
mem[8844] = 26023958
mem[65175] = 81386046
mem[54410] = 4119058
mask = X10000X1XX01X01X0100000X1X0001010100
mem[62976] = 29914819
mem[7792] = 49702987
mem[61389] = 124692445
mem[10004] = 29696422
mem[61943] = 43748477
mem[61040] = 199512596
mask = 0X00XX11110X10X1010101010X0011X00X1X
mem[10880] = 91763
mem[93] = 46698
mask = X100XX111X01001101000X00101000000000
mem[30458] = 4474263
mem[2932] = 25975
mem[25986] = 106060
mem[20974] = 20857
mem[23672] = 853256
mask = 11000011010XX01101X000XX10111001X11X
mem[39572] = 24316000
mem[14981] = 41633461
mem[41885] = 3807449
mem[49990] = 31780591
mem[2414] = 5032671
mask = 111010XXX110X1010110100001111010X101
mem[26803] = 474
mem[15407] = 33070532
mem[35211] = 24880155
mem[52428] = 396521
mem[9814] = 252376513
mask = 01000011XX011011X10XX000X11010000010
mem[20974] = 101
mem[13535] = 632
mem[12489] = 58930152
mem[61506] = 681
mem[18309] = 8028011
mem[33984] = 7404765
mask = 1100X01X01X1101101100011100X01000111
mem[15864] = 413
mem[15023] = 7825
mem[60154] = 451000
mem[53862] = 240968
mem[63761] = 5500
mem[8136] = 5727
mask = 01000X1XX101001111X00000101X110X0X00
mem[884] = 1258
mem[12502] = 150248279
mem[63] = 1403008

1
input/2020/day15.txt Normal file
View File

@@ -0,0 +1 @@
1,12,0,20,8,16

268
input/2020/day16.txt Normal file
View File

@@ -0,0 +1,268 @@
departure location: 25-568 or 594-957
departure station: 33-447 or 466-952
departure platform: 31-700 or 725-956
departure track: 43-124 or 141-952
departure date: 26-290 or 306-962
departure time: 34-754 or 763-960
arrival location: 29-208 or 217-958
arrival station: 48-118 or 124-973
arrival platform: 35-368 or 389-972
arrival track: 47-91 or 106-970
class: 35-521 or 528-960
duration: 27-833 or 855-965
price: 25-870 or 895-957
route: 31-140 or 146-965
row: 35-736 or 743-957
seat: 33-227 or 249-961
train: 27-763 or 788-961
type: 34-167 or 193-950
wagon: 47-437 or 443-952
zone: 48-928 or 940-955
your ticket:
113,197,59,167,151,107,79,73,109,157,199,193,83,53,89,71,149,61,67,163
nearby tickets:
659,831,365,819,499,735,227,617,597,323,200,413,863,803,5,753,925,468,632,658
927,75,984,694,820,863,534,221,199,559,628,748,860,940,792,351,496,947,278,259
418,710,489,833,397,567,488,620,158,218,199,857,271,566,911,790,152,489,746,421
148,646,536,509,923,537,944,552,488,390,113,218,256,522,562,685,628,400,568,148
470,488,669,648,802,323,801,109,926,496,207,267,68,397,565,196,648,648,815,383
911,362,638,673,911,4,471,647,646,164,699,681,557,906,288,657,90,445,730,218
493,679,809,398,116,544,405,692,616,736,662,410,316,201,906,403,322,314,331,703
792,481,67,503,545,536,806,220,677,118,988,726,551,106,87,400,479,155,910,71
863,322,355,482,550,432,157,661,113,749,308,805,77,167,75,107,645,885,529,506
336,433,147,909,530,727,751,617,220,68,904,442,59,82,537,425,562,794,506,613
329,908,363,321,504,419,794,521,269,417,285,189,568,940,912,902,498,57,421,558
696,649,444,413,503,363,596,78,536,977,626,329,745,538,263,166,308,899,404,428
613,919,354,163,278,919,865,158,614,419,620,260,128,205,567,651,792,153,820,685
706,321,903,437,444,477,443,395,447,364,160,445,529,365,88,262,700,630,226,421
790,236,632,411,865,60,405,266,315,64,356,107,146,118,644,699,608,503,792,447
56,944,115,277,434,621,331,287,21,607,904,274,909,434,280,494,433,472,249,473
888,323,672,419,447,635,678,391,788,791,331,403,274,664,270,686,194,338,403,736
112,341,491,258,814,404,112,282,337,322,614,277,911,419,252,108,690,500,10,828
312,392,337,669,508,557,200,694,309,226,700,909,16,343,289,333,754,262,664,789
602,476,793,561,427,416,627,112,663,821,74,279,554,427,536,123,365,826,899,203
54,685,193,321,866,650,417,196,680,287,79,360,117,62,495,412,272,205,438,681
940,269,566,519,642,52,164,513,606,829,159,796,603,89,312,492,661,363,988,217
156,826,316,525,895,902,823,619,149,310,863,536,208,495,685,533,594,813,284,355
353,560,814,293,655,639,365,949,553,926,546,401,917,793,672,907,693,725,813,814
604,636,124,69,259,682,602,343,863,640,154,445,531,625,509,942,292,796,624,197
490,55,6,860,395,865,831,89,910,115,731,639,725,537,79,163,310,691,671,366
276,196,442,221,594,644,273,660,594,418,810,808,436,108,429,609,261,281,664,863
633,568,272,412,67,541,561,678,729,308,444,274,418,948,652,197,81,400,517,937
155,736,402,897,595,615,55,266,109,404,280,692,625,918,735,759,633,421,903,672
651,113,914,632,271,80,386,626,511,220,869,255,531,811,413,353,57,763,76,391
331,546,82,266,826,326,54,945,933,948,920,118,287,903,801,106,358,163,618,676
911,520,922,287,733,57,195,796,624,672,932,624,810,650,833,666,801,428,868,911
108,65,79,272,818,265,544,80,426,809,671,218,152,936,353,630,664,493,445,113
469,652,633,274,675,166,448,653,225,540,150,946,630,322,157,200,437,472,151,735
636,275,670,680,164,285,771,312,869,628,898,653,912,492,500,520,640,655,223,196
91,112,408,601,508,90,823,564,345,401,878,50,267,864,508,349,338,512,261,146
397,549,803,74,394,637,150,685,922,868,870,407,330,997,903,492,833,223,308,332
638,677,342,152,333,467,476,530,947,809,487,50,656,940,799,912,536,686,619,989
688,605,258,668,152,50,815,642,631,107,410,946,154,124,768,819,407,85,917,856
552,342,897,114,61,867,118,165,544,346,323,920,558,438,796,687,693,155,290,419
155,406,331,899,499,312,796,820,747,870,699,323,83,385,365,151,744,317,665,193
303,615,602,942,476,425,642,551,817,830,401,640,666,906,628,162,566,317,221,639
258,0,506,513,548,537,258,405,255,679,631,659,792,365,799,532,420,556,499,159
831,904,949,493,271,810,622,677,429,645,327,167,146,807,597,685,980,405,330,411
683,614,403,274,743,661,367,830,625,687,361,54,918,53,618,703,948,565,611,320
115,51,330,926,74,158,894,788,545,63,350,789,115,106,420,649,669,62,822,56
284,898,410,517,827,613,943,310,686,161,283,904,362,492,664,203,330,142,259,927
457,333,345,555,62,659,489,633,540,166,828,833,861,482,685,495,624,856,827,226
355,940,224,145,864,629,147,308,437,415,913,926,662,679,273,402,156,635,156,306
646,818,70,659,628,610,552,280,865,148,928,158,351,807,526,680,496,920,422,503
942,208,511,151,899,489,414,912,811,497,865,613,684,480,185,351,490,689,476,567
663,339,510,495,914,555,201,195,493,433,529,630,656,4,644,506,920,488,820,546
656,512,568,621,731,206,283,419,391,895,306,486,593,560,631,519,434,66,697,619
685,309,624,755,422,84,493,55,912,502,656,801,325,117,897,205,725,790,310,404
485,446,219,726,619,725,748,400,814,217,941,668,770,227,108,735,220,788,672,150
323,147,612,942,400,397,390,440,263,317,641,860,567,83,613,913,151,259,124,903
619,456,503,631,193,685,601,551,909,916,433,534,819,510,476,686,817,497,763,313
509,751,655,322,926,744,407,684,675,65,697,511,947,914,22,622,907,594,389,898
242,907,252,823,543,686,700,788,905,867,52,901,336,155,258,202,330,902,422,469
151,582,280,672,659,489,447,160,596,148,432,594,695,124,430,557,86,860,598,869
791,64,353,686,641,802,792,288,256,208,928,687,819,945,307,628,426,993,473,426
224,397,167,218,58,194,706,54,536,683,347,505,337,697,492,535,487,653,521,111
611,634,627,645,556,501,108,314,81,310,86,354,697,351,881,328,432,310,534,416
862,196,350,949,819,485,251,988,447,860,494,419,90,484,828,111,747,345,393,318
307,509,731,337,252,150,204,678,499,919,327,826,59,309,439,824,749,436,813,76
924,154,942,751,206,620,610,414,749,438,322,55,412,253,860,90,649,338,793,350
683,185,906,915,661,829,198,831,670,943,683,434,566,415,58,529,263,78,164,201
480,689,548,658,674,646,694,869,58,251,680,195,541,319,477,178,925,400,267,562
251,809,901,809,162,66,87,810,159,287,543,485,802,400,72,81,217,643,531,120
87,689,920,787,788,918,84,409,808,350,50,82,404,917,320,70,148,72,753,435
77,269,665,632,422,205,409,626,158,553,200,406,942,207,271,531,266,370,116,159
139,537,913,317,500,161,921,260,434,265,652,447,820,276,468,271,161,467,394,403
405,110,412,670,336,618,113,4,745,202,254,221,420,349,166,79,336,219,434,866
202,909,251,260,512,226,279,72,866,510,537,558,198,762,257,218,561,164,390,564
905,253,743,107,944,431,499,148,307,728,251,320,178,288,155,659,921,68,813,261
675,444,502,165,407,681,566,278,265,79,610,56,639,663,272,566,141,729,534,923
636,948,91,921,526,487,604,609,636,529,947,319,915,515,112,409,830,490,696,124
259,147,615,855,516,626,413,502,559,259,547,821,568,342,694,736,6,639,353,390
392,346,150,669,682,310,745,510,260,925,376,789,729,665,620,497,856,505,925,916
536,617,275,563,601,497,897,177,503,226,791,160,791,315,261,153,821,856,494,74
154,412,54,896,616,111,226,596,492,735,603,901,603,696,933,353,856,509,653,652
111,69,316,285,832,1,65,434,273,431,557,832,507,494,466,51,644,691,225,433
339,158,306,120,272,493,556,84,446,910,612,506,606,655,826,629,626,474,520,684
544,488,501,275,262,362,153,82,442,730,351,274,562,898,698,149,691,512,810,367
913,611,830,856,641,312,437,280,436,331,162,70,891,687,113,80,404,533,225,602
537,378,686,333,77,108,627,566,414,672,407,51,69,608,548,537,625,116,81,497
289,727,912,820,350,538,317,327,946,276,942,428,620,447,870,483,282,862,736,525
944,536,195,540,688,948,688,393,617,499,141,811,900,628,207,906,333,71,905,917
149,292,857,649,321,614,227,346,467,916,637,500,753,804,348,306,561,358,161,332
355,466,805,485,899,695,299,195,509,395,480,568,792,623,154,82,491,676,695,278
436,405,264,745,51,76,679,324,536,665,650,208,936,699,362,415,325,624,264,75
277,648,666,223,392,897,744,379,619,568,275,278,945,895,351,927,646,490,321,482
210,445,315,616,360,597,551,604,696,913,665,795,164,751,606,824,162,434,558,264
868,322,905,82,193,57,312,630,787,820,501,536,800,63,926,327,398,549,487,470
736,827,520,551,747,815,935,390,536,730,56,601,218,553,478,745,753,312,343,683
612,540,626,748,725,59,192,287,699,820,437,262,606,945,84,59,519,686,814,857
869,427,548,473,749,429,16,609,365,395,62,66,480,443,155,898,68,443,352,471
81,930,547,279,698,866,943,650,641,686,788,565,725,483,530,816,636,491,155,745
84,637,389,870,408,478,689,314,142,55,566,283,690,61,149,504,162,667,697,686
808,599,514,632,788,61,625,424,432,311,673,519,862,281,814,992,390,657,632,506
898,608,483,269,62,362,274,272,747,796,149,807,89,597,919,652,604,341,858,296
77,736,901,897,642,677,344,914,310,382,68,315,608,161,73,80,418,335,537,288
896,410,498,673,635,797,307,111,857,390,59,321,824,288,608,87,61,943,686,755
335,922,696,91,650,262,307,536,662,161,897,647,369,154,666,250,249,652,194,620
50,269,699,697,807,323,517,116,621,908,663,559,224,532,200,780,807,612,594,357
684,73,328,895,200,542,578,51,480,948,563,685,270,332,347,677,678,751,632,918
942,858,411,288,546,418,616,489,468,546,68,289,658,446,330,572,354,87,250,69
472,78,487,934,57,316,414,944,822,799,657,636,698,324,273,686,447,423,65,478
409,429,696,620,472,831,808,197,413,492,944,486,316,917,545,529,420,540,618,23
106,151,559,711,273,692,896,149,910,519,86,344,672,603,206,194,404,557,331,744
605,108,519,255,56,282,444,793,361,167,669,261,314,733,340,797,694,916,685,787
312,655,619,643,207,69,414,564,427,222,257,608,206,529,508,628,919,157,410,585
759,81,642,147,814,559,726,796,260,72,390,257,423,902,669,618,272,688,86,793
564,622,749,655,363,686,620,392,997,309,745,350,866,151,150,323,788,725,52,401
534,599,114,855,919,347,431,801,423,523,260,367,275,685,553,687,348,478,271,116
203,910,909,64,366,76,527,69,57,537,217,651,330,644,687,469,162,424,198,615
897,494,499,430,322,617,67,108,595,110,515,549,394,804,979,603,747,356,357,162
542,911,326,815,544,424,469,513,993,249,489,487,530,620,112,282,599,259,162,810
495,259,641,659,625,866,806,655,809,549,160,901,726,320,387,747,794,315,925,286
290,675,73,54,18,436,203,409,747,816,855,468,342,831,659,654,554,630,347,664
434,482,362,333,612,268,330,161,156,615,226,218,494,51,416,283,524,391,392,671
412,914,366,557,528,434,51,420,310,886,674,344,544,368,725,641,158,637,474,688
17,815,109,646,306,288,911,822,321,159,699,904,674,476,799,201,539,201,945,401
521,617,622,162,401,350,808,149,744,624,90,270,342,813,677,167,479,524,655,904
251,325,161,536,635,610,745,406,257,601,517,64,947,808,797,926,801,731,595,142
75,976,332,167,668,474,828,149,350,326,473,276,224,900,744,82,799,736,332,343
217,423,949,919,270,923,333,620,541,275,409,553,684,74,987,54,348,650,648,354
153,600,167,727,650,221,800,223,312,262,920,665,736,18,340,343,819,208,628,411
439,940,220,654,84,320,598,599,616,869,622,59,605,315,349,425,896,217,534,731
646,474,749,401,518,610,640,615,673,620,469,348,597,993,528,496,220,68,857,312
260,655,634,443,597,79,868,268,114,282,923,763,164,632,727,928,138,124,356,117
263,541,266,157,87,500,755,551,277,744,487,661,151,918,531,351,227,164,859,147
825,906,526,88,733,466,331,900,866,625,471,640,669,351,682,905,158,560,594,633
370,156,57,56,73,909,656,414,856,160,596,606,153,643,610,637,205,368,659,743
748,628,155,477,485,80,473,812,338,857,202,662,349,445,336,490,672,56,200,998
86,542,512,922,151,597,676,433,864,317,919,823,438,565,813,791,547,412,206,311
606,539,541,926,289,670,204,261,81,790,905,530,818,403,306,473,501,183,750,112
426,828,809,700,426,412,307,895,107,949,174,861,262,264,698,504,225,749,645,796
403,411,433,270,601,390,645,537,315,166,514,829,562,478,359,667,149,831,76,211
419,928,502,650,544,805,688,519,78,486,12,159,535,736,904,817,59,60,317,816
620,901,915,333,415,154,629,538,643,429,285,18,681,258,261,307,806,895,494,203
810,621,829,685,71,478,605,942,315,863,195,659,640,785,58,163,827,682,515,640
491,430,275,249,323,484,747,73,65,312,830,260,412,319,410,792,781,428,117,831
281,920,54,286,795,828,141,405,423,803,418,860,855,657,410,528,409,552,277,357
856,738,736,679,365,814,644,729,520,344,635,568,520,331,515,73,830,224,411,273
685,51,281,656,407,788,945,751,306,531,74,75,822,640,636,604,195,217,555,459
804,821,4,792,415,53,163,656,402,497,251,562,512,676,397,405,164,423,400,516
269,52,649,285,266,637,667,202,255,55,65,345,365,354,819,64,725,326,700,440
803,745,926,432,482,628,745,698,306,621,441,111,650,115,445,66,855,661,443,435
732,435,656,604,678,158,675,651,525,551,284,219,594,482,348,330,281,605,823,915
602,832,399,683,855,467,309,488,330,817,635,154,595,428,534,629,534,342,914,999
737,753,311,564,751,917,924,679,258,263,86,728,206,447,604,113,832,861,221,683
824,330,289,513,536,153,664,317,157,357,344,253,525,390,903,319,664,330,310,162
555,135,90,506,812,357,221,659,615,829,731,728,605,162,62,819,339,725,398,194
252,941,56,928,551,532,518,523,421,672,111,820,395,549,922,529,800,501,477,816
934,618,725,609,698,331,918,506,470,818,809,362,926,482,117,165,748,347,730,264
645,812,393,799,754,329,255,445,483,332,664,524,925,626,347,492,685,699,948,673
123,406,362,745,655,508,675,152,357,317,698,675,907,402,346,866,217,907,321,207
539,783,903,342,288,339,151,667,694,567,567,198,699,816,675,490,559,197,79,631
276,518,827,508,202,550,81,77,669,532,797,355,656,414,452,252,616,897,204,917
745,480,563,60,904,800,488,897,507,151,154,544,630,809,59,377,657,395,532,59
4,727,828,422,431,900,321,68,643,446,725,431,53,404,162,499,540,636,310,810
790,84,444,330,477,252,498,686,729,52,608,824,271,445,390,512,761,258,124,323
351,103,820,73,78,732,252,752,659,540,619,625,927,154,749,425,364,788,366,83
900,525,443,560,941,867,728,822,167,605,356,157,611,662,869,919,109,165,107,897
437,250,354,827,548,313,408,52,262,168,507,113,252,808,204,218,870,941,70,749
545,901,987,657,108,399,832,596,409,748,506,285,949,365,317,336,629,482,435,907
586,749,118,281,804,921,698,201,828,504,649,277,84,606,633,290,249,698,398,368
261,689,942,624,432,798,623,260,507,619,902,425,908,161,410,976,398,306,807,830
515,156,220,925,667,611,441,270,62,358,358,799,545,61,364,67,286,668,548,393
772,825,606,731,685,165,91,920,608,654,155,833,227,510,532,274,344,595,259,396
678,399,909,861,335,923,700,323,892,543,744,410,485,153,620,606,541,790,511,274
419,503,108,342,675,193,825,918,602,420,260,148,164,145,517,549,279,500,639,255
725,72,54,469,436,507,856,72,830,653,502,944,856,75,688,736,529,779,746,730
445,503,944,752,68,319,432,164,510,72,513,331,416,359,77,72,462,489,393,413
689,90,278,166,157,19,167,332,912,500,682,481,911,676,544,807,342,530,794,471
596,915,664,751,621,71,748,943,414,223,483,633,295,549,677,551,317,69,529,538
913,540,832,335,748,656,685,826,656,89,138,700,362,73,427,351,560,327,562,612
405,690,390,731,396,78,895,249,549,626,155,311,337,404,923,298,799,693,153,254
271,210,924,926,678,339,366,162,430,686,904,901,267,155,544,162,905,322,868,802
81,284,261,498,919,334,621,750,600,536,865,435,203,825,312,226,473,925,277,236
142,507,157,492,621,201,491,278,470,681,609,194,417,619,649,860,746,661,616,908
274,920,66,355,479,10,55,435,158,338,503,446,414,500,816,406,654,508,61,257
824,149,516,673,361,803,668,926,500,730,51,410,823,857,308,162,441,429,366,901
147,145,158,112,595,867,332,108,925,400,797,368,542,558,323,427,77,554,337,503
337,344,871,790,360,158,551,727,269,52,83,539,734,327,597,285,335,753,484,402
903,697,728,532,655,944,75,143,57,445,743,273,684,109,347,506,77,864,111,491
516,424,899,816,752,199,227,266,172,734,74,165,222,601,652,468,85,279,531,415
56,70,159,537,354,196,610,206,833,416,605,859,975,609,645,437,675,922,655,594
823,657,323,163,509,277,0,362,552,311,668,308,636,436,922,801,253,56,219,350
267,331,338,680,568,678,487,947,858,412,77,818,656,290,917,665,667,269,90,887
253,600,284,895,908,90,831,857,56,256,656,58,489,73,314,197,383,306,520,803
396,603,638,732,18,823,54,109,796,113,858,808,796,261,401,393,420,683,391,803
524,415,255,910,422,915,693,803,535,117,323,80,830,472,56,353,268,151,51,116
425,669,679,827,793,58,366,856,479,219,219,689,312,218,69,460,309,730,410,82
615,735,809,150,860,488,796,221,791,555,316,362,634,146,420,475,391,928,279,189
915,416,86,619,314,505,163,908,277,327,12,801,152,601,797,346,557,289,398,265
619,122,927,195,903,400,736,619,249,603,664,498,817,282,414,72,362,520,427,356
489,889,641,154,603,629,150,622,610,492,926,485,763,320,352,273,947,444,555,747
470,90,483,91,59,941,683,359,810,81,70,886,763,546,366,218,162,345,497,413
664,486,485,675,223,733,814,607,644,748,523,567,662,607,157,342,752,106,730,367
478,152,88,220,600,280,312,256,518,791,79,606,326,515,306,138,488,814,114,394
901,197,75,381,320,65,257,857,602,193,71,339,402,153,399,282,207,322,648,320
601,329,314,443,542,528,904,754,336,807,783,813,53,791,85,801,923,858,420,258
65,520,752,61,351,159,810,732,928,278,286,324,490,184,277,167,813,867,198,280
157,322,617,64,442,53,225,350,659,422,813,268,665,610,942,266,487,419,415,158
474,318,79,440,223,327,289,89,226,506,147,647,109,698,472,402,634,485,911,810
808,642,824,418,74,490,695,310,150,868,758,485,862,218,275,475,436,322,202,789
170,632,287,632,548,536,283,221,670,792,503,943,896,251,547,625,324,604,657,663
343,519,359,754,74,494,127,601,949,315,538,437,811,752,407,922,319,149,362,203
435,642,253,830,336,258,414,157,794,355,521,598,307,801,553,540,977,347,343,322
270,416,513,237,901,360,426,327,124,345,868,484,651,645,763,205,60,821,746,154
332,157,480,828,554,903,361,277,261,640,515,316,275,505,128,601,609,859,643,557
541,700,203,495,267,422,426,999,789,644,62,269,617,636,217,551,633,474,726,109
606,940,155,580,311,796,77,467,415,53,166,727,521,947,632,308,200,746,410,76
496,943,609,858,91,599,124,53,393,730,208,308,800,148,621,440,618,529,437,165
430,752,605,340,920,400,109,502,407,315,699,483,75,255,654,14,813,566,546,800
725,270,404,393,545,124,160,389,402,926,222,333,143,830,166,321,552,71,436,258
924,748,601,918,310,553,500,693,162,904,602,700,448,153,560,692,333,490,86,500
519,598,161,471,276,612,604,561,823,509,485,735,406,350,518,432,115,441,804,529
343,263,84,606,751,928,647,67,162,691,416,677,90,729,512,815,507,816,995,634
165,670,469,282,342,533,858,290,547,194,162,482,833,888,156,310,557,475,807,744
665,634,806,614,466,594,164,889,262,217,557,405,682,745,321,627,444,413,67,601
326,758,657,488,310,394,318,278,205,691,148,446,916,534,923,403,206,63,195,51
810,344,594,217,272,368,611,830,387,342,866,82,616,60,322,693,663,519,261,805
252,152,412,894,315,542,268,496,327,638,497,673,362,437,469,77,282,552,205,614
858,280,630,320,671,512,895,401,510,479,329,558,115,310,145,91,75,333,88,117
147,798,77,648,689,801,904,796,253,623,865,618,316,410,761,275,310,62,502,630
539,84,311,926,194,639,356,446,821,445,253,679,757,53,633,749,902,490,543,193
354,359,432,916,547,940,349,820,692,424,734,944,403,519,118,141,732,664,596,160
342,346,50,616,146,919,472,281,469,700,225,364,83,948,668,411,873,403,286,400
553,162,633,346,497,489,117,258,280,823,693,919,279,404,193,933,203,827,808,623
341,509,751,132,486,645,898,425,899,794,699,609,636,807,906,514,63,748,568,535
547,607,860,459,285,166,693,78,67,830,802,355,743,691,901,349,538,695,60,391
481,501,477,195,429,647,63,561,610,320,336,663,534,799,330,994,748,910,789,351
535,746,501,553,831,107,515,149,482,79,563,795,617,645,734,483,391,729,650,125
276,792,492,536,733,285,552,432,208,981,350,818,347,71,735,322,225,435,788,651
813,820,436,431,596,944,330,518,256,354,277,647,870,264,284,527,530,505,54,152
115,420,204,619,509,351,699,352,402,634,361,425,925,808,333,886,415,364,160,659
111,749,731,187,67,790,89,437,491,610,677,61,225,550,791,341,945,864,537,389
690,632,89,763,538,389,831,333,366,864,157,253,64,732,652,763,181,791,333,556
313,194,489,272,153,520,274,124,700,676,506,565,518,624,816,390,929,227,362,555
788,439,948,678,596,411,539,57,596,77,323,614,204,323,71,333,540,635,348,476

8
input/2020/day17.txt Normal file
View File

@@ -0,0 +1,8 @@
#.#.#.##
.####..#
#####.#.
#####..#
#....###
###...##
...#.#.#
#.##..##

373
input/2020/day18.txt Normal file
View File

@@ -0,0 +1,373 @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 8 + 3 * 4 * 3) + (9 + 6 + 4 * 2)) * 4 + (9 + 9 + 3 + 7 + 4 * 4) + 6 * (9 + (7 * 8 * 2))
8 + (7 * 6 * 5) + (4 + 3 + 2 + 9) * 6
6 + 7 * (7 + 3 + 3 + 9 * 2)
(8 * (4 + 3 + 5 + 9 + 3) * 3 + 3 + (9 * 7 + 9 + 9 + 4 + 7)) * (3 * 3 * 3 + 6 * 9) + 2
(2 + (4 + 8 + 6 + 9 * 3)) + 2 * 2 * 7
4 + 5 + ((5 * 7) * 6 + 9 * 4 * 5 * 6) + 6 + 3 * 8
8 * 7 + 5 + 5
(3 + (7 * 4 + 3) * 9 + 4 + 7 * 5) + (6 + (3 + 3 * 5) + (6 * 6 * 7))
4 * 8 * (7 * 7 * 6) + 6 * (2 * 5 + (6 * 4 * 9 + 2 + 5 * 5) * 7 * 5) * (6 * 6 * 7 * 6)
(4 * 4 + 5 + 9 * 9) + 2 + 2 + 9 * 3 * 5
((9 + 7 + 6 + 8 + 8) + 4 + 4 * (2 * 5 * 8)) * 4 + 7 * 7 + 4 * (6 + 2 + 7 + 5 * 6)
9 + 5 + 9 + 3
4 * 6 * 5 + 3 + (7 * (2 + 5 + 2 * 5 + 9) + (2 + 9 + 8 * 9 + 3 * 3)) * 5
(3 * 5 * (4 + 2 + 8 + 4 + 7) + 7 * 7) * (6 * 7 + 9 * 7 + 7 + 9)

562
input/2020/day19.txt Normal file
View File

@@ -0,0 +1,562 @@
72: "b"
45: 46 52 | 9 72
85: 9 52 | 9 72
82: 52 87 | 72 77
133: 52 30 | 72 56
118: 7 52 | 70 72
18: 52 113 | 72 52
119: 72 46 | 52 18
25: 19 72 | 103 52
32: 90 52 | 78 72
50: 113 113
71: 72 106 | 52 128
3: 103 72 | 18 52
41: 86 72 | 19 52
96: 86 72 | 108 52
33: 44 52 | 104 72
127: 52 36 | 72 50
51: 72 79 | 52 38
43: 72 50 | 52 106
14: 32 72 | 129 52
6: 2 72 | 33 52
108: 52 72 | 72 52
129: 6 52 | 82 72
34: 127 72 | 3 52
74: 128 52 | 9 72
80: 52 103 | 72 19
2: 134 72 | 13 52
54: 128 72 | 114 52
19: 72 72 | 113 52
0: 8 11
30: 132 72 | 39 52
60: 72 64 | 52 5
4: 18 52 | 114 72
57: 72 71 | 52 54
111: 52 27 | 72 102
76: 122 52 | 75 72
134: 86 52 | 9 72
49: 17 52 | 81 72
124: 103 72 | 86 52
123: 72 28 | 52 121
117: 18 52 | 86 72
26: 51 72 | 58 52
62: 85 52 | 44 72
55: 126 52 | 92 72
115: 72 13 | 52 67
109: 128 72 | 106 52
52: "a"
93: 60 52 | 133 72
64: 67 72 | 84 52
102: 52 128 | 72 48
84: 86 52 | 46 72
77: 41 72 | 21 52
27: 52 9 | 72 108
95: 89 72 | 105 52
36: 52 72
110: 72 50 | 52 9
9: 72 72
120: 72 19 | 52 18
67: 52 48
112: 65 72 | 119 52
75: 62 52 | 123 72
23: 15 72 | 119 52
42: 131 52 | 61 72
94: 52 91 | 72 18
66: 52 128 | 72 103
10: 113 108
37: 52 18 | 72 50
98: 72 69 | 52 94
126: 115 52 | 29 72
79: 59 52 | 94 72
104: 19 72 | 36 52
125: 96 72 | 4 52
122: 52 73 | 72 112
130: 52 20 | 72 45
90: 72 40 | 52 88
132: 103 52
121: 91 52 | 46 72
7: 52 114 | 72 128
5: 52 66 | 72 41
97: 52 18 | 72 91
89: 72 109 | 52 116
53: 52 108 | 72 128
114: 52 113 | 72 72
16: 1 52 | 110 72
113: 72 | 52
31: 52 14 | 72 12
69: 52 103 | 72 48
128: 72 52
40: 72 3 | 52 83
101: 63 52 | 127 72
1: 72 91 | 52 114
58: 52 111 | 72 99
13: 19 72 | 9 52
35: 22 72 | 125 52
65: 72 114 | 52 91
12: 52 24 | 72 93
46: 72 72 | 52 52
20: 9 72
73: 72 37 | 52 43
15: 52 50 | 72 108
103: 52 52
106: 72 52 | 72 72
21: 36 72
28: 72 50 | 52 46
78: 72 16 | 52 23
70: 36 72 | 19 52
87: 72 107 | 52 47
116: 19 52 | 106 72
29: 72 68 | 52 65
8: 42
68: 9 52 | 128 72
99: 110 72 | 25 52
17: 52 118 | 72 130
11: 42 31
48: 52 52 | 72 52
83: 48 113
105: 52 100 | 72 80
61: 55 52 | 26 72
100: 48 52 | 108 72
56: 52 53 | 72 74
63: 52 106 | 72 9
44: 72 114 | 52 128
47: 52 50 | 72 36
107: 52 36 | 72 91
39: 114 72 | 86 52
86: 52 72 | 52 52
24: 52 95 | 72 35
81: 98 72 | 34 52
131: 49 52 | 76 72
92: 52 101 | 72 57
59: 52 114 | 72 50
38: 52 74 | 72 124
88: 97 72 | 10 52
22: 117 72 | 120 52
91: 72 72 | 52 72
bbabbaabaabaaaababbbbabaabbaabab
baaabaaabaaababbabababaabababaaa
aaabbbabaabbbbbbbbabaaba
aaababbbaaabaabbabbbbabbaaaabbbb
ababaabbaabbbaabbbabbababbabbbbbbaaabbbbaaaabbbabbbaaabbaaaabbaa
bbbbaabaababaaabbbaaaaabbbbabbabaaabaabaabbaaaba
bbaababbbbbbaabbbbbaaaabbbbbabaaaabbbabaabbbaaaa
aaaaaaaaaababaaaabaaababaabbbbaababaaaaaaaaabaaabbaabbbaaabaabababbbbaaabbbbbabb
bbbbabbbbbbbbbbababbabbabbbabbbaaabbbbbaabbbbbaa
bbabaaababbbaabababbabbbabaabbbbbaaabbaaaaabbbaaaaabaabbaabbabba
babbbabaaabbaaaabaaaaabbbabaaaaa
ababaabbaaabbabbbbbbbaaaaabaabaabaaaababbaaaaaaa
baaaababaaaaaaababaaabba
bbaabbbaaabababbbaaaaabbbbbbbaaaaabbaabaabaaabaabbbaabaaaaaababbababbbbb
bbababbbaaabbabababbbabaaabbaababbbaaabaaabbbabbabababab
babbabbabbbaabbbbaabaaabbabababbbbbbbbaa
abbaaaaaabbabbaabbabbabababbaabaabbbaaaa
ababaabbabbbbbabbabbbaaaabbbaabbabbbbabb
aaabbbbaabbbababaabaaaaa
babbbaaaabaaabaaabbabbabbabaabab
aaabbaabaabbabaaaaaaaabb
ababbbabaabbaabbabaababababbbbaa
babbabaaabbbababbbababaaaaaabbaaababaaab
bbaababbbabaaababbaaabab
aabababbbbaabbbbabaabaababababaaabababab
baaaaabbbbbaabbbbbababbbbbbabbab
baaaabaaabaabaaabbabaaaababaaaab
aabbbabababaaabababbaaaa
ababbbaaabababbaaabaaababbaaaabaabbbbbab
ababbbaaaabaaaababababba
aaabbbabaabbaababbbbabbbbbabbabaababbabb
aabbabaaaabbaababbabbabbaaabaabababaaabaaaaaabab
abaaabbbabbaaababaaababa
bbaaabbbbababbababaababb
aaabbabababaaabaabbabaab
bbabbaaaabbbaabbaaabbbbbbbbabaabbbbbabbbbabbaabaabbaababaaabaabb
babbabbabbbbababaaaaabaababbbabbaabaabbbabaaaabb
bbabbaababababbabaaababb
babaaabaaabababbaabababbabbababaabbaaabbbababaaaababbbbbaaaabbbbabbbbaaa
aaabaabaaabbbaabbbabbbbbbbababba
aabaababbbaaaababbabaaaa
aaaabaaabbabababbabbbaab
baaabaabbaaaababbbaabaaaaabbabaaabaaabaabbbbbabbbabaabababaabbaaabbaaababbabbbbb
aabaabbbababbbababaababaabbbaaaa
aabaabbaaaabaabaabaaaaaabababbaababaaabbabbbbabbbaaaaaaabababbabbbbbabaa
baaabbbaaaaaabbbbbaaaaabbabbaabaaaaabbba
baaabaaaabbbbaaaaabbaababbabbababaaaabbbbabbaaabaabbbaabbaaaabbb
baaabbbabaabbabaabbabaaabaaabbbaabbaaabbabaaabab
abbaaabbaaabbabbabaaabba
aaaaaaabbabbbabababbbaaaababaabbabbaaabaabbaabab
aabababaaabbaabbbbaabbbababbaaaa
aabbbabaaabaabbbbbbabaabababbbbb
bbbababbbabbbbbbbabaaabaaaabbabaaabbbbabbabababaaabaaaaa
abaabbaabbbabaabbabaaabbaaabbaaaaabbaaabbaaabbbbbabbaabb
abbbbbabaabaabababababbaaabababbaabbbababbaabaaa
aaabbaabaabaaaabbbbabbbbbabaababaaaaabab
aabbbaabbbbbababaabbbbbbaababbbb
bbababbbaabaaaabbaaaaabbbaababaabbaabaab
aabaababaabbbbbbbabbbbab
aaaaabaababbbabbabbbaabbbbabbaaa
baaaabababbbabbbbaaababbbbbababaaaaaaabb
baaaabaabaaabbaaabbbbbbaabaabbaabbbbbbabbbbbbbbbbabaabababbbbabbaababbbb
bababbabaaabaaaaaaababbbbbabbbaabaaabbbb
bbbbbbbabbabaaabaaaaaaabaabaaabaaaaaaaaababbaaabbaabbaaababaaabbabaaaaaa
abbaaababbbabaabbaaabbab
aabaabbbabaaaababaaabbbabaaaabbbbabbbababbbbabaaaaaababbaaabaabbbbbaabababbaabbb
abaaabaabbabaabbaabbaabaababaaaa
babbabaabaaaaababaaaabba
bbabbbbaaabbbabaaaaabbbb
abbabababbabbbbbaaabaaabaaaaabbaabbabbababbaabbaaabbbabbabbaabbbaabbabaaabaabbab
baabaaabbbbbaabbbaaababa
bbaaabbabbbbabbabbaabbaabaaaaabbabaabbba
babbbabaaabbbaaababababb
abaabbbbbbbbbababaaabbbabbababaaabaaaabababaaaab
bbbbbabbbabbbbbababbabaaabbbaabbbbabbbbbabbabababababaabaaabaaabbaaabaaaaaabbaaa
bababababbbbbbaaaabbbbaabbaaabaababbbbaaabbabbab
ababbaabababaababbbbbabbbbabbababaaabbbabaaaabbbaaaaaaba
abaabababbbbabbbbabbaaab
bbaaaaaaabbababaabbbababbabbbabbbaabaaaabbabbaba
abbbaabbabbabaabbbbbbbaabaaaaabbbbaaaabbbbbbabba
aabbbbbbaaabbaabaababbbababbabaaaaabbaaa
abaabbaaaabababbabbabbabbbaaaaab
babbbababbbbbbbababaaaaa
baabbbbbaabbbaabbabbababbbbbbbbb
bbaaabbbbbbabaabaaaaabaa
bbababaaabbabbabbabbbaaabbabbbab
bbbbabbababbababaababbaa
bbababaabbabaabaabbaabab
aabbbaabbbbaababbabababa
ababaaababbbbaaaabbbbaaaaaababbb
baaaababbbaabaaabbabbbabaababbabbaaaaaaabbaaaaaa
abbbababbaababbbbbaabbbbababbbaabaaababaabaababbbabbbbab
bbabaaabbaabbaaabbbaaabaaaaabbabbaaaabaaabbbbabbbaabbbbbabbabaababaaaaab
bbbbabbabbbbbbaaaaaabbbbabaabababbabbbbbbabaabbaaabbbbbbbbbbaaaa
baababaaaaabbbaaabaabbba
bbbbababbbabbaabbbabaaababbaaaababababaa
aaaaaaaaaaaaaababaaababbabbbabaa
aaabbabababbbaaabaabbbbbababbbbaaabbbabb
aabaaaabbbbbaaaaababbaabaaabbbbabbaaaaaabbababbbaababaaabaabbaabbabaaaaa
aaaabaaabbaabbaaaabbabba
bbbbaaabbaababaaababbabb
abbbbababbbbabbbbbbbababbaabbbbbaaabaabaabababbabaaabaaa
baabbabaabbbaababbabbaba
bbbbaabbbabbabaaaabaaaaababbaababaaabaabbbaaabaaaaababab
abbbbbbababbabbbbaababababbabbabababbbbb
aaabbbabbbbaaaaaabbbabaababababb
aabbaaabaaabaaabbbaaabaaaabbaaaaaaabababbbaabaab
babaababbaabaaaababaaaaa
aaabbbaaaabaabbbaaabbbbb
abaabaabbaabbabaaaabbbbaaabbbbabaabbbabb
baaababbabaaababaaababbababbbbba
aabbaaaabbabaabbbabaaabaaaaaaaabbbbaaaaa
bbbabbbbaabbbbaabbbaaaabbbbaaabb
abaaabababbabababbaabbbabaaabaaaaaaaaaabaabbbaaaaabbbbbbabbabbaaabaaaaaa
bbbbbbbabbabbaabbabbbaaabaabbaaa
bababbabbaabaabbaaabbbbabaabbbbaaabaaabb
bbbbbababaaaaabbabbbbbbabaaaabab
babbabaabbbbaaabaaabbbbaababaabbaabbaabb
ababaabbbbbaaababaabbaaaabbabbbbaaabbaaa
ababbaabbbbbbaaaaaabbbbb
babbabaababbabbabaabbbab
bbaabbaabbbbaabbabbbbbbaabbbaabaaaababbbbaaabbbbbaabbaaa
aabaabbbbabbbbbbabbabbaaabaabababbbbbabbbbaabaaa
abbbbbbaaabbbbaaabbabbbb
aaaaaaaaababbbabaaabbaabababbbba
baaabbaabaaaabaaabaabaaabbaabbbbaaaaaaababaababb
ababbbaababbbbabbabaaaaabababbba
aaaaabaaaaabbbababaaabbbabbbabba
bbbabbbaaaaaaaaaaaabbbbb
abbbbbbabbabbabbabababaa
baaaaabaaaaabaaabbaabbba
baaaabbbaababbbaaaaaaabb
bbbabaabbabbabbbabaabbbbaabbaababaaabaaababaabbb
bbbabbaabbbaabbbbbbabbbabbababababbabbbb
baabaabbbbbaabbaaaababab
bbabbaabbababbabbbabaabbbabbbbbaaaabbabaabbbbbbbababbaba
babbabbaabbaaabbbbabbbbabaaaaaaabbbaaaaa
abaabbaabbbabbbaabbabaaaaababaaaaaaaabbb
aababbabbbabbaabbabaaabbabbabaabbbbaaababbabbaaabbaaaababbbaaabbbaabaabaabababaa
abbabababbaaabbbbaababbaabaabbbbbbbbbbaa
bbbabbbabbabbbbabaaabaaababaaababbbaababbbbabababbabbbabaaabaaaaaabaabbb
baaaaaababbabaabbbabaabaabbbbbabaaababab
baabaabababbbbbabbbbaabaaaaabbbb
baabbabaababbbabbabbbbab
bbbbaabbbbbaaaabbbbbaaaa
bbbbaababaabaaababbbbbaa
bbbbbabbaaabaababbbaaaababaaabba
ababbbabbbbaaaababaaaabbbbaabbbaaaaaababababbbbababbbbbaababbbabaaaaaaababaabbababbbaaaa
aabaababbbbbababbaabbbab
baaaaababbbababbababaaab
baabaabbaaabbaaaabaabbbabbabbbbababbbbab
abbbbbbababbbabaaabababbbbaabbbabbbbababaabaaabb
bbabbabbabbabababaaaabba
abbabbbabbbbbababaaabaaa
bbbbbaabbabbbbaaabaaaaaabbbabbabaabbbabbabbabaaaabaababbbbbaaabb
baaabbbaaabaabaababaabab
baabaababaaaaabaabaabbaababbbbbabaaabbababbaabab
bbabbbbabaaaabaaaabababbabbabaab
babbaababaaaaaabbbaabaab
abaabbabaaabbbabaaaaabbbbbabababbbbaabbabbbabbbbabaaaaab
ababbbabaababababaabaaaa
abaaabaaababbbabbaababaabaabbaab
aaabbbbabbbaabbabbabaabbbaabbbaa
aaabbbaaaabaabaaabbbbbbb
abbbbabbababaabbbbaababbaabaabbbabbbbabbababbbab
baabaabbbbaaaababbabaabbbbabbaaaabbbaaaaaaababaaaabaabbbbbaaaaabbbbaaaaaaaaabbababbabbba
abbaababbbaaaaabbaabbaaa
babbbbabbbaababaaaaaaaaaabbbbaabbbababbbabbaaaaabababbaabaabbaaaaabaabbbaaaaaaaaababbbbbabbaabaa
abbbabababbabaaaababaaaaababbbbaabaabbbababbaabb
abbaaabaaabbabaaababbaab
bbaabbbabaabbbbbabbabbbaaabbaaaabbaaabbbabbaabbababbbbababbaabab
abaaabbbbbabaababbabaaaa
bbababbbbbbababbaaaaaaabbabaaabb
bbbaabbbaabbbbaaabbabbaabaabaabbbababaaa
babbbaaaaabaabbbabbbbbaa
abaabbaabaabbbbbabbbaabbaaabbaaa
abbbaabaababbbabaaaaaaaabbbabbbabbbaabab
aaaabbaabbabbaabbbaababaabbabbbbabaaabbaabbbbbbbaababbbbbbaabbabaabbbaaabbaabbba
abababbabbabbabbbbabbbab
bbbababbaaaabaaabaabbbba
bbbbaababbbbbbabbbbbabbaababaabaaababaab
bbaaaaaaaabbbaaabaaabaab
babbbbbbbbbbbaaabbaaabbaaabbabbaaaabbaaa
abaabbabaaabaababbbaaabb
abaababaaaaaaabbbababaabaaaababaabbabaabababbbba
aaabbabaabaababaababbbba
bbaaaaaababaaababababaaa
abbabaaabaabaaabbabbaaba
abbabababbabaabbabbabababbbaaaaa
aabaaabaababbbaaababaaab
bbabbbbaabaaabbbabbaaaab
bbbbababbbbaaababbbaaaba
bbbbbbababbbbbbaaaaaabab
bbababbbabaaabaabaabbaaaabbbabbabbbbbbaaabbabbbb
baababbbaaabbbaaaabaabbbaabaaabb
abaabbabbaaaabababbaabbb
bbbabaababbbbbbabaabaaabbabbbbbbbbbaabaabbabbbaaabbababb
babbabbbbbbbbabbbaaaababbbbbbbbababababa
baabababaabbaabbaabbabba
baabaababaaaaabbbabaabbbababbbaaabbaaaba
bbbbabbbbaabbbababbbaabaabaabaaaaaaaabaaabbaaaaa
bbabababbaabbabaabbabbaabaababaabaaaabba
abbbbbbaaaaabbaabbbbbaabaabbabbbaabababaaaababbbbabbbbbabaaabbab
bbbbaaabaaaabaaaaabbbaab
aabbaabbaaaaaaaaabbbbababaabababbabbabbbbbbbababaaabaabb
bbabababbabbabbbbaaaabaaaabbaababbbaaaaaabbbaaaa
bbabbabbaaabababbabbbbababaabbabbbbabbbababbaaab
abaaaaaabbbaabaaaabbbbabbababaab
aabababbbabbabbabbaabaaa
ababbbaaaaabbabaaaabbabbaaaaaabb
baaaababbbaaaababbbbbabbbbbaaabaabbabaaabbbbbabaaaaaaaababbbababaabbbbbbaabbbbaa
baabbbbbbbbbaabaabbababb
bababbababaabbbbababaaab
baababbbbabbaabbabbabbaabababbabaaaabbbaabaabaaa
aabaabababaaaabaabababbbbaaabaaaabaaabab
abbaaaaababbabbabaaaabbbbaaaabba
babbbaaabaaaaabbbabbbbab
ababbbabbaabbabaabbbabba
abaabbabaaaabaabbaaabbbbbbbabbaaaaabaabb
bbbaabbaaabbbaabbaabaabaababbaab
ababbbaabbbbbbbabaababaaabbabbabaababaaabbbaaababaabbaab
bbbbbbbabbaaaaaaaaabbbababbbbbbb
aabaaababbabbabaaaaabaaabbabbaabaabbbbbbababaaaa
baabaaabaaabbbabbababbabababbaba
abbbabbbababbabbbbbbaaaababbabbbaaaaaaaaabbaabbabbaaaaabbbabaaaabababbbaaabbabbb
baabaaabbabbababbbbaabbaaaabbaabbbbbabbbabbbaaabbbbabaaa
abaaabbbabaabaaaabbbbbabaaabbbbabababbbbbabbbbabaabaaaaa
aaaaaaaaabaaaababbbaaabababababa
bbbbaabbbababaaaaaaaaaab
aaabaaaabaaaababbabbbbbbaaaabbababbbabaa
babaaababbbbbbbaabbbbabb
baaabbaaaabbbbaabbbababa
baababbbaababbbabbbaabbbbbbbabaaaabbaaab
baaaabaabaabaabbbababbababbbaabbaaabbaabbaaaabba
baabaababbbaabbbabbabababaaaaaaa
bbbababbaabbababaaaaabbb
bbbabaaaaaaaaaaabbbaabbbbabaabbaabaaabbbabbaabbbbabbbbab
aaaaaaabbaababaaaaabaaaababbbaab
abababbaababbbabaabbbbaaaaaabaaaabbaaaba
baababbaaabaabbbbbbaabbabbbbaabbaabbabaabbabbbabaabbabba
abaaabbbbabbbaaabbbbaabaabaabababbaaabbbaabbbbabbababbbabaabbaaabaaabaaa
aabaaabaababbaabbbbbbbabbaaaaabbaaaabbba
aabbabaaabbbbabababbbbbbbaaabbbabaabbaaababbbbabbbbabaaa
abaabbbbbbbbabbbabbaaaaabbaaaaaaabbabbbbabababaa
ababaabbbbbbabaaabbaabba
bbbbababaababaaaaaaabbaabaabaaaa
abbbababbbbbaaababaaaabb
aabbbbbbaababbbaababbbabbaabbabaabaababaaaabaaab
aabaababaaabbbaabbaababababbbaaaabababaa
abaabaabbabbbababbaaaabaabaaabaabaabaabbabbababbaaabaaababaaabba
baaaaabbbbbaaaabbbbbbabb
abbbababbbbbbbbaabbaaaaababbbabbabababbaabaababb
aabbaababbabbaabbbbbaabaaaabbabbababbaba
ababbbaababbbbbabbbabaaa
abaaabbbabababbaabaaabbb
abababbabbabbababbbaabbaababbbaaaabbaaab
abbbbabbbaabaabbbaaaabbbbaaabbbbbbbabbbaababbababbbabbab
bbbbbaabbbaababbabbbaaaababbbabaaaababaaabaabbaa
ababbbaababababaaabaabbbabaaabbbbaabababbabbbbbaababbaaa
baababaabbbabbbbaaabaabb
babaabbbbbaabbbbbbabbabaabbbaaaaabbaabbabbbbaabaabbabbbbbbabbbaa
baabbabaaabbbababbaaaaba
abbbbbabbaaabbbabbaabbaaaabbbbaaaabbabbabaabbbba
aaaaaaabbaaabbbaaaaabbab
baabbbbbbaaabbbbaabbabaaaababbabbbaababaaabbbbbaabaaaaaabaabaabababbbaaa
aabbaaaaabbabaaaabbbbbaa
bbbabaabbbaaaaaaaabbbabaababaaab
babbabaaaaabbbababaaaaaa
baabbabaabaaabbbaabaaaaa
aabbaababbababbbbababaabaabbbbba
abbbbabaaabaaababbbbbaaaaaabaaab
bbbabaabbbbbabbaaababaaa
bbbbbabaabbaaabaaaabbbaaabbbbbbabaabbbaaabbbbbbbbaabbaaa
bbbbaaaabaabaabbbbabbabbbbbbbabaaaaabaaabbabbbbbbaabbbabaaabaabb
bbbbbaaabbbbabaabbabbbbbbaabaaabbabbbbbaabbbabbaabbbbbaa
aaabbbabbabbabbbbabaaaaaabbbbbaaaaababaaaaaaabbaabbabababababaaabbbababaabbaaaabbaaabaaababbaabb
abbaaaaaabbababaaababababaaaaabbaaabbaaa
aaaabaaaaabbabaaaaaabbaa
bbbbbbbabaababbbbbbbaaaabbbbbaab
ababaaaababbabbabbbababaabbaaabbabbbbbbbaabbababbbabbaba
bbbbbbbaaaaaababbaabbaaaaaababbbabaaabab
baabbbaaaaabbbbabbababbaaaaababaabbababaaaabbbbbbbbaaaababbbbbaababaaabb
bbbabbbaaabbbaabaaababbaaaabbaaa
baabaababbbbbaaabbbbabaaaabbabbaaaabaabb
abbbaabbabbabbabbbbaabbbbbabbbab
babbabaaabbabbbabaababaabbabaaba
baababbbbaaaabaaabbbaabbbbbaaaaa
bbaababbaaabbbbabbbabaaa
babababaaabbababbbbbabbbbbbababbabbbabbaaabbabbbabbaaaabbabbbabbaabbaaba
bbbbaaaabaaaaaaabbaaabaabaaaababaabaababbbbabababbabbbbaabbaaaabbbbaaababbbabbababaababb
babaaabbaabaaabbbabbbaabaaaabbbaaaaaabababababbabbababba
aaaabaaabbabaaabaabbbaaabbbbabaa
abbababaabaabbaabbbababbbbabbbbbaabbaaaaaaaabbabaaababbbbbabbbaa
aababbbababbabaabbbbabbaaabaaababbbbabababaaabaaaababaaaaabbaaab
ababbbaaaababbbaabbbbabaabaaabaabbbaabbaabbbbbaabbbaaaaabaabbabb
bbbabbaabaabababaabbababaababaaa
aaaaaaabbbbbbbabbabaabaa
abaabaaaaabbaaaabbbbaabaaabaabaabbbaabaa
aabbabaabaaabbaaaaaabbbb
abbabbaabaabababaabbbaabbbbbaababbbbabbbabbbaaab
abbaaabbabaaaabaaaaaabaaaababbbbbaabaaabaaabaabbbbabbabbbbbaaabababbabbabbbbbaaa
abaaabbbbabaaaaaabbaaababaaaaabaababbaababaabaaaabaaaaabbbaaaaab
aababababbbbbbbaabaabbabbbbbbaaaabbbaaaa
aabbaabaaabbaaaaaabaababaabbbbab
aabaaababbaaaaaabbababababaaaaabbababaab
baababaababbabbbabbaabaababbaabbaabaabbabbbbbaab
abaaabaaaaabbbaaabbababababbbabaaababaaa
aabaaababbbbbabbbaabbabb
aaabbabbaaabbbaabbbbbbababbababb
aabaaaabaabbbbaaaaaabaaabbaabbbaabbbbbbb
bbbbabaaaabbababbbabaaabbabaabba
baabaabaaabababababbabbbbbababaaaaababab
aabbbaaaaabbbbaaababbaaaababbbbaababaaaabbbabaab
abbaaabbbaabbbbabababbbabaabbbbaaabbabaabbaaaaba
aaaaaaabbbabaabbaabbbabaabbababaabbbbbbaabbbbaaaabababaaaaaabbbbaabbabba
abbbbabaabaabaabbbabbbbaabbbbabaabababbbbbaabbabbaabaaaa
abaabababbbbbabbbabaaaab
bababbabbbbabaaabbaaaabb
abbabaaabbbababbbbbaabbaaabbbbaababbaaba
bbbbaabaaabbbbbbabaabaaaaabaababbabbabbbabaaabab
babbabbbbbbabbaabbbabaabbbbbbbbb
babaabaaababbbbaabaabbbaababaaabbbabbbaaaaaaaaaabaababbbbaabbaaa
bbbbaabaabbabbaaabaabaaababababa
abbaababbbbabbabaabbbbbaababaaabaaabbbaaabaababbbbbaabaa
aabbaaaabbbbababaaaabbab
aabaababbabbbabaaabababaabaaabbaabaaaabb
bbabbabbbbaabbbbabaabaaaaaaaaaababaaabba
aaababbaabababaabababaaababaabaaabaaaabb
baaabbbabbaaaaabbaabbbab
bababaabbabbbababaaaababbabbaabbbbbaababbabbabbb
bbababaaabbbaabbaaabbbabaaabbbaabbbaaaaa
aabbbbaaabbbbbabaabaaababbaabbaaaabbbbbaabaaababbbbaabab
aaaaaaabaaaababbabababbaaababaabaabaaaaaabbaaaaaabaabbbaaaaabaaa
abaabbbbbbbabbaaaababbab
bbaaaaaaababaabbbaabaaabaababaaa
aabbbababaabababbabbbaab
abaabbbbbbaaaaaabbbbbbbabbbbabbbbabbaabb
aabbbbaabbababaabababbba
bababbabaaaabaaabaababaaaaaaaabb
bbbbaababbbabbaabbaabbaaabbbaabbbbabbaabaaaaaabb
bbbbabbabbbbaabaaaabaaaabaaaaabbaaabbbbaabaabbbaaabaaaaaabbaabbb
abbabaaabbaababbaabaaabbbbabbaabbbaabbbb
bbaaabbabbbbbababababaababaaaaaababaaaaaaabbbbab
aababbbaabbbbabaabbabaab
bbbaabbbaaaaabaabbaaaaab
bbabbabbbbaaabbbbbaaaaaababaabbaababbabbabaabbbabbaaaabb
aaabbabaaabaabbbbbaababbbaaaaaababbabaab
abbabbabbbaabbaabbaaabaa
abaabbabaaaabaaaaaaaabab
abbbbaabaabbabbbaabaaabbbaaaaaaa
abbabbaaaababbbabbabbababbaababaabbabaabbbbaaabb
aabaaaaabbbababbbaaababbabbbbababababaaabbabbbba
aaabbabababbbababbbaabbbbaabbbbaaababaaa
aabababbaaabaaaabbababaaaaaababb
abbaaaaaabababbaabaabaababbaaababaababbbaaaababbbabbaaabaabbabbaabbaabba
bbaaaabaaaabbaabbbaaaabaababbbbb
ababbbabbaababbbabaabaababbbababbbaabbaaabaababbabaaaaab
aabaaabaababaabaababaaaa
baabbbbbbaaaaabbbaabbbaa
abbabbabbabbabbbabbbbabaabbbabbb
ababbaabaabbababbbbababbbbbbabaabbabbbabbabbbbaa
bbbabaabbababbabbbabbbaa
aabaabbbaaabbababaabaaababababbbaabababbabaabbbabaaabaabbababbba
abaabaabababaababaabbabb
bbaabbbaaaabbbabaaababaa
bbbbabbbaabbaaaaabaaabba
baaaabbbbbbbaaabbaaaaabbabaabbabaabaabbbbaabbbabaababbaa
bbabaabbbaababbabbaabbaaaaabbbababaabbbaaaaabbab
babaaababbbabbbbabaabaaababaabbb
baaabbaabaaaabaaaaabaabaaaaabaaaaaabababababaaab
bbbbbabbbbaaaaaabaababbababbaaaaabbaabbb
abaaabbbabbbaabbbaaabaab
bbbabbaaaaabaabaaabababaaaabbbabbbbbabbbaababaab
bbbbabbbbaabbabbaabbbbbbabaaababbbbaaabaaaaabaabaabbaaab
baaaabbaaaaababbbbaaaaabbbbbbbaababbbabb
bbaabbbaababbaabbabbabababbbaababaabaaaa
bbbabbbbbaaaabbbabbbbbbaabaabbabbababaab
baababbbaabaabaabbaababaabaaabbbbbbababbbaaaabba
babbabababbbbbabababbbba
aabbbaaabbaaabbaabaaabab
bbbbbbbaabaaabaabbbbbabaabaababbabbabaab
bbaabbbbaaabbaababaaabbabababbbaaaabababbababaaaaabaaaab
babbbabaaabbabaaaabbbaabbabaabab
bbaaaabaaaaaaabbababbaaaababbbbbabaabaaababbabbbabbaaaaaaaaaababaaabbabbbbbbabaa
ababaabbaabbaaaabaaaaabbababbbba
baaaababbbbbaabbbaaabaaa
aababababbbaabbabbaabbbb
baababbaaaabbabbababbaba
babbabaabbbbbbbaaabbbabb
bbbbbbabbbbbbbabbbbbbabbabaaaabb
bbbaabbbbbbbbababababbbb
aabbaaaabbabbabbbbbaabaa
bbababababbbbaabaaabaababbbbaaabaaaabbab
ababbaabaabbbaababbbaababbabbabbaaabbababaabbaabababaaaaaabaaaaa
aabaababbabbbaaaabababbaaaaabbab
abbaaabbaabbaababbbabbbaababaaaa
aabaabaabbbbbabbaabbaabaaabaabaabaabaabbaaaabaaababbaabb
aabaaaabbbbbaaaabaaabbbbbbbbaaabababaaabababbaabbbaabaabaababbaabaaaabab
bbbabbabaaabaaaabababbaabaaabbbabbaabbba
bbaaaabababbbbaabaaabbaababbabbaaabbbababaaaabaaabbbbbbb
bbaabbaaaaaaabaaaaabbbbabbbbbabbbaabaabaaabbbabb
bbaabbbaabbaaaaaaaabaabababababbaabaaaaa
babbababbaabaababaababbabbbbbbabbbbbaabbbaabbbbbbabaabab
ababaabbaabbbaabaaaabbba
aaaabaaaabbabbbabbbbababbbaabbab
aaabaaaaaaabbabaaaaaabbb
bbbbabbaababbaabbbabbabbabaaaabbabaaabba
ababbaabbbabbbbbaaaabbba
abbbbabaaabbbaabbbbaaaabababaaaa
aaabaabaaabbbbbbaaabaababbabbabbbbbabbab
aaabaababaaaaaabbababbabbabaabbaabababbabaabaabaaaababbabbaabbaa
baaabbbabbabbaababbbaaab
aabbabababaabbabaaaaaaba
aabbbabaabbaaaaaaababbaa
bbbbbbabbaaaabaaabbabbabbaaaababbbababaa
aababababaaaaabbaaaaabaabbabbabbabbbabba
bbbbaaababbbbabaabbbaaaa
babababbbabababaabaabbabbbbbbbbbaaaabbaaaababababbabaaab
abaaabbbaabbbaabbbbaaaba
aabbaabbbabaaabaabbabaaabbbbbaba
bbbbaaabaaabaabaababbaabbbababbbabaaabbbabbaabaababaabababbbbabbbababbba
abaaabbbaabbaabbabbabbbabbbaaaaabaaabaabbbbbaabbaaabbbbaabababab
bbabbbbaaabbbabaababbbaaababaabb
aabababbbaabbabaaaaaabab
abaababaabbababaaabbaabbbbbaabbaaaaababa
aaabbbabaababbbabbbaaaabbabbbbaabaaabaaa

1728
input/2020/day20.txt Normal file

File diff suppressed because it is too large Load Diff

38
input/2020/day21.txt Normal file
View File

@@ -0,0 +1,38 @@
pblqsd tdtg rrzf rsbxb mml hgflmgp lsb lxvc mzxmthz mdhvtc sdpssq cdmln zmsn vfmsk slmjgj nvjql hjbq cxsvdm mfpgdr kndg chvtbb gstc hjjg bvqlhhd ggvzz tjlqrg mtnh rpxdc vxqg hvrqsz fqnzvb bkz kktl ppf tlrjcv dsjtkv txdmlzd zbsmv jssz npkdtv vlblq hlkb kpq fpjgdr lzkc lrcxf msfd ftx mptbpz rfdqzf nccr scjsx ncth fqqhkbm qvcr vvptj glf tlls qmnqtm tjlxs bnqbh vgpdr ftxzklk zpcj kqqmg fdzjc ckzc dcrnk cq bbfm xtgghn nnzm (contains soy, fish)
zpkv qvcr nvq xntsmjqf vqtqp tlls frng rmbn jssz bvqlhhd vsjpsl krlr mtnh fzrmkrdh txdmlzd cjfdvf ghjhv rkd ftxzklk dhlrh mptbpz mgtl tdv qjn gnvmv cq msfd zthtx prgck shc slssgt gn vxdrhp vgpdr fdzjc lrcxf cknhk tmt vlblq fhrc lvfph glf xbnmzr rrvq qmnqtm kvgctt pcjf tjlqrg ftx kktl cmgvvr ggzb stmnld rsbxb vvptj ctmf cdmln prhkvgbh cfvdq hgflmgp vpmfdct zntx (contains soy, eggs, wheat)
zrt rdtbcz krlr sdst mtdzn vqtqp slssgt dhlrh hghtp lzkc xtgghn qvcr sptc shc nvq mzmpqh ttpxk xzfd fqqhkbm ftx cxsvdm dfgjq cdmln dfdmj kktl lvfph fsxkvv cjfdvf ggvzz hlkb mzcpbs rzmtsz ckzc vfmsk rkd vjlpj bs rsbxb rrzf dmnxl mptbpz vpmfdct nnzm txrtjzx xbnmzr cxsmk tzlx tlrjcv glf mdhvtc gnvmv mchrgcrj pmznfk dkq ppf zpcj zcsmnq mgtl sdpssq mtnh ggzb zplxgb ftxzklk bftd zffkzcp zbblpvfb txdmlzd rfdqzf stbldpp rmxph xntsmjqf (contains dairy, eggs)
cvptv xhzkj glf tshxt rfdqzf vqtqp lrcxf pblqsd gblh bbfm chvtbb rsbxb mzxmthz zthtx fdzjc prgck cxsmk cjfdvf flcd ckzc vlblq sqmqz ppf rmbn vxgn mptbpz kll kqqmg cmgvvr tdkcd txdmlzd hgflmgp cxsvdm cdmln fhrc xbnmzr tdv vxqg dfdmj hvrqsz vvptj tjlqrg ncth hdbmkt zntx lvfph pcjf bftd dcrnk gn dhjrmdl (contains dairy)
vfmsk slmjgj cxsvdm nvq vlblq gnvmv cxsmk rl kpq dcrnk tgdk bhhmjbk qmnqtm fsxkvv bftd ggvzz cmgvvr fhrc zcsmnq vsjpsl xtgghn zthtx cjfdvf tlrjcv ftxzklk xbnmzr prgck zbblpvfb bkz frng zntx glf sfxd fdzjc fqnzvb ftx slssgt cknhk qtlnsrq lzkc thbx rrvq sptc xhzkj jzdzmg ggzb rsbxb mgdjxn kqqmg dmnxl mzmpqh dsjtkv fpjgdr txdmlzd mptbpz cfvdq (contains wheat)
nvq vlblq qvcr rkd rmbn ggzb xtgghn nvjql kslxsfnv mzmpqh fqqhkbm qnbf hgflmgp vxgn vgpdr sfxd cmgvvr zmsn tgdk ttpxk zcsmnq dmnxl stbldpp zpkv qtlnsrq klrnc vpmfdct nnzm tjlqrg pcjf pllr kll jssz ksfgf cxsmk rfdqzf prhkvgbh vvptj ncth nccr vjlpj flcd hjbq xjx cdmln slmjgj hghtp lsb xbnmzr zffkzcp tshxt cvptv ctmf lzkc ldl vfhkmn bkz slssgt txdmlzd mtnh sptc tdkcd dhjrmdl cxsvdm dhlrh rdtbcz lxvc vbsz bhhmjbk cq mptbpz rl vqtqp fdzjc glf zplxgb xzfd gnvmv xhzkj zbblpvfb tlls mgtl hvrqsz (contains peanuts, eggs, sesame)
msfd fqnzvb tjlqrg ksfgf gfkt zthtx dbds lxvc vgpdr glf zpcj xhzkj mptbpz rrzf krlr slmjgj cfvdq tlls rmxph mzcpbs dfgjq rfdqzf zmsn lrcxf tlrjcv thbx vzcgt lvfph dkq kslxsfnv tdkcd zcsmnq ttpxk kvff flcd mtnh hghtp kktl rmbn gn vlblq xntsmjqf prhkvgbh tjlxs pcjf hjbq bs kvgctt stmnld sn ctmf jgjx rhmpqn kcvgs rl cq vxdrhp pblqsd ggzb shc zntx rsbxb kqqmg cxsvdm txrtjzx hdbmkt dqldvn zbsmv kll txdmlzd jzdzmg klrnc mzmpqh zrt ldnvr nnzm prfjk (contains wheat, dairy)
kndg jzdzmg txdmlzd ldnvr vqtqp frng cxsvdm fsxkvv rhnd hglq gnvmv thbx bbfm shc zmsn sptc fqqhkbm qsvfj nkv lzkc pk ncth rhmpqn gdpdm bnqbh pcjf mchrgcrj dbds gn zthtx kpq stbldpp dqldvn rrzf mtnh zplxgb vlblq rsbxb mptbpz ncknc ccqpr ksfgf xbnmzr jgjx mzxmthz (contains peanuts, fish, dairy)
prgck bs kktl vjlpj rhnd gfkt rmxph vjrlml msfd zffkzcp mchrgcrj mptbpz cmgvvr zrt txrtjzx tjlxs kqqmg rdtbcz lzkc hjbq pblqsd sdst xntsmjqf hgflmgp bvqlhhd lsb sn txdmlzd kslxsfnv bkz vfmsk nnzm dhjrmdl sptc gblh vlblq hglq xhzkj rsbxb vsjpsl flcd kvgctt mgdjxn hghtp tjlqrg tdv tlls cxsvdm rfdqzf fqnzvb mtdzn kndg dsjtkv pvg sqmqz mzxmthz gnvmv vzcgt cq ggzb xbnmzr gstc rrvq dkq qmnqtm pmznfk krlr qtlnsrq vbsz lxvc pllr mtnh hdbmkt rl kffdz prfjk kvff jzdzmg qsvfj npkdtv rzmtsz (contains nuts, wheat, fish)
vxgn rhmpqn glf kqqmg fpjgdr ncknc tzlx kcvgs rl bftd tdtg hjjg xbnmzr rsbxb dhjrmdl xjx ksfgf tgdk jzdzmg dfgjq sn kpq vxdrhp qtlnsrq mchrgcrj krlr cxsvdm mptbpz vxqg cknhk jssz msfd cjfdvf tmt pblqsd ghjhv vfhkmn ttpxk ldnvr zdkxzm mzmpqh npkdtv vgpdr ggzb vjrlml zpkv bvqlhhd bqgjz vfmsk ggvzz tdv pllr vvptj scjsx txdmlzd nvq pcjf hghtp bhhmjbk kvff cq pmznfk pvg tjlxs vlblq ftx chvtbb lsb hgflmgp nxtvs (contains nuts)
kll flcd nccr tdkcd rpxdc ncth rrvq vlblq cdmln vfmsk krlr txrtjzx hrflzj cblbf tdv kndg mml fqnzvb shc slssgt qtlnsrq vxgn stbldpp ggzb gstc ncknc nxtvs vjlpj txdmlzd cxsvdm bs kvgctt hglq rfdqzf qnbf hvrqsz glf cknhk zntx msfd lrcxf rzsvmj zplxgb zpcj rhmpqn vzcgt xhzkj lsb kvff ghjhv hghtp mchrgcrj zbblpvfb sn qsvfj slmjgj ldl fsxkvv mdhvtc xjx vvptj pllr zbsmv kffdz dqldvn pmznfk frng pk sdpssq rsbxb vgpdr fqqhkbm rmbn bvqlhhd mzxmthz vsjpsl vbsz kqqmg tmt tlrjcv gdpdm xbnmzr mptbpz mgtl (contains nuts, peanuts, fish)
zpkv mtnh msfd zdkxzm zrt glv kll prhkvgbh rpxdc rfdqzf sn zffkzcp nvjql gblh gstc dhlrh hjbq kndg sqmqz mzmpqh bs vxqg rrzf kvff vbsz vgpdr cknhk sdpssq pcjf mzcpbs vlblq glf cmgvvr fqqhkbm shc stbldpp scjsx vzcgt lxvc lsb hghtp frng txdmlzd mptbpz rsbxb fpjgdr lvfph slmjgj ggzb xzfd cxsvdm tlls mzxmthz vxdrhp (contains sesame, soy)
kktl tjlqrg jssz rsbxb xzfd gfkt pblqsd tdv ncth dhjrmdl xtgghn pmznfk hjjg rfdqzf dfgjq mzxmthz mgtl bnqbh vxdrhp ppf ckzc lzkc mptbpz qtlnsrq gn prhkvgbh rdtbcz vjrlml qggdgf mtnh bhhmjbk kffdz fzrmkrdh glf vfhkmn pvg cmgvvr kll xbnmzr qmnqtm mtdzn kcvgs dkq dqldvn cxsvdm mml rmxph txdmlzd zpcj nkv vzcgt vbsz kndg nccr fqqhkbm hlkb nvq nnzm rzmtsz (contains eggs)
mptbpz glf chvtbb dkq xntsmjqf xjx bhhmjbk hgflmgp fpjgdr hvrqsz vfhkmn kndg vzcgt rhnd mgtl thbx rdtbcz rmxph zpkv pllr zbsmv nvjql xbnmzr tjlqrg pvg qggdgf fhrc bftd ckzc pmznfk cblbf mtdzn klrnc hglq kvff zntx mtnh dfgjq bnqbh txdmlzd ftx jgjx vfmsk slssgt frng vgpdr tgdk pblqsd lrcxf xhzkj kpq rl nvq dmnxl tlrjcv hdbmkt pk gnvmv tzlx cxsvdm rhmpqn cjfdvf lzkc qvcr mfpgdr mdhvtc rzsvmj hghtp tmt nxtvs vlblq tdkcd kvgctt ftxzklk vjlpj lvfph rzmtsz vqtqp slmjgj jzdzmg (contains dairy)
xjx xbnmzr prfjk mgdjxn glf hghtp cxsvdm vlblq mml sn qggdgf vjlpj frng vjrlml mzmpqh lrcxf rsbxb qmnqtm ckzc nccr rzmtsz hjjg hgflmgp stbldpp kvff cfvdq rhmpqn txdmlzd prhkvgbh hjbq prgck gnvmv fqqhkbm qjn stmnld slssgt kslxsfnv mgtl cmgvvr rl tzlx mfpgdr tlls zpkv ttpxk mptbpz ldl dbds kndg vsjpsl vpmfdct kqqmg qnbf mchrgcrj bs bkz flcd ncth ftxzklk cvptv tjlqrg bhhmjbk xhzkj vxgn cxsmk sfxd lsb qvcr zrt nkv sqmqz scjsx (contains dairy, peanuts, wheat)
mdhvtc tdkcd vlblq xtgghn cfvdq prgck nkv zcsmnq kvff rrzf cq rzsvmj hglq gnvmv mptbpz dcrnk pk nvq hlkb sqmqz xhzkj krlr prfjk tlrjcv cblbf kktl klrnc rpxdc cdmln ldl nccr glv lvfph mtnh kndg vfhkmn dkq ccqpr lzkc rsbxb rdtbcz hgflmgp vjrlml xjx dhlrh glf sdpssq bnqbh cxsvdm dmnxl stbldpp xbnmzr cknhk cmgvvr zthtx (contains sesame)
hglq nccr mzcpbs tlrjcv slssgt npkdtv ccqpr fdzjc vpmfdct vvptj dhjrmdl tjlqrg ldl ncth mzmpqh fqnzvb flcd fsxkvv glf ctmf rmbn bnqbh rsbxb pcjf dkq dhlrh txrtjzx cxsvdm rl lxvc ttpxk prhkvgbh kvff zrt ggvzz mptbpz klrnc bqgjz msfd rdtbcz fhrc gfkt qmnqtm tlls mchrgcrj kqqmg zbsmv hjjg dfgjq xbnmzr kndg kpq gn zbblpvfb mgtl sqmqz shc sptc zcsmnq ckzc ghjhv mzxmthz qnbf ftx glv qsvfj dqldvn mtnh rmxph xzfd rfdqzf txdmlzd gblh xtgghn ppf nvjql bvqlhhd kktl lsb cblbf tzlx vgpdr krlr (contains peanuts)
ncth kcvgs sptc cxsvdm fqnzvb mgdjxn ftxzklk ckzc kktl ccqpr tlrjcv txrtjzx kqqmg qnbf bqgjz vzcgt hrflzj kvff slssgt rsbxb mgtl mfpgdr cfvdq scjsx cvptv tshxt bnqbh cblbf glf jgjx xbnmzr vxdrhp xtgghn mzcpbs vjrlml dcrnk ksfgf fsxkvv fdzjc qvcr vbsz gnvmv txdmlzd rrvq npkdtv flcd frng rhmpqn gblh mptbpz vlblq tjlxs ldl (contains wheat, eggs)
tdkcd kktl cxsmk lrcxf rmxph tgdk vfhkmn dfgjq rzsvmj mptbpz flcd kffdz kcvgs bqgjz cvptv rrzf pllr klrnc kndg zffkzcp sdpssq rl pmznfk xbnmzr lxvc dsjtkv cknhk qnbf mtnh pcjf mtdzn sn tlrjcv kll qsvfj rsbxb krlr tdtg thbx vzcgt qjn tdv ktkbpp mzmpqh vgpdr vlblq ghjhv stbldpp bbfm dhjrmdl pblqsd rhmpqn fqnzvb fdzjc txdmlzd scjsx bhhmjbk gdpdm prgck ncknc bs chvtbb fhrc hghtp hjjg nvq cxsvdm ksfgf cjfdvf ncth (contains peanuts)
zpkv pmznfk qnbf shc dsjtkv zmsn fdzjc vlblq bs rhnd ttpxk mptbpz kndg mchrgcrj xhzkj txdmlzd cblbf nccr jssz xzfd flcd glv hghtp bbfm hdbmkt tdkcd kcvgs pblqsd vpmfdct gblh kktl mtnh pllr lzkc kvgctt hrflzj ldnvr ftx hlkb vbsz zbblpvfb dfgjq prgck qmnqtm nxtvs ggvzz ldl xbnmzr ftxzklk mfpgdr gnvmv stmnld zntx xjx glf vqtqp frng sdpssq vxdrhp kffdz hglq msfd vzcgt rsbxb cfvdq tzlx rzmtsz kqqmg gn rmbn (contains peanuts, sesame, soy)
bvqlhhd klrnc ggzb mptbpz dsjtkv qggdgf nxtvs zthtx hrflzj ldl ncth sptc prfjk txdmlzd scjsx zntx zcsmnq shc lsb txrtjzx tlrjcv bqgjz mtnh ldnvr xbnmzr chvtbb gnvmv sqmqz hgflmgp fdzjc zpkv bbfm kktl qvcr vjlpj ftxzklk xntsmjqf prhkvgbh rsbxb vqtqp zrt dmnxl ncknc cxsmk ctmf vlblq glv mdhvtc cxsvdm (contains fish, sesame, peanuts)
bhhmjbk zplxgb zmsn mzmpqh cq gblh fdzjc pblqsd mtnh dfgjq kffdz jzdzmg vfhkmn mchrgcrj npkdtv pvg tlrjcv rhmpqn cmgvvr pcjf cfvdq lsb kvgctt vxqg tgdk nccr nvq glf gstc nkv txdmlzd qvcr vzcgt txrtjzx ggzb nnzm sptc dsjtkv kslxsfnv zntx dhlrh jgjx vlblq prgck mptbpz thbx ghjhv gfkt lzkc jssz gdpdm rmbn rrvq fqnzvb xbnmzr pmznfk cblbf dbds stmnld mfpgdr kndg slssgt hglq rmxph bvqlhhd ncknc qmnqtm prhkvgbh cxsvdm xtgghn vqtqp rdtbcz pllr qsvfj kqqmg rpxdc hjbq (contains nuts, sesame, soy)
fhrc kktl fqqhkbm vjlpj zmsn qvcr zffkzcp qggdgf dbds rfdqzf sdpssq zcsmnq kll kvgctt zthtx cjfdvf cxsvdm ksfgf hghtp glf scjsx vfmsk fzrmkrdh bbfm kslxsfnv mtnh gstc rsbxb mptbpz rzmtsz hjbq qnbf vgpdr vzcgt dhjrmdl ggzb ldnvr vsjpsl txdmlzd vlblq ldl shc mzxmthz ncth kffdz mtdzn bnqbh pvg rdtbcz glv rrzf ghjhv gdpdm zbsmv bftd (contains peanuts, wheat)
xtgghn gnvmv mzxmthz vqtqp rsbxb slssgt zdkxzm rmxph prgck dcrnk txdmlzd kslxsfnv fzrmkrdh zrt vjrlml qtlnsrq dfdmj glf npkdtv lsb pllr tdtg bhhmjbk shc fhrc cblbf mptbpz bftd vbsz vlblq prfjk rkd nkv zffkzcp fpjgdr vxdrhp ldl mzmpqh rhmpqn hglq bs rhnd rl cfvdq xbnmzr jssz kll ncth mdhvtc zpcj tmt ncknc hjjg gstc pblqsd bqgjz mtnh flcd (contains peanuts, nuts)
gstc gdpdm rmbn sfxd mfpgdr tdv txdmlzd zntx ghjhv cdmln kcvgs pk xbnmzr nvq ncknc tdtg fpjgdr pmznfk stbldpp cknhk xtgghn tdkcd thbx jgjx hvrqsz zbblpvfb qsvfj gn frng glf sdpssq sqmqz rfdqzf txrtjzx rl ksfgf hjbq rsbxb dsjtkv tjlqrg kndg vlblq hglq ldl vxdrhp ggvzz cxsvdm ldnvr qggdgf vfmsk sdst ttpxk mtnh dqldvn (contains peanuts)
mzmpqh msfd qsvfj lxvc txdmlzd sfxd gstc cdmln bhhmjbk cxsmk xtgghn mtnh rfdqzf dbds ftxzklk zffkzcp mzxmthz vfmsk dmnxl zcsmnq mfpgdr rl mzcpbs rzsvmj bnqbh mgtl tdkcd dqldvn qmnqtm vsjpsl hvrqsz fhrc stmnld rmbn hlkb tzlx vjlpj glf cxsvdm txrtjzx mdhvtc fpjgdr nxtvs krlr bqgjz xbnmzr fsxkvv vvptj gn rzmtsz zmsn jssz pllr vlblq lrcxf nccr gfkt jgjx vgpdr qggdgf ccqpr sn kll zpcj dhlrh slssgt zbblpvfb tjlqrg mptbpz hgflmgp nnzm rhnd mtdzn flcd cknhk tlls nvjql pcjf jzdzmg (contains nuts, sesame, wheat)
cvptv ctmf glf tlrjcv ktkbpp zpcj vxdrhp cxsmk lsb ghjhv tzlx prfjk bftd rsbxb rpxdc dbds qtlnsrq dqldvn nvjql rhnd xbnmzr nnzm cxsvdm vbsz cfvdq cblbf txdmlzd dkq tdv mptbpz stmnld rrzf kcvgs qjn gfkt slssgt hlkb zpkv slmjgj prhkvgbh hgflmgp fhrc hvrqsz jssz vzcgt ftxzklk hjbq xntsmjqf tlls rmxph zcsmnq cmgvvr rhmpqn ldl dcrnk qggdgf mzmpqh sn vlblq thbx klrnc qnbf rzmtsz fdzjc bs ggzb gblh nvq mgtl pk jgjx dfgjq (contains wheat)
nxtvs sfxd sqmqz chvtbb ctmf cxsmk ccqpr zpkv frng xbnmzr rrvq rzsvmj fdzjc kcvgs gfkt zdkxzm ppf bhhmjbk scjsx qggdgf xntsmjqf vjrlml ftx nccr kktl zrt cjfdvf vlblq bvqlhhd bs lsb pllr fzrmkrdh mptbpz sdpssq thbx txdmlzd vxqg vjlpj rrzf kslxsfnv cxsvdm zmsn nkv ldnvr mtnh zbblpvfb dfgjq rl mzxmthz hdbmkt rhmpqn dsjtkv prhkvgbh tjlqrg dqldvn lxvc vxgn rsbxb gnvmv xzfd mml cknhk tmt mdhvtc jzdzmg tdkcd vfhkmn pcjf kqqmg vpmfdct (contains sesame, peanuts)
kcvgs ldnvr dhlrh fsxkvv tlls vjlpj gfkt gnvmv hgflmgp tgdk nnzm sdst vlblq dhjrmdl tdkcd sfxd cfvdq xzfd fqqhkbm ghjhv txdmlzd ggzb sptc mgdjxn zpcj cxsvdm rl rkd cjfdvf mtnh vxgn bbfm xbnmzr zntx ctmf dqldvn jssz cdmln cq rsbxb hghtp ppf sdpssq mchrgcrj lvfph fqnzvb hrflzj sn zbsmv nvjql zcsmnq mptbpz (contains peanuts, fish, wheat)
tjlqrg stbldpp tlls nvjql vqtqp lsb zntx bnqbh msfd kll klrnc ktkbpp npkdtv fqnzvb cxsvdm ftxzklk sdpssq thbx mtnh fqqhkbm dsjtkv dfgjq vvptj txdmlzd xntsmjqf bftd xjx dcrnk fpjgdr rdtbcz txrtjzx lxvc hrflzj zpkv krlr rsbxb xhzkj zdkxzm vlblq qsvfj mfpgdr zmsn ggzb kpq qtlnsrq rzsvmj hglq sqmqz gdpdm rkd gblh prfjk glf jgjx pk xbnmzr lvfph kndg dkq vxdrhp (contains peanuts)
zffkzcp vjrlml mfpgdr lvfph sqmqz sptc jgjx msfd hvrqsz lzkc rdtbcz cjfdvf sdst zpcj ghjhv bkz ncth sn ckzc tjlxs fsxkvv ncknc bvqlhhd hjjg kffdz mdhvtc vxdrhp ccqpr tdv glf dsjtkv hgflmgp rfdqzf ttpxk xbnmzr ktkbpp rsbxb vfhkmn stmnld ftxzklk vlblq dhjrmdl pblqsd gdpdm fqqhkbm ftx ksfgf nccr vzcgt mzmpqh nkv nnzm lxvc glv rkd txdmlzd hrflzj vjlpj xtgghn ldnvr qtlnsrq nxtvs zdkxzm dhlrh jssz cxsvdm jzdzmg ppf mzcpbs bftd dfdmj hglq cvptv dmnxl mptbpz zntx xntsmjqf (contains fish, nuts, sesame)
qnbf tdtg pblqsd tmt gblh ftx qtlnsrq bftd mgtl mzmpqh xbnmzr rpxdc sdst krlr mchrgcrj rsbxb vxdrhp bs ctmf sdpssq glv ggvzz mtnh ppf glf dfdmj dkq nvq dhlrh tlrjcv pmznfk dfgjq gstc mzxmthz zbsmv vxgn fqqhkbm rhmpqn hrflzj lrcxf vvptj vfmsk rhnd slmjgj gnvmv kslxsfnv flcd scjsx rrvq lzkc mfpgdr bhhmjbk pcjf zntx txdmlzd hjbq cjfdvf frng lsb qmnqtm mzcpbs ccqpr cxsvdm mptbpz rdtbcz rrzf nvjql vgpdr (contains wheat, dairy)
ttpxk dqldvn xtgghn stbldpp tzlx qggdgf qvcr pvg xbnmzr zbsmv zpkv kslxsfnv rmxph vjlpj gdpdm sfxd hghtp vxqg vlblq ktkbpp jgjx klrnc stmnld ftxzklk hvrqsz slssgt cq gnvmv glf kll vqtqp rfdqzf dcrnk zcsmnq bbfm ldl flcd gstc cxsvdm vsjpsl prgck mchrgcrj nvjql hdbmkt sptc mtdzn frng ldnvr nccr dkq fzrmkrdh vgpdr kktl cdmln rsbxb tshxt mtnh kcvgs mptbpz lzkc nnzm rrzf ftx (contains eggs, soy, sesame)
ccqpr tzlx zpcj mptbpz cjfdvf bkz zrt rdtbcz tmt cxsmk pvg fdzjc lxvc vlblq hvrqsz dhjrmdl msfd dcrnk ttpxk tdtg ftxzklk rsbxb mtnh cxsvdm vbsz fqnzvb xntsmjqf xjx shc dbds qnbf dkq txrtjzx zcsmnq prfjk glf sdpssq nnzm cmgvvr cblbf flcd lsb xhzkj cfvdq lzkc vjrlml rmbn frng gdpdm bs tlls ghjhv nvjql rrzf kktl txdmlzd hjjg zpkv zntx hgflmgp ggvzz dhlrh jzdzmg (contains fish, peanuts, soy)
kqqmg rfdqzf dfgjq cxsvdm glf sn mzcpbs ktkbpp vxqg mzmpqh ttpxk mzxmthz rsbxb tzlx zplxgb dcrnk zbsmv fdzjc dsjtkv sdpssq kvgctt xhzkj stmnld bnqbh bqgjz tdv stbldpp rhmpqn cq lxvc klrnc mtnh hjjg rkd vlblq gnvmv lsb cdmln dhjrmdl qtlnsrq vjrlml scjsx txdmlzd lzkc mfpgdr dkq tlrjcv xjx chvtbb ghjhv ppf cfvdq kcvgs xzfd kndg nnzm jzdzmg hdbmkt gdpdm kpq rzsvmj mgtl cjfdvf qmnqtm gstc dqldvn qsvfj vfhkmn rrzf zthtx cxsmk mtdzn xbnmzr qjn rmbn hvrqsz bhhmjbk dhlrh ldl flcd vjlpj fsxkvv (contains nuts, fish)
tlrjcv cxsvdm nccr vsjpsl vfhkmn vlblq xbnmzr prgck frng bhhmjbk zplxgb thbx jssz tdtg lrcxf pvg cjfdvf dmnxl vvptj stbldpp mtnh txrtjzx xzfd zpcj cmgvvr flcd bs qsvfj ggzb gdpdm zdkxzm rpxdc rhmpqn sdst rhnd ftxzklk nnzm fdzjc kndg vjrlml qmnqtm ldl cq cfvdq ttpxk tgdk xhzkj bnqbh fpjgdr lzkc vjlpj ggvzz glf prhkvgbh txdmlzd vxqg mfpgdr mzmpqh tjlqrg kqqmg cxsmk gfkt kvgctt kll mptbpz fqqhkbm xntsmjqf cvptv ftx zbblpvfb xjx qggdgf bqgjz chvtbb (contains soy, dairy, sesame)
cxsvdm zplxgb mtnh vfmsk ckzc hdbmkt tshxt dmnxl zpcj mtdzn nkv glv vzcgt txdmlzd vxdrhp rsbxb krlr zbblpvfb tdtg ccqpr lvfph nccr sdpssq qtlnsrq prhkvgbh klrnc rhnd mdhvtc bkz vgpdr dsjtkv tlrjcv cfvdq pmznfk dkq vlblq tzlx glf rl rzmtsz ttpxk kvgctt chvtbb nnzm scjsx mptbpz tdkcd xjx jzdzmg zffkzcp npkdtv cdmln tdv bs nvq prgck sptc gn ftx (contains soy)
ccqpr slssgt gfkt rzmtsz xtgghn prfjk cxsmk xbnmzr ghjhv gnvmv dsjtkv jgjx pllr bvqlhhd hlkb pcjf vfhkmn cq vsjpsl mtnh nvjql stbldpp mml mchrgcrj pvg dfgjq sdpssq shc fqqhkbm tdkcd sqmqz ldl mptbpz scjsx mfpgdr lzkc vlblq hdbmkt glf slmjgj thbx ksfgf dmnxl gn cjfdvf dbds tjlxs mtdzn xhzkj tdtg nxtvs zmsn ggzb xntsmjqf tgdk kslxsfnv zthtx vxgn zbblpvfb tjlqrg xzfd dkq cxsvdm rsbxb bkz vqtqp mzcpbs (contains eggs, soy, dairy)

53
input/2020/day22.txt Normal file
View File

@@ -0,0 +1,53 @@
Player 1:
10
21
37
2
47
13
6
29
9
3
4
48
46
25
44
41
23
20
24
12
45
43
5
27
50
Player 2:
39
42
31
36
7
1
49
19
40
35
8
11
18
30
14
17
15
34
26
33
32
38
28
16
22

1
input/2020/day23.txt Normal file
View File

@@ -0,0 +1 @@
459672813

496
input/2020/day24.txt Normal file
View File

@@ -0,0 +1,496 @@
enesenwwwsenewswsewenwwnwwnwnwswse
swneswseesweswneswwwwseewnewswsw
neneenenenenwneseneesenewenenwnenenesw
weeswnenenwneneeesweneswenwneene
nwnwnenwnwwnwnwnwnwwsewnwswnwwnwnwnw
nwwwnwnwnenenwewnwseewnwswnwwnww
senwweneewewswweswsenwnesenwwnwswnw
nwnwnenenenenwnesenenenwneswnwnweeswwsene
wswnwswneneswswswswswnesweseswwswnwswsw
neeeeeweseesesweeneweneesw
wwenewwwwwwnwnwwwwwwwwse
swneswswseseswswswsw
seswswsewseesesese
nenwneneneewseneneneenenenenenesenenew
swswwwnewwsewwwswwwswswwnesew
wwswwwwwwwwwwwswewwwwe
senewnwwnwswnwswnwewnenwenwewsenwnwse
wnwnwenwwnwnwwnewnwswsenwnwnwnwwne
nenwneswnwnwswnwnwesewwnwnwnwsenwnene
wsewneeseneseseseswnesesenwswenwswnwe
nesewnwwwswnweneenwswwesenesw
swsesenwswsesesewswswneseseeswnesesesewsw
neneswswwswswwswseswswewwswswswsew
eeeneeneneneneesweenewneneeee
seeenesesweseeeewwneeseeseee
nweeweeneeswenewe
seswwnwseeswseseswswe
wneneeswnesenwseneeneneneenwneneneenwne
newnenesenenenenenewneswnenenenenenenenese
wswswswswwswwwwweswnwswsewswswsw
eeeeeenesenwewseeneeneneweee
sewnwwnwnwwwnwnwnwnwswwwewnwww
sewesenwswwneswnwnwnwsweseseeswwse
nwwewnwweswswwwwewnwnwnwwnwwswe
swwwswnwswswenwneswswseswsweswseswsene
eneeenwswseseeeeeesenwenwwsweee
swseenwseesewnwnewnwneeeswswesenee
swwsesenwnwnwwwwnewenwnwewwwwsw
seeeeeeeeswnweeenwnwnewswesw
seenwswnenenwnewnwnwnwnwe
esenenweeswseeeseeweseseeeee
swswswswseswswswswnenw
neneseswsenenewneenenewwnenenenenenenene
wnewwenweswswwwswseswswwwnesene
seneneneweenwnwseeeweeseseeeene
neenwsweneneeeswwnwwneeenewnene
seseneswwneswseswwsesenwseseseswsesese
wweeeeeeswsenweeneeee
newnenenwneseneneeneeneneseneneeneene
wewnwnwwwwwwsenewnwwnwnwwwse
weseeseseswnwsewseneneeeesewwe
swswswswswswswswswswswwneswswwwswswe
swsenwneeseswseswswswswseseneseswswswsw
seswnenwwswswswneswsewwnewseswswwwsw
swswswneswswseswnwswseswseswswseneseswsw
wwwwnewesesewswwwnewwwne
enweeneseneeeeswnwesw
eesesenwseseeseseesesese
nwswseenesewwseesenee
wwswswswwswswwneesw
newwseswwnewswwwwswnwewnewwsww
nesenenenewenesenenenenwnwswnenwnwnenene
swnwswswneswswneswswswswseswswseswsweswwsw
swswswswswswneseswswseswnwswswswsweswsw
nwwwwswwwsewwwwewnwewswwww
neneeneeewneeneeeneenene
swnwnwnwneswwwseeenewnewswsenwwnww
nenenenwnenwneswnenwnenenenenene
nwweenwesweeeeeeseeeeewnenese
weeeneeseeeseeeseeeewe
wwwwwnwesewwwswewwwwenww
seneseseseseseneswsesesesewsewsesesese
eenwneneseeeeeesweenweeeenee
neseneseseseseseeseswseeeeseewee
nwswnweeeeseeseneeneneswswneneee
sesesewseseswesesesewseeneeseesese
seswnewwswewnwswneneswwnwnwnew
wneseneeeewsesewneneneenenwswnwne
wnwnenwnwnwnwsenenwnesenwnwnwnwnwnwnwnwwnw
wwnewnwwswweswewswseeewenwsw
eneeneseeneneneewneweeeneeeneew
nwwnwnwwnwnwenenwnwnwenwnenwnenwnenw
nwsenwnwenwnwswsenwsenwnwnwnwnwnwswenwnw
eeseseeeeeseseeeneesenwseeswe
ewenewneeneswewneseneswsewswwese
nwwwwswwswswwse
newnwnwnwwwwnwnwswsewewnwwwwnwnw
seswswnwwseseseswseesw
sewseweswwwwwswwwwwswwwwnwne
senenenenwnwnwnwnwnwnwnwnw
swswswwwwswswwnwwwswwesewwww
seeneseseneseesesesewsesesesesenwseswsw
wnenwnwsewwwnwnwwwwwsewwnwnew
swswswswswneswseswswswseseseswswnwsesese
neneneneneeneenenesenenwnenewnesenenee
wseseswseneeseswneseswseswswwwseswne
nenenenenenenwnenenenesenesewswneneenwe
seeseseseeseneesesenweeewseewsese
neeewneneneneseneenenenenenenesenwne
nenewnweneweseenwnwsesewnwswnwnwnw
sewnwnesenenwneswwnenwnwnwsenweneswe
senwnwnenwswnwnwnwnenwenenwnwnenenesenw
wnwwwwwsewnwwwewwwweseww
swnwnewnwnwsenwsenwnwnwnenwneswwwnwenenw
wnwseswnewwweewneneeseseesenww
wseseseseeseseseseseesesesenwswswswnw
neneneneneneneseneswnenenwneneneneneenewne
neswswswswswswsesesesesewsewneswsenesw
nenwneswnwweseeenwnesweneeneeese
seesesesesesweeseseseesweenweseenwse
seeswseseseswseseseswswswnenwswswseswsw
swneswswseswswswwswswnwswseswswswswseneswsw
nwseseesesewneeseseeeeeseewenesese
nenenenewneneswneswneneswswneneneneene
nwswnwnenwnwnwnwswnewnwnwnwenwnwnwnww
nwwnwnwnwnenwnwnenwsenenwnenwnwnwnwnw
senenenwnwewwwneeneewnenwsew
nenenenwneneneneswneneneeswenenenwnenw
wwneweewseswseseneneeseeeseese
neneneeswnenenewneneneneneneswenenene
eeeeewseeeneneneeeeeweenwsw
nwenenwnwswwsenwnwswneswnwnwnenwenenwne
eswwswneswswswswswnwewswswwswswwswswsw
enwwwwnwnwnwwewwnwnwnwnwseeww
seseseneeseseseseneseseewwseesesesese
nenenweneswnewenw
nenenenwneneneseswnwnwsenwenwewnenenwnw
nenenenwnwnwenwnwswnwnwwnwnwnwnwnwsenw
neeneneneeneneneneneneenesw
neeeneeeswnwnenwsewswswnenwsenwnee
wenwwwswenewwwsewswswnewswwew
seseeneeseseseneseseesesewsesewsesesese
swewnwwsenwnwwseewwnwwwnewwnw
wesesweeneeenewnwsweenenwneeesw
nwnwswnwnwnwnwnwenenwnwswnwnwnwnwnwenenw
nwsenwwswnenwneeesenewenwwwnw
ewseeeeenweseseseeeewseeseese
wnwnwsewwnwneswwnwwnwnwwnwwwnwnenw
swswsenwwswwenenenewseswswewswnesw
wnwswsesesesweeswseswswswswswseswswsw
eneeswnwwnwnwsweenwenwnwnewnwswswnwne
seseswswseseswseswsenesesewsenenwsesww
eeeneswnwnwnwneneseneseneenewnenwsee
enweseesweswneeweseenwneeew
newneneneneeneneswsenenewnenenene
eneswwneneenwnenesenewwnenenesenene
swswswswswsesenwswswswswsw
eeeneewewneeeee
swswsesenwswsenwswseswsweswseswnwseswswenw
sweneseswswesenenenwnwwnwnwneswe
wnwnwnwwwwsweneswnwnwnwewwnwww
seseswswswsesenwwseeseswswswswweese
seseeseseseseesesesenwnenwsenwsesesesew
wnwnwswnwwwwwwsewwwnenwwwwe
wnwwsenwneewswnwsenwnenwwnwesenwnewsw
swnenwnenenwnwwnwnesenenwnwnenwnenenenwnw
wwewwwwnwswwwnewwwswwwwnw
neneeeweesesenweneneswneeeewne
swswswseneneswwseseseneseseseswswswswswsw
nwnwnenwswwnwwwwnwwwwsew
swswswswseswsesesenwswsewseseswswesesw
nenwswnwnenwswnenwnwnenwnwnwsenwnwneenw
wseseswswswneseswseseswswsenwswswne
swnesesewseneseswswnwswswswswnwswseswswswsw
wnwnwnwnenwsenwneenwswnwnwnwenwsenwswnw
enenenewnenenwnenenenwnenenenenw
enenwnenwsewwwsweenenewnwnenwene
swwswsewnewswneswswwwswswwswwswwsw
neneswseeneeswewenwwswswweesese
swnwseswsenwsenweewenwsweeneeese
nwenwnwnwnwswnwnenwnwnwnwnwnwnwnwwsenw
seseseseeseseseeeeewesenesesewe
eswsenwnwneswwswwswnwwwwseeswsenwe
enenewnesenewnwnwnwswnwnwnenesenenwnenw
wneneneeneeeeweenewnenesweesene
enewnweneneeneeeswneneeeeenene
nwswsesenwnenwnwwnwnweswswnwnwneeew
eseeewneeneeeeeneeeeeseewene
sewnewwwwwwwsewwwwwwwnwwe
newnenesenweneneneweneenene
swseswswswswswswswswewswswswswswnwneswswsw
eseneneseseeseseeeeseeeeeswsewse
enwneenenewneeneneneswnenenenenenene
nenenwnenenwseneneenwnwnenwnweswnwnww
nwnwenwnwsenwnwnwnwnwwwse
nweswswwswenenweeeseseseeeeeee
nwnenwswnwwnwenwsewwnwneswnwnwnwnwsee
seeseeseseneewswweseseswswwwswswsw
nwnwnesenwenwnwnwnwnwnwwnwneswnwswwnwnw
seseseseswseswesesesesesesenesewswsenw
swswwswseseseseswsewseseneseseswneswswsw
nwnwnwnenwswnwnwnenesenenwnwnenwnwnwnenw
swnewwnwneenwnwenwsenwnwnwsewnwenw
eeenwwweeeewseneeswesenese
swenewneseneswneenwnesenenenwnenewene
nwnenwwwwwnewwwwwwwsesenwwww
seseswneseseseeenewwsese
enwneeeswenewneeeeneeseneeee
seseeseneseeeeeeswwnenwseswsesese
nwnesesenenenwnwnenwnwnenenwnewnwnwnenw
wwswnwnwewewswneseeswswswseneswsw
nwsenwneneneneneneeseewnenenenenesenwse
nesewswswneneswneswseswswnewswswsenese
swswwsesweswnwseseswseseswseseseseswsw
senenwswenwnwnwwnenwsenwnwnwnenwewnwwnw
nenenenwnwneswswneswnenenenenenenenenene
enweneswneneneeswneneeewneenenee
nwnwswnwwnwseesenenwwswwnewwsenwnwnw
neswseseswneeswneneswswneswenwwswwwe
swwneeneeneswwewnwneseeenwnenwnewne
wswwwseenwnewneswwnwwwnwseew
seewwnenenwneswwnenwneseneenenenene
swwsenwswsweseesenwwwswswwnewnesenew
neswswswnenesenenenw
nwwsewwwnwwnewnwwnenwwseswnenwswwnw
nenwneseeewneeeeseneesweneenwsee
seswseswseswnwnwswswseswsweseswswswswse
swwswneswswswswswswneswsweswswswswwswsesw
senesewseseseeewseweseseseeseesese
swnesenenenwneneneswnwnwne
wsesewwenenwsesewneneseseseswsesese
newseswwwswwwnwswweswwewswwww
nweneeneneeswnwwenenesweneseneene
esweneenweeeeseweeeneeewew
neswnweswswnenweseswswnesewswsenwsese
nwnwnwnwnwwenwwwnwnw
swswseseswswswswswswswswswsweswneswswnwsw
neneswnenwnenenenenenwnenwne
seeseseneseseswseseseseswsesesenwsesesese
nwnenwnwseenwnewewswsewnwwswswnew
wseesesweseseeneeenwseeeeeenee
swwwsewesewnewnweenwswswwwwwsw
eeneseseeseseseseswseewse
eeeneseeeeeeswseeenewseeee
swseswswsewenenwnwwnweswne
ewwnenwswnwnenwnwnwnenenwnwenenenwnw
neswswswswswnwswwswsewsw
seseeseswswewsewsenwseseneewsewneee
seswseswenwwnwswwswewnweseswnwnw
sesesenesesesewswseseswneseswsesesesesese
neneneneneseenenewneeneneswwnesenenew
nweeewneenwswneneswnewne
nwwewwswwwseswwswwne
nwnenwnwnwnwsewnwnwwnwewnwnwnwnwwnwnw
seneneneneenenwnewneneneswneenenwswnenese
swseswnwseswswseseseswnwnewseswswswswswsesw
nwnenenwnwnenwnenwnwseswneneenwnesenwne
nenenesweeenenenenewne
eewneeeweeeeseeeneneewene
swsweswswswswswswswswneswnwseswnwwseswsw
wwswwwnwnwewseweswnwnesenwwwew
seeneenenenesenenesweweenenenenwnene
newewseewnwwnwwwsewsenewswswe
sweeseweseseeeseeenesesesenwese
neswewwwseswwwswsww
wewnwnwnwnwnwwwnwwswesenwnwenwsee
seswsewsewseswswenenewseenwnwnwswse
swswseswseswseswswswnwswswnwsenesesw
nwnwsenenenwsewnenenenwsenwnesesenwnwnwnw
swnenwwwwwseswwneewswswwwnesene
seseseswswsesenesesesesesw
eneenwneenenenewswneswnesweee
nwnwneswnenenwsenenenenenenenwnenewnene
seswnewswswswnwswsenwwsweswswnwswesee
swswswswswwswswswewswneswswseswswswneswnw
swswswswswseseswsenwseneesesesesewwsese
seneeesweeeeeeweeeee
senweseeeenweeeenwenwsweeswese
swswneswseewswswnwswswwsenweswswswesw
ewneeeeeneweeeeeeweseesesese
nwseswseneeseeseesweeweseesesee
neeneswnenenewnwnenwnenenenwswneenewne
eswwswswnwnwseeenwweswnwnenwswswse
wwswnewwswnwwwswwneneeswwseswne
neneneneseneneswneneeneeewne
wwwnwwnewsenweseewwwewwnew
neswwsweewneswsenewsesewwsenwsesese
seswwsweenwweseneseneseneeenwwe
senwsesweseseswnwseeseswsenesesenenewsw
swseswswswswnenwswswwswswswswswwswenesw
nesenwnwnwnenwnwnwnenwnewnwnwnwnwnesenw
seswswswwswswwswswswswneswswenewnwswsw
nwnwwnwnwnwnenwenwwwenwswwswnwnwnwnww
neseenesenwnwsenwwneesewnewwswenwnenw
wnenwnwnenenenwnenesenwnenenwnenwnenwe
nwnwnwnwnenwnwnesenwnenwnwnenewnwnenwswe
enwswseeseseseewseeswnweeseeeee
eeeeeesenwseseeee
swsesweweswwswswswswnwnwwswswsw
neseneneeeenwweneenenenene
swwsenwnenenwnesesewneeswwswseswnwswswse
seeenweesesweseeeweeeseeswnw
sewsesesesesenesweesenwswsesw
nwnenwwnwnwswnwnenwnwwnwnenwnwnwnwsenwe
neenenwneeneswnenwneswneeneeneeneene
seseeeweseseeeeseese
nenwnenwnenenenenwswneneneenwnenenenw
wwwwswswwsweswnewwnewsewwwne
wwnenwnwsewnwnenwsenwnwnwnwnwwwnwnwsw
seseseswswsesenwwsenesesesesesesene
nwseswsesenwwswnenesenenwsw
swswsweswswswseweswnwswswneseswswswnwsw
enweesweneeneeneneeeeeneeewe
seswseseseseswsesewseseseswswsenwesese
seswsesesesenwnewsesesesesesesesesesenwsese
swswswnwswswswseswnweswswswsw
newnwwswwneeneneseeneswnenenenwnenwnw
swwswnwwswswnwswwewnwsweswswswseesw
sweswnwswenwwswswwwwsweswswswswswsw
nenenwnwsenesenenwnwnwnenenenenenwnwswnwne
wnwseswwewwnewwswnwnwwswewsesww
seseneseseswsesewswsesesesene
wwnwwwewwwewwwnwwwwwnwsww
wneeneesenwseeeeeweeesweswene
senesenwsweseeseesewseseenesewwsee
nwnwnwsenwnwswesenwenwnwnwnwnwnwnwswnwnwnw
eeweeeeeesweneeeseeneeneee
wwsenweswsewswneswswnweneswneenww
eeneneneeneeeeenewswneneeseenee
swwseseneswseseweseseswneesenesesese
eeeeneneneneneweeee
swsenesewseswsenwnenwsesweswsenwswswswnw
nwnwswsweswnenwnwnwnenenwnwnwnwnwsenenw
swsesweseseseweseeseswnwsesesenwseswsesw
eneeseneswswsweeweewnewne
neneeseenenenewenenenewnenenwswesw
sweeswwewsweewnwenwnwnesesenwesw
swswswswswswneswswswsw
eseseeneeeseewenwweeeeswsesese
swswwnwswnwwwswewweswwwwswswwe
wwewswwnwwwwwswwwwwweww
enenwnwwnwwwwsesese
wwwwnwswwwswswwwewwwew
wnenwneeswneneneseneewsw
sweswnenenwewsesenwsenw
wsewwenwnwnwwwnwwwnwnwwwnwww
eseeeeeeseeeseneeneeewwwee
nwwnwewsewnenenwwnwswwnwwwswnwse
wwswwwwweswwswwswswewwwneww
swnewnwnwnewseswewnesweswswesesw
nwnwnwswnwnenwnwnwnwnwnwewnwenwnwnwnw
swseweswnesewneesenwnesenwwseesew
wenweseesenwseswsesweswnenwneenwse
seeneneneeeenweneene
nwnwnenwneenwneswnenwnwnwnwswnwnwnwnwnw
esesesweswneneneswnwnwnenwneneseww
nwnwwenwnwnenwnenweswwenwnwnwnwnenesw
senewsewswswseseneswseseseseswsesesese
nwnwnwsesenenwneneswnwnwewnesewnenese
neesesewseseneseseseeseeseseesewsese
swnewneswwswswwwnewsesesenwswswnwsew
neseseswswwseseeswsesesesesesewseswse
swsweswseswswneseeswswswnwnwswwwswneswnw
seeeeseswsesesesesenwsesesee
nenenwnwnwnwnwswsenwnwnwne
eswsweswswsweswseswswwnewswwswswswsw
seneswneswswseswswseswswseswswsenenwswswsw
eswswseswnwnwsesewseseswseneeswswnesww
seseseesesenwsesesenesewseseseseseesesew
swswswswnweswswnewswswswswswwneswwswsw
neeswnenenesweeneneeneneeneenenewne
neswwswnwnwnwwseseneneewwsesewsew
eseseswwwseenesenesesenenwwnwseseswee
swswswseseseseswwswneeswswweswnwsesene
neneneneenesenwwweneswnwswwnwswnenwne
neeeneeeseeneswnenenenenwewnee
nwwnwewsenwnwnwenwesenwneewwnwsw
seswewnwwnwwswnwsenwnwswseenesweene
seswseneseswswseseseweesewwswwnesw
neseeneneneswneeneenenenewneneneenw
nwnwsewnwsenesenwwnewenw
senwneneswewnenenesenenenwewwnene
nenwenwwswwwwwwwwwewwwwse
sesenwsesesenwseesesenwnwswswsenewese
eeenenenwnwsweeeeeeeeeeneneswe
swwwseswwseswswwswwneswswwwnwsww
nwnwwnwwnwnesewnenwnwwwwnenwwwesese
seswswnwswseseseswseswneseseseewswsese
seswswneewneneeswswnwswwwswswnweswse
nwnwnwnwwnwsenwnewnwnwnwneenenenwnwnesw
nenwnwnwnwwnwesenwnwnwnwnwsewwnw
neswwnesenwneswwenwnwsenwnweeswsese
wwnwnwsewnenwwswwnwwwnwwnwnwwew
sewswseseneswseseswswneswseneseseswsesw
swwwnwwwswwswwwwwsewwwnwesww
seneswswwswwnwenwnwwswseeswwwwwwsw
neneswneneswnenesenenenewnenwneneneenw
nwswseseneseseswswswnewswseseseweswnesenw
nenenenenwneseneeneneneneneeswnenenwnee
swseneeeeeeeweneswneweeswwnw
nenenwneeneswneseenewnwswwnwenenenw
senenwnwwnwsewsewnesenenwwnewsewww
swweeenenenenewseeeeewsenwnee
nwneeseseseseseseseseseswse
eeeeweeeeweeneeesweneee
swswseseesesesesesewseseseseneswsewnesesw
eeenwseeeswnweeeeeeeeeeeesw
swswswswsweewswswswwsweswseswswnwnww
sesewsenwseeseeseeeenwnweswnesesesw
seseesesesesewseseeswseeseneesesenw
neeenwnenwsweneneseeenee
seenewesenwseseeseseseseee
nwswswsweswswwwwwswswswwswsw
wwwwnewwswnewwwnewwseswseww
eeseseseseseseseseesesesesenwenw
wwewwwwwwwnwwwww
swswswwswnewswneswswseswwswswwwswsw
wswneswswswwwwneswwseswswwswwswswsesw
nwnenwnenwnenenenewneneneseenwsenwswnwne
wnweswenwneeswswweseneseneeeenw
wnwneneneenenwnenenenene
newswwswweeswseseswswwseneswwnew
wsweneeseseseseseseseeseeseseeswene
sesenwseswseseseswseewnwseseswsese
seswnwnwneesenwseneewswnenwee
nwnwnwnwsenwnwnesewwnenenenenenwnenwnwnenw
senewesweeneswewsenwe
sewewswswwwwswnwwwnewwwwwswsww
eeneeeeeneeseneeeneneneeswnwnw
swseswwsewswseseswswseneswswswseseswneswsw
nenenenwneneseneneneneneneeeeneneswnwne
wnwsenwnwnwwsewnwnwnwnwnwewswnenenw
nweeeeeneesweneeeeneeneeswesw
sesewwnewwwwwnwwwnewwseeww
nwswswnwswneswwwnwswswsweeswnweeneee
wwwwwwwwswwwwwsewwnenewww
nenwsenwseeswneswseseswswenwswswseswsww
swswwswnwswwswswwswswwswwwewwnwew
wnwnwnwnewseswwewnwwwnwnwwnwsew
weseeseseseenenewseesewswsesesese
nenenenwnwneswnwneneseneneenwnenwnenew
nwseeeeswnewsewseeeeesesewesee
wwnwwewwwwnwenwnwwwwswnwwww
nwnwnwswnwnwnwenwnwnwnwnwnwnenwnwnwnw
wseswweseseneswnwneseswsewswswseese
neewseeesweeneenee
enwseswswswseseswswswswwswswsenwnwe
sewwnwwewwsewwwwwenwsewwwne
wewswswwnwnenwswneeswnwnesesenwesw
swswnenwneswswswswswswswswwswseneswswswse
wswwswswwswneweswewnwswswwsewwe
wnwwnwwsewswwwwwsenwwwswnenwswnee
seseeswenenesesewsewswneneseseesenwse
sesesesesesesenweneseseseseneswsewswsese
wnwnenenesweneeweneseeeseeene
sewnwwnwnwwnwwwwnwnwwsenwneww
wwswswwnewneseswnewwsenewswwwsew
nenesewneswnwenwwnesw
nweeeeeeseeesenwneswneeweene
nwnwwnwnwnwwnwnwwnwnwwwwew
seseseseseseseseswsenwseswsesesenesesese
seeswnwswnwnwseswsenesesweswse
seseeseseseseeseseenwsewseseswnenesewse
wweswnwwwnwsewwnwnwwnewnwwnwnwenw
neneswswswswswswwswneeswwswseseswswswse
sewnwseseswnwswseswsesenwseswseneseseswe
seseseseseeneseewseswneseeseseseseese
ewswseswnewswwwswwwswewwnew
swwewwswnesenesenwwnewnw
seseneseswsesenwseseswwnesesesewse
newswwswwswswswwswwnewswswswwsesw
wseneeeeswnwneenweneneweeeeeee
wswsewswswneswsewneneneswwwwswwsw
swwneeneswswwwswwwsenwswwneswnene
seeeeneeeeeswenweeeseseswsese
sesweeenwnewnwnwneeenwswsewsenwsw
seswnwseeseewnwswneenwnwseswneesee
neswnwwnwnwswnwnwnwnwnwnwenwnwnwnwnwnw
swseswswswseswswneswsw
neeswneneeswsewnwnwneswewnenwenee
swswseswswseswseswnwseswswweswswswneswswse
seseewseeseeeswseseseneseeewee
eeeeeseeweswwseene
swswswswswswswswswswseewneswswswswswsw
senwwwnewseesesenwnwenwwswnwnenwnwnw
eeeseswneesweeeeenweeeenee
newswnesweneneweneneneene
nesenwnenenwnwswseswenwwwwsww
senewswswwseswswnwwsw
newwwwsewswwwwswnwsewswsw
nwnwwnwnwsenwnwwnwnwnwnwnenwnwwwenw
swsenwnesesesewswswswswswswswswseswswsw
seneseseswwesewseseneseseeese
wwwsewwwwnwnwswwwwwwwewwsw
neewneeswenenenenenenenenenenewnenew
nwnenwenwnwnwnwwnwnwnwnenewnwneenene
enwwwwwwwwwsenwnwwewww
senwnwnwnwnwenenwwswneenesweewswswne
nesesesesewsewnesenwseswseswsenwsesesw
seseswswswseseenwseseneswnwnw
seseseseseseeeseeweeseseswnwsenesenw
nenewwswseseswseenwenesenwwwesenwswse
nwnwnwnwswwnweswenwnwnwnwnwnwnwenwswnw
wwwenwsesewnwnwnenwsenewsenwenwwse
swsewswnwwwswewnw
enwnwsenwnwenwnenwnwnwnwnwwswnwnwwew

2
input/2020/day25.txt Normal file
View File

@@ -0,0 +1,2 @@
17773298
15530095

323
input/2020/day3.txt Normal file
View File

@@ -0,0 +1,323 @@
.##......#.##..#..#..##....#...
...##.....#...###........###...
#....##....#.....#.....#..##.##
.......#.###.#......#..#..#..#.
##..........#....#.#...#.......
###.#.#.#......##...#..........
.#.##........#..............#..
..#..........#...##..#.......##
.........##...#...#....###.#...
#.......#.....#.#.#...###.##.#.
...#...#...#......#........#.##
....#..........#.....#..#....##
.#.#.##....#.#...#.............
#....#..#.....#.#..............
........#....#....#..#........#
..#.......#...#....##.#........
......#.........##.......#.#...
............#.......#..........
.....#..#.#..#........##...#...
....#.....................###..
..#.......#.........#..##....##
..#........#..#...#........#...
..............#....##..##....#.
....#..#.#.......#....#..#...##
.#........##......#.#..#.#.....
............#.##...##...#...##.
.......#........#.........##...
...#...........#.#...#..#......
#...#............#..####.......
..#..#..#..#.....#...#.#.#.....
....#.#..............#.....##..
#.....##........#......#.......
.....#..#................##.#..
.###.#...................#.....
....#....#...#.##..........#...
.#.....#....#.......#...#......
.....#...#.##.##............#..
..........#..#....#...#.#..#...
#...#..#..............###.#...#
......#....#.#....##....#......
............#......#......##...
.#....#...#........#.#.#..#....
..#.....#.......#.....#.#......
#....#......#.......#......#...
....#..##.....#...#........#...
.#..#......#..#................
.#...#...#....#.#...#.....#...#
......#..#...#...#..#.......##.
...#..#...#.#.......#.......#..
..#...#.........#......#......#
......#...#..#..........#......
.#..#......#....#.#.#...#....#.
.#.#....#.#.#..#..#..#........#
....###.#...##..#.#..#....#....
...#.#.#................#......
.#.....#..#..........##..#....#
..........#..#......#.........#
.....#....#...#.#..##....#.#.#.
........#.##......###..........
##......#.#..#.....#..##.#.....
.#.......#..#....##.....##.....
.....##....#...................
##......#....##........#.....#.
..##...#...........##........#.
...#....#..##.#....#......##...
#....#...##....#..........#....
......##....#...............#..
...#.#.#...#...#...#...........
....#..#...#.#....#.#......#...
.......#...#...............#...
.##..#....#...#....#.#........#
.....#..##............#......#.
...##...#.....#..........#.#..#
..#..##.............#....#.....
.....#.#.....#.........#......#
........#..........#.#.#...#..#
#........#.#...................
......#......##..............#.
......#..#.#.....#...#.#...#...
.#..##.....#...##.......#......
#.......#....#..##....#..#.#...
#..#..#....#...........#.##....
..##....#....##.....#...#...##.
.#.......#.......#....#.......#
.#..#..#...#...#...............
.#..............#.....#........
..........##...#....#.#......##
..........#..........#.......#.
..#..##....##...#.......#......
.#......#.#........##.#........
...#......#..#....#...#....#...
...............#....#..#.##...#
....#.......................#..
#....##.#......#....#..........
.......#.#......#........#..##.
..#.....#...#...........##..#..
#........#.#....#............#.
.........##..................#.
........#...#..#...#......#...#
...#.......#...####.#...#......
....#..###......###..#.........
.....#...........#......#......
.#.....#......#.....#.....##.##
.#.#...##..........#........#.#
..#....#.....##...............#
.....##.....#...##..#..........
.#......##.......#..##.##.#...#
.#..#...#.##.....#.#...........
.........#....##...#.....##....
#..........#.............#..#.#
...........#........#.#...#....
........#..###...#...........#.
#.........#...#....#..##.##....
........#....##.......#.#....#.
..........#..............#.....
....##...#...##..........#.....
...#..##.#...###..#............
...##..#####....#.............#
.#..#.......##.......#........#
....##..........#.......#.#....
......#.........####.......#...
...............#......#..#.....
...#...##...#.#.#.....##.#.#...
..#....#..#..............#....#
#..............#............#..
.#.#..#....#.....#.#.#...#.....
......#......#..#..#.....#.....
.#.#..#.##.#........#..........
..##.#......#..#.......#.......
.##...##....#..#.#.........#.##
.........#........#.#..###....#
.....#...............#.........
......##..........#.....#......
.#.....#.#.#..#.#.....#..#.####
.......###.##......#.....#.#..#
..#.....#....#.#.##......#....#
.....##..#................#..##
.#......#.....#..#.....#..#####
.........#.#.......#..##...#...
.#.#..#.......##.....#....#....
.....#...###.#...#......#....#.
.#....#....#...#..#.#........#.
......##........##.#...#..#..#.
.##.##.###..#.....#........###.
.....#..#.#.......#..#.#.......
##.#.#..............#..##......
....#.........#.......#.#......
.....#..#.....#...#.#....#.#...
...#..#.#.#..................#.
........##.#.###...............
..#...#.#.......#......#.......
.......#.##....#...#....#......
......#.#.............#........
........#......#........##.##..
.....#...#......##.............
...#.#..#.....#.#...#..........
.#.#..#.....#............#.....
.#.#..#.#.##.#...#.##..##...#..
.........##........#.##..#.....
##.#.#......###..#.##.#........
.##...#..#...#.#..#....##.....#
#......#..........#.#...#.....#
..........#......#...#.......#.
.............#..........#......
#.#....#.......##..#.....#.#...
##......#..#......#.#..#.#....#
..#.#..#.....#.#......#....#..#
...#......#......##.....#..#.#.
....#......#.....#....#.#.#..#.
.....#..#..#.....#...........##
....#.....#...#........##.#.#.#
..#......#.......#........#....
#.......##..##......#...####..#
#..........#......#.#..#..#....
.................##............
...#..#..#.#.....#.##.#.....#.#
...#....###....................
....#.......#..#.#.............
#......#................#......
..........#........#..#........
.....#......##..#......#..###..
...#....#.......#..............
.#....#.#.#........#.....#...#.
.......#.....##.#.....#....#...
.........#.#.........##..#...#.
......#......#....#.....##.#.#.
####...#.........#.....#......#
...#.#..#..#.............#.....
......#.........#....#.#..##..#
.........#.....#.#..##..##..#..
.#......##.............#.......
....#...#......#...#.....#.#.##
......#..##....#..#.....#......
......#..............#....##...
.........#.###..........#.##...
#....#..........#..#.......#...
...........#...#.....#.......#.
..#..#........#................
...###.........#...............
.....#.##...#.................#
..#.#..#...###......#........#.
#......#......#.#.............#
.........#.#.....#..#........#.
........#..#......#......##....
.....#......#...#.....##...#.##
.##...#..#....##..........###..
.......#............#........##
.##.....#.......#...#..........
..###..........#.............##
#....#....#.#....#............#
#...#......................#...
....#..#..#..#.......###....#..
#..###.#..#.....#.............#
..........#.##.....#.........##
...#.............#....#....##..
#........................#..#..
........#...#.....#.....#..##..
#........#......#....#..#....#.
.....#.#.#....#.#..#....#......
.....#....#....................
.........#..#..#....#......#...
..........#.#.#.......#........
.......#.#.....#..#.....##.....
.....#....#.#.....#.......#..#.
.#..###.......#......#..#..#...
..##.#.....#.........##.#......
.....#.......###.......##......
#...#.......##.#.#......#.....#
.##........##.#...#...#........
....#.......#....#..#.......#..
.#..#.......#..####..##........
..#..#..#..#..#..#.............
...#......#...#...#.#......##.#
........#.#..#.#.#......#...#..
#.......#..##.......##........#
..##...#...............#.#....#
.####........##..........#..#..
..#........#...##...#........#.
.#.#..........#...#...#........
....###..........#....#........
.#.#.#.###.#.##..#.#........#..
..........#....##.#..##........
.......#..#..##.......#........
..#........#....#..####.#..#...
....#.......#..##..#..........#
.....#...........#....#....#...
.#.##..#......##.........#.#...
...#......##..##......#.....#..
#........#..........#.#...#....
.#.#........###........#..#....
....#####.................##...
.........##...#......#.........
.......#....#....#.#....#...#..
......#................#...#.#.
....#.....#.....#.#.....#.....#
#.........#..#........#.....#..
....#...........#.....#.#......
##..#....................#.#...
#.#.##....#.....##....#.......#
..#..#....###.......#..##......
......##.....#.##...#....#..#..
........#..#.#..#..#.#.........
#...#.....##..........##.......
....#.....#...#.###.......#....
..........#..#...#........##..#
##..#...#.#.####.#..#..#...#...
................#......#..#....
.......#...###...#........#....
....#..##..#.#......#...#.#..##
.##......#...........#.......##
....#.#...#..#.#.......##......
....#..##..#.....#........##...
...#...#..#.#.#....#.........#.
#....##.#....#..##.............
.#......##......#.#.##.......#.
.......#...#....#.##......#....
..##..........#.....#.#......#.
#..##.....#..........##..#.#...
....#.#.......#.#.....#.....#..
##.....#..#.....##...#.....#..#
...#.#..#...#..............#...
...............#..#............
.#.......#......#........##....
..#......#..##..####.....#...#.
.#.##.#.#..#..##..##...........
...##.............#.....#..#...
.##.....#..#.#......##........#
##....#.............#...#......
......#.....###...........##...
.#.#...#.............##..#..###
..#.##.##...#.....#...........#
.....#.....##...#...#........#.
........#..##.......##.....#...
.#........####.......#.#...#...
...#..........#......##........
.......#......#..##..#...#.....
..#...........#.#.#..#.#.#.....
#..........#....#....###.#.....
....#.................#...##...
#....#.###......#..#.....#...##
.#.......##.....###.....#...#..
....##............#...........#
...#.#.#.........#...#..#..#..#
.....#..###.................#..
.#.....#.....#....###.#..#...#.
................#...#..........
..#....#..##....#.##........#..
....##....#...........#..#.....
...##......###.......#...#.....
.......##............#......#.#
#####.....#..#.###..#.#........
#.##.##..#.......#....#........
....###..#.#.#......###.#......
....#....#.....##.#..#....#...#
....#.....#.#...##.##.#.#....#.
.........#.#.###.#.....#.......
.#....#.......#..##...#....#...
...####...##.#.....#...........
#.....#.....#..........##..#...
................#.#.#......#...
.#...#.......#..#............#.
.##.#.......#..#....#.....#....
.#...#..#.....#..............#.

1138
input/2020/day4.txt Normal file

File diff suppressed because it is too large Load Diff

927
input/2020/day5.txt Normal file
View File

@@ -0,0 +1,927 @@
BBFBFFBRLL
FBFBFFBRRR
BBBFBFFLLR
BFBBFFBRRL
BBFFBBBRRL
BFFFFFBLRR
FBBBFBFLLL
FBBFBFFLRR
FBFFFFBRLR
FBFBFBFLRL
FFBBFFFLRR
BFFBBBFRRL
FFBBFBBRRR
BFFBBFFRRR
FBBFBBFRLR
BFFFFBBLRL
BFFBFFBRLL
BFFFBFFRLL
BBFFFBFRLL
FFFFBFBLLR
FBFBFFBLRR
FBBFFFFRRL
FBBFFFFLRL
BBFBFFFLRR
FFBFBBFLLR
FFFFBFBRRL
BFFFBBBLRR
BBFBFBFRRL
FFBFBFBRRL
FFFBBBBRRL
FBBBBBBLLR
FFFFFBFRLR
FBBFBBBRRL
FBBBBFFRLR
FFBBBFFRLR
FFBBBFFLRR
FFBBBBBRLR
FFBFFFBRLR
FBFBFFBLRL
BFBBBBFRRR
FBFFBFFRRL
BFFFBFFLRL
BBFBFBBRRR
BFBFBFFLRR
BFFFBBBRRR
FBBFFBFLRR
BFFBFBFLRL
BFBBBFBRRL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LR
FFBBBFFLLL
BFBBBBFRLL
FFBBFFFRRL
FBBBFFBLRL
BFFBFBFRLR
BBFBFFBRRL
FBBBBBBRLL
FBBBBBFRRR
BFFBBFFRLL
BBFFFFFLLL
BBBFFBBRLL
FFFBFFBLLL
FFFBFFBRRR
FFBFBBBRLR
FFFFFFBRLR
FBFFFBBRRL
BFFFFBFLLR
BFBFBBFRRR
FBBBFBBRRR
BFBFFFFLLL
BBFBBFBLRR
BFBFBBFLRR
FFFFFBBLRL
FBBFFFBRRR
FFBBFBBRRL
BFFBBBBLRR
BBFBBBFLRL
FBFFBBFLRL
BBBFFFBRRR
BBFBFBFRLL
BFBFFBFRLR
BFBFFFFLRL
BBFBBBFLLR
BFFBBBFRLR
BFBBBBBRRL
BFBFFBFRLL
BBFFFBBLLL
FBBBBFBRRL
FFBFFFFLRL
FFBBBFFLRL
FBBBFFFRLR

2201
input/2020/day6.txt Normal file

File diff suppressed because it is too large Load Diff

594
input/2020/day7.txt Normal file
View File

@@ -0,0 +1,594 @@
plaid magenta bags contain 2 clear lavender bags, 3 clear teal bags, 4 vibrant gold bags.
light teal bags contain 4 drab magenta bags, 2 dull crimson bags, 3 posh brown bags.
wavy gray bags contain 3 dark aqua bags.
faded magenta bags contain 3 dark crimson bags, 3 dark violet bags.
shiny aqua bags contain 1 plaid turquoise bag.
muted maroon bags contain 2 dim cyan bags.
pale yellow bags contain 5 dotted black bags, 2 drab silver bags, 3 shiny gold bags.
dark white bags contain 5 posh salmon bags, 5 wavy brown bags, 4 dark fuchsia bags.
plaid tomato bags contain 1 posh brown bag, 3 muted white bags, 4 vibrant fuchsia bags, 2 drab magenta bags.
wavy green bags contain 5 pale brown bags, 3 plaid turquoise bags, 2 mirrored maroon bags.
posh tomato bags contain 5 mirrored white bags, 1 shiny lavender bag.
vibrant silver bags contain 4 dotted lavender bags, 3 wavy green bags, 1 striped yellow bag, 4 muted plum bags.
mirrored cyan bags contain 1 faded plum bag, 5 dull purple bags.
bright yellow bags contain 1 clear yellow bag, 3 muted indigo bags.
shiny plum bags contain 3 shiny teal bags, 3 wavy gray bags.
striped gold bags contain 1 dull plum bag, 2 dark crimson bags, 4 bright lime bags, 2 vibrant teal bags.
faded black bags contain 3 faded bronze bags.
dim white bags contain 5 striped turquoise bags, 4 muted yellow bags, 4 shiny crimson bags.
light bronze bags contain 5 bright plum bags.
vibrant maroon bags contain 3 dim beige bags, 4 drab blue bags.
vibrant lime bags contain 2 pale cyan bags.
striped fuchsia bags contain 1 vibrant bronze bag, 3 shiny lavender bags.
mirrored indigo bags contain 4 dim gray bags.
posh bronze bags contain 5 muted coral bags, 2 pale orange bags.
drab coral bags contain no other bags.
mirrored violet bags contain 2 dotted purple bags, 2 posh green bags.
dotted lime bags contain 3 dull fuchsia bags, 4 plaid fuchsia bags, 4 pale gray bags, 3 drab fuchsia bags.
dull gray bags contain 4 bright brown bags, 5 dark blue bags, 4 dull cyan bags, 1 dark violet bag.
posh indigo bags contain 1 faded teal bag, 3 dark cyan bags.
shiny orange bags contain 3 mirrored green bags, 5 dim tomato bags.
faded lime bags contain 5 vibrant olive bags.
dim magenta bags contain 3 vibrant green bags, 1 vibrant olive bag.
light salmon bags contain 1 dim turquoise bag, 1 muted tomato bag, 4 bright black bags, 5 posh yellow bags.
bright bronze bags contain 4 pale black bags, 2 mirrored maroon bags.
striped yellow bags contain 5 mirrored red bags, 3 light tan bags, 4 vibrant teal bags.
dark teal bags contain 5 posh yellow bags, 4 dull plum bags, 3 muted plum bags, 5 mirrored beige bags.
plaid green bags contain 4 mirrored yellow bags, 4 dark aqua bags, 2 muted gray bags.
bright red bags contain 2 faded olive bags, 5 drab olive bags, 1 striped lime bag.
light plum bags contain 2 pale coral bags.
muted yellow bags contain no other bags.
wavy yellow bags contain 3 posh plum bags, 2 dotted chartreuse bags, 4 dotted magenta bags.
drab brown bags contain 2 clear blue bags.
posh purple bags contain 4 light coral bags, 1 dim aqua bag.
faded brown bags contain 2 faded salmon bags, 5 striped crimson bags.
dark blue bags contain 4 pale brown bags, 1 mirrored gray bag.
mirrored gold bags contain 2 wavy gold bags, 4 muted gray bags, 5 drab olive bags.
muted tomato bags contain 1 bright violet bag, 5 pale plum bags, 5 light plum bags.
wavy tomato bags contain 4 dim beige bags, 5 faded orange bags.
clear aqua bags contain 1 dull lime bag, 1 clear violet bag, 2 dim tan bags, 3 bright gray bags.
clear violet bags contain 4 posh brown bags, 2 striped fuchsia bags.
plaid yellow bags contain 1 pale fuchsia bag, 1 mirrored purple bag, 4 faded purple bags.
muted lime bags contain 3 dotted lavender bags, 1 faded turquoise bag, 1 plaid chartreuse bag.
bright orange bags contain 1 shiny aqua bag, 2 mirrored salmon bags, 3 posh red bags.
pale cyan bags contain 3 dim orange bags, 4 drab lavender bags, 2 bright coral bags, 5 light white bags.
dark magenta bags contain 5 dull salmon bags, 1 drab cyan bag, 1 dotted maroon bag, 1 dim tomato bag.
plaid chartreuse bags contain 5 dotted orange bags, 2 vibrant maroon bags, 1 dotted lavender bag.
dotted tomato bags contain 2 muted bronze bags, 1 dark magenta bag.
muted tan bags contain 2 plaid tan bags.
posh magenta bags contain 2 vibrant red bags, 4 muted gray bags, 2 vibrant maroon bags.
bright purple bags contain 4 bright gray bags, 2 plaid tomato bags.
drab chartreuse bags contain 1 light blue bag, 3 drab gray bags, 1 dim tan bag, 5 posh crimson bags.
shiny white bags contain 5 dull beige bags.
bright cyan bags contain 4 shiny tomato bags, 1 muted lavender bag.
faded blue bags contain 3 vibrant aqua bags, 3 muted orange bags.
light cyan bags contain 4 mirrored magenta bags, 1 dotted turquoise bag.
wavy salmon bags contain 3 clear tan bags, 1 dull bronze bag.
pale indigo bags contain 2 faded blue bags, 2 pale yellow bags, 5 dim tomato bags, 5 dark coral bags.
pale olive bags contain 5 muted olive bags, 4 dim olive bags, 5 clear violet bags.
shiny brown bags contain 1 dark green bag, 3 vibrant olive bags, 1 wavy indigo bag.
shiny coral bags contain 5 bright violet bags.
posh plum bags contain 3 pale coral bags, 1 dull green bag, 1 plaid cyan bag, 4 shiny orange bags.
shiny silver bags contain 3 dotted brown bags, 3 bright tomato bags, 2 posh tomato bags.
wavy gold bags contain 1 bright gray bag, 1 shiny fuchsia bag.
vibrant yellow bags contain 2 posh lavender bags, 1 pale purple bag, 5 muted plum bags, 3 faded chartreuse bags.
drab blue bags contain 4 drab silver bags, 4 bright plum bags.
vibrant turquoise bags contain 2 bright maroon bags.
pale violet bags contain 5 faded violet bags.
dark bronze bags contain 4 faded indigo bags, 5 muted yellow bags.
drab gray bags contain no other bags.
shiny violet bags contain 2 bright lime bags, 5 dull magenta bags.
striped tomato bags contain 1 wavy indigo bag, 5 shiny coral bags, 5 vibrant bronze bags.
dull yellow bags contain 3 muted teal bags, 1 dim green bag, 4 pale brown bags.
shiny lime bags contain 5 muted yellow bags, 1 drab gray bag, 2 faded yellow bags, 1 pale magenta bag.
vibrant tan bags contain 1 vibrant lime bag, 1 drab blue bag, 5 dark maroon bags.
wavy coral bags contain 1 clear gold bag, 2 drab tan bags, 1 plaid magenta bag, 2 pale lime bags.
bright beige bags contain 3 bright violet bags.
dim silver bags contain 4 bright plum bags.
plaid beige bags contain 4 dotted turquoise bags, 5 shiny salmon bags, 2 pale red bags.
light blue bags contain no other bags.
wavy brown bags contain 4 light yellow bags, 1 dark coral bag, 2 dark olive bags, 4 vibrant teal bags.
pale gray bags contain 5 faded cyan bags, 2 shiny lime bags, 3 striped blue bags, 5 drab purple bags.
vibrant white bags contain 3 drab gray bags, 4 faded blue bags, 2 clear white bags, 1 dull tan bag.
light lime bags contain 3 muted white bags, 2 dark fuchsia bags.
dark yellow bags contain 3 vibrant maroon bags.
vibrant indigo bags contain 4 dark olive bags, 5 light purple bags.
faded yellow bags contain 1 posh brown bag, 2 light blue bags, 4 mirrored teal bags, 1 dull crimson bag.
mirrored bronze bags contain 3 bright black bags, 4 faded blue bags, 3 striped salmon bags, 4 mirrored olive bags.
pale chartreuse bags contain 3 dim aqua bags, 4 mirrored lime bags.
plaid gray bags contain 1 vibrant aqua bag.
pale fuchsia bags contain 5 wavy yellow bags, 3 dotted brown bags, 3 muted black bags, 1 dotted turquoise bag.
vibrant olive bags contain 1 faded tan bag, 3 drab silver bags, 4 muted brown bags, 2 faded blue bags.
dotted olive bags contain 3 plaid gold bags, 5 mirrored salmon bags, 2 dim magenta bags.
muted purple bags contain 2 muted magenta bags.
dim teal bags contain 2 dotted maroon bags.
mirrored red bags contain 3 dim tan bags, 5 clear black bags, 3 faded violet bags, 1 mirrored olive bag.
dark lime bags contain 3 mirrored violet bags.
shiny beige bags contain 1 dim yellow bag, 2 mirrored coral bags, 2 bright salmon bags, 5 vibrant brown bags.
dim gold bags contain 1 shiny gold bag.
mirrored maroon bags contain 1 faded blue bag.
shiny olive bags contain 5 plaid olive bags, 3 muted silver bags.
wavy purple bags contain 3 dim cyan bags, 2 dotted white bags, 4 dark coral bags.
drab fuchsia bags contain 4 dull gold bags, 3 muted yellow bags, 4 muted orange bags, 4 faded fuchsia bags.
drab beige bags contain 2 plaid olive bags.
vibrant coral bags contain 3 mirrored cyan bags.
dull salmon bags contain 2 shiny gold bags.
light chartreuse bags contain 3 plaid cyan bags.
striped silver bags contain 3 shiny violet bags, 3 dark blue bags.
dark indigo bags contain 3 light beige bags, 3 wavy white bags, 2 light black bags, 4 striped silver bags.
dotted orange bags contain 2 dull bronze bags, 3 vibrant red bags, 5 dull gold bags, 3 shiny yellow bags.
dotted fuchsia bags contain 1 vibrant cyan bag, 4 dotted crimson bags.
shiny turquoise bags contain 1 dark aqua bag, 4 dark cyan bags.
posh beige bags contain 1 shiny purple bag.
shiny tan bags contain 2 bright violet bags, 5 faded orange bags, 2 mirrored cyan bags.
faded maroon bags contain 1 dark red bag, 1 mirrored red bag.
clear tomato bags contain 4 mirrored teal bags, 2 posh turquoise bags.
pale beige bags contain 2 pale salmon bags, 5 dark teal bags, 4 shiny chartreuse bags, 5 striped green bags.
dull red bags contain 1 pale plum bag.
striped salmon bags contain 4 drab cyan bags, 5 light yellow bags, 4 vibrant orange bags, 4 dark gold bags.
dull lavender bags contain 3 pale blue bags, 5 clear blue bags.
dim red bags contain 3 vibrant bronze bags, 3 dotted gray bags.
light orange bags contain 2 plaid teal bags, 2 dull brown bags, 3 dark brown bags.
dotted silver bags contain 1 vibrant yellow bag, 4 pale lime bags, 4 pale crimson bags.
mirrored gray bags contain 1 dark coral bag, 2 mirrored crimson bags, 3 light yellow bags, 5 dull crimson bags.
light black bags contain 1 drab tan bag, 3 drab lavender bags.
plaid purple bags contain 4 clear tan bags, 3 dim yellow bags.
mirrored tan bags contain 2 dark olive bags, 4 clear violet bags, 5 wavy salmon bags.
dark silver bags contain 3 shiny silver bags, 3 dark lime bags.
dark violet bags contain 3 faded violet bags, 1 dull plum bag, 1 drab silver bag, 1 pale purple bag.
drab magenta bags contain 1 dark aqua bag, 2 muted maroon bags, 5 drab green bags.
pale green bags contain 5 posh red bags, 1 light fuchsia bag, 2 dotted chartreuse bags.
mirrored beige bags contain 4 vibrant turquoise bags, 4 muted yellow bags, 5 faded cyan bags, 2 drab purple bags.
striped aqua bags contain 4 clear black bags, 3 striped indigo bags.
mirrored crimson bags contain 2 dull gold bags, 5 wavy blue bags, 2 bright plum bags, 4 shiny yellow bags.
striped crimson bags contain 3 clear blue bags.
muted lavender bags contain 1 drab coral bag, 2 dull gold bags, 2 posh crimson bags, 1 mirrored green bag.
light tomato bags contain 3 dull black bags, 5 posh white bags.
pale tan bags contain 1 clear yellow bag, 2 vibrant aqua bags, 1 wavy red bag, 2 drab chartreuse bags.
dotted plum bags contain 4 shiny tomato bags, 1 mirrored olive bag, 2 posh turquoise bags, 1 faded bronze bag.
vibrant bronze bags contain 1 vibrant aqua bag.
clear tan bags contain 5 vibrant aqua bags, 1 drab coral bag, 4 muted lavender bags, 1 muted orange bag.
dark beige bags contain 5 dull green bags, 5 clear violet bags, 1 pale coral bag, 3 pale silver bags.
wavy plum bags contain 4 light teal bags, 4 shiny aqua bags, 2 light olive bags, 4 light blue bags.
striped turquoise bags contain 2 pale salmon bags, 3 muted orange bags, 3 posh lavender bags.
mirrored turquoise bags contain 3 vibrant lavender bags.
clear gray bags contain 3 dark cyan bags, 2 mirrored red bags, 2 wavy teal bags.
wavy violet bags contain 1 dark fuchsia bag.
clear crimson bags contain 1 pale red bag.
faded purple bags contain 1 shiny black bag, 2 mirrored white bags.
bright white bags contain 5 dotted maroon bags, 1 wavy aqua bag.
pale bronze bags contain 5 dull teal bags.
bright teal bags contain 1 mirrored aqua bag, 5 drab fuchsia bags.
posh silver bags contain 5 dim gray bags, 5 vibrant beige bags, 2 muted green bags.
posh chartreuse bags contain 3 pale brown bags.
dotted purple bags contain 5 faded indigo bags, 4 drab magenta bags, 5 shiny chartreuse bags, 3 faded maroon bags.
dim fuchsia bags contain 3 light blue bags, 3 muted yellow bags.
dark coral bags contain 4 dull crimson bags, 3 muted brown bags.
faded crimson bags contain 1 muted teal bag.
mirrored orange bags contain 3 dull bronze bags, 5 dull gold bags, 4 dim gray bags, 1 dotted green bag.
faded aqua bags contain 1 light gray bag.
vibrant magenta bags contain 1 dark aqua bag.
light fuchsia bags contain 4 light orange bags, 5 muted chartreuse bags, 3 wavy tomato bags, 1 dotted violet bag.
light coral bags contain 5 plaid tan bags.
dim lavender bags contain 1 pale purple bag.
shiny gray bags contain 5 shiny purple bags, 5 vibrant green bags, 1 bright cyan bag, 5 light blue bags.
dim turquoise bags contain no other bags.
wavy turquoise bags contain 1 light white bag, 4 posh magenta bags, 5 dim magenta bags.
dim salmon bags contain 5 faded violet bags, 1 faded lime bag.
wavy bronze bags contain 4 plaid magenta bags.
clear black bags contain 1 shiny lavender bag.
striped magenta bags contain 5 shiny cyan bags, 3 dotted purple bags, 4 striped silver bags, 3 light coral bags.
striped gray bags contain 3 faded plum bags, 2 striped fuchsia bags, 1 dim gray bag.
wavy cyan bags contain 1 striped indigo bag.
faded fuchsia bags contain 2 striped fuchsia bags.
plaid blue bags contain 2 dark brown bags, 5 drab gray bags, 5 plaid olive bags, 1 dark aqua bag.
pale red bags contain 5 clear aqua bags, 2 dim turquoise bags, 5 drab gray bags, 4 faded turquoise bags.
dim tan bags contain no other bags.
wavy fuchsia bags contain 2 dull lime bags, 1 drab fuchsia bag, 3 drab indigo bags.
drab gold bags contain 4 bright salmon bags, 2 shiny fuchsia bags, 4 faded lime bags, 5 plaid magenta bags.
pale lavender bags contain 1 wavy beige bag, 2 striped olive bags.
muted olive bags contain 5 striped fuchsia bags, 1 drab silver bag, 3 dotted lavender bags.
shiny magenta bags contain 3 clear orange bags, 2 plaid silver bags, 5 bright turquoise bags, 4 shiny orange bags.
muted blue bags contain 3 dark gray bags, 3 drab blue bags, 4 dark gold bags, 5 bright tomato bags.
dotted red bags contain 4 striped plum bags, 5 shiny aqua bags, 2 clear red bags.
vibrant tomato bags contain 3 wavy white bags, 1 mirrored lime bag, 1 dark fuchsia bag.
dull silver bags contain 4 posh black bags, 3 dark gray bags, 3 pale plum bags.
dark chartreuse bags contain 3 dull blue bags, 1 dim tan bag.
clear gold bags contain 3 muted magenta bags, 3 dim teal bags, 4 vibrant olive bags, 1 vibrant salmon bag.
posh teal bags contain 4 wavy red bags.
pale blue bags contain 1 dim red bag, 4 clear silver bags, 2 dull salmon bags, 4 vibrant salmon bags.
dotted gray bags contain 4 vibrant bronze bags, 4 dark maroon bags, 4 muted lavender bags.
dotted magenta bags contain 2 dull purple bags, 4 dim gold bags, 5 drab gray bags, 4 faded bronze bags.
faded gold bags contain 2 clear black bags, 3 pale tomato bags, 3 wavy aqua bags.
light turquoise bags contain 2 bright tan bags, 2 muted chartreuse bags.
muted green bags contain 4 muted gold bags, 4 posh black bags, 1 striped fuchsia bag, 1 dotted blue bag.
light beige bags contain 5 muted olive bags.
striped brown bags contain 4 bright white bags, 1 pale teal bag.
vibrant blue bags contain 4 clear aqua bags, 2 striped green bags, 1 faded indigo bag.
dim purple bags contain 4 bright coral bags, 2 posh yellow bags.
dim aqua bags contain 3 faded plum bags, 2 dim red bags.
clear salmon bags contain 2 drab gray bags, 1 mirrored cyan bag.
plaid tan bags contain 5 muted yellow bags, 1 bright brown bag.
striped green bags contain 2 drab cyan bags, 5 dim gray bags.
dark gray bags contain 3 muted teal bags, 1 clear violet bag, 5 bright cyan bags.
clear lavender bags contain 1 dark red bag, 1 wavy blue bag, 2 plaid silver bags.
vibrant gold bags contain 5 dark brown bags.
drab indigo bags contain 3 wavy aqua bags, 3 mirrored indigo bags, 5 dull brown bags.
light white bags contain 2 dull plum bags, 2 drab orange bags.
posh orange bags contain 4 wavy plum bags, 2 posh tan bags, 1 bright blue bag, 4 muted red bags.
drab red bags contain 2 mirrored maroon bags, 4 light coral bags.
muted silver bags contain 5 muted maroon bags, 3 clear fuchsia bags, 3 dark gold bags.
plaid olive bags contain 1 posh red bag, 1 pale crimson bag, 5 shiny tomato bags.
light tan bags contain 1 dull bronze bag, 2 dim lavender bags.
plaid white bags contain 3 dim turquoise bags.
pale aqua bags contain 1 vibrant crimson bag, 3 striped silver bags, 3 bright lavender bags, 3 shiny white bags.
bright tomato bags contain 5 drab purple bags, 1 shiny black bag, 4 wavy turquoise bags.
dotted green bags contain 3 dim cyan bags, 4 faded violet bags.
faded silver bags contain 1 shiny violet bag, 5 faded lavender bags.
vibrant cyan bags contain 1 bright green bag, 4 muted teal bags, 3 clear salmon bags.
mirrored blue bags contain 2 muted teal bags, 4 posh crimson bags, 2 dim indigo bags, 1 clear black bag.
faded olive bags contain 3 faded fuchsia bags, 3 dotted maroon bags, 5 wavy red bags, 4 plaid chartreuse bags.
striped lavender bags contain 2 vibrant salmon bags, 5 bright black bags, 5 dull blue bags.
bright green bags contain 2 muted maroon bags, 3 dim orange bags.
striped teal bags contain 4 light brown bags, 5 plaid brown bags, 4 clear turquoise bags.
posh yellow bags contain 1 pale teal bag, 5 dark crimson bags.
clear cyan bags contain 1 muted silver bag, 5 shiny white bags, 4 dotted white bags, 2 striped fuchsia bags.
drab tan bags contain 3 vibrant bronze bags, 1 pale white bag.
muted chartreuse bags contain 1 clear white bag, 1 shiny violet bag, 5 bright fuchsia bags.
drab aqua bags contain 3 mirrored tan bags.
vibrant gray bags contain 2 mirrored salmon bags, 3 dotted brown bags, 3 wavy maroon bags, 4 shiny maroon bags.
faded teal bags contain 2 drab gray bags, 1 dim gold bag, 4 drab orange bags, 5 clear violet bags.
wavy red bags contain 4 drab coral bags, 4 dotted lavender bags, 5 dim turquoise bags.
dull white bags contain 3 mirrored green bags, 5 dim turquoise bags.
dotted chartreuse bags contain 1 dotted green bag, 4 dull blue bags, 1 striped indigo bag, 5 dim tomato bags.
posh maroon bags contain 2 dull salmon bags, 5 clear bronze bags, 5 bright cyan bags, 5 clear silver bags.
faded white bags contain 4 drab gray bags, 4 dim gray bags.
striped black bags contain 1 bright salmon bag, 3 faded white bags, 3 dark magenta bags, 1 muted plum bag.
striped indigo bags contain 3 shiny tomato bags, 2 mirrored olive bags.
striped white bags contain 4 vibrant maroon bags.
dim gray bags contain 2 dull gold bags.
faded coral bags contain 5 mirrored lavender bags, 2 vibrant plum bags.
mirrored tomato bags contain 5 light yellow bags, 2 drab orange bags.
dotted tan bags contain 2 posh plum bags, 2 pale teal bags, 2 pale maroon bags.
dotted turquoise bags contain 5 mirrored crimson bags, 2 dull orange bags.
dim yellow bags contain 2 bright cyan bags, 3 dim turquoise bags, 2 mirrored green bags.
vibrant crimson bags contain 5 posh maroon bags.
pale crimson bags contain 4 clear black bags, 5 dull crimson bags, 5 dotted green bags.
light indigo bags contain 3 clear black bags.
plaid cyan bags contain 3 plaid tan bags, 3 drab coral bags.
drab bronze bags contain 5 dull teal bags, 3 plaid coral bags, 2 faded beige bags, 4 plaid aqua bags.
drab orange bags contain 1 mirrored green bag.
mirrored lime bags contain 1 shiny gray bag, 3 dim indigo bags.
posh aqua bags contain 4 muted tan bags, 2 faded yellow bags.
light purple bags contain 2 shiny chartreuse bags, 2 dim gray bags, 5 pale red bags.
dull teal bags contain 3 posh crimson bags, 1 dotted blue bag, 3 muted yellow bags.
vibrant red bags contain 4 faded white bags, 5 dim tan bags, 4 shiny lavender bags, 1 dim turquoise bag.
dull cyan bags contain 1 dotted silver bag, 5 striped olive bags, 5 faded gray bags, 1 dark green bag.
dim crimson bags contain 1 posh lime bag, 1 dark salmon bag.
light violet bags contain 5 posh brown bags.
clear orange bags contain 2 light olive bags, 4 faded turquoise bags, 4 drab gray bags, 2 mirrored olive bags.
dotted crimson bags contain 4 pale magenta bags, 5 muted red bags, 4 shiny yellow bags.
posh gray bags contain 4 dull lavender bags, 4 dim gray bags.
faded tomato bags contain 3 striped salmon bags, 1 bright lime bag, 4 vibrant magenta bags.
clear bronze bags contain 5 bright plum bags, 1 dim beige bag, 1 dim cyan bag, 5 dotted blue bags.
clear fuchsia bags contain 3 vibrant olive bags, 3 pale crimson bags, 4 wavy maroon bags, 4 drab olive bags.
bright violet bags contain 3 faded blue bags.
muted brown bags contain 1 muted lavender bag.
faded turquoise bags contain 3 dull gold bags, 3 muted orange bags, 4 light blue bags, 1 dotted gray bag.
dim indigo bags contain 5 muted maroon bags.
plaid black bags contain 4 plaid teal bags, 5 vibrant green bags.
dull purple bags contain 2 shiny gold bags, 4 dim gray bags.
dull crimson bags contain 1 dull gold bag, 4 vibrant aqua bags.
light aqua bags contain 5 mirrored orange bags, 4 wavy aqua bags.
pale lime bags contain 4 drab coral bags, 3 vibrant chartreuse bags, 4 posh crimson bags.
faded plum bags contain 1 muted brown bag, 4 dull bronze bags, 1 plaid white bag, 1 drab blue bag.
clear silver bags contain 4 muted gray bags, 5 mirrored maroon bags, 1 clear violet bag.
light brown bags contain 4 shiny maroon bags, 1 drab lavender bag, 5 dark violet bags, 4 dull green bags.
light crimson bags contain 4 light magenta bags, 3 mirrored blue bags, 1 pale tomato bag, 1 muted tomato bag.
plaid orange bags contain 4 dull silver bags.
muted black bags contain 2 dull tomato bags, 5 mirrored teal bags.
dotted bronze bags contain 4 dim tan bags.
drab tomato bags contain 4 muted lime bags, 2 striped cyan bags.
clear indigo bags contain 5 dull lavender bags, 4 dark indigo bags.
pale purple bags contain 5 dim beige bags, 5 shiny tomato bags, 3 mirrored olive bags, 5 muted lavender bags.
mirrored silver bags contain 4 vibrant maroon bags.
bright aqua bags contain 5 bright olive bags, 2 drab magenta bags, 2 dim teal bags.
wavy magenta bags contain 3 clear fuchsia bags, 3 mirrored gray bags, 4 dull fuchsia bags.
dull blue bags contain 5 drab coral bags, 5 drab chartreuse bags.
dim plum bags contain 1 muted magenta bag, 3 shiny lavender bags.
muted bronze bags contain 3 posh white bags, 5 clear black bags, 3 mirrored lime bags.
drab cyan bags contain 1 drab blue bag.
faded tan bags contain 4 pale plum bags.
posh violet bags contain 2 dim silver bags.
posh blue bags contain 5 clear yellow bags, 3 light indigo bags.
muted orange bags contain 5 drab gray bags, 1 dim turquoise bag.
bright lavender bags contain 1 drab cyan bag.
clear brown bags contain 2 shiny teal bags.
light maroon bags contain 4 dim fuchsia bags, 1 light yellow bag, 3 pale magenta bags.
muted indigo bags contain 4 shiny gold bags, 1 clear teal bag, 4 light gray bags, 2 shiny orange bags.
striped red bags contain 4 wavy blue bags, 1 vibrant maroon bag, 5 shiny yellow bags.
drab olive bags contain 2 dull blue bags, 5 pale coral bags, 1 vibrant salmon bag, 1 dotted green bag.
dotted aqua bags contain 5 dim aqua bags, 1 drab olive bag, 5 dim violet bags, 2 light plum bags.
dull indigo bags contain 5 vibrant gold bags.
drab turquoise bags contain 3 pale salmon bags, 1 shiny violet bag, 1 shiny orange bag, 1 mirrored olive bag.
bright turquoise bags contain 1 dotted green bag.
bright tan bags contain 5 faded cyan bags, 5 mirrored aqua bags, 3 dim orange bags.
bright chartreuse bags contain 1 dim bronze bag, 3 posh bronze bags, 3 drab salmon bags.
vibrant orange bags contain 3 dim fuchsia bags, 3 dull crimson bags, 5 vibrant salmon bags.
bright lime bags contain 3 posh tomato bags, 4 striped indigo bags, 1 dull white bag, 2 light plum bags.
dark black bags contain 1 muted aqua bag.
pale silver bags contain 2 dull fuchsia bags, 2 dark maroon bags.
dotted maroon bags contain 2 drab olive bags.
shiny gold bags contain 2 dim beige bags, 1 dark maroon bag, 4 light blue bags.
posh lime bags contain 1 shiny green bag, 3 drab purple bags, 3 vibrant blue bags.
vibrant violet bags contain 5 dim silver bags, 4 dotted maroon bags, 5 drab fuchsia bags, 5 clear plum bags.
bright silver bags contain 2 drab coral bags, 5 mirrored red bags, 5 drab fuchsia bags.
dark purple bags contain 1 drab chartreuse bag, 1 posh lavender bag, 1 clear blue bag.
light green bags contain 1 dark plum bag, 5 dull olive bags, 4 shiny lavender bags.
dull beige bags contain 5 light indigo bags.
muted gold bags contain 2 mirrored magenta bags, 5 shiny orange bags, 5 drab lavender bags.
plaid gold bags contain 4 dark crimson bags, 3 dotted crimson bags.
plaid silver bags contain 2 dotted blue bags, 1 vibrant aqua bag, 2 shiny chartreuse bags.
vibrant green bags contain 5 posh brown bags, 3 light gray bags, 2 wavy blue bags.
posh crimson bags contain 2 dim turquoise bags, 3 dim tan bags, 4 dotted lavender bags.
bright coral bags contain 1 faded chartreuse bag.
shiny teal bags contain 2 muted orange bags, 5 muted olive bags, 5 mirrored olive bags.
posh brown bags contain 4 posh crimson bags.
pale white bags contain 5 dark coral bags, 3 dim tomato bags, 3 wavy indigo bags.
clear olive bags contain 1 bright plum bag.
dotted violet bags contain 3 posh plum bags.
vibrant salmon bags contain 3 dim beige bags, 2 light gray bags, 2 wavy red bags, 5 dull brown bags.
dotted indigo bags contain 1 dull maroon bag.
clear lime bags contain 5 posh maroon bags, 1 muted coral bag, 5 wavy maroon bags, 3 muted orange bags.
posh cyan bags contain 3 posh black bags, 4 drab black bags.
striped blue bags contain 5 dim yellow bags, 1 wavy chartreuse bag.
dark cyan bags contain 1 faded blue bag.
clear magenta bags contain 3 muted green bags, 5 dotted aqua bags, 2 posh gray bags.
dull lime bags contain 4 dotted lavender bags, 3 dim cyan bags, 4 dim tan bags.
pale brown bags contain 3 dim gray bags.
dull violet bags contain 2 posh tomato bags, 2 clear blue bags, 2 drab silver bags, 4 muted gray bags.
dark tan bags contain 2 dim cyan bags, 4 dotted lavender bags.
dotted black bags contain 3 plaid olive bags, 3 posh plum bags, 3 wavy turquoise bags, 5 muted teal bags.
muted cyan bags contain 2 shiny tan bags, 1 bright aqua bag, 4 dotted lavender bags, 3 vibrant crimson bags.
clear green bags contain 1 dotted violet bag, 3 dotted bronze bags, 1 clear bronze bag.
bright olive bags contain 4 muted orange bags, 3 dotted orange bags.
dull turquoise bags contain 1 faded lavender bag, 5 dark blue bags, 3 striped cyan bags.
mirrored plum bags contain 5 dull violet bags, 3 faded turquoise bags.
plaid lavender bags contain 2 striped green bags, 2 posh magenta bags, 3 drab cyan bags, 3 bright plum bags.
clear yellow bags contain 1 mirrored green bag, 2 dotted blue bags.
light gold bags contain 3 dark blue bags.
dark gold bags contain 1 light aqua bag.
drab crimson bags contain 2 posh coral bags, 1 shiny red bag.
faded chartreuse bags contain 2 vibrant red bags, 4 vibrant aqua bags, 5 pale purple bags, 5 mirrored olive bags.
bright plum bags contain 2 pale tan bags.
muted crimson bags contain 3 dotted orange bags, 4 bright orange bags, 3 drab maroon bags, 2 vibrant turquoise bags.
dim black bags contain 3 shiny green bags, 5 mirrored gold bags, 2 wavy fuchsia bags.
pale gold bags contain 2 wavy silver bags, 3 muted magenta bags.
wavy black bags contain 2 dim beige bags, 1 clear bronze bag, 5 shiny gray bags.
dim green bags contain 1 wavy maroon bag.
dull tomato bags contain 4 mirrored red bags, 1 dark violet bag, 2 posh magenta bags, 1 light indigo bag.
clear beige bags contain 1 posh coral bag, 4 dim silver bags, 1 wavy turquoise bag, 4 bright white bags.
posh red bags contain 5 dim cyan bags.
dark turquoise bags contain 1 dark cyan bag, 3 light blue bags.
clear maroon bags contain 2 mirrored white bags, 5 dull plum bags, 3 dull beige bags.
light silver bags contain 4 shiny violet bags, 4 posh indigo bags, 1 wavy white bag.
muted salmon bags contain 3 dim lime bags, 2 shiny violet bags, 2 dark green bags, 1 mirrored chartreuse bag.
muted plum bags contain 3 bright coral bags, 5 posh indigo bags, 4 bright gray bags.
dim orange bags contain 5 mirrored brown bags, 4 dim turquoise bags.
light gray bags contain 2 light blue bags, 2 pale purple bags.
mirrored magenta bags contain 5 pale coral bags, 1 dark crimson bag.
drab lavender bags contain 3 clear yellow bags.
striped tan bags contain 1 dotted black bag, 1 dull crimson bag.
wavy aqua bags contain 1 muted teal bag.
light olive bags contain 4 drab magenta bags.
bright indigo bags contain 1 mirrored gray bag, 4 vibrant red bags, 3 dim tomato bags.
dotted yellow bags contain 1 drab olive bag, 4 pale crimson bags, 4 drab gray bags, 2 striped fuchsia bags.
mirrored lavender bags contain 3 drab coral bags, 3 dim indigo bags, 4 dim gold bags, 5 wavy salmon bags.
muted white bags contain 5 bright brown bags, 5 bright plum bags, 1 dull gold bag.
posh fuchsia bags contain 3 dotted aqua bags.
dotted brown bags contain 4 dim turquoise bags, 1 dotted gray bag, 3 dark magenta bags, 2 bright coral bags.
shiny bronze bags contain 4 mirrored indigo bags, 2 wavy turquoise bags, 2 wavy blue bags, 3 mirrored beige bags.
vibrant teal bags contain 1 dark violet bag, 3 wavy blue bags, 1 dull fuchsia bag.
plaid indigo bags contain 4 vibrant magenta bags, 2 dull cyan bags.
muted turquoise bags contain 5 dark magenta bags, 5 drab gray bags, 4 plaid red bags.
striped bronze bags contain 5 bright white bags, 2 clear bronze bags, 3 bright silver bags.
posh salmon bags contain 4 drab maroon bags, 3 mirrored bronze bags, 4 faded plum bags.
light magenta bags contain 5 dark purple bags, 3 plaid silver bags.
dull fuchsia bags contain 3 posh red bags, 4 dark coral bags, 2 dark aqua bags.
vibrant aqua bags contain 3 drab coral bags, 3 dim cyan bags, 5 dim tan bags.
muted red bags contain 3 plaid teal bags, 1 posh coral bag, 3 posh plum bags.
drab yellow bags contain 3 bright brown bags, 3 mirrored aqua bags.
dim cyan bags contain no other bags.
shiny yellow bags contain 4 wavy red bags, 2 dotted blue bags.
bright maroon bags contain 4 drab gray bags, 1 mirrored olive bag, 5 faded white bags.
dark crimson bags contain 4 drab orange bags, 5 vibrant red bags, 1 pale purple bag.
shiny cyan bags contain 4 faded plum bags, 4 faded teal bags, 1 posh indigo bag.
posh olive bags contain 1 dark tan bag, 1 drab green bag, 5 pale cyan bags, 4 vibrant turquoise bags.
dull chartreuse bags contain 3 shiny chartreuse bags, 3 striped brown bags, 2 mirrored blue bags, 3 pale coral bags.
dim bronze bags contain 4 muted olive bags.
faded orange bags contain 2 vibrant red bags.
dim violet bags contain 1 posh red bag, 5 plaid tan bags.
wavy indigo bags contain 2 bright olive bags, 3 shiny red bags, 4 clear blue bags.
dull coral bags contain 4 faded magenta bags, 1 plaid lime bag, 2 dotted red bags.
dotted white bags contain 2 mirrored purple bags, 4 faded cyan bags, 1 vibrant salmon bag.
shiny crimson bags contain 5 mirrored magenta bags, 2 plaid silver bags, 3 vibrant brown bags, 2 vibrant orange bags.
bright magenta bags contain 1 light silver bag, 1 striped salmon bag, 4 dark gold bags, 5 faded lime bags.
dotted salmon bags contain 5 dim purple bags, 4 dull indigo bags, 2 pale turquoise bags.
clear purple bags contain 2 clear coral bags, 2 muted green bags, 5 clear maroon bags.
mirrored purple bags contain 4 drab silver bags, 1 wavy aqua bag, 1 shiny teal bag.
wavy teal bags contain 5 dull salmon bags, 2 bright coral bags, 2 bright plum bags.
shiny red bags contain 4 dull indigo bags, 4 pale coral bags, 3 wavy blue bags.
wavy tan bags contain 5 faded turquoise bags, 2 posh tomato bags, 4 dark green bags, 4 dull crimson bags.
wavy crimson bags contain 3 vibrant gold bags, 3 drab magenta bags, 3 dull salmon bags.
wavy olive bags contain 2 pale blue bags, 1 dull gold bag, 3 clear aqua bags, 1 mirrored gray bag.
shiny salmon bags contain 2 mirrored aqua bags, 3 mirrored tan bags, 1 wavy blue bag.
dark plum bags contain 1 faded salmon bag, 1 faded plum bag, 3 pale tan bags.
mirrored yellow bags contain 3 clear lime bags.
dark lavender bags contain 5 muted teal bags, 5 shiny bronze bags.
pale tomato bags contain 2 clear silver bags, 3 shiny green bags, 2 mirrored blue bags, 4 vibrant beige bags.
dotted cyan bags contain 4 light gray bags.
wavy silver bags contain 4 drab teal bags, 5 vibrant maroon bags, 4 wavy teal bags, 4 striped turquoise bags.
vibrant brown bags contain 5 striped gray bags, 1 bright turquoise bag.
mirrored salmon bags contain 1 bright salmon bag, 4 drab lavender bags.
striped violet bags contain 5 drab teal bags.
bright gold bags contain 4 clear blue bags, 2 dull gray bags, 1 striped red bag, 5 muted indigo bags.
faded cyan bags contain 5 dark green bags.
plaid fuchsia bags contain 2 posh blue bags.
posh green bags contain 4 striped cyan bags, 2 bright lime bags, 1 dotted black bag, 5 dim silver bags.
dull plum bags contain 4 striped fuchsia bags.
dull brown bags contain 1 faded bronze bag, 5 posh tomato bags, 1 muted gray bag.
dull aqua bags contain 1 light blue bag, 1 vibrant bronze bag, 1 posh brown bag.
clear plum bags contain 4 clear silver bags, 2 bright beige bags, 5 mirrored red bags, 2 dull magenta bags.
dull orange bags contain 1 light blue bag, 5 shiny maroon bags.
wavy maroon bags contain 3 dotted gray bags, 3 faded indigo bags, 3 dim cyan bags.
plaid teal bags contain 2 dotted blue bags, 5 vibrant olive bags, 5 faded orange bags.
muted gray bags contain 1 dim tan bag, 1 shiny tomato bag, 3 vibrant bronze bags, 1 drab coral bag.
plaid aqua bags contain 3 mirrored tan bags, 2 mirrored green bags, 2 dark gray bags, 4 dotted blue bags.
striped beige bags contain 4 clear salmon bags.
faded beige bags contain 4 vibrant red bags, 3 pale tan bags.
pale salmon bags contain 3 mirrored chartreuse bags, 3 striped salmon bags, 4 faded blue bags.
plaid turquoise bags contain 3 shiny lavender bags, 3 faded beige bags.
muted fuchsia bags contain 3 muted indigo bags, 3 vibrant red bags, 4 dim lavender bags, 4 dull teal bags.
drab black bags contain 5 dark beige bags, 3 mirrored olive bags, 3 faded turquoise bags.
shiny fuchsia bags contain 3 muted brown bags, 4 dim beige bags.
shiny maroon bags contain 2 dark bronze bags, 2 bright salmon bags, 5 striped cyan bags.
shiny lavender bags contain 3 muted orange bags, 1 bright plum bag, 5 muted lavender bags.
bright gray bags contain 1 plaid tan bag, 2 dotted gray bags.
striped purple bags contain 5 posh black bags, 2 striped fuchsia bags, 3 mirrored magenta bags, 3 dark tan bags.
faded red bags contain 5 posh coral bags, 3 dim silver bags, 2 bright black bags, 3 muted green bags.
dim blue bags contain 5 drab purple bags.
dotted gold bags contain 5 pale coral bags, 5 dim bronze bags.
bright crimson bags contain 2 clear purple bags, 2 plaid yellow bags, 4 muted fuchsia bags.
dull gold bags contain no other bags.
mirrored teal bags contain 4 wavy maroon bags, 1 faded magenta bag, 2 wavy teal bags, 2 vibrant salmon bags.
dotted lavender bags contain no other bags.
muted aqua bags contain 4 muted tan bags.
vibrant black bags contain 3 plaid white bags.
pale maroon bags contain 3 dotted cyan bags, 4 posh brown bags, 1 bright salmon bag.
dark maroon bags contain 1 shiny tomato bag, 2 mirrored white bags, 2 posh red bags.
pale magenta bags contain 4 vibrant red bags, 3 bright cyan bags.
posh lavender bags contain 5 dim silver bags, 3 striped indigo bags, 3 muted gray bags, 3 dull violet bags.
striped chartreuse bags contain 2 shiny chartreuse bags, 5 drab gray bags, 2 dotted brown bags, 1 plaid coral bag.
muted teal bags contain 5 clear black bags, 1 light white bag, 4 posh crimson bags, 4 faded beige bags.
mirrored chartreuse bags contain 1 bright silver bag, 1 light plum bag, 2 drab purple bags.
dim lime bags contain 1 dotted gray bag, 4 muted olive bags, 2 muted gray bags.
drab violet bags contain 1 plaid fuchsia bag, 4 dull white bags, 3 posh beige bags.
bright fuchsia bags contain 1 pale turquoise bag, 5 dotted cyan bags.
striped lime bags contain 3 light blue bags, 4 drab fuchsia bags, 5 light aqua bags, 1 dim indigo bag.
wavy lavender bags contain 4 dull violet bags.
drab maroon bags contain 1 pale brown bag, 1 pale purple bag.
clear chartreuse bags contain 4 faded fuchsia bags, 2 light gray bags, 3 vibrant maroon bags, 3 posh lavender bags.
clear teal bags contain 1 faded teal bag, 4 muted white bags.
dull black bags contain 1 pale blue bag, 2 shiny green bags, 3 plaid plum bags, 2 faded turquoise bags.
dark olive bags contain 1 faded tan bag, 3 dim beige bags, 4 dark chartreuse bags, 5 light yellow bags.
faded green bags contain 4 striped green bags, 5 dotted blue bags, 3 striped beige bags.
drab green bags contain 1 clear aqua bag, 4 light plum bags.
mirrored green bags contain no other bags.
posh black bags contain 4 striped cyan bags, 2 dim tan bags, 5 drab blue bags, 5 faded white bags.
muted magenta bags contain 2 vibrant aqua bags.
mirrored brown bags contain 4 wavy turquoise bags, 1 dull magenta bag, 1 dim silver bag, 2 dim gray bags.
plaid brown bags contain 5 mirrored brown bags, 4 mirrored lime bags, 1 clear red bag.
posh white bags contain 5 clear bronze bags, 5 faded maroon bags, 3 light lavender bags.
posh turquoise bags contain 1 pale tan bag, 1 dark purple bag, 4 shiny white bags, 2 drab brown bags.
dim brown bags contain 2 drab coral bags.
plaid violet bags contain 4 clear lavender bags, 4 drab maroon bags, 4 muted maroon bags, 1 bright red bag.
posh coral bags contain 1 shiny gold bag, 4 dim red bags, 5 dull aqua bags.
bright black bags contain 2 dull teal bags.
plaid bronze bags contain 1 bright orange bag, 5 wavy turquoise bags, 5 vibrant beige bags.
drab plum bags contain 2 bright lime bags.
shiny green bags contain 5 wavy blue bags, 4 bright lime bags.
drab teal bags contain 1 wavy aqua bag, 2 mirrored gray bags, 5 dim lavender bags.
bright blue bags contain 4 muted purple bags, 3 bright fuchsia bags, 5 muted maroon bags.
shiny chartreuse bags contain 2 clear violet bags, 3 posh coral bags, 2 drab chartreuse bags, 2 pale silver bags.
faded lavender bags contain 5 dim lavender bags, 1 dim turquoise bag, 1 vibrant magenta bag.
dim coral bags contain 3 faded teal bags, 3 faded indigo bags.
striped maroon bags contain 1 shiny aqua bag, 3 vibrant magenta bags, 5 light maroon bags, 2 dull aqua bags.
striped plum bags contain 1 dotted brown bag, 3 wavy green bags, 2 mirrored tomato bags.
drab lime bags contain 2 wavy teal bags, 3 dim maroon bags, 1 dark cyan bag.
muted coral bags contain 4 dim maroon bags, 5 drab lavender bags, 5 drab purple bags.
drab white bags contain 3 shiny cyan bags, 5 wavy aqua bags, 5 faded maroon bags.
dotted teal bags contain 3 muted indigo bags.
plaid coral bags contain 4 dotted aqua bags, 4 wavy salmon bags, 2 dim maroon bags.
bright salmon bags contain 5 dark cyan bags.
shiny blue bags contain 1 posh lime bag.
plaid red bags contain 1 dim maroon bag, 4 faded crimson bags, 2 muted plum bags.
dull olive bags contain 2 faded plum bags, 4 striped white bags, 4 wavy indigo bags.
shiny purple bags contain 2 drab coral bags, 5 pale blue bags.
striped olive bags contain 2 vibrant orange bags, 5 dim red bags, 1 dim cyan bag, 3 mirrored cyan bags.
dull magenta bags contain 2 vibrant yellow bags.
dull tan bags contain 2 mirrored green bags, 5 muted yellow bags, 4 faded turquoise bags.
vibrant plum bags contain 3 shiny olive bags, 1 dim indigo bag.
mirrored black bags contain 3 posh black bags, 4 vibrant tan bags, 1 vibrant black bag, 2 posh orange bags.
shiny black bags contain 3 muted white bags, 1 dim maroon bag, 2 dull salmon bags.
clear red bags contain 4 muted gray bags.
striped cyan bags contain 4 posh chartreuse bags, 4 dull brown bags, 2 posh tomato bags, 3 dark crimson bags.
faded violet bags contain 1 drab chartreuse bag, 1 dim turquoise bag, 2 mirrored olive bags, 2 clear tan bags.
muted beige bags contain 2 bright silver bags, 5 bright gold bags, 4 pale brown bags, 2 bright bronze bags.
pale black bags contain 5 vibrant green bags, 3 dark coral bags.
vibrant purple bags contain 4 dark brown bags, 3 clear violet bags, 1 wavy black bag, 2 faded fuchsia bags.
dark fuchsia bags contain 1 wavy salmon bag.
dark aqua bags contain 5 vibrant aqua bags, 5 dull blue bags.
pale coral bags contain 3 mirrored olive bags, 5 faded blue bags, 3 dim beige bags.
striped coral bags contain 4 shiny fuchsia bags, 1 plaid brown bag, 2 bright turquoise bags, 1 vibrant blue bag.
pale turquoise bags contain 3 dull green bags, 1 dim red bag.
pale teal bags contain 3 mirrored green bags, 1 faded violet bag, 3 vibrant green bags.
wavy beige bags contain 1 bright tomato bag, 2 dull olive bags, 3 dotted violet bags.
dark orange bags contain 2 posh salmon bags, 1 clear bronze bag.
shiny tomato bags contain 5 drab orange bags, 3 dull crimson bags, 4 clear tan bags, 5 faded blue bags.
mirrored fuchsia bags contain 2 bright maroon bags, 2 dim beige bags, 3 muted gold bags, 4 striped brown bags.
clear coral bags contain 5 dim brown bags, 1 drab lavender bag, 3 dull lime bags.
clear white bags contain 2 clear violet bags, 5 dull beige bags, 3 vibrant aqua bags, 4 dull blue bags.
dull maroon bags contain 5 dim salmon bags, 4 dim silver bags, 3 dark magenta bags.
drab silver bags contain 5 faded blue bags, 5 wavy chartreuse bags, 5 dull crimson bags, 5 muted yellow bags.
faded salmon bags contain 4 wavy olive bags, 3 mirrored salmon bags, 1 plaid violet bag.
drab salmon bags contain 4 dull magenta bags, 5 muted teal bags.
light yellow bags contain 1 pale coral bag, 4 dim turquoise bags, 4 mirrored maroon bags.
plaid crimson bags contain 3 dark violet bags, 2 dull gray bags.
dark tomato bags contain 1 posh teal bag, 1 posh lavender bag, 5 dim cyan bags, 4 light yellow bags.
dim chartreuse bags contain 5 muted plum bags, 4 vibrant aqua bags.
mirrored white bags contain 5 dull gold bags, 5 muted lavender bags, 2 dull crimson bags.
dotted blue bags contain 3 muted orange bags.
mirrored olive bags contain 5 posh crimson bags, 3 faded blue bags.
dim maroon bags contain 5 wavy aqua bags, 5 faded violet bags, 2 dull crimson bags, 2 posh lavender bags.
shiny indigo bags contain 5 dull lavender bags, 1 light white bag.
wavy chartreuse bags contain 3 mirrored white bags, 2 drab chartreuse bags, 5 muted orange bags, 4 dull crimson bags.
striped orange bags contain 4 shiny salmon bags.
dull green bags contain 4 muted gray bags, 4 drab gray bags, 3 clear yellow bags.
pale orange bags contain 5 posh turquoise bags, 3 light beige bags, 3 bright aqua bags, 5 dim bronze bags.
dim tomato bags contain 3 bright brown bags.
dull bronze bags contain 1 bright plum bag, 3 wavy red bags, 2 drab silver bags.
wavy blue bags contain 3 dull crimson bags, 4 light blue bags.
clear blue bags contain 1 dim gold bag, 4 dark crimson bags, 2 light gray bags, 4 muted olive bags.
clear turquoise bags contain 1 muted lime bag, 2 faded turquoise bags, 4 plaid lavender bags.
dark brown bags contain 3 dull gold bags, 5 bright cyan bags, 2 dull brown bags, 3 dark aqua bags.
plaid lime bags contain 3 dotted purple bags, 1 plaid blue bag, 3 bright silver bags, 1 vibrant chartreuse bag.
mirrored coral bags contain 2 plaid olive bags.
vibrant fuchsia bags contain 3 light indigo bags.
dim beige bags contain 1 muted lavender bag, 3 light blue bags.
wavy orange bags contain 5 dotted teal bags, 3 dull magenta bags, 4 clear chartreuse bags, 5 shiny violet bags.
vibrant lavender bags contain 3 vibrant orange bags, 1 dark aqua bag.
mirrored aqua bags contain 4 drab blue bags.
faded gray bags contain 1 wavy blue bag, 2 vibrant yellow bags, 1 light magenta bag.
dark green bags contain 2 wavy red bags.
dark red bags contain 5 drab magenta bags, 3 bright lime bags.
dark salmon bags contain 2 striped indigo bags, 5 wavy lavender bags, 1 dim fuchsia bag, 5 dim yellow bags.
wavy lime bags contain 2 striped plum bags, 3 faded brown bags.
muted violet bags contain 1 faded tomato bag.
faded bronze bags contain 2 dim gray bags, 3 muted gray bags.
vibrant beige bags contain 5 striped brown bags, 5 dull lime bags.
dotted coral bags contain 4 shiny brown bags, 1 bright silver bag, 2 clear yellow bags.
plaid maroon bags contain 3 shiny magenta bags, 3 faded tomato bags.
dim olive bags contain 3 light brown bags.
pale plum bags contain 4 pale tan bags, 1 drab silver bag, 3 dim beige bags.
vibrant chartreuse bags contain 4 mirrored white bags, 2 muted orange bags, 2 posh magenta bags.
faded indigo bags contain 3 bright brown bags, 3 dim tomato bags.
posh gold bags contain 3 dark silver bags, 4 mirrored gray bags, 4 dark salmon bags, 1 dim white bag.
light lavender bags contain 2 dark cyan bags.
plaid salmon bags contain 2 dotted green bags, 4 shiny indigo bags, 5 bright brown bags.
wavy white bags contain 2 dim lavender bags, 3 faded teal bags, 2 dull tan bags, 3 drab orange bags.
plaid plum bags contain 1 vibrant yellow bag.
posh tan bags contain 2 dull orange bags, 4 pale violet bags, 2 shiny brown bags.
light red bags contain 4 dim maroon bags, 4 faded salmon bags, 5 plaid purple bags.
dotted beige bags contain 2 shiny fuchsia bags, 3 faded cyan bags, 5 mirrored red bags, 3 drab turquoise bags.
drab purple bags contain 3 bright cyan bags, 1 faded bronze bag, 3 light plum bags, 1 dull fuchsia bag.
bright brown bags contain 2 dotted green bags, 4 clear tan bags, 3 wavy red bags.

653
input/2020/day8.txt Normal file
View File

@@ -0,0 +1,653 @@
acc +9
acc -2
acc -12
acc +33
jmp +301
nop +508
jmp +216
acc +27
acc +35
acc +43
acc +31
jmp +309
acc +18
acc -19
acc +7
jmp +44
acc -13
acc -17
acc +31
jmp +311
nop +612
jmp +143
acc +22
nop +85
jmp +458
acc -3
jmp +13
acc -19
acc +27
acc +12
jmp +483
acc +40
acc +6
jmp +128
jmp +10
acc +0
acc -3
acc -2
jmp -11
acc +43
acc -12
jmp +158
acc +0
jmp +240
jmp +1
acc +5
acc +15
jmp +187
nop +563
jmp +51
acc -16
jmp +158
jmp +322
acc +47
nop -1
jmp +299
acc +26
acc +25
jmp +232
jmp -9
acc +15
jmp +54
jmp +558
acc +7
acc -7
jmp +399
nop +447
jmp +71
acc +26
acc +46
jmp +145
acc +38
acc +30
acc +21
jmp +263
acc +10
jmp +168
acc +22
nop +561
jmp -26
jmp +1
acc -7
jmp -5
acc +28
acc -6
jmp +370
jmp +94
acc +50
acc +42
acc -9
acc +30
jmp +70
acc +29
jmp +166
acc -5
acc -18
nop +84
acc +2
jmp +366
jmp -40
acc -4
acc -15
acc -1
jmp +169
jmp +1
acc -4
acc +0
jmp -45
nop -21
nop +241
acc -18
acc +19
jmp +26
nop -51
jmp +260
acc +17
jmp +428
acc +6
jmp +405
acc +22
acc +10
nop +471
jmp +352
acc -6
acc +48
acc +7
acc +3
jmp +57
acc -10
acc +16
acc +16
acc +43
jmp +432
acc -5
acc +0
nop +339
acc +49
jmp +17
acc +33
nop +166
acc -5
jmp +392
nop +246
acc -7
acc +21
acc +30
jmp +398
acc +36
acc +24
acc -15
acc -9
jmp +114
acc +19
jmp +11
acc +43
nop +182
jmp -129
nop -29
acc -6
acc +2
jmp +398
jmp +78
acc +36
jmp +393
acc +15
nop -11
acc -7
acc -9
jmp +76
acc +0
acc +27
jmp +25
acc +27
nop -54
jmp +458
acc +3
acc +29
acc -4
acc +43
jmp +413
acc +33
acc +13
jmp +382
jmp -83
acc +42
acc +24
jmp +64
acc +23
acc -13
nop +110
acc -5
jmp +114
jmp +113
nop +112
acc +26
jmp -133
jmp -12
jmp +1
jmp +330
acc +25
acc -1
acc +30
acc +42
jmp -187
jmp +1
acc +20
acc +35
acc +36
jmp -125
jmp +165
acc +28
acc -17
acc -12
jmp +1
jmp -120
nop +1
acc +2
acc +26
jmp +398
acc +20
acc -1
jmp -127
acc +36
acc +14
jmp +1
jmp +331
acc +50
acc +1
acc -10
nop +159
jmp -83
jmp +374
acc +17
jmp +372
acc +44
nop -39
jmp +228
acc +17
jmp +74
acc +16
acc +33
acc -2
jmp +152
jmp +29
acc +8
acc +27
nop +59
jmp -32
acc +28
jmp -227
nop -35
jmp -168
acc +13
nop +390
jmp -204
acc +16
acc +44
jmp -230
jmp +25
acc +30
jmp +383
acc -11
acc +38
acc +11
jmp +341
acc +35
acc +46
acc -1
jmp +94
acc -4
acc +12
jmp +111
jmp +133
nop +283
acc +13
acc +37
jmp +74
nop -218
jmp -178
acc +46
acc +25
acc -5
jmp -174
acc +28
acc +39
acc +36
acc +22
jmp -172
acc +19
jmp -250
nop +62
acc +44
nop +347
acc +40
jmp +345
acc -3
acc -13
acc -11
jmp +56
jmp -180
acc +17
acc -4
acc +46
nop -165
jmp +321
acc -4
jmp +1
acc +9
acc -12
jmp -155
acc +5
jmp -96
acc +0
acc -2
acc +38
jmp +67
acc -4
nop -283
acc +28
jmp +324
acc -9
acc +43
acc -1
acc +9
jmp -290
acc +3
acc +22
nop +84
acc -17
jmp -210
acc +7
jmp -260
nop -232
nop +87
acc +43
acc +36
jmp +96
jmp +238
acc +13
acc -14
acc +32
acc +11
jmp -146
acc +13
acc +37
acc -10
jmp +187
acc +49
acc +15
jmp -234
jmp -328
jmp -136
jmp +143
jmp +1
acc +27
acc +22
jmp +1
jmp -5
acc +30
nop -7
acc -6
jmp -71
acc -17
acc +15
jmp -52
jmp -126
acc -4
jmp +151
jmp +52
nop -86
acc +25
jmp +187
nop -22
jmp -219
acc +33
nop -120
acc +0
jmp +215
acc +46
acc +38
jmp +1
jmp -262
jmp +157
acc -15
acc +48
acc +39
acc +10
jmp -137
acc +47
acc +50
jmp -324
nop +214
acc +39
jmp -178
acc +49
acc -10
jmp -268
jmp +50
acc -14
nop -100
jmp +20
acc +45
acc -12
acc -4
jmp -208
acc -19
jmp -340
acc +36
nop -358
acc +5
jmp -348
acc +47
nop -18
acc -12
jmp -131
acc +19
acc +10
acc +19
acc +31
jmp -164
nop +162
nop -260
jmp +146
acc +32
acc -1
nop -14
jmp -192
acc +3
acc +31
nop -185
jmp -208
jmp -69
acc +43
acc +43
jmp -68
acc -16
acc +5
acc -9
jmp +126
acc +33
acc +2
acc +34
acc -9
jmp -16
acc +34
acc -19
jmp -266
nop +135
nop -389
acc +33
jmp -195
acc +48
jmp +1
acc -12
jmp +143
nop -317
acc -14
nop -127
acc +32
jmp -372
acc +24
nop -41
nop -42
jmp -344
acc +23
nop +117
nop +92
acc +42
jmp +143
acc +48
acc -6
nop -272
acc -13
jmp -379
acc -2
acc +44
acc +9
jmp -369
acc +6
acc +25
acc +34
jmp -301
nop -227
acc +43
jmp -141
acc +12
acc +41
acc +17
acc -11
jmp +29
jmp -121
acc +6
acc +7
acc +7
jmp +131
nop +144
nop -142
acc -13
acc -18
jmp +149
acc +14
acc +49
acc +25
acc -17
jmp -9
acc +26
acc -4
jmp -230
acc -18
acc +36
acc +27
nop -142
jmp +21
acc +34
nop +54
jmp -476
acc +10
jmp -174
nop -354
acc +1
jmp -324
acc +40
jmp +94
acc -12
jmp -136
nop -454
acc -14
jmp +116
acc +12
acc -1
nop -453
jmp -241
jmp -479
acc -19
jmp -87
acc +27
acc +48
acc +0
jmp -476
acc +16
acc +46
jmp -534
acc +0
jmp -344
acc +0
acc +28
jmp +10
jmp -248
nop -186
jmp +1
acc +26
jmp -153
acc +14
acc -8
nop -416
jmp -91
jmp -409
jmp -326
acc +2
acc +8
acc -18
acc +33
jmp -468
jmp -175
acc -7
acc +45
jmp -18
jmp -375
acc -8
jmp +28
acc -16
nop -38
acc +37
acc +48
jmp -343
acc +10
acc +26
acc -9
acc -16
jmp -348
acc +37
jmp -453
acc -2
acc +27
acc +17
acc +28
jmp -406
acc +25
acc +24
acc +44
acc +44
jmp -532
acc +10
jmp -531
acc +39
acc +40
jmp -284
acc +19
acc +3
nop -533
acc -3
jmp -162
nop -438
acc -5
jmp -114
acc +45
acc +1
acc +28
acc +9
jmp -550
jmp -222
jmp -106
acc -7
nop -263
nop -375
jmp -381
acc -4
nop -223
jmp -171
jmp -465
acc -2
nop -562
jmp -190
acc +40
jmp -4
acc +30
acc +21
jmp -435
acc +1
acc +10
jmp +1
jmp -157
acc -7
acc +18
acc -3
acc +24
jmp -113
acc +21
jmp -339
acc +34
jmp -563
acc +27
jmp -589
jmp -61
acc +35
acc +50
acc +8
jmp -553
acc +48
acc -15
acc +29
acc +24
jmp +1

1000
input/2020/day9.txt Normal file

File diff suppressed because it is too large Load Diff

39
src/day1.rs Normal file
View File

@@ -0,0 +1,39 @@
use aoc_runner_derive::{aoc, aoc_generator};
#[aoc_generator(day1)]
pub fn d1_input(input: &str) -> Vec<u64> {
let mut entries: Vec<u64> = input.split('\n').map(|x| x.parse().unwrap()).collect();
entries.sort();
entries
}
#[aoc(day1, part1)]
pub fn solve_d1_p1(input: &[u64]) -> u64 {
for entry in input {
let needed = 2020 - entry;
if let Ok(idx) = input.binary_search(&needed) {
return entry * input[idx];
}
}
panic!("not found");
}
#[aoc(day1, part2)]
pub fn solve_d1_p2(input: &[u64]) -> Option<u64> {
for i in 0..input.len() - 2 {
let entry1 = input[i];
for j in i + 1..input.len() - 1 {
let entry2 = input[j];
if entry1 + entry2 > 2020 {
break;
}
for k in j + 1..input.len() {
let entry3 = input[k];
if entry1 + entry2 + entry3 == 2020 {
return Some(entry1 * entry2 * entry3);
}
}
}
}
return None;
}

78
src/day10.rs Normal file
View File

@@ -0,0 +1,78 @@
use aoc_runner_derive::aoc;
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
struct Jolts(usize);
impl std::ops::Add for Jolts {
type Output = Jolts;
fn add(self, b: Jolts) -> Jolts {
Jolts(self.0 + b.0)
}
}
impl std::ops::Sub for Jolts {
type Output = Jolts;
fn sub(self, b: Jolts) -> Jolts {
Jolts(self.0 - b.0)
}
}
#[aoc(day10, part1)]
pub fn solve_d10_p1(input: &str) -> usize {
let jolts = {
let mut jolts: Vec<Jolts> = std::iter::once(Jolts(0))
.chain(input.split('\n').map(|x| Jolts(x.parse().unwrap())))
.collect();
jolts.sort();
jolts.push(*jolts.last().unwrap() + Jolts(3)); // The devices built-in adapter is always 3 more than the highest.
jolts
};
// Count the number of 1-jolt differences and 3-jolt differences in the
// chain.
let (j1_diff, j3_diff) =
jolts
.windows(2)
.fold((0, 0), |(j1_diff, j3_diff), entry| match entry {
&[a, b] if b - a == Jolts(1) => (j1_diff + 1, j3_diff),
&[a, b] if b - a == Jolts(3) => (j1_diff, j3_diff + 1),
_ => panic!("fail"),
});
j1_diff * j3_diff
}
#[aoc(day10, part2)]
pub fn solve_d10_p2(input: &str) -> usize {
let jolts = {
let mut jolts: Vec<Jolts> = std::iter::once(Jolts(0))
.chain(input.split('\n').map(|x| Jolts(x.parse().unwrap())))
.collect();
jolts.sort();
jolts.push(*jolts.last().unwrap() + Jolts(3)); // The devices built-in adapter is always 3 more than the highest.
jolts
};
// Iterate over the list of jolt value for the adapters. For each entry
// store the number of combinations this adapter has that lead back to zero
// in `combinations_count`
// To calculate the number of combinations the current adapter has you first
// determine which are the potential upstream adapters and then sum their
// combinations.
let mut combinations_count = Vec::with_capacity(jolts.len());
// The first entry in jolts is the `0` jolts. Initialize it with 1 to
// indicate that it is the only way to reach the end of the chain.
combinations_count.push(1);
// Skip the first entry in jolts since it's already initialized in
// combinations_count.
for (idx, current_jolts) in jolts.iter().copied().enumerate().skip(1) {
let mut current_combinations = 0;
for upstream_idx in idx.saturating_sub(3)..idx {
if current_jolts - jolts[upstream_idx] <= Jolts(3) {
current_combinations += combinations_count[upstream_idx];
}
}
combinations_count.push(current_combinations);
}
*combinations_count.last().unwrap()
}

275
src/day11.rs Normal file
View File

@@ -0,0 +1,275 @@
use aoc_runner_derive::aoc;
use std::fmt;
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[repr(u8)]
enum GridSquare {
Empty = b'L',
Occupied = b'#',
Floor = b'.',
}
impl GridSquare {
fn from_u8(b: u8) -> Option<Self> {
Some(match b {
b'L' => GridSquare::Empty,
b'#' => GridSquare::Occupied,
b'.' => GridSquare::Floor,
_ => return None,
})
}
fn into_u8(self) -> u8 {
match self {
GridSquare::Empty => b'L',
GridSquare::Occupied => b'#',
GridSquare::Floor => b'.',
}
}
}
impl fmt::Display for GridSquare {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.into_u8() as char)
}
}
#[derive(Debug, Copy, Clone)]
struct GridIdx(usize);
#[derive(Debug, PartialEq, Eq)]
struct Grid {
row_len: usize,
grid: Vec<GridSquare>,
}
impl Grid {
fn parse(input: &str) -> Option<Self> {
let row_len = input.find('\n')?;
let grid = input
.bytes()
.filter(|&b| b != b'\n')
.map(|b| GridSquare::from_u8(b))
.collect::<Option<Vec<_>>>()?;
Some(Grid { row_len, grid })
}
fn new(grid: Vec<GridSquare>, row_len: usize) -> Grid {
if grid.len() % row_len != 0 {
panic!("invalid grid");
}
Grid { grid, row_len }
}
fn enumerate(&self) -> impl Iterator<Item = (GridIdx, GridSquare)> + '_ {
self.grid
.iter()
.copied()
.enumerate()
.map(|(idx, square)| (GridIdx(idx), square))
}
fn is_occupied(&self, idx: usize) -> bool {
self.grid[idx] == GridSquare::Occupied
}
fn num_adjacent_occupied(&self, idx: GridIdx) -> usize {
let mut total = 0;
let col = idx.0 % self.row_len;
// Add row above idx if it exists.
if self.row_len < idx.0 {
let above_idx = idx.0 - self.row_len;
if col > 0 && self.is_occupied(above_idx - 1) {
total += 1;
}
if self.is_occupied(above_idx) {
total += 1;
}
if col < self.row_len - 1 && self.is_occupied(above_idx + 1) {
total += 1;
}
}
// Add left and right if they exist.
if col > 0 && self.is_occupied(idx.0 - 1) {
total += 1;
}
if col < self.row_len - 1 && self.is_occupied(idx.0 + 1) {
total += 1;
}
// Add row below if it exists.
let below_idx = idx.0 + self.row_len;
if below_idx < self.grid.len() {
if col > 0 && self.is_occupied(below_idx - 1) {
total += 1;
}
if self.is_occupied(below_idx) {
total += 1;
}
if col < self.row_len - 1 && self.is_occupied(below_idx + 1) {
total += 1;
}
}
total
}
fn num_visible_occupied(&self, idx: GridIdx) -> usize {
let mut total = 0;
for &(x_step, y_step) in &[
(-1, -1),
(-1, 0),
(-1, 1),
(0, -1),
(0, 1),
(1, -1),
(1, 0),
(1, 1),
] {
total += GridIter::new(self, idx, x_step, y_step)
.find_map(|idx| match &self.grid[idx.0] {
GridSquare::Empty => Some(0),
GridSquare::Occupied => Some(1),
GridSquare::Floor => None,
})
.unwrap_or(0);
}
total
}
}
impl fmt::Display for Grid {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
for line in self.grid.chunks_exact(self.row_len) {
for square in line {
write!(f, "{}", square)?;
}
write!(f, "\n")?;
}
Ok(())
}
}
#[aoc(day11, part1)]
fn solve_d11_p1(input: &str) -> usize {
fn next_grid(orig: &Grid) -> Grid {
let new_grid: Vec<GridSquare> = orig
.enumerate()
.map(|(grid_idx, grid_square)| match grid_square {
GridSquare::Empty => {
let occupied = orig.num_adjacent_occupied(grid_idx);
if occupied == 0 {
GridSquare::Occupied
} else {
GridSquare::Empty
}
}
GridSquare::Occupied => {
let occupied = orig.num_adjacent_occupied(grid_idx);
if occupied >= 4 {
GridSquare::Empty
} else {
GridSquare::Occupied
}
}
GridSquare::Floor => GridSquare::Floor,
})
.collect();
Grid::new(new_grid, orig.row_len)
}
let mut grid = Grid::parse(input).unwrap();
let stable_grid = loop {
let next = next_grid(&grid);
if next == grid {
break next;
}
grid = next;
};
stable_grid
.enumerate()
.filter(|&(_idx, square)| square == GridSquare::Occupied)
.count()
}
#[derive(Debug)]
struct GridIter {
x: isize,
y: isize,
x_step: isize,
y_step: isize,
num_cols: usize,
num_rows: usize,
}
impl GridIter {
fn new(grid: &Grid, idx: GridIdx, x_step: isize, y_step: isize) -> Self {
let num_cols = grid.row_len;
let num_rows = grid.grid.len() / num_cols;
let x = (idx.0 % num_cols) as isize;
let y = (idx.0 / num_cols) as isize;
GridIter {
x,
y,
x_step,
y_step,
num_cols,
num_rows,
}
}
}
impl Iterator for GridIter {
type Item = GridIdx;
fn next(&mut self) -> Option<GridIdx> {
self.x += self.x_step;
self.y += self.y_step;
if self.x < 0 || self.x >= self.num_cols as isize {
return None;
}
if self.y < 0 || self.y >= self.num_rows as isize {
return None;
}
Some(GridIdx(self.y as usize * self.num_cols + self.x as usize))
}
}
#[aoc(day11, part2)]
fn solve_d11_p2(input: &str) -> usize {
fn next_grid(orig: &Grid) -> Grid {
let new_grid: Vec<GridSquare> = orig
.enumerate()
.map(|(grid_idx, grid_square)| match grid_square {
GridSquare::Empty => {
let occupied = orig.num_visible_occupied(grid_idx);
if occupied == 0 {
GridSquare::Occupied
} else {
GridSquare::Empty
}
}
GridSquare::Occupied => {
let occupied = orig.num_visible_occupied(grid_idx);
if occupied >= 5 {
GridSquare::Empty
} else {
GridSquare::Occupied
}
}
GridSquare::Floor => GridSquare::Floor,
})
.collect();
Grid::new(new_grid, orig.row_len)
}
let mut grid = Grid::parse(input).unwrap();
let stable_grid = loop {
let next = next_grid(&grid);
if next == grid {
break next;
}
grid = next;
};
stable_grid
.enumerate()
.filter(|&(_idx, square)| square == GridSquare::Occupied)
.count()
}

148
src/day12.rs Normal file
View File

@@ -0,0 +1,148 @@
use aoc_runner_derive::aoc;
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
enum LeftRight {
Left,
Right,
}
#[derive(Debug, Copy, Clone)]
#[repr(u8)]
enum Direction {
North = 0,
East = 1,
South = 2,
West = 3,
}
impl Direction {
fn xy(self) -> (isize, isize) {
match self {
Direction::North => (0, 1),
Direction::East => (1, 0),
Direction::South => (0, -1),
Direction::West => (-1, 0),
}
}
fn from_usize(x: usize) -> Self {
match x {
0 => Direction::North,
1 => Direction::East,
2 => Direction::South,
3 => Direction::West,
_ => panic!("invalid direction"),
}
}
fn rotate_ship(self, degrees: usize, lr: LeftRight) -> Self {
debug_assert!(degrees % 90 == 0);
let num_turns = degrees / 90;
Direction::from_usize(match lr {
LeftRight::Left => (self as usize).wrapping_sub(num_turns) & 0b11,
LeftRight::Right => (self as usize).wrapping_add(num_turns) & 0b11,
})
}
}
enum Action {
North(usize),
East(usize),
South(usize),
West(usize),
Left(usize),
Right(usize),
Forward(usize),
}
impl Action {
fn parse(input: &str) -> Option<Action> {
let value = (&input[1..]).parse().ok()?;
Some(match input.as_bytes()[0] {
b'N' => Action::North(value),
b'E' => Action::East(value),
b'S' => Action::South(value),
b'W' => Action::West(value),
b'L' => Action::Left(value),
b'R' => Action::Right(value),
b'F' => Action::Forward(value),
_ => return None,
})
}
}
#[aoc(day12, part1)]
fn solve_d12_p1(input: &str) -> usize {
let mut x = 0isize;
let mut y = 0isize;
let mut ship_dir = Direction::East;
for action in input.split('\n').map(|x| Action::parse(x).unwrap()) {
match action {
Action::North(distance) => y += distance as isize,
Action::East(distance) => x += distance as isize,
Action::South(distance) => y -= distance as isize,
Action::West(distance) => x -= distance as isize,
Action::Left(degrees) => ship_dir = ship_dir.rotate_ship(degrees, LeftRight::Left),
Action::Right(degrees) => ship_dir = ship_dir.rotate_ship(degrees, LeftRight::Right),
Action::Forward(distance) => {
let (x_step, y_step) = ship_dir.xy();
x += x_step * distance as isize;
y += y_step * distance as isize;
}
}
}
x.abs() as usize + y.abs() as usize
}
#[derive(Debug, Copy, Clone)]
struct Waypoint {
x: isize,
y: isize,
}
impl Waypoint {
fn rotate(self, mut degrees: usize, lr: LeftRight) -> Self {
assert!(degrees == 90 || degrees == 180 || degrees == 270);
if lr == LeftRight::Left {
degrees = 360 - degrees;
}
match degrees {
0 => self,
90 => Waypoint {
x: self.y,
y: -self.x,
},
180 => Waypoint {
x: -self.x,
y: -self.y,
},
270 => Waypoint {
x: -self.y,
y: self.x,
},
_ => unreachable!(),
}
}
}
#[aoc(day12, part2)]
fn solve_d12_p2(input: &str) -> usize {
let mut waypoint = Waypoint { x: 10, y: 1 };
let mut x = 0isize;
let mut y = 0isize;
for action in input.split('\n').map(|x| Action::parse(x).unwrap()) {
match action {
Action::North(distance) => waypoint.y += distance as isize,
Action::East(distance) => waypoint.x += distance as isize,
Action::South(distance) => waypoint.y -= distance as isize,
Action::West(distance) => waypoint.x -= distance as isize,
Action::Left(degrees) => waypoint = waypoint.rotate(degrees, LeftRight::Left),
Action::Right(degrees) => waypoint = waypoint.rotate(degrees, LeftRight::Right),
Action::Forward(distance) => {
x += waypoint.x * distance as isize;
y += waypoint.y * distance as isize;
}
}
}
x.abs() as usize + y.abs() as usize
}

35
src/day13.rs Normal file
View File

@@ -0,0 +1,35 @@
use aoc_runner_derive::aoc;
#[aoc(day13, part1)]
fn solve_d13_p1(input: &str) -> usize {
let first_newline = input.find('\n').unwrap();
let (t, bus_ids) = input.split_at(first_newline);
let bus_ids = bus_ids.trim();
let t: usize = t.parse().unwrap();
struct WaitTime {
bus_id: usize,
wait_time: usize,
}
let min_wait_time = bus_ids
.split(',')
.filter(|&x| x != "x")
.map(|x| x.parse::<usize>().unwrap())
.fold(
WaitTime {
bus_id: usize::MAX,
wait_time: usize::MAX,
},
|min, bus_id| {
let offset = t % bus_id;
let wait_time = if offset == 0 { 0 } else { bus_id - offset };
if min.wait_time < wait_time {
min
} else {
WaitTime { bus_id, wait_time }
}
},
);
min_wait_time.bus_id * min_wait_time.wait_time
}

174
src/day14.rs Normal file
View File

@@ -0,0 +1,174 @@
use aoc_runner_derive::aoc;
use std::collections::HashMap;
#[derive(Debug)]
enum Instr<'a> {
Mask(&'a str),
UpdateMem { offset: u64, value: u64 },
}
impl<'a> Instr<'a> {
fn parse(instr: &'a str) -> Option<Self> {
let eq_idx = instr.find('=')?;
let lhs = &instr[..eq_idx - 1];
let rhs = &instr[eq_idx + 2..];
if lhs == "mask" {
Some(Instr::Mask(rhs))
} else {
Self::parse_mem(lhs, rhs)
}
}
fn parse_mem(lhs: &str, rhs: &str) -> Option<Self> {
let offset: u64 = lhs[4..lhs.len() - 1].parse().ok()?;
let value: u64 = rhs.parse().ok()?;
Some(Instr::UpdateMem { offset, value })
}
}
#[derive(Debug)]
struct Mask {
or_mask: u64,
and_mask: u64,
}
impl Mask {
fn parse(mask: &[u8]) -> Option<Mask> {
if mask.len() != 36 {
return None;
}
let mut and_mask = !0;
let mut or_mask = 0;
for (idx, b) in mask.iter().enumerate() {
match b {
b'0' => {
and_mask &= !(1 << 35 - idx);
}
b'1' => {
or_mask |= 1 << 35 - idx;
}
b'X' => {}
_ => return None,
}
}
Some(Mask { and_mask, or_mask })
}
fn mask(&self, value: u64) -> u64 {
value & self.and_mask | self.or_mask
}
}
#[aoc(day14, part1)]
fn solve_d14_p1(input: &str) -> u64 {
// Assume initialization doesn't write to any memory offset multiple times.
let mut iter = input.split('\n').map(|x| Instr::parse(x).unwrap());
let mut mask = match iter.next() {
Some(Instr::Mask(mask)) => Mask::parse(mask.as_bytes()).unwrap(),
_ => panic!("first line is not valid bitmask"),
};
let mut memory = std::collections::HashMap::new();
for instr in iter {
match instr {
Instr::Mask(new_mask) => mask = Mask::parse(new_mask.as_bytes()).unwrap(),
Instr::UpdateMem { offset, value } => {
memory.insert(offset, mask.mask(value));
}
}
}
memory.values().sum()
}
struct Mask2 {
floating: u64,
or_mask: u64,
}
impl Mask2 {
fn parse(mask: &[u8]) -> Option<Mask2> {
if mask.len() != 36 {
return None;
}
let mut floating = 0;
let mut or_mask = 0;
for (idx, b) in mask.iter().enumerate() {
match b {
b'0' => {}
b'1' => {
or_mask |= 1 << 35 - idx;
}
b'X' => {
floating |= 1 << 35 - idx;
}
_ => return None,
}
}
Some(Mask2 { floating, or_mask })
}
fn set_memory(&self, mem: &mut HashMap<u64, u64>, address: u64, value: u64) {
let offset = address | self.or_mask;
for mut floating_value in 0..2 << self.floating.count_ones() {
let mut addr = offset;
for bit in BitIndexes::new(self.floating) {
addr = set_bit(addr, bit, (floating_value & 1) == 1);
floating_value >>= 1;
}
mem.insert(addr, value);
}
}
}
fn set_bit(value: u64, bit_idx: u64, enabled: bool) -> u64 {
if enabled {
value | (1 << bit_idx)
} else {
value & !(1 << bit_idx)
}
}
struct BitIndexes {
value: u64,
current_idx: u64,
}
impl BitIndexes {
fn new(value: u64) -> Self {
BitIndexes {
value,
current_idx: 0,
}
}
}
impl Iterator for BitIndexes {
type Item = u64;
fn next(&mut self) -> Option<u64> {
while self.value > 0 {
let set = self.value & 1 == 1;
self.value >>= 1;
self.current_idx += 1;
if set {
return Some(self.current_idx - 1);
}
}
return None;
}
}
#[aoc(day14, part2)]
fn solve_d14_p2(input: &str) -> u64 {
let mut iter = input.split('\n').map(|x| Instr::parse(x).unwrap());
let mut mask = match iter.next() {
Some(Instr::Mask(mask)) => Mask2::parse(mask.as_bytes()).unwrap(),
_ => panic!("first line is not valid bitmask"),
};
let mut memory = std::collections::HashMap::new();
for instr in iter {
match instr {
Instr::Mask(new_mask) => mask = Mask2::parse(new_mask.as_bytes()).unwrap(),
Instr::UpdateMem { offset, value } => {
mask.set_memory(&mut memory, offset, value);
}
}
}
memory.values().sum()
}

61
src/day15.rs Normal file
View File

@@ -0,0 +1,61 @@
use aoc_runner_derive::aoc;
use std::collections::{hash_map::Entry, HashMap};
fn spoken_word_n(mut spoken: HashMap<usize, usize>, mut last_spoken: usize, n: usize) -> usize {
for turn in spoken.len() + 1..=n {
//dbg!(turn, last_spoken);
last_spoken = match spoken.entry(last_spoken) {
Entry::Occupied(mut occupied) => {
let difference = turn - 1 - *occupied.get();
occupied.insert(turn - 1);
difference
}
Entry::Vacant(vacant) => {
vacant.insert(turn - 1);
0
}
}
}
last_spoken
}
#[aoc(day15, part1)]
fn solve_d15_p1(input: &str) -> usize {
let mut last_spoken = None;
let spoken: HashMap<usize, usize> = input
.split(',')
.enumerate()
.map(|(idx, spoken)| {
let spoken = spoken.parse().unwrap();
last_spoken = Some(spoken);
(spoken, idx + 1)
})
.collect();
spoken_word_n(spoken, last_spoken.unwrap(), 2020)
}
#[aoc(day15, part2)]
fn solve_d15_p2(input: &str) -> usize {
let mut last_spoken = None;
let spoken: HashMap<usize, usize> = input
.split(',')
.enumerate()
.map(|(idx, spoken)| {
let spoken = spoken.parse().unwrap();
last_spoken = Some(spoken);
(spoken, idx + 1)
})
.collect();
spoken_word_n(spoken, last_spoken.unwrap(), 30_000_000)
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_part1() {
assert_eq!(solve_d15_p1("1,3,2"), 1);
}
}

303
src/day16.rs Normal file
View File

@@ -0,0 +1,303 @@
use crate::split_once;
use aoc_runner_derive::aoc;
use std::ops::RangeInclusive;
struct Rule<'a> {
name: &'a str,
a: RangeInclusive<u16>,
b: RangeInclusive<u16>,
}
impl<'a> Rule<'a> {
fn parse(input: &'a str) -> Option<Self> {
let (name, rem) = split_once(input, ": ")?;
let (a, b) = split_once(rem, " or ")?;
let a = {
let (start, end) = split_once(a, "-")?;
RangeInclusive::<u16>::new(start.parse().ok()?, end.parse().ok()?)
};
let b = {
let (start, end) = split_once(b, "-")?;
RangeInclusive::<u16>::new(start.parse().ok()?, end.parse().ok()?)
};
Some(Rule { name, a, b })
}
fn matches(&self, value: u16) -> bool {
self.a.contains(&value) || self.b.contains(&value)
}
}
#[aoc(day16, part1)]
fn solve_d16_p1(input: &str) -> u16 {
let (rules, rem) = split_once(input, "\n\nyour ticket:\n").unwrap();
let (_your_ticket, nearby_tickets) = split_once(rem, "\n\nnearby tickets:\n").unwrap();
let rules: Vec<_> = rules.split('\n').map(|x| Rule::parse(x).unwrap()).collect();
nearby_tickets
.split('\n')
.flat_map(|line| line.split(','))
.filter_map(|x| {
let value: u16 = x.parse().unwrap();
if rules.iter().any(|rule| rule.matches(value)) {
None
} else {
Some(value)
}
})
.sum()
}
#[aoc(day16, part2)]
fn solve_d16_p2(input: &str) -> usize {
let (rules, rem) = split_once(input, "\n\nyour ticket:\n").unwrap();
let (my_ticket, nearby_tickets) = split_once(rem, "\n\nnearby tickets:\n").unwrap();
let rules: Vec<_> = rules.split('\n').map(|x| Rule::parse(x).unwrap()).collect();
assert!(rules.len() < 63);
let mut candidates = vec![(1u64 << rules.len()) - 1; rules.len()];
let mut scratch = Vec::with_capacity(rules.len());
for line in nearby_tickets.split('\n') {
scratch.clear();
scratch.extend(line.split(',').map(|field| {
let value = field.parse().unwrap();
// Initialize a bitmap of which rules the field is valid for. `1`
// indicates the value is valid for that field. `0` is invalid.
let mut bitmap = 0u64;
for (rule_idx, rule) in rules.iter().enumerate() {
if rule.matches(value) {
bitmap |= 1 << rule_idx;
}
}
bitmap
}));
if scratch.iter().copied().any(|x| x == 0) {
continue;
}
candidates
.iter_mut()
.zip(scratch.iter())
.for_each(|(candidate, valid_bitmask)| {
*candidate &= valid_bitmask;
});
}
while candidates.iter().copied().any(|x| x.count_ones() > 1) {
for idx in 0..candidates.len() {
let candidate = candidates[idx];
if candidate.count_ones() == 1 {
let mask = !candidate;
for before in &mut candidates[..idx] {
*before &= mask;
}
for after in &mut candidates[idx + 1..] {
*after &= mask;
}
}
}
}
my_ticket
.split(',')
.map(|x| x.parse::<usize>().unwrap())
.zip(candidates.into_iter().map(|x| x.trailing_zeros() as usize))
.filter_map(|(field, rule_idx)| {
if rules[rule_idx].name.starts_with("departure") {
Some(field)
} else {
None
}
})
.product()
}
#[aoc(day16, part2, avx2)]
fn solve_d16_p2_avx2(input: &str) -> usize {
unsafe { avx2::solve_d16_p2(input) }
}
#[cfg(all(target_arch = "x86_64", target_feature = "avx2"))]
mod avx2 {
use super::{split_once, Rule};
use std::arch::x86_64::*;
struct RuleEval {
lo_start: [__m256i; 2],
lo_end: [__m256i; 2],
hi_start: [__m256i; 2],
hi_end: [__m256i; 2],
}
impl RuleEval {
#[target_feature(enable = "avx2")]
unsafe fn new(rules: &[Rule]) -> Option<Self> {
if rules.len() > 31 {
return None;
}
let lo_start = {
let mut lo_start = [_mm256_setzero_si256(); 2];
let lo_start_16 = &mut *(&mut lo_start as *mut [__m256i; 2] as *mut [i16; 32]);
let mut rules_iter = rules.iter();
for (idx, rule) in rules_iter.by_ref().take(8).enumerate() {
lo_start_16[idx] = *rule.a.start() as i16 - 1;
}
for (idx, rule) in rules_iter.by_ref().take(8).enumerate() {
lo_start_16[idx + 16] = *rule.a.start() as i16 - 1;
}
for (idx, rule) in rules_iter.by_ref().take(8).enumerate() {
lo_start_16[idx + 8] = *rule.a.start() as i16 - 1;
}
for (idx, rule) in rules_iter.by_ref().take(8).enumerate() {
lo_start_16[idx + 24] = *rule.a.start() as i16 - 1;
}
lo_start
};
let lo_end = {
let mut lo_end = [_mm256_setzero_si256(); 2];
let lo_end_16 = &mut *(&mut lo_end as *mut [__m256i; 2] as *mut [i16; 32]);
let mut rules_iter = rules.iter();
for (idx, rule) in rules_iter.by_ref().take(8).enumerate() {
lo_end_16[idx] = *rule.a.end() as i16 + 1;
}
for (idx, rule) in rules_iter.by_ref().take(8).enumerate() {
lo_end_16[idx + 16] = *rule.a.end() as i16 + 1;
}
for (idx, rule) in rules_iter.by_ref().take(8).enumerate() {
lo_end_16[idx + 8] = *rule.a.end() as i16 + 1;
}
for (idx, rule) in rules_iter.by_ref().take(8).enumerate() {
lo_end_16[idx + 24] = *rule.a.end() as i16 + 1;
}
lo_end
};
let hi_start = {
let mut hi_start = [_mm256_setzero_si256(); 2];
let hi_start_16 = &mut *(&mut hi_start as *mut [__m256i; 2] as *mut [i16; 32]);
let mut rules_iter = rules.iter();
for (idx, rule) in rules_iter.by_ref().take(8).enumerate() {
hi_start_16[idx] = *rule.b.start() as i16 - 1;
}
for (idx, rule) in rules_iter.by_ref().take(8).enumerate() {
hi_start_16[idx + 16] = *rule.b.start() as i16 - 1;
}
for (idx, rule) in rules_iter.by_ref().take(8).enumerate() {
hi_start_16[idx + 8] = *rule.b.start() as i16 - 1;
}
for (idx, rule) in rules_iter.by_ref().take(8).enumerate() {
hi_start_16[idx + 24] = *rule.b.start() as i16 - 1;
}
hi_start
};
let hi_end = {
let mut hi_end = [_mm256_setzero_si256(); 2];
let hi_end_16 = &mut *(&mut hi_end as *mut [__m256i; 2] as *mut [i16; 32]);
let mut rules_iter = rules.iter();
for (idx, rule) in rules_iter.by_ref().take(8).enumerate() {
hi_end_16[idx] = *rule.b.end() as i16 + 1;
}
for (idx, rule) in rules_iter.by_ref().take(8).enumerate() {
hi_end_16[idx + 16] = *rule.b.end() as i16 + 1;
}
for (idx, rule) in rules_iter.by_ref().take(8).enumerate() {
hi_end_16[idx + 8] = *rule.b.end() as i16 + 1;
}
for (idx, rule) in rules_iter.by_ref().take(8).enumerate() {
hi_end_16[idx + 24] = *rule.b.end() as i16 + 1;
}
hi_end
};
Some(RuleEval {
lo_start,
lo_end,
hi_start,
hi_end,
})
}
#[target_feature(enable = "avx2")]
unsafe fn eval(&self, value: u16) -> u32 {
let value = _mm256_set1_epi16(value as i16);
let within_lo = [
_mm256_and_si256(
_mm256_cmpgt_epi16(self.lo_end[0], value),
_mm256_cmpgt_epi16(value, self.lo_start[0]),
),
_mm256_and_si256(
_mm256_cmpgt_epi16(self.lo_end[1], value),
_mm256_cmpgt_epi16(value, self.lo_start[1]),
),
];
let within_hi = [
_mm256_and_si256(
_mm256_cmpgt_epi16(self.hi_end[0], value),
_mm256_cmpgt_epi16(value, self.hi_start[0]),
),
_mm256_and_si256(
_mm256_cmpgt_epi16(self.hi_end[1], value),
_mm256_cmpgt_epi16(value, self.hi_start[1]),
),
];
let valid = [
_mm256_or_si256(within_lo[0], within_hi[0]),
_mm256_or_si256(within_lo[1], within_hi[1]),
];
let packed = _mm256_packs_epi16(valid[0], valid[1]);
_mm256_movemask_epi8(packed) as u32
}
}
#[target_feature(enable = "avx2")]
pub unsafe fn solve_d16_p2(input: &str) -> usize {
let (rules, rem) = split_once(input, "\n\nyour ticket:\n").unwrap();
let (my_ticket, nearby_tickets) = split_once(rem, "\n\nnearby tickets:\n").unwrap();
let rules: Vec<_> = rules.split('\n').map(|x| Rule::parse(x).unwrap()).collect();
assert!(rules.len() < 32);
let rule_eval = RuleEval::new(&rules).unwrap();
let mut candidates = [_mm256_set1_epi32((1i32 << rules.len()) - 1); 4];
let mut scratch_space = [_mm256_set1_epi32(1); 4];
for line in nearby_tickets.split('\n') {
let scratch_slice = &mut *(&mut scratch_space as *mut _ as *mut [u32; 32]);
for (field, scratch) in line.split(',').zip(scratch_slice.iter_mut()) {
let field = field.parse().unwrap();
*scratch = rule_eval.eval(field);
}
if scratch_space.iter().copied().any(|elem| {
_mm256_movemask_epi8(_mm256_cmpeq_epi32(elem, _mm256_set1_epi32(0))) != 0
}) {
continue;
}
for (candidate, valid_bitmask) in candidates.iter_mut().zip(scratch_space.iter()) {
*candidate = _mm256_and_si256(*candidate, *valid_bitmask);
}
}
let candidates = &mut *(&mut candidates as *mut _ as *mut [u32; 32]);
let candidates = &mut candidates[..rules.len()];
while candidates.iter().copied().any(|x| x.count_ones() > 1) {
for idx in 0..candidates.len() {
let candidate = candidates[idx];
if candidate.count_ones() == 1 {
let mask = !candidate;
for before in &mut candidates[..idx] {
*before &= mask;
}
for after in &mut candidates[idx + 1..] {
*after &= mask;
}
}
}
}
my_ticket
.split(',')
.map(|x| x.parse::<usize>().unwrap())
.zip(candidates.into_iter().map(|x| x.trailing_zeros() as usize))
.filter_map(|(field, rule_idx)| {
if rules[rule_idx].name.starts_with("departure") {
Some(field)
} else {
None
}
})
.product()
}
}

101
src/day17.rs Normal file
View File

@@ -0,0 +1,101 @@
use aoc_runner_derive::aoc;
use std::collections::HashSet;
#[aoc(day17, part1)]
fn solve_d17_p1(input: &str) -> usize {
let mut world = HashSet::new();
for (y, line) in input.split('\n').enumerate() {
for (x, _) in line
.as_bytes()
.iter()
.copied()
.enumerate()
.filter(|&(_, byte)| byte == b'#')
{
world.insert((x as isize, y as isize, 0isize, 0isize));
}
}
for _ in 0..6 {
world = step(world);
}
world.len()
}
fn neighbors(
world: &HashSet<(isize, isize, isize, isize)>,
(x, y, z, w): (isize, isize, isize, isize),
) -> usize {
let mut count = 0;
for xa in x - 1..=x + 1 {
for ya in y - 1..=y + 1 {
for za in z - 1..=z + 1 {
for wa in w - 1..=w + 1 {
count += world.contains(&(xa, ya, za, wa)) as usize;
}
}
}
}
count - world.contains(&(x, y, z, w)) as usize
}
fn step(world: HashSet<(isize, isize, isize, isize)>) -> HashSet<(isize, isize, isize, isize)> {
struct MinMax {
x_min: isize,
x_max: isize,
y_min: isize,
y_max: isize,
z_min: isize,
z_max: isize,
w_min: isize,
w_max: isize,
}
let MinMax {
x_min,
x_max,
y_min,
y_max,
z_min,
z_max,
w_min,
w_max,
} = world.iter().fold(
MinMax {
x_min: isize::MAX,
x_max: isize::MIN,
y_min: isize::MAX,
y_max: isize::MIN,
z_min: isize::MAX,
z_max: isize::MIN,
w_min: isize::MAX,
w_max: isize::MIN,
},
|minmax, &(x, y, z, w)| MinMax {
x_min: std::cmp::min(minmax.x_min, x),
x_max: std::cmp::max(minmax.x_max, x),
y_min: std::cmp::min(minmax.y_min, y),
y_max: std::cmp::max(minmax.y_max, y),
z_min: std::cmp::min(minmax.z_min, z),
z_max: std::cmp::max(minmax.z_max, z),
w_min: std::cmp::min(minmax.w_min, w),
w_max: std::cmp::max(minmax.w_max, w),
},
);
let mut new_world = HashSet::new();
for x in x_min - 1..=x_max + 1 {
for y in y_min - 1..=y_max + 1 {
for z in z_min - 1..=z_max + 1 {
for w in w_min - 1..=w_max + 1 {
let active = world.contains(&(x, y, z, w));
let n = neighbors(&world, (x, y, z, w));
if active && (n == 2 || n == 3) {
new_world.insert((x, y, z, w));
}
if !active && n == 3 {
new_world.insert((x, y, z, w));
}
}
}
}
}
new_world
}

164
src/day18.rs Normal file
View File

@@ -0,0 +1,164 @@
use aoc_runner_derive::aoc;
fn num(i: &str) -> Option<(&str, usize)> {
let i = i.trim_start();
let end_idx = i
.as_bytes()
.iter()
.copied()
.position(|b| !(b'0'..=b'9').contains(&b))
.unwrap_or(i.len());
let n = (&i[..end_idx]).parse().ok()?;
let rem = &i[end_idx..];
Some((rem, n))
}
#[aoc(day18, part1)]
fn solve_d18_p1(input: &str) -> usize {
#[derive(Debug, Copy, Clone)]
enum Operator {
Add,
Mul,
}
// The next token is an operator '+' or '*'
fn operator(i: &str) -> Option<(&str, Operator)> {
let i = i.trim_start();
let op = match i.as_bytes()[0] {
b'+' => Operator::Add,
b'*' => Operator::Mul,
_ => return None,
};
Some((&i[1..], op))
}
// The next token is '('. Evaluate the entire expression within the parens.
fn paren(i: &str) -> Option<(&str, usize)> {
let i = i.trim_start();
if i.is_empty() || i.as_bytes()[0] != b'(' {
return None;
}
let (rem, n) = expr(&i[1..])?;
if rem.is_empty() || rem.as_bytes()[0] != b')' {
return None;
}
let rem = &rem[1..];
Some((rem, n))
}
// the next token is either a bare number or an expression within a paren,
// return either the number of the evaluation of the paren enclosed
// expression.
fn num_or_paren(i: &str) -> Option<(&str, usize)> {
num(i).or_else(|| paren(i))
}
// the next token is an operator ('+' or '*') followed by a number or an
// expression within a paren.
fn operator_and_rhs(i: &str) -> Option<(&str, (Operator, usize))> {
let (i, op) = operator(i)?;
let (i, rhs) = num_or_paren(i)?;
Some((i, (op, rhs)))
}
// evaluate the expression provided as input. Return the remaining input
// after evaluation is complete.
fn expr(i: &str) -> Option<(&str, usize)> {
let (mut rem, mut lhs) = num_or_paren(i)?;
loop {
if rem.is_empty() {
break;
}
if let Some((irem, (op, rhs))) = operator_and_rhs(rem) {
rem = irem;
lhs = match op {
Operator::Add => lhs + rhs,
Operator::Mul => lhs * rhs,
};
} else {
break;
}
}
Some((rem, lhs))
}
input.split('\n').map(|line| expr(line).unwrap().1).sum()
}
#[aoc(day18, part2)]
fn solve_d18_p2(input: &str) -> usize {
// The next token is '('. Evaluate the entire expression within the parens.
fn paren(i: &str) -> Option<(&str, usize)> {
let i = i.trim_start();
if i.is_empty() || i.as_bytes()[0] != b'(' {
return None;
}
let (rem, n) = expr(&i[1..])?;
if rem.is_empty() || rem.as_bytes()[0] != b')' {
return None;
}
let rem = &rem[1..];
Some((rem, n))
}
// the next token is either a bare number or an expression within a paren,
// return either the number of the evaluation of the paren enclosed
// expression.
fn num_or_paren(i: &str) -> Option<(&str, usize)> {
num(i).or_else(|| paren(i))
}
// The next token is a number or an expression within a paren, optionally
// followed by some number of '+' and number or paren enclosed expressions.
// The returned value is the sum of the entire sequence.
fn add_or_paren(i: &str) -> Option<(&str, usize)> {
let (mut i, mut lhs) = num_or_paren(i)?;
loop {
i = i.trim_start();
if i.is_empty() || i.as_bytes()[0] != b'+' {
break;
}
i = &i[1..];
if let Some((rem, rhs)) = num_or_paren(i) {
lhs += rhs;
i = rem;
} else {
break;
}
}
Some((i, lhs))
}
// Evaluate the expression.
fn expr(i: &str) -> Option<(&str, usize)> {
// add_or_paren will evaluate any consecutive elements of the expression
// that are separated by '+'. This enforces that '+' has a higher order
// of operation than '*'.
let (mut i, mut lhs) = add_or_paren(i)?;
loop {
// The next token is expected to be '*'. Remember that all '+'
// operations will have already been handled by add_or_paren above.
i = i.trim_start();
if i.is_empty() || i.as_bytes()[0] != b'*' {
break;
}
i = &i[1..];
// '*' has been seen, now get the rhs of the multiplication. Using
// add_or_paren here again will first sum all consecutive
// '+' tokens prior to doing the multiplication.
if let Some((rem, rhs)) = add_or_paren(i) {
lhs *= rhs;
i = rem;
} else {
break;
}
}
Some((i, lhs))
}
input.split('\n').map(|line| expr(line).unwrap().1).sum()
}

103
src/day19.rs Normal file
View File

@@ -0,0 +1,103 @@
use crate::split_once;
use aoc_runner_derive::aoc;
use std::collections::HashMap;
#[derive(Debug)]
enum Parser<'a> {
Lit(&'a str),
Seq(Vec<usize>),
Alt(Vec<usize>, Vec<usize>),
}
impl<'a> Parser<'a> {
fn new(parser_def: &'a str) -> Option<(usize, Self)> {
let (idx, def) = split_once(parser_def, ": ")?;
let idx = idx.parse().ok()?;
if let Some((a, b)) = split_once(def, " | ") {
let a = a
.split(' ')
.map(|x| x.parse().ok())
.collect::<Option<Vec<usize>>>()?;
let b = b
.split(' ')
.map(|x| x.parse().ok())
.collect::<Option<Vec<usize>>>()?;
Some((idx, Parser::Alt(a, b)))
} else if let Some(_) = def.find('"') {
Some((idx, Parser::Lit(&def[1..def.len() - 1])))
} else {
let seq = def
.split(' ')
.map(|x| x.parse().ok())
.collect::<Option<Vec<usize>>>()?;
Some((idx, Parser::Seq(seq)))
}
}
// returns Some(remaining_input) when valid, None when doesn't match.
fn parse<'b>(&self, parsers: &HashMap<usize, Parser>, input: &'b str) -> Option<&'b str> {
match self {
&Parser::Lit(s) => {
if input.is_empty() || &input[..s.len()] != s {
None
} else {
Some(&input[s.len()..])
}
}
Parser::Seq(a) => {
let mut input = input;
let mut iter = a.iter().copied();
while let Some(parser_idx) = iter.next() {
input = parsers
.get(&parser_idx)
.and_then(|p| p.parse(parsers, input))?;
}
Some(input)
}
Parser::Alt(a, b) => {
let parser_a = Parser::Seq(a.clone());
match parser_a.parse(parsers, input) {
Some(input) => Some(input),
None => {
let parser_b = Parser::Seq(b.clone());
parser_b.parse(parsers, input)
}
}
}
}
}
}
#[aoc(day19, part1)]
fn solve_d19_p1(input: &str) -> usize {
let (parser_input, pattern_input) = split_once(input, "\n\n").unwrap();
let parsers: HashMap<usize, Parser> = parser_input
.split('\n')
.map(|parser_def| Parser::new(parser_def).unwrap())
.collect();
let rule0 = parsers.get(&0).unwrap();
pattern_input
.split('\n')
.filter(|pattern| rule0.parse(&parsers, pattern) == Some(""))
.count()
}
#[aoc(day19, part2)]
fn solve_d19_p2(input: &str) -> usize {
let (parser_input, pattern_input) = split_once(input, "\n\n").unwrap();
let mut parsers: HashMap<usize, Parser> = parser_input
.split('\n')
.map(|parser_def| Parser::new(parser_def).unwrap())
.collect();
parsers.insert(8, Parser::Alt(vec![42], vec![42, 8]));
parsers.insert(11, Parser::Alt(vec![42, 31], vec![42, 11, 31]));
let rule0 = parsers.get(&0).unwrap();
pattern_input
.split('\n')
.filter(|pattern| rule0.parse(&parsers, pattern) == Some(""))
.count()
}

53
src/day2.rs Normal file
View File

@@ -0,0 +1,53 @@
use aoc_runner_derive::aoc;
struct PasswdEntry<'a> {
lower_bound: usize,
upper_bound: usize,
policy_char: u8,
passwd: &'a [u8],
}
impl<'a> PasswdEntry<'a> {
fn parse(mut input: &'a str) -> Option<Self> {
let lb_idx = input.find('-')?;
let lower_bound: usize = (&input[..lb_idx]).parse().ok()?;
input = &input[lb_idx + 1..];
let ub_idx = input.find(' ')?;
let upper_bound: usize = (&input[..ub_idx]).parse().ok()?;
input = &input[ub_idx + 1..];
let policy_char = input.as_bytes()[0];
let passwd = &input[3..].as_bytes();
Some(PasswdEntry {
lower_bound,
upper_bound,
policy_char,
passwd,
})
}
}
#[aoc(day2, part1)]
pub fn solve_d2_p1(input: &str) -> usize {
fn line_is_valid(line: &str) -> bool {
let entry = PasswdEntry::parse(line).unwrap();
let count = entry
.passwd
.iter()
.filter(|&&b| b == entry.policy_char)
.count();
(count >= entry.lower_bound) && (count <= entry.upper_bound)
}
input.split('\n').filter(|x| line_is_valid(x)).count()
}
#[aoc(day2, part2)]
pub fn solve_d2_p2(input: &str) -> usize {
fn line_is_valid(line: &str) -> bool {
let entry = PasswdEntry::parse(line).unwrap();
(entry.passwd[entry.lower_bound - 1] == entry.policy_char)
^ (entry.passwd[entry.upper_bound - 1] == entry.policy_char)
}
input.split('\n').filter(|x| line_is_valid(x)).count()
}

220
src/day20.rs Normal file
View File

@@ -0,0 +1,220 @@
use crate::split_once;
use aoc_runner_derive::aoc;
use std::collections::HashMap;
#[derive(Debug)]
struct Tile {
id: usize,
data: [bool; 100],
}
impl Tile {
fn parse(input: &str) -> Option<Tile> {
let (id_line, input_data) = split_once(input, ":\n")?;
let (_, id) = split_once(id_line, " ")?;
let mut data = [false; 100];
for idx in input_data
.as_bytes()
.iter()
.cloned()
.filter(|&b| b != b'\n')
.enumerate()
.filter_map(|(idx, b)| if b == b'#' { Some(idx) } else { None })
{
data[idx] = true;
}
Some(Tile {
id: id.parse().ok()?,
data,
})
}
fn sides(&self) -> Vec<u16> {
let top = self.data[0..10]
.iter()
.cloned()
.enumerate()
.filter(|&(_, b)| b)
.fold(0u16, |accum, (idx, _)| accum | (1 << idx));
let bottom = self.data[90..100]
.iter()
.cloned()
.enumerate()
.filter(|&(_, b)| b)
.fold(0u16, |accum, (idx, _)| accum | (1 << idx));
let left = self
.data
.iter()
.step_by(10)
.cloned()
.enumerate()
.filter(|&(_, b)| b)
.fold(0u16, |accum, (idx, _)| accum | (1 << idx));
let right = self
.data
.iter()
.skip(9)
.step_by(10)
.cloned()
.enumerate()
.filter(|&(_, b)| b)
.fold(0u16, |accum, (idx, _)| accum | (1 << idx));
// Put the id's in a consistent order.
fn consistent_id(id: u16) -> u16 {
let reversed = id.reverse_bits() >> 6;
if id < reversed {
reversed
} else {
id
}
}
vec![
consistent_id(top),
consistent_id(right),
consistent_id(bottom),
consistent_id(left),
]
}
}
const EXAMPLE: &str = "Tile 2311:
..##.#..#.
##..#.....
#...##..#.
####.#...#
##.##.###.
##...#.###
.#.#.#..##
..#....#..
###...#.#.
..###..###
Tile 1951:
#.##...##.
#.####...#
.....#..##
#...######
.##.#....#
.###.#####
###.##.##.
.###....#.
..#.#..#.#
#...##.#..
Tile 1171:
####...##.
#..##.#..#
##.#..#.#.
.###.####.
..###.####
.##....##.
.#...####.
#.##.####.
####..#...
.....##...
Tile 1427:
###.##.#..
.#..#.##..
.#.##.#..#
#.#.#.##.#
....#...##
...##..##.
...#.#####
.#.####.#.
..#..###.#
..##.#..#.
Tile 1489:
##.#.#....
..##...#..
.##..##...
..#...#...
#####...#.
#..#.#.#.#
...#.#.#..
##.#...##.
..##.##.##
###.##.#..
Tile 2473:
#....####.
#..#.##...
#.##..#...
######.#.#
.#...#.#.#
.#########
.###.#..#.
########.#
##...##.#.
..###.#.#.
Tile 2971:
..#.#....#
#...###...
#.#.###...
##.##..#..
.#####..##
.#..####.#
#..#.#..#.
..####.###
..#.#.###.
...#.#.#.#
Tile 2729:
...#.#.#.#
####.#....
..#.#.....
....#..#.#
.##..##.#.
.#.####...
####.#.#..
##.####...
##..#.##..
#.##...##.
Tile 3079:
#.#.#####.
.#..######
..#.......
######....
####.#..#.
.#...#.##.
#.#####.##
..#.###...
..#.......
..#.###...
";
#[aoc(day20, part1)]
fn solve_d20_p1(input: &str) -> usize {
let tiles: Vec<_> = input
.split("\n\n")
.map(|i| Tile::parse(i).unwrap())
.collect();
let mut side_to_tile: HashMap<_, Vec<_>> = HashMap::new();
for tile in &tiles {
for side in tile.sides() {
side_to_tile.entry(side).or_default().push(tile.id);
}
}
tiles
.iter()
.filter_map(|tile| {
let num_unique_sides = tile.sides().iter().fold(0, |accum, side| {
if side_to_tile.get(&side).unwrap().len() == 1 {
accum + 1
} else {
accum
}
});
if num_unique_sides == 2 {
Some(tile.id)
} else {
None
}
})
.product()
}

75
src/day21.rs Normal file
View File

@@ -0,0 +1,75 @@
use crate::split_once;
use aoc_runner_derive::aoc;
use std::collections::{HashMap, HashSet};
#[derive(Debug)]
struct Food<'a> {
ingredients: HashSet<&'a str>,
allergens: HashSet<&'a str>,
}
impl<'a> Food<'a> {
fn parse(input: &'a str) -> Option<Self> {
let (ingredients, allergens) = split_once(input, " (contains ")?;
let allergens = allergens.strip_suffix(")")?;
Some(Food {
ingredients: ingredients.split(" ").collect(),
allergens: allergens.split(", ").collect(),
})
}
}
#[aoc(day21, part1)]
fn solve_d2_p1(input: &str) -> usize {
//let input = EXAMPLE;
let foods: Vec<_> = input.split('\n').map(|l| Food::parse(l).unwrap()).collect();
let mut allergen_causes = HashMap::new();
for food in &foods {
for &allergen in &food.allergens {
let ingredients = allergen_causes
.entry(allergen)
.or_insert_with(|| food.ingredients.clone());
ingredients.retain(|ingredient| food.ingredients.contains(ingredient));
}
}
let possible_allergens: HashSet<_> = allergen_causes.values().flatten().collect();
foods
.iter()
.flat_map(|food| &food.ingredients)
.filter(|ingredient| !possible_allergens.contains(ingredient))
.count()
}
#[aoc(day21, part2)]
fn solve_d2_p2(input: &str) -> String {
let foods: Vec<_> = input.split('\n').map(|l| Food::parse(l).unwrap()).collect();
let mut allergen_causes = HashMap::new();
for food in &foods {
for &allergen in &food.allergens {
let ingredients = allergen_causes
.entry(allergen)
.or_insert_with(|| food.ingredients.clone());
ingredients.retain(|ingredient| food.ingredients.contains(ingredient));
}
}
let mut dangerous_ingredients = Vec::new();
while let Some(&allergen) = allergen_causes
.iter()
.find(|(_k, v)| v.len() == 1)
.map(|(k, _v)| k)
{
let (allergen, mut ingredient) = allergen_causes.remove_entry(allergen).unwrap();
let ingredient = ingredient.drain().next().unwrap();
dangerous_ingredients.push((allergen, ingredient));
for ingredient_set in allergen_causes.values_mut() {
ingredient_set.remove(&ingredient);
}
}
dangerous_ingredients.sort_by(|(a, _), (b, _)| a.cmp(b));
dangerous_ingredients
.into_iter()
.map(|(_allergen, ingredient)| ingredient)
.collect::<Vec<_>>()
.join(",")
}

87
src/day22.rs Normal file
View File

@@ -0,0 +1,87 @@
use crate::split_once;
use aoc_runner_derive::aoc;
use std::borrow::Cow;
use std::collections::{HashSet, VecDeque};
fn deck_score(deck: VecDeque<usize>) -> usize {
deck.iter()
.rev()
.enumerate()
.map(|(idx, value)| (idx + 1) * value)
.sum()
}
#[aoc(day22, part1)]
fn solve_d22_p1(input: &str) -> usize {
let (p1, p2) = split_once(input, "\n\n").unwrap();
let mut p1_deck: VecDeque<usize> = p1.split('\n').skip(1).map(|x| x.parse().unwrap()).collect();
let mut p2_deck: VecDeque<usize> = p2.split('\n').skip(1).map(|x| x.parse().unwrap()).collect();
while !p1_deck.is_empty() && !p2_deck.is_empty() {
let p1_value = p1_deck.pop_front().unwrap();
let p2_value = p2_deck.pop_front().unwrap();
if p1_value > p2_value {
p1_deck.push_back(p1_value);
p1_deck.push_back(p2_value);
} else {
p2_deck.push_back(p2_value);
p2_deck.push_back(p1_value);
}
}
deck_score(if p1_deck.is_empty() { p2_deck } else { p1_deck })
}
enum Winner {
Player1(VecDeque<usize>),
Player2(VecDeque<usize>),
}
#[aoc(day22, part2)]
fn solve_d22_p2(input: &str) -> usize {
let (p1, p2) = split_once(input, "\n\n").unwrap();
let p1_deck: VecDeque<usize> = p1.split('\n').skip(1).map(|x| x.parse().unwrap()).collect();
let p2_deck: VecDeque<usize> = p2.split('\n').skip(1).map(|x| x.parse().unwrap()).collect();
match play_recursive_combat(p1_deck, p2_deck) {
Winner::Player1(deck) | Winner::Player2(deck) => deck_score(deck),
}
}
fn play_recursive_combat(mut p1_deck: VecDeque<usize>, mut p2_deck: VecDeque<usize>) -> Winner {
let mut previous_rounds = HashSet::new();
while !p1_deck.is_empty() && !p2_deck.is_empty() {
if previous_rounds.contains(&(Cow::Borrowed(&p1_deck), Cow::Borrowed(&p2_deck))) {
return Winner::Player1(p1_deck);
}
previous_rounds.insert((Cow::Owned(p1_deck.clone()), Cow::Owned(p2_deck.clone())));
let p1_value = p1_deck.pop_front().unwrap();
let p2_value = p2_deck.pop_front().unwrap();
if p1_deck.len() >= p1_value && p2_deck.len() >= p2_value {
match play_recursive_combat(
p1_deck.iter().copied().take(p1_value).collect(),
p2_deck.iter().copied().take(p2_value).collect(),
) {
Winner::Player1(_) => {
p1_deck.push_back(p1_value);
p1_deck.push_back(p2_value);
}
Winner::Player2(_) => {
p2_deck.push_back(p2_value);
p2_deck.push_back(p1_value);
}
}
} else {
if p1_value > p2_value {
p1_deck.push_back(p1_value);
p1_deck.push_back(p2_value);
} else {
p2_deck.push_back(p2_value);
p2_deck.push_back(p1_value);
}
}
}
if p1_deck.is_empty() {
Winner::Player2(p2_deck)
} else {
Winner::Player1(p1_deck)
}
}

86
src/day23.rs Normal file
View File

@@ -0,0 +1,86 @@
use aoc_runner_derive::aoc;
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
struct Cup(u32);
impl Cup {
fn as_idx(self) -> usize {
self.0 as usize - 1
}
fn from_idx(idx: usize) -> Self {
Cup(idx as u32 + 1)
}
}
#[derive(Debug)]
struct Cups {
current: Cup,
cups: Box<[Cup]>,
}
impl Cups {
fn parse(input: &[u8], total_len: usize) -> Option<Self> {
let mut cups = vec![Cup(0); total_len];
let input_iter = input.iter().map(|x| (x - b'0') as u32).chain(input.len() as u32 + 1 ..= total_len as u32);
for (curr, next) in input_iter.clone().zip(input_iter.cycle().skip(1)) {
cups[curr as usize - 1] = Cup(next as u32);
}
Some(Cups {
current: Cup((input[0] - b'0') as u32),
cups: cups.into_boxed_slice(),
})
}
fn do_move(&mut self) {
let taken_1 = self.next_cup(self.current);
let taken_2 = self.next_cup(taken_1);
let taken_3 = self.next_cup(taken_2);
let mut dest_cup =
Cup::from_idx((self.current.as_idx() + self.cups.len() - 1) % self.cups.len());
Cup(((self.current.0 as usize - 1 + self.cups.len() - 1) % self.cups.len()) as u32 + 1);
while dest_cup == taken_1 || dest_cup == taken_2 || dest_cup == taken_3 {
dest_cup = Cup::from_idx((dest_cup.as_idx() + self.cups.len() - 1) % self.cups.len());
}
self.cups[self.current.as_idx()] = self.next_cup(taken_3);
self.cups[taken_3.as_idx()] = self.next_cup(dest_cup);
self.cups[dest_cup.as_idx()] = taken_1;
self.current = self.next_cup(self.current);
}
fn next_cup(&self, cup: Cup) -> Cup {
self.cups[cup.as_idx()]
}
fn iter(&self, starting_cup: Cup) -> impl Iterator<Item = Cup> + '_ {
std::iter::successors(Some(starting_cup), move |&prev_cup| {
Some(self.next_cup(prev_cup))
})
}
}
#[aoc(day23, part1)]
fn solve_d23_p1(input: &[u8]) -> usize {
let mut cups = Cups::parse(input, input.len()).unwrap();
for _ in 0..100 {
cups.do_move();
}
cups.iter(Cup(1))
.skip(1)
.take_while(|&cup| cup != Cup(1))
.fold(0, |accum, cup| accum * 10 + cup.0 as usize)
}
#[aoc(day23, part2)]
fn solve_d23_p2(input: &[u8]) -> usize {
let mut cups = Cups::parse(input, 1_000_000).unwrap();
for _ in 0..10_000_000 {
cups.do_move();
}
cups.iter(Cup(1))
.skip(1)
.take(2)
.map(|x| x.0 as usize)
.product()
}

159
src/day24.rs Normal file
View File

@@ -0,0 +1,159 @@
use aoc_runner_derive::aoc;
use std::collections::HashMap;
#[derive(Debug, Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash)]
struct Pos(isize, isize);
impl Pos {
fn step(self, dir: Direction) -> Self {
match dir {
Direction::E => Pos(self.0 + 2, self.1),
Direction::SE => Pos(self.0 + 1, self.1 -1),
Direction::SW => Pos(self.0 -1, self.1 -1),
Direction::W => Pos(self.0 -2, self.1),
Direction::NE => Pos(self.0 + 1, self.1 + 1),
Direction::NW => Pos(self.0 -1, self.1 + 1),
}
}
}
#[derive(Debug, Copy, Clone)]
enum Direction {
E,
SE,
SW,
W,
NW,
NE,
}
impl Direction {
fn parse(input: &[u8]) -> Option<(&[u8], Direction)> {
match input {
&[b's', b'e', ..] => Some((&input[2..], Direction::SE)),
&[b's', b'w', ..] => Some((&input[2..], Direction::SW)),
&[b'n', b'e', ..] => Some((&input[2..], Direction::NE)),
&[b'n', b'w', ..] => Some((&input[2..], Direction::NW)),
&[b'e', ..] => Some((&input[1..], Direction::E)),
&[b'w', ..] => Some((&input[1..], Direction::W)),
_ => None,
}
}
fn iter(input: &[u8]) -> impl Iterator<Item = Direction> + '_ {
struct Iter<'a>(&'a [u8]);
impl<'a> Iterator for Iter<'a> {
type Item = Direction;
fn next(&mut self) -> Option<Self::Item> {
match Direction::parse(self.0) {
None => None,
Some((rem, dir)) => {
self.0 = rem;
Some(dir)
}
}
}
}
Iter(input)
}
}
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
enum Tile {
Black,
White,
}
impl Tile {
fn flip(&mut self) {
*self = match *self {
Tile::Black => Tile::White,
Tile::White => Tile::Black,
};
}
}
#[aoc(day24, part1)]
fn solve_d24_p1(input: &str) -> usize {
let mut tiles: HashMap<_, usize> = HashMap::new();
for pos in input.split('\n').map(|line| {
Direction::iter(line.as_bytes()).fold(Pos(0, 0), |pos, dir| {
pos.step(dir)
})
}) {
*tiles.entry(pos).or_default() += 1;
}
tiles
.values()
.filter(|&times_flipped| times_flipped % 2 == 1)
.count()
}
#[aoc(day24, part2)]
fn solve_d24_p2(input: &str) -> usize {
let mut floor: HashMap<_, Tile> = HashMap::new();
for pos in input.split('\n').map(|line| {
Direction::iter(line.as_bytes()).fold(Pos(0, 0), |pos, dir| {
pos.step(dir)
})
}) {
floor.entry(pos).or_insert(Tile::White).flip()
}
for _ in 0..100 {
let mut tiles_visited = HashMap::new();
for &pos in floor.keys() {
run(&floor, &mut tiles_visited, pos);
}
for pos in tiles_visited
.into_iter()
.filter_map(|(k, should_flip)| if should_flip { Some(k) } else { None })
{
floor.entry(pos).or_insert(Tile::White).flip();
}
}
floor.values().filter(|&&tile| tile == Tile::Black).count()
}
fn run(
floor: &HashMap<Pos, Tile>,
tiles_visited: &mut HashMap<Pos, bool>,
pos: Pos,
) {
if tiles_visited.contains_key(&pos) {
return;
}
let n = neighbors(floor, pos);
let black_tiles = n
.iter()
.copied()
.filter(|&tile| tile == Tile::Black)
.count();
let tile = floor.get(&pos).copied().unwrap_or(Tile::White);
if (tile == Tile::Black && (black_tiles == 0 || black_tiles > 2))
|| (tile == Tile::White && black_tiles == 2)
{
tiles_visited.insert(pos, true);
} else {
tiles_visited.insert(pos, false);
}
if black_tiles > 0 {
run(floor, tiles_visited, pos.step(Direction::E));
run(floor, tiles_visited, pos.step(Direction::SE));
run(floor, tiles_visited, pos.step(Direction::SW));
run(floor, tiles_visited, pos.step(Direction::W));
run(floor, tiles_visited, pos.step(Direction::NE));
run(floor, tiles_visited, pos.step(Direction::NW));
}
}
fn neighbors(floor: &HashMap<Pos, Tile>, pos: Pos) -> [Tile; 6] {
[
floor.get(&pos.step(Direction::E)).copied().unwrap_or(Tile::White),
floor.get(&pos.step(Direction::SE)).copied().unwrap_or(Tile::White),
floor.get(&pos.step(Direction::SW)).copied().unwrap_or(Tile::White),
floor.get(&pos.step(Direction::W)).copied().unwrap_or(Tile::White),
floor.get(&pos.step(Direction::NE)).copied().unwrap_or(Tile::White),
floor.get(&pos.step(Direction::NW)).copied().unwrap_or(Tile::White),
]
}

33
src/day25.rs Normal file
View File

@@ -0,0 +1,33 @@
use crate::split_once;
use aoc_runner_derive::aoc;
const MOD: usize = 20201227;
#[aoc(day25, part1)]
fn solve_d25_p1(input: &str) -> usize {
let (pubkey1, pubkey2) = split_once(input, "\n").unwrap();
let pubkey1: usize = pubkey1.parse().unwrap();
let pubkey2: usize = pubkey2.parse().unwrap();
let loop_size = loop_size_from_pubkey(pubkey1);
encryption_key_from_pubkey(pubkey2, loop_size)
}
fn encryption_key_from_pubkey(pubkey: usize, loop_size: usize) -> usize {
let mut value = 1;
for _ in 0..loop_size {
value *= pubkey;
value %= MOD;
}
value
}
fn loop_size_from_pubkey(pubkey: usize) -> usize {
let mut loop_size = 0;
let mut value = 1;
while value != pubkey {
loop_size += 1;
value *= 7;
value %= MOD;
}
loop_size
}

101
src/day3.rs Normal file
View File

@@ -0,0 +1,101 @@
use std::convert::TryFrom;
use aoc_runner_derive::{aoc, aoc_generator};
#[derive(Debug)]
pub enum MapSquare {
Open,
Tree,
}
impl TryFrom<u8> for MapSquare {
type Error = u8;
fn try_from(b: u8) -> Result<MapSquare, u8> {
Ok(match b {
b'.' => MapSquare::Open,
b'#' => MapSquare::Tree,
unknown => return Err(unknown),
})
}
}
#[aoc_generator(day3)]
pub fn d3_input(input: &[u8]) -> Vec<Vec<MapSquare>> {
input
.split(|&b| b == b'\n')
.map(|line| {
line.iter()
.copied()
.map(|b| MapSquare::try_from(b).unwrap())
.collect()
})
.collect()
}
#[aoc(day3, part1)]
pub fn solve_d3_p1(input: &[Vec<MapSquare>]) -> usize {
input
.iter()
.skip(1)
.enumerate()
.map(|(steps_taken, grid_line)| {
let x_coord = (steps_taken + 1) * 3;
match grid_line.iter().cycle().nth(x_coord).unwrap() {
MapSquare::Open => 0,
MapSquare::Tree => 1,
}
})
.sum()
}
#[aoc(day3, part2)]
pub fn solve_d3_p2(input: &[Vec<MapSquare>]) -> usize {
#[derive(Debug, Clone, Copy)]
struct Step {
x_step: usize,
y_step: usize,
}
let steps = [
Step {
x_step: 1,
y_step: 1,
},
Step {
x_step: 3,
y_step: 1,
},
Step {
x_step: 5,
y_step: 1,
},
Step {
x_step: 7,
y_step: 1,
},
Step {
x_step: 1,
y_step: 2,
},
];
steps
.iter()
.copied()
.map(|Step { x_step, y_step }| -> usize {
input
.iter()
.skip(y_step)
.step_by(y_step)
.enumerate()
.map(|(num_steps_taken, grid_line)| {
let x_coord = (num_steps_taken + 1) * x_step;
match grid_line.iter().cycle().nth(x_coord).unwrap() {
MapSquare::Open => 0,
MapSquare::Tree => 1,
}
})
.sum()
})
.product()
}

190
src/day4.rs Normal file
View File

@@ -0,0 +1,190 @@
use std::str::FromStr;
use aoc_runner_derive::aoc;
#[derive(Debug)]
struct BirthYear(u16);
impl FromStr for BirthYear {
type Err = ();
fn from_str(s: &str) -> Result<BirthYear, ()> {
let year = s.parse().map_err(|_| ())?;
if year < 1920 || year > 2002 {
return Err(());
}
Ok(BirthYear(year))
}
}
#[derive(Debug)]
struct IssueYear(u16);
impl FromStr for IssueYear {
type Err = ();
fn from_str(s: &str) -> Result<IssueYear, ()> {
let year = s.parse().map_err(|_| ())?;
if year < 2010 || year > 2020 {
return Err(());
}
Ok(IssueYear(year))
}
}
#[derive(Debug)]
struct ExpYear(u16);
impl FromStr for ExpYear {
type Err = ();
fn from_str(s: &str) -> Result<ExpYear, ()> {
let year = s.parse().map_err(|_| ())?;
if year < 2020 || year > 2030 {
return Err(());
}
Ok(ExpYear(year))
}
}
#[derive(Debug)]
struct HairColor(u32);
impl FromStr for HairColor {
type Err = ();
fn from_str(s: &str) -> Result<HairColor, ()> {
let hex = s.strip_prefix("#").ok_or(())?;
let hcl = u32::from_str_radix(hex, 16).map_err(|_| ())?;
if hcl > 0xffffff {
return Err(());
}
Ok(HairColor(hcl))
}
}
#[derive(Debug)]
enum Height {
Inches(u8),
Cm(u8),
}
impl FromStr for Height {
type Err = ();
fn from_str(s: &str) -> Result<Height, ()> {
if let Some(cm) = s.strip_suffix("cm") {
let cm: u8 = cm.parse().map_err(|_| ())?;
if cm < 150 || cm > 193 {
return Err(());
}
Ok(Height::Cm(cm))
} else if let Some(inches) = s.strip_suffix("in") {
let inches: u8 = inches.parse().map_err(|_| ())?;
if inches < 59 || inches > 76 {
return Err(());
}
Ok(Height::Inches(inches))
} else {
Err(())
}
}
}
#[derive(Debug)]
enum EyeColor {
Amber,
Blue,
Brown,
Gray,
Green,
Hazel,
Other,
}
impl FromStr for EyeColor {
type Err = ();
fn from_str(s: &str) -> Result<EyeColor, ()> {
Ok(match s {
"amb" => EyeColor::Amber,
"blu" => EyeColor::Blue,
"brn" => EyeColor::Brown,
"gry" => EyeColor::Gray,
"grn" => EyeColor::Green,
"hzl" => EyeColor::Hazel,
"oth" => EyeColor::Other,
_ => return Err(()),
})
}
}
#[derive(Debug)]
struct PassportId(u32);
impl FromStr for PassportId {
type Err = ();
fn from_str(s: &str) -> Result<PassportId, ()> {
if s.len() != 9 {
return Err(());
}
Ok(PassportId(s.parse().map_err(|_| ())?))
}
}
#[derive(Debug)]
pub struct Passport<'a> {
byr: BirthYear,
iyr: IssueYear,
eyr: ExpYear,
hgt: Height,
hcl: HairColor,
ecl: EyeColor,
pid: PassportId,
cid: Option<&'a str>,
}
impl<'a> Passport<'a> {
fn parse(input: &'a str) -> Option<Self> {
fn parse_kv(input: &str) -> Option<(&str, &str)> {
let mut iter = input.split(':');
let k = iter.next()?;
let v = iter.next()?;
if iter.next().is_some() {
return None;
}
Some((k, v))
}
let mut byr = None;
let mut iyr = None;
let mut eyr = None;
let mut hgt = None;
let mut hcl = None;
let mut ecl = None;
let mut pid = None;
let mut cid = None;
for field in input.split_ascii_whitespace() {
match parse_kv(field) {
Some(("byr", value)) => byr = Some(value.parse().ok()?),
Some(("iyr", value)) => iyr = Some(value.parse().ok()?),
Some(("eyr", value)) => eyr = Some(value.parse().ok()?),
Some(("hgt", value)) => hgt = Some(value.parse().ok()?),
Some(("hcl", value)) => hcl = Some(value.parse().ok()?),
Some(("ecl", value)) => ecl = Some(value.parse().ok()?),
Some(("pid", value)) => pid = Some(value.parse().ok()?),
Some(("cid", value)) => cid = Some(value),
_ => return None,
}
}
Some(Passport {
byr: byr?,
iyr: iyr?,
eyr: eyr?,
hgt: hgt?,
hcl: hcl?,
ecl: ecl?,
pid: pid?,
cid,
})
}
}
#[aoc(day4, part2)]
pub fn solve_d4_p2(input: &str) -> usize {
input.split("\n\n").filter_map(Passport::parse).count()
}

78
src/day5.rs Normal file
View File

@@ -0,0 +1,78 @@
use aoc_runner_derive::aoc;
use std::fmt;
#[derive(Debug, Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
pub struct SeatId(u16);
impl fmt::Display for SeatId {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
impl SeatId {
fn parse(input: &[u8]) -> Option<SeatId> {
if input.len() != 10 {
return None;
}
let mut seatid = 0u16;
for b in &input[..7] {
let value = match b {
b'F' => 0,
b'B' => 1,
_ => return None,
};
seatid = (seatid << 1) | value;
}
for b in &input[7..10] {
let value = match b {
b'L' => 0,
b'R' => 1,
_ => return None,
};
seatid = (seatid << 1) | value;
}
Some(SeatId(seatid))
}
}
#[aoc(day5, part1)]
pub fn solve_d5_p1(input: &[u8]) -> SeatId {
input
.split(|&b| b == b'\n')
.map(|i| SeatId::parse(i).unwrap())
.max()
.unwrap()
}
#[aoc(day5, part2)]
pub fn solve_d5_p2(input: &[u8]) -> SeatId {
#[derive(Debug)]
struct MinMaxSum {
min: u16,
max: u16,
sum: u32,
}
let MinMaxSum { min, max, sum } = input
.split(|&b| b == b'\n')
.map(|i| SeatId::parse(i).unwrap())
.fold(
MinMaxSum {
min: u16::MAX,
max: 0,
sum: 0,
},
|MinMaxSum { min, max, sum }, seatid| MinMaxSum {
min: std::cmp::min(min, seatid.0),
max: std::cmp::max(max, seatid.0),
sum: sum + seatid.0 as u32,
},
);
let max = max as u32;
let min = min as u32;
let num_seats = max - min + 1;
let expected_sum = (max + min) * num_seats / 2;
SeatId((expected_sum - sum) as u16)
}

76
src/day6.rs Normal file
View File

@@ -0,0 +1,76 @@
use std::iter::FromIterator;
use aoc_runner_derive::aoc;
/// A set that can only contain b'a'..b'z';
struct AlphabetSet(u32);
impl AlphabetSet {
pub fn new() -> AlphabetSet {
AlphabetSet(0)
}
pub fn insert(&mut self, b: u8) {
self.0 |= 1 << Self::char_to_bit_index(b);
}
pub fn len(&self) -> usize {
self.0.count_ones() as usize
}
fn char_to_bit_index(b: u8) -> usize {
debug_assert!(b >= b'a' && b <= b'z');
(b as usize - 97) & 0x1f
}
}
// Do a set intersection with another set.
impl std::ops::BitAndAssign for AlphabetSet {
fn bitand_assign(&mut self, rhs: AlphabetSet) {
self.0 &= rhs.0;
}
}
impl FromIterator<u8> for AlphabetSet {
fn from_iter<I>(iter: I) -> AlphabetSet
where
I: IntoIterator<Item = u8>,
{
let mut set = AlphabetSet::new();
for entry in iter {
set.insert(entry);
}
set
}
}
#[aoc(day6, part1)]
pub fn solve_d6_p1(input: &str) -> usize {
input
.split("\n\n")
.map(|record| {
record
.split('\n')
.flat_map(|line| line.as_bytes())
.copied()
.collect::<AlphabetSet>()
.len()
})
.sum()
}
#[aoc(day6, part2)]
pub fn solve_d6_p2(input: &str) -> usize {
input
.split("\n\n")
.map(|record| {
let mut line_iter = record
.split('\n')
.map(|line| line.as_bytes().iter().copied().collect::<AlphabetSet>());
let mut group_set = line_iter.next().unwrap();
for set in line_iter {
group_set &= set;
}
group_set.len()
})
.sum()
}

167
src/day7.rs Normal file
View File

@@ -0,0 +1,167 @@
use aoc_runner_derive::aoc;
use std::collections::HashMap;
#[derive(Debug, Clone, PartialEq, Eq)]
struct BagPolicy<'a> {
color: &'a str,
contained_bags: Vec<ContainedBags<'a>>,
}
impl<'a> BagPolicy<'a> {
fn parse(input: &'a str) -> Option<Self> {
// example input:
// "light red bags contain 1 bright white bag, 2 muted yellow bags."
// "faded blue bags contain no other bags."
let mut iter = input.split(" bags contain ");
let color = iter.next()?;
let contained = iter.next()?;
if let Some(_) = iter.next() {
return None;
}
if contained == "no other bags." {
return Some(BagPolicy {
color,
contained_bags: Vec::new(),
});
}
let contained_bags = contained
.split(", ")
.map(|i| ContainedBags::parse(i))
.collect::<Option<Vec<_>>>()?;
Some(BagPolicy {
color,
contained_bags,
})
}
}
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
struct ContainedBags<'a> {
count: usize,
color: &'a str,
}
impl<'a> ContainedBags<'a> {
fn parse(input: &'a str) -> Option<Self> {
// example input: "5 faded blue bags"
let first_space_idx = input.find(' ')?;
let bag_color_end_idx = input.find(" bag")?;
let count = (&input[..first_space_idx]).parse().ok()?;
let color = &input[first_space_idx + 1..bag_color_end_idx];
Some(ContainedBags { count, color })
}
}
#[aoc(day7, part1)]
pub fn solve_d7_p1(input: &str) -> usize {
// Hashmap keyed by bag color and values are a list of bags that can directly enclose that bag.
let mut bag_graph: HashMap<&str, Vec<&str>> = HashMap::new();
for bag_policy in input.split('\n') {
let bag_policy = BagPolicy::parse(bag_policy).unwrap();
for contained_bag in bag_policy.contained_bags {
bag_graph
.entry(contained_bag.color)
.or_default()
.push(bag_policy.color);
}
}
find_transitive_enclosing_bags(&bag_graph, "shiny gold").len()
}
fn find_transitive_enclosing_bags<'a>(
graph: &HashMap<&str, Vec<&'a str>>,
color: &str,
) -> Vec<&'a str> {
fn _find_transitive_enclosing_bags<'a>(
graph: &HashMap<&str, Vec<&'a str>>,
color: &str,
output: &mut Vec<&'a str>,
) {
let enclosing_colors = match graph.get(color) {
None => return,
Some(enclosing_colors) => enclosing_colors,
};
output.extend(enclosing_colors);
for enclosing_color in enclosing_colors {
_find_transitive_enclosing_bags(graph, enclosing_color, output);
}
}
let mut output = Vec::new();
_find_transitive_enclosing_bags(graph, color, &mut output);
output.sort();
output.dedup();
output
}
#[aoc(day7, part2)]
pub fn solve_d7_p2(input: &str) -> usize {
let bag_policies = input
.split('\n')
.map(|line| {
let policy = BagPolicy::parse(line)?;
Some((policy.color, policy))
})
.collect::<Option<HashMap<_, _>>>()
.unwrap();
count_bags_inside(&bag_policies, "shiny gold")
}
fn count_bags_inside(graph: &HashMap<&str, BagPolicy>, color: &str) -> usize {
let policy = graph.get(color).unwrap();
policy
.contained_bags
.iter()
.map(|contained_bag| {
contained_bag.count * (1 + count_bags_inside(graph, contained_bag.color))
})
.sum()
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn parse_contained_bags() {
assert_eq!(
ContainedBags::parse("5 faded blue bags"),
Some(ContainedBags {
count: 5,
color: "faded blue"
})
);
}
#[test]
fn parse_bag_policy() {
assert_eq!(
BagPolicy::parse("light red bags contain 1 bright white bag, 2 muted yellow bags."),
Some(BagPolicy {
color: "light red",
contained_bags: vec![
ContainedBags {
count: 1,
color: "bright white",
},
ContainedBags {
count: 2,
color: "muted yellow",
},
],
}),
);
}
#[test]
fn test_part2() {
const INPUT: &str = r#"shiny gold bags contain 2 dark red bags.
dark red bags contain 2 dark orange bags.
dark orange bags contain 2 dark yellow bags.
dark yellow bags contain 2 dark green bags.
dark green bags contain 2 dark blue bags.
dark blue bags contain 2 dark violet bags.
dark violet bags contain no other bags."#;
assert_eq!(solve_d7_p2(INPUT), 126);
}
}

142
src/day8.rs Normal file
View File

@@ -0,0 +1,142 @@
use aoc_runner_derive::aoc;
#[derive(Debug, Copy, Clone)]
enum Instr {
Nop(isize),
Acc(isize),
Jmp(isize),
}
impl Instr {
fn parse(input: &str) -> Option<Instr> {
let space_idx = input.find(' ')?;
let (op, arg) = (&input[..space_idx], &input[space_idx + 1..]);
let arg = arg.parse().ok()?;
Some(match op {
"nop" => Instr::Nop(arg),
"acc" => Instr::Acc(arg),
"jmp" => Instr::Jmp(arg),
_ => return None,
})
}
}
#[derive(Debug, Clone)]
struct BitSet(Vec<u64>);
impl BitSet {
fn new(max_bits: usize) -> Self {
BitSet(vec![0; (max_bits - 1) / 64 + 1])
}
fn contains(&self, bit_idx: usize) -> bool {
let byte_idx = bit_idx / 64;
let bit_offset = bit_idx & 63;
self.0[byte_idx] & (1 << bit_offset) != 0
}
fn insert(&mut self, bit_idx: usize) {
let byte_idx = bit_idx / 64;
let bit_offset = bit_idx & 63;
self.0[byte_idx] |= 1 << bit_offset;
}
}
fn run_program(
program: &[Instr],
mut prev_instrs: BitSet,
mut pc: usize,
mut accum: isize,
) -> (usize, isize) {
while pc < program.len() {
if prev_instrs.contains(pc) {
return (pc, accum);
}
let (new_pc, new_accum) = step(program[pc], &mut prev_instrs, pc, accum);
pc = new_pc;
accum = new_accum;
}
(pc, accum)
}
fn step(instr: Instr, prev_instrs: &mut BitSet, mut pc: usize, mut accum: isize) -> (usize, isize) {
prev_instrs.insert(pc);
pc = match instr {
Instr::Nop(_) => pc + 1,
Instr::Acc(arg) => {
accum += arg;
pc + 1
}
Instr::Jmp(arg) => (pc as isize + arg) as usize,
};
(pc, accum)
}
#[aoc(day8, part1)]
pub fn solve_d8_p1(input: &str) -> isize {
let program = input
.split('\n')
.map(|line| Instr::parse(line))
.collect::<Option<Vec<_>>>()
.unwrap();
run_program(&program, BitSet::new(program.len()), 0, 0).1
}
#[aoc(day8, part2)]
pub fn solve_d8_p2(input: &str) -> isize {
let mut program = input
.split('\n')
.map(|line| Instr::parse(line))
.collect::<Option<Vec<_>>>()
.unwrap();
let mut pc = 0;
let mut accum = 0;
let mut prev_instrs = BitSet::new(program.len());
loop {
match program[pc] {
Instr::Nop(arg) => {
program[pc] = Instr::Jmp(arg);
let (new_pc, new_accum) = run_program(&program, prev_instrs.clone(), pc, accum);
if new_pc == program.len() {
return new_accum;
}
program[pc] = Instr::Nop(arg);
}
Instr::Jmp(arg) => {
program[pc] = Instr::Nop(arg);
let (new_pc, new_accum) = run_program(&program, prev_instrs.clone(), pc, accum);
if new_pc == program.len() {
return new_accum;
}
program[pc] = Instr::Jmp(arg);
}
_ => {}
}
let (new_pc, new_accum) = step(program[pc], &mut prev_instrs, pc, accum);
pc = new_pc;
accum = new_accum;
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_bitset() {
let mut bs = BitSet::new(192);
for bit in 0..191 {
assert!(!bs.contains(bit));
}
bs.insert(5);
assert!(bs.contains(5));
bs.insert(191);
assert!(bs.contains(191));
bs.insert(63);
assert!(bs.contains(63));
bs.insert(64);
assert!(bs.contains(64));
bs.insert(65);
assert!(bs.contains(65));
}
}

99
src/day9.rs Normal file
View File

@@ -0,0 +1,99 @@
use aoc_runner_derive::aoc;
use std::collections::HashSet;
struct Preamble {
entries: [usize; 25],
entries_start_idx: usize,
set: HashSet<usize>,
}
impl Preamble {
// Take the first 25 items from the iterator.
fn new<I>(iter: &mut I) -> Option<Self>
where
I: Iterator<Item = usize>,
{
let mut entries = [0; 25];
let mut set = HashSet::new();
let mut count = 0;
for (idx, entry) in iter.enumerate().take(25) {
count += 1;
entries[idx] = entry;
set.insert(entry);
}
if count != 25 {
return None;
}
Some(Preamble {
entries,
entries_start_idx: 0,
set,
})
}
// Insert a new entry into the preamble letting the oldest one roll off.
fn insert(&mut self, entry: usize) {
self.set.remove(&self.entries[self.entries_start_idx]);
self.set.insert(entry);
self.entries[self.entries_start_idx] = entry;
self.entries_start_idx = (self.entries_start_idx + 1) % 25;
}
fn find_sum_pair(&self, total: usize) -> Option<(usize, usize)> {
for idx in 0..25 {
let entry = self.entries[(self.entries_start_idx + idx) % 25];
if entry <= total {
let needed = total - entry;
if self.set.contains(&needed) {
return Some((entry, needed));
}
}
}
None
}
}
#[aoc(day9, part1)]
pub fn solve_d9_p1(input: &str) -> usize {
let mut iter = input.split('\n').map(|x| -> usize { x.parse().unwrap() });
let mut preamble = Preamble::new(&mut iter).unwrap();
for entry in iter {
if preamble.find_sum_pair(entry).is_none() {
return entry;
}
preamble.insert(entry);
}
panic!("not found");
}
#[aoc(day9, part2)]
pub fn solve_d9_p2(input: &str) -> usize {
const EXPECTED_SUM: usize = 36845998;
let entries: Vec<usize> = input
.split('\n')
.map(|x| -> usize { x.parse().unwrap() })
.collect();
let mut sum = 0;
let mut start_idx = 0;
let mut end_idx = 0;
loop {
if sum < EXPECTED_SUM {
sum += entries[end_idx];
end_idx += 1;
} else if sum > EXPECTED_SUM {
sum -= entries[start_idx];
start_idx += 1;
} else {
let (min, max) = &entries[start_idx..end_idx]
.iter()
.copied()
.fold((usize::MAX, 0), |(min, max), entry| {
(std::cmp::min(min, entry), std::cmp::max(max, entry))
});
return min + max;
}
}
}

View File

@@ -1,75 +1,32 @@
use aoc_runner_derive::{aoc_lib, aoc};
pub mod day1;
pub mod day10;
pub mod day11;
pub mod day12;
pub mod day13;
pub mod day14;
pub mod day15;
pub mod day16;
pub mod day17;
pub mod day18;
pub mod day19;
pub mod day2;
pub mod day20;
pub mod day21;
pub mod day22;
pub mod day23;
pub mod day24;
pub mod day25;
pub mod day3;
pub mod day4;
pub mod day5;
pub mod day6;
pub mod day7;
pub mod day8;
pub mod day9;
#[aoc(day1, part1)]
pub fn solve_d1_p1(input: &str) -> u64 {
let mut entries: Vec<u64> = input.split('\n').map(|x| x.parse().unwrap()).collect();
entries.sort();
for entry in &entries {
let needed = 2020 - entry;
if let Ok(idx) = entries.binary_search(&needed) {
return entry * entries[idx];
}
}
panic!("not found");
aoc_runner_derive::aoc_lib! { year = 2020 }
fn split_once<'a>(input: &'a str, delimeter: &str) -> Option<(&'a str, &'a str)> {
let idx = input.find(delimeter)?;
Some((&input[..idx], &input[idx + delimeter.len()..]))
}
#[aoc(day1, part2)]
pub fn solve_d1_p2(input: &str) -> Option<u64> {
let mut entries: Vec<u64> = input.split('\n').map(|x| x.parse().unwrap()).collect();
entries.sort();
for i in 0 .. entries.len()-2 {
let entry1 = entries[i];
for j in i+1 .. entries.len()-1 {
let entry2 = entries[j];
if entry1 + entry2 > 2020 {
break;
}
for k in j+1 .. entries.len() {
let entry3 = entries[k];
if entry1 + entry2 + entry3 == 2020 {
return Some(entry1 * entry2 * entry3)
}
}
}
}
return None
}
#[aoc(day2, part1)]
pub fn solve_d2_p1(input: &str) -> usize {
fn line_is_valid(mut line: &str) -> bool {
let lb_idx = line.find('-').unwrap();
let lb: usize = (&line[..lb_idx]).parse().unwrap();
line = &line[lb_idx+1..];
let ub_idx = line.find(' ').unwrap();
let ub: usize = (&line[..ub_idx]).parse().unwrap();
line = &line[ub_idx+1..];
let letter = line.as_bytes()[0];
let passwd = &line[3..];
let count = passwd.bytes().filter(|&b| b == letter).count();
count >= lb && count <= ub
}
input.split('\n').filter(|x| line_is_valid(x)).count()
}
#[aoc(day2, part2)]
pub fn solve_d2_p2(input: &str) -> usize {
fn line_is_valid(mut line: &str) -> bool {
let lb_idx = line.find('-').unwrap();
let lb: usize = (&line[..lb_idx]).parse().unwrap();
line = &line[lb_idx+1..];
let ub_idx = line.find(' ').unwrap();
let ub: usize = (&line[..ub_idx]).parse().unwrap();
line = &line[ub_idx+1..];
let letter = line.as_bytes()[0];
let passwd = &line[3..].as_bytes();
(passwd[lb-1] == letter) ^ (passwd[ub-1] == letter)
}
input.split('\n').filter(|x| line_is_valid(x)).count()
}
aoc_lib!{ year = 2020 }

3
src/main.rs Normal file
View File

@@ -0,0 +1,3 @@
use aoc_runner_derive::aoc_main;
aoc_main! { lib = aoc }