Compare commits

...

69 commits

Author SHA1 Message Date
4cbcb7e0c2 test.sh: iterate over all days 2021-12-01 08:26:02 +01:00
8e1fcf87c4 2021 day1/rust: add solution 2021-12-01 08:24:26 +01:00
82e362ecdf 2021 day1: add data 2021-12-01 08:24:08 +01:00
475d40bf90 day21: add python solution 2021-11-30 17:06:48 +01:00
6c1a8a5699 gitignore: ignore haskell build artifacts 2021-11-30 17:06:48 +01:00
372fde8d69 day24: add haskell solution 2021-11-30 17:06:48 +01:00
3dd4b45eba Move conway to common/ 2021-11-30 17:06:48 +01:00
8bde0a6ce9 day17: add haskell solution 2021-11-30 17:06:48 +01:00
b8d9eb70ac day19: add haskell solution 2021-11-30 17:06:48 +01:00
f84d404eb9 day18: add haskell solution 2021-11-30 17:06:48 +01:00
5bf3f4e0ce day16/haskell: readability improvements 2021-11-30 17:06:48 +01:00
873ea19b8d day14/haskell: replace map-filter-enumerate with findIndices 2021-11-30 17:06:48 +01:00
6dee5caf29 day16/haskell: prettify findSingletonChoice 2021-11-30 17:06:48 +01:00
477f518531 day16/haskell: rename iterateUntilDone to iterateUntilNothing 2021-11-30 17:06:48 +01:00
499c02756e day16: add haskell solution 2021-11-30 17:06:48 +01:00
1295c5f720 day15: add python solution 2021-11-30 17:06:48 +01:00
fbc4917943 day14: add haskell solution 2021-11-30 17:06:48 +01:00
f14cd294c2 day2: add haskell solution 2021-11-30 17:06:48 +01:00
7c5dc39073 day11/python: optimizations 2021-11-30 17:06:48 +01:00
29a768fdf8 test.sh: ignore all example* files 2021-11-30 17:06:48 +01:00
0f3334d99f day13: add haskell solution 2021-11-30 17:06:48 +01:00
32f676dcd7 day10: add haskell solution 2021-11-30 17:06:48 +01:00
c40425cb4e test.sh: allow empty directories 2021-11-30 17:06:48 +01:00
cb5372410c day11: add python solution 2021-11-30 17:06:48 +01:00
d52596530a Add gitignore 2021-11-30 17:06:48 +01:00
df0aa288c5 day9: add haskell solution 2021-11-30 17:06:48 +01:00
7997b49c61 README: update 2021-11-30 17:06:48 +01:00
097a2dc025 README: fix typo 2021-11-30 17:06:48 +01:00
d9fcfcba9f test.sh: skip hidden files and example.txt 2021-11-30 17:06:48 +01:00
6935837ed2 test.sh: fix removal of test output files 2021-11-30 17:06:48 +01:00
bad4db3946 day8: add haskell solution 2021-11-30 17:06:48 +01:00
73dc7182c7 haskell: remove unused import 2021-11-30 17:06:48 +01:00
826de9381d haskell: explicitly export functions from AoC module 2021-11-30 17:06:48 +01:00
5b1515f6ee test.sh: write errors to stdout
stdout is swallowed by the result verification
2021-11-30 17:06:48 +01:00
9b12fb9d02 day7/python: rename functions 2021-11-30 17:06:48 +01:00
3566e499b6 day7: add python solution 2021-11-30 17:06:48 +01:00
52465a9380 day4/haskell: prettify 2021-11-30 17:06:48 +01:00
f717860fe3 Revert "day2/vhdl: workaround ghdl#1529"
This reverts commit 7ae2f5a4af.
2021-11-30 17:06:48 +01:00
f8f2470b12 README: update 2021-11-30 17:06:48 +01:00
c5eb7888ac add test script 2021-11-30 17:06:48 +01:00
553d79f66c add test data 2021-11-30 17:06:28 +01:00
86d6c4a80f day2/vhdl: allow script to be run from outside its basedir 2020-12-06 16:39:41 +01:00
f989d052be day2/vhdl: don't simulate synthesized design by default 2020-12-06 16:39:29 +01:00
6bcb64280d day4/haskell: fix wrongly removed import 2020-12-06 16:39:29 +01:00
58ab8238f8 read problem inputs from stdin 2020-12-06 16:39:29 +01:00
d6f5591e66 day6: add haskell solution 2020-12-06 07:38:48 +01:00
8a359603d5 haskell: simplify runAoC invocations 2020-12-06 07:38:27 +01:00
9aefab8549 haskell: don't force concatenation in splitOnEmptyLines 2020-12-06 07:38:26 +01:00
51aaea90dc haskell: move splitOnEmptyLines to AoC.hs 2020-12-06 07:38:26 +01:00
98c1af4d58 README.md: update 2020-12-05 11:24:59 +01:00
b88afd44e0 day5: add haskell solution 2020-12-05 10:21:57 +01:00
38cac26cb7 haskell: move oneCompleteResult to AoC module 2020-12-05 10:21:09 +01:00
8bb03a8dcd haskell: add simple run harness 2020-12-05 09:53:51 +01:00
9331250c28 day4/haskell: fix typo 2020-12-04 16:14:16 +01:00
23e5f473c0 day4/python: fix last passport not being read 2020-12-04 15:39:48 +01:00
e8f88e8b3c day4: add haskell parser solution 2020-12-04 15:39:43 +01:00
793eefc817 day3/haskell: make it more readable 2020-12-04 10:34:46 +01:00
eecf2c2f35 day4: add pythong solution 2020-12-04 10:12:53 +01:00
4ec5908454 day3: add haskell solution 2020-12-03 22:33:03 +01:00
e76f855d05 day3: add python solution 2020-12-03 20:10:48 +01:00
cdfec86112 day2/vhdl: update gitignore 2020-12-02 21:21:12 +01:00
377e7d3e57 day2/vhdl: also run synthesized version 2020-12-02 21:19:33 +01:00
7ae2f5a4af day2/vhdl: workaround ghdl#1529
https://github.com/ghdl/ghdl/pull/1529
2020-12-02 21:19:19 +01:00
1b2695c305 README: add overview table 2020-12-02 12:09:14 +01:00
a34a10b15e day2: add VHDL solution 2020-12-02 11:10:43 +01:00
066513b45a day1: add haskell solution 2020-12-02 10:12:00 +01:00
feda46249b day2: add python solution 2020-12-02 08:02:49 +01:00
03abb1a5ae day1: modify python for part2 2020-12-01 16:50:45 +01:00
b4004fd75f day1: add python part1 2020-12-01 16:40:10 +01:00
82 changed files with 14167 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
target/

3
2020/.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
example*
*.hi
*.o

View file

@ -1,3 +1,34 @@
# Solutions for Advent of Code 2020 # Solutions for Advent of Code 2020
https://adventofcode.com/2020/ https://adventofcode.com/2020/
## Overview
|day| python | haskell | VHDL |
|---|--------|---------|------|
| 1 | `**` | `**` | |
| 2 | `**` | `**` | `**` |
| 3 | `**` | `**` | |
| 4 | `**` | `**` | |
| 5 | | `**` | |
| 6 | | `**` | |
| 7 | `**` | | |
| 8 | | `**` | |
| 9 | | `**` | |
|10 | | `**` | |
|11 | `**` | | |
|12 | | | |
|13 | | `**` | |
|14 | | `**` | |
|15 | `**` | | |
|16 | | `**` | |
|17 | | `**` | |
|18 | | `**` | |
|19 | | `**` | |
|20 | | | |
|21 | `**` | | |
|22 | | | |
|23 | | | |
|24 | | `**` | |
`test.sh` can be used to run all solutions and automatically compares them to (my) puzzle inputs and the expected outputs.

34
2020/common/AoC.hs Normal file
View file

@ -0,0 +1,34 @@
module AoC
( (.:)
, enumerate
, oneCompleteResult
, splitOnEmptyLines
, runAoC
)
where
import Data.Function (on)
import Data.List (groupBy)
import Text.ParserCombinators.ReadP
(.:) :: (c -> d) -> (a -> b -> c) -> a -> b -> d
f .: g = (f .) . g
infixl 8 .:
enumerate :: Enum i => i -> [a] -> [(i, a)]
enumerate _ [] = []
enumerate i (x:xs) = (i, x) : enumerate (succ i) xs
oneCompleteResult :: ReadP a -> String -> Maybe a
oneCompleteResult p s = case readP_to_S (p <* eof) s of
[(x, "")] -> Just x
_ -> Nothing
splitOnEmptyLines :: String -> [[String]]
splitOnEmptyLines = filter (not . any null) . groupBy ((==) `on` null) . lines
runAoC :: (Show r1, Show r2) => (String -> i) -> (i -> r1) -> (i -> r2) -> IO ()
runAoC inputTransform part1 part2 = do
contents <- inputTransform <$> getContents
print $ part1 contents
print $ part2 contents

28
2020/common/Conway.hs Normal file
View file

@ -0,0 +1,28 @@
module Conway
( Index(..)
, update
)
where
import Data.List
import qualified Data.Vector.Sized as V
import Data.Map (Map)
import qualified Data.Map as M
import Data.Set (Set)
import qualified Data.Set as S
class Index i where
neighbours :: i -> [i]
addIndex :: i -> i -> i
counts :: Ord a => [a] -> Map a Int
counts = M.fromList . map (\xs -> (head xs, length xs)) . group . sort
neighbourCounts :: (Index i, Ord i) => Set i -> Map i Int
neighbourCounts = counts . concatMap neighbours . S.elems
update :: (Index i, Ord i) => (Int -> Bool) -> (Int -> Bool) -> Set i -> Set i
update create destroy old = M.keysSet $ M.filterWithKey shouldLive $ M.fromSet (flip (M.findWithDefault 0) nCounts) indices
where nCounts = neighbourCounts old
indices = S.union old $ M.keysSet nCounts
shouldLive ix n = if S.notMember ix old then create n else not $ destroy n

2
2020/data/day1.expected Normal file
View file

@ -0,0 +1,2 @@
1018336
288756720

200
2020/data/day1.input Normal file
View file

@ -0,0 +1,200 @@
1028
1987
1938
1136
1503
1456
1107
1535
1946
1986
855
1587
1632
1548
1384
1894
1092
1876
1914
1974
1662
1608
2004
1464
1557
1485
1267
1582
1307
1903
1102
1578
1421
1184
1290
1786
1295
1930
1131
1802
1685
1735
1498
1052
1688
990
1805
1768
1922
1781
1897
1545
1591
1393
1186
149
1619
1813
1708
1119
1214
1705
1942
1684
1460
1123
1439
1672
1980
1337
1731
1203
1481
2009
1110
1116
1443
1957
1891
1595
1951
1883
1733
1697
1321
1689
1103
1300
1262
1190
1667
1843
1544
1877
1718
1866
1929
1169
1693
1518
1375
1477
1222
1791
1612
1373
1253
1087
1959
1970
1112
1778
1412
1127
1767
1091
1653
1609
1810
1912
1917
935
1499
1878
1452
1935
1937
968
1905
1077
1701
1789
1506
1451
1125
1686
1117
1991
1215
1776
1976
846
1923
1945
1888
1193
1146
1583
1315
1372
1963
1491
1777
1799
1363
1579
1367
1863
1983
1679
1944
1654
1953
1297
530
1502
1738
1934
1185
1998
1764
1856
1207
1181
1494
1676
1900
1057
339
1994
2006
1536
2007
644
1173
1692
1493
1756
1916
1890
1908
1887
1241
1447
1997
1967
1098
1287
1392
1932

2
2020/data/day10.expected Normal file
View file

@ -0,0 +1,2 @@
1885
2024782584832

93
2020/data/day10.input Normal file
View file

@ -0,0 +1,93 @@
80
87
10
122
57
142
134
59
113
139
101
41
138
112
46
96
43
125
36
54
133
17
42
98
7
114
78
67
77
28
149
58
20
105
31
19
18
27
40
71
117
66
21
72
146
90
97
94
123
1
119
30
84
61
91
118
2
29
104
73
13
76
24
148
68
111
131
83
49
8
132
9
64
79
124
95
88
135
3
51
39
6
60
108
14
35
147
89
34
65
50
145
128

2
2020/data/day11.expected Normal file
View file

@ -0,0 +1,2 @@
2275
2121

98
2020/data/day11.input Normal file
View file

@ -0,0 +1,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.L.LLLLLL.LLLLLL.LLLLLLLL.LLLLLLLLLLLLLLLLL.LLLLLLLL
LLLLLLLLL.LLLL.LLLLL.LLLLLL.LLLLLLLL.LLLLLLLLLLL.LLLLLL.LLLLLLLL.LLLLLLLLL.LLLLLLL.LLLLLLLL
LLLLLLLLL.LLLLLLLLLL.LLLLLL.LLLLL.LLLLLLL.LL.LLL.LLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLL..LLLLLLLL
LLLLLLLLLLLLLL.LLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLLL.LLLLLLLLL.LLLLLLLLLL.LLLLL

2
2020/data/day13.expected Normal file
View file

@ -0,0 +1,2 @@
2215
1058443396696792

2
2020/data/day13.input Normal file
View file

@ -0,0 +1,2 @@
1005162
19,x,x,x,x,x,x,x,x,41,x,x,x,x,x,x,x,x,x,823,x,x,x,x,x,x,x,23,x,x,x,x,x,x,x,x,17,x,x,x,x,x,x,x,x,x,x,x,29,x,443,x,x,x,x,x,37,x,x,x,x,x,x,13

2
2020/data/day14.expected Normal file
View file

@ -0,0 +1,2 @@
12512013221615
3905642473893

572
2020/data/day14.input Normal file
View file

@ -0,0 +1,572 @@
mask = 101XX10X1X00001010011011X1XXX1001011
mem[12898] = 4515455
mem[39269] = 262864
mem[15998] = 27
mem[4565] = 896581
mem[35263] = 872262
mask = 110X1111000X000111001XX0110X010111XX
mem[5436] = 29453
mem[405] = 4591187
mem[36544] = 119659504
mem[4590] = 1754617
mask = 11001111000100XX11000000000XX0X0X001
mem[18971] = 65392
mem[12898] = 60445914
mem[51566] = 8117
mem[7267] = 99056
mem[25605] = 978
mem[33329] = 437436
mask = 10X0X100X00000101X0X0001111111X101XX
mem[43594] = 7609
mem[12898] = 126982257
mem[15065] = 4039
mask = 11XX11XX000100X10110111001101000X110
mem[2358] = 139154
mem[48424] = 361
mask = X00X0X000101010111111000X11001000111
mem[60868] = 1012242539
mem[13504] = 114153
mem[51015] = 34551413
mem[43984] = 708156
mem[58774] = 436301
mem[15489] = 243282402
mem[10963] = 81839
mask = 1001000X1100001001001101XX01000001X0
mem[63618] = 3428738
mem[16270] = 289636637
mem[45847] = 271443
mem[38518] = 2789
mask = X0010X000101X00111110010101010X001X1
mem[56985] = 14253068
mem[10578] = 869930
mask = 10000100010100010X11X01X00X011010001
mem[31893] = 32746
mem[57677] = 1423
mem[43667] = 94853349
mem[7624] = 76941001
mem[20508] = 1273351
mask = 10XX00100011X0X0110XX1X10011XX111000
mem[28963] = 125041
mem[42777] = 251362
mem[34873] = 155374451
mem[29355] = 886081
mem[16775] = 57795906
mem[42311] = 10111
mem[30652] = 4443965
mask = 10000111XX000001X1X0X001011110X00111
mem[31369] = 31024146
mem[23234] = 1046769566
mask = 00XX1010XX1X001011010111X11X1010011X
mem[20251] = 3138
mem[23672] = 28276
mem[48425] = 304
mem[51384] = 6985
mask = 110X011X00000001X100111001X010010X0X
mem[44366] = 985
mem[47430] = 127814906
mem[34576] = 41033794
mem[58183] = 11571792
mask = XX0001X0010100011X11101010000101X011
mem[47311] = 897443
mem[47179] = 457654457
mask = X100X11100010X0XX10X1000X11001001100
mem[57561] = 38620862
mem[63945] = 78
mem[37164] = 2722
mask = 0000XXXX0011XX0XX1110010X10000111000
mem[52440] = 14680631
mem[10040] = 482410861
mem[31369] = 1312217
mask = 10X1X0001000X01111X01011100111111001
mem[33657] = 127832235
mem[59700] = 232182856
mem[64183] = 32458630
mem[13528] = 56706903
mask = 00XX110X0X0XX00111010101X001110111X0
mem[34491] = 23031313
mem[16152] = 2473
mem[46572] = 58257
mask = 11X1011X00000001010XXX1010X10000X000
mem[36932] = 54890
mem[17249] = 518900642
mem[58586] = 27068931
mask = 1100011X0000X00111001000X00011X11001
mem[4203] = 11690902
mem[20122] = 399199895
mem[32417] = 379534
mem[50520] = 3253466
mem[23645] = 12184122
mask = 100000X00001010011X01011100X0010X010
mem[59410] = 3462
mem[51849] = 231731736
mem[31141] = 17505
mem[2661] = 20669501
mem[57030] = 225241
mem[37965] = 4947
mem[37475] = 120
mask = 10XX01110001000XX10001X0101111000011
mem[54239] = 21386681
mem[25423] = 49927683
mem[17991] = 24735
mem[26742] = 66457157
mask = 10000100100X00100X011X11100X10100100
mem[42442] = 2898
mem[33841] = 98213928
mem[1295] = 436390
mem[20533] = 26130
mask = 00X0001X000X000011001X1010000X101101
mem[12898] = 85396
mem[17781] = 96765096
mem[23645] = 156257533
mem[41542] = 25550
mem[23694] = 19768
mask = 00000000X0111101X11101110110X01X0001
mem[30165] = 9659654
mem[17417] = 840
mem[38700] = 20540407
mem[17514] = 266223622
mask = 1X0X0X100001000011001000101X11X0XX11
mem[1187] = 2633
mem[49568] = 13636
mem[41073] = 2493
mem[42442] = 562308
mask = 10000XXX0001000X1100010X111111000001
mem[18887] = 22856
mem[7241] = 580581
mem[20501] = 15343308
mem[8329] = 9182
mem[30265] = 1720165
mem[55589] = 56956
mem[56070] = 99398329
mask = 11X0111100010001X1X0101X0011X01XX1XX
mem[22677] = 289814
mem[57909] = 24289535
mem[2053] = 96654349
mem[12868] = 30681
mem[28491] = 26428
mem[52407] = 644
mem[26000] = 1537
mask = 100001X11100X00X0110010X111X100X0110
mem[61720] = 4504409
mem[18231] = 20747971
mem[7557] = 40802
mem[8177] = 1825
mem[16963] = 831395
mem[58488] = 32600
mask = 10000X001000001XX1XX101111X11X100XX1
mem[23493] = 1676
mem[14482] = 39198509
mem[12119] = 277
mem[34873] = 839193094
mem[59700] = 213967901
mem[44792] = 4486
mask = 11101111XX0X00010X100X101XX100000X00
mem[21304] = 749
mem[17415] = 1039713731
mem[56228] = 1653
mask = 0000X0X000X1X000X1XXX01000100010100X
mem[54745] = 258440
mem[9496] = 1382
mem[677] = 160442786
mem[18231] = 118264
mem[3314] = 7774920
mem[48978] = 58150
mask = 11010X11000000X1110011100X001001X0X0
mem[11295] = 1701
mem[43085] = 35120466
mem[36184] = 717214
mem[11085] = 797499853
mem[50040] = 100884
mem[12868] = 76327
mem[1094] = 17127824
mask = X1X0111100000001X100100111101111X000
mem[23009] = 56150703
mem[62945] = 187456
mem[16270] = 2148
mem[6558] = 226
mem[18104] = 116620
mask = 1100111X000100010X0X1XX0111101X00X1X
mem[20277] = 41195
mem[55507] = 497048
mem[65060] = 1392113
mem[39631] = 729
mem[20012] = 221
mem[38700] = 157
mask = 1011110X1100001010XX01X111X111X01110
mem[50095] = 329773464
mem[19363] = 23694
mem[23187] = 136735746
mem[41305] = 248581
mem[60810] = 36613
mask = 11X1010000000001X00001X0010010111X10
mem[23234] = 315410359
mem[61681] = 3806597
mem[57545] = 205794
mem[8173] = 743124
mem[33142] = 2265923
mem[50325] = 338694
mask = 11101XX10001X001X100101X0X11101000X0
mem[10886] = 92
mem[31621] = 49382572
mem[40094] = 381691821
mem[22404] = 25092613
mem[26046] = 540575313
mask = 1100X110000X000100X01X0X0X00X0X00001
mem[6401] = 12044
mem[51779] = 1254732
mem[49213] = 14771072
mask = 11001X1100X10X0111001110X10X0XX00100
mem[17960] = 1810
mem[58879] = 14547554
mask = 10110010X01110X01101000101100X011X01
mem[6271] = 43039
mem[42035] = 308023
mem[61809] = 14965999
mem[14482] = 22965
mask = 1000011111000X0X0110X111X1001XX00110
mem[34865] = 521885574
mem[32874] = 47758845
mem[49758] = 486116428
mem[4620] = 436
mem[8795] = 37336
mem[35355] = 1913
mem[24155] = 5028
mask = 100X00X100XXX0X011X111000001X00X1001
mem[12898] = 326718882
mem[41304] = 2217
mem[512] = 252187
mask = 00001X10X0111X0X01100010001010110011
mem[17133] = 9763003
mem[53861] = 20374202
mem[12411] = 11146
mem[44155] = 70710
mem[18558] = 1014374
mem[8244] = 27394
mask = 1100111100010X0X110X10X1X1110X100100
mem[6255] = 15673046
mem[27448] = 617665
mem[17549] = 1391
mem[9254] = 1191392
mask = 1110111X00010001X11XX110X01110100001
mem[27269] = 915739
mem[17886] = 2414578
mem[23234] = 10312308
mask = 1000111100010X01110X0101XX1010100001
mem[14210] = 3945538
mem[53570] = 152079
mem[42311] = 804
mem[20501] = 7528
mem[62486] = 44029
mask = 1X1X110X1X0X0010100001X111X11X10110X
mem[31020] = 10294
mem[36367] = 173644419
mem[3344] = 55087
mem[22404] = 3768102
mask = 0X000010000X00X01100XX1000110X001101
mem[8146] = 32084685
mem[25356] = 204754
mem[53100] = 31087
mem[16162] = 43271515
mem[7495] = 248175354
mask = 0X00111X000100000111000011000X11000X
mem[48425] = 16845
mem[21120] = 5932031
mem[18984] = 5971079
mem[22024] = 1139029
mem[57772] = 8264
mask = 1000X1X111X00000011001001X01X1000X11
mem[29416] = 214197264
mem[23107] = 16163
mem[35947] = 392
mem[3969] = 18827505
mask = 1X001111000XX10X1101110001X111100000
mem[23664] = 824737
mem[35051] = 6316
mem[23107] = 3396
mem[23133] = 93865
mask = 101000100011X000110101010110XX01010X
mem[64539] = 503222475
mem[49280] = 222415
mem[4908] = 6056
mask = X11011110001000111X000110X100X111101
mem[63002] = 227835267
mem[62736] = 2687
mem[35355] = 13135677
mem[30575] = 34622509
mem[6958] = 8289
mask = 1100111100X1X00111101011001110XXX011
mem[38931] = 50025
mem[5213] = 488636
mem[16162] = 6370
mem[49918] = 27948504
mem[10972] = 32144736
mem[25810] = 23808695
mem[59308] = 573239
mask = 1000001000X10X001100X011X01X11100X01
mem[8119] = 1356
mem[18765] = 16001283
mem[40681] = 81290249
mem[12898] = 1301
mem[26361] = 20784743
mem[27679] = 142542224
mask = 101X001X001X00001X0X0110001X111X01X1
mem[35355] = 805383617
mem[61993] = 4078154
mem[17549] = 1577966
mem[5900] = 111957340
mask = 0000001000010XX01X000000000100X10001
mem[14482] = 203210
mem[40789] = 103701945
mem[60901] = 165096
mem[9784] = 16634
mem[58840] = 2959
mask = 0X0000100001010XX1X0101X001X01X010XX
mem[35677] = 923584
mem[38170] = 52214160
mem[59710] = 917580
mem[28352] = 9711
mem[24738] = 527299
mask = 111XX100100100X0XXX0010111011010100X
mem[48324] = 113818619
mem[46099] = 22968630
mem[2047] = 7513744
mem[16084] = 22059
mem[3484] = 7934120
mask = 100001X00X01000111XX110010X1X0011X01
mem[40970] = 582049676
mem[43326] = 33149
mem[28352] = 8866951
mem[8571] = 5223
mask = X10100100XX1000011001X00100011000010
mem[57677] = 10736612
mem[44008] = 27644
mem[51849] = 54378
mem[20005] = 5582059
mem[23107] = 9832268
mem[57561] = 40400
mask = 11101111000X0001X10X10X10X1X10X010X0
mem[29968] = 89927661
mem[56] = 1989163
mem[7557] = 17453
mem[33361] = 9
mem[43444] = 78638
mem[12248] = 54497991
mem[35709] = 2765740
mask = 110XX1X00000000X0X00110000X0000001X0
mem[34491] = 13649
mem[26000] = 980
mask = 0X0000100X010100X1X0X000010001100101
mem[7504] = 2704
mem[41073] = 22655
mem[28507] = 9278213
mem[21463] = 1475
mem[63802] = 11330
mask = 11001111000X0001X100X1001001101000X0
mem[45847] = 1029083
mem[52359] = 87173
mem[7504] = 205315899
mem[37731] = 657
mem[41396] = 1027
mask = X001X0100XX10X1011X10X010000001111X1
mem[29618] = 14034335
mem[7831] = 1455
mem[28409] = 26087196
mask = X000001000010X0011001X1XX010XXX011X1
mem[49280] = 816038
mem[53410] = 632054
mem[25605] = 2170
mem[47742] = 449847
mem[7056] = 13776253
mem[12256] = 722
mask = 110X11X100010001X10010X0X01010100100
mem[63043] = 7807913
mem[57885] = 230082055
mem[50315] = 27089695
mem[64722] = 54151
mem[19735] = 978866
mem[41391] = 9015641
mem[50548] = 96572794
mask = 100X00X0XX0000X1110X10111011111000X1
mem[61760] = 5688555
mem[18595] = 4630
mem[41305] = 1670
mem[25605] = 472094
mem[50759] = 28261157
mask = 00XXX1X0010100011XX1011010X0010100XX
mem[16270] = 7874
mem[63561] = 49551173
mem[43150] = 11196
mem[18504] = 18360154
mask = 1X0101X1000000X111001X100X0011010101
mem[1825] = 2048695
mem[26563] = 66443
mem[22477] = 2539322
mem[59104] = 1269245
mem[50554] = 3370
mem[7797] = 300
mask = 1000000XX0000X11010X11111X011010X011
mem[61720] = 700175
mem[37943] = 41662
mem[3405] = 441992426
mask = X0XX0X001X00001001000111110110XX0110
mem[45473] = 1830
mem[35940] = 16393
mem[44793] = 10545068
mem[23107] = 145304756
mem[48096] = 480559528
mem[57539] = 97582237
mem[64518] = 60543
mask = 10X00100010100X1X01XX0X000010101011X
mem[14210] = 200447
mem[26703] = 46292
mem[42748] = 7946
mem[11664] = 7633363
mask = X00X010001010X01XX11X0101X0X01000X01
mem[40269] = 357709
mem[36823] = 14385170
mem[52568] = 522064310
mem[41363] = 389730
mem[4127] = 2285054
mask = 1010110010000010X000XX111011100X01XX
mem[19072] = 49597375
mem[32473] = 7622
mem[1916] = 9685106
mem[10040] = 16339629
mem[10795] = 25165351
mem[16634] = 508779
mem[16084] = 232615
mask = 11XX1111X001XX0111000010X0110100X111
mem[44372] = 11010
mem[58030] = 5106
mem[15235] = 24371
mem[41578] = 3641535
mask = 110000X000000X01X0X0X01X1X0100001011
mem[64968] = 1528
mem[21183] = 429276
mem[51816] = 60726
mem[12248] = 87748
mask = X0001111000000011100101X10111100X11X
mem[39612] = 57230
mem[33329] = 35880
mem[15681] = 27569
mem[51326] = 237622439
mem[36099] = 48369
mem[58183] = 726
mem[38471] = 2690
mask = 11X011110X01000X0100X0X0X000X01X01X0
mem[41793] = 519002787
mem[39290] = 5821
mask = 000X00100001XX00X1000000X1XX10010110
mem[36367] = 1347261
mem[52040] = 858329
mem[60969] = 14183
mem[49232] = 3014091
mask = X000X01X000101XX1100X11001X00000100X
mem[61397] = 9063
mem[63395] = 92917
mem[47750] = 6587
mem[13695] = 2038
mem[52876] = 219355
mem[50726] = 815351
mask = 11X0X111000100011100100X0X11X1X011XX
mem[24438] = 360143
mem[14268] = 233280
mem[46071] = 14590
mem[47430] = 195019
mem[8714] = 5003481
mem[34758] = 866985
mask = 10000X00XX010101101X1X111001X0001110
mem[12826] = 369283
mem[33546] = 519165
mem[34578] = 12340
mem[13504] = 301264250
mem[4433] = 26315015
mask = X0X011X000X100X001110100000XX011100X
mem[10779] = 6427
mem[62591] = 124867728
mem[4073] = 26086825
mem[19735] = 14280934
mem[40681] = 54398576
mem[44232] = 1164302
mem[5734] = 677248729
mask = 1000XX0X11000010X100X01011011X1001X1
mem[55680] = 6971988
mem[4565] = 1361280
mem[35316] = 2209
mem[40546] = 758
mem[47381] = 49216
mask = 000000100XX10101X10X10000XX1X01X0100
mem[57507] = 477326
mem[58729] = 256151738
mem[47689] = 16875625
mask = 0000001000010X00X100100X0X0X0X00010X
mem[58893] = 531598
mem[56609] = 1534
mem[793] = 3558686
mem[17811] = 31042
mem[41552] = 73028105
mem[12657] = 1035597401
mask = 110011100000000101001XX00101X0000X00
mem[18971] = 81961737
mem[58641] = 685839
mem[58774] = 51830284
mem[50554] = 190835154
mask = 1010X100000000101X00100X1110X0001X01
mem[10630] = 11281616
mem[30301] = 344
mem[21809] = 66389352
mem[15829] = 3924744
mem[50602] = 546681
mem[33142] = 153438
mask = 0X000010000X010X111X01X11110111X10X0
mem[32309] = 1315
mem[59481] = 404
mem[13793] = 2029
mem[41406] = 2393
mem[7495] = 24826836
mem[61576] = 9555003
mask = 00000100X10X010111111X0010X111010010
mem[6662] = 15689063
mem[1130] = 182923358
mem[6648] = 3538
mem[8833] = 7984
mem[7495] = 8285851
mask = 11000X1X00XX000100X01X0X01X11X000000
mem[34270] = 180307825
mem[36097] = 712
mem[47750] = 843753
mem[44800] = 247708
mem[48331] = 31912
mask = 0001000001010101XX1X1X1X011X1000011X
mem[15235] = 491
mem[47685] = 775
mem[52882] = 99948
mem[32016] = 395727
mask = 100000010XX0XX00X101X10000X110X01000
mem[49801] = 230387797
mem[55855] = 7808
mem[39291] = 114525
mem[50759] = 2588
mem[31793] = 19374
mask = 10XX11X000010X00X1X1XX010011011110X1
mem[45068] = 763282
mem[31165] = 43188
mem[25684] = 1041033
mem[52456] = 32196
mask = 1100X1XXX001X00111X0110X0X101010X101
mem[59821] = 6610
mem[57397] = 67932
mem[15240] = 505977952
mask = 100X001XX0X1X00011010100X0110000X001
mem[22585] = 2024050
mem[30527] = 79580709
mem[57425] = 7597579
mem[49280] = 47528262
mask = 1X00XX1X000X0001110011X010X111000001
mem[45847] = 207968
mem[12898] = 69230005
mem[18887] = 433691609
mem[7495] = 114085080
mem[8177] = 105183315
mem[9561] = 1468259
mem[38679] = 7998

2
2020/data/day15.expected Normal file
View file

@ -0,0 +1,2 @@
496
883

1
2020/data/day15.input Normal file
View file

@ -0,0 +1 @@
2,0,1,7,4,14,18

2
2020/data/day16.expected Normal file
View file

@ -0,0 +1,2 @@
25984
1265347500049

268
2020/data/day16.input 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

2
2020/data/day17.expected Normal file
View file

@ -0,0 +1,2 @@
359
2228

8
2020/data/day17.input Normal file
View file

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

2
2020/data/day18.expected Normal file
View file

@ -0,0 +1,2 @@
2743012121210
65658760783597

376
2020/data/day18.input Normal file
View file

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

2
2020/data/day19.expected Normal file
View file

@ -0,0 +1,2 @@
147
263

465
2020/data/day19.input Normal file
View file

@ -0,0 +1,465 @@
90: 86 86
122: 86 1 | 99 20
116: 86 58 | 99 75
20: 86 123
62: 99 95 | 86 113
81: 76 99 | 90 86
106: 120 86 | 93 99
73: 99 72 | 86 45
117: 131 99 | 72 86
92: 86 96 | 99 98
13: 3 99 | 118 86
56: 90 86 | 58 99
85: 72 99 | 51 86
51: 99 99 | 86 86
59: 99 25 | 86 62
65: 99 15 | 86 97
112: 86 13 | 99 38
46: 33 86 | 2 99
10: 67 86 | 68 99
33: 120 99 | 76 86
38: 35 86 | 125 99
26: 86 10 | 99 55
1: 33 99 | 60 86
8: 42
16: 51 86 | 93 99
107: 40 99 | 2 86
40: 17 120
34: 86 82 | 99 127
88: 93 17
2: 99 51 | 86 120
32: 100 99 | 7 86
113: 86 127 | 99 82
14: 73 86 | 44 99
25: 86 101 | 99 56
130: 110 86 | 109 99
19: 86 4 | 99 49
30: 86 92 | 99 70
27: 17 86 | 86 99
94: 47 86 | 53 99
115: 86 107 | 99 84
15: 76 99 | 58 86
58: 86 99
105: 130 86 | 32 99
71: 120 99 | 131 86
12: 99 131 | 86 82
60: 72 86 | 93 99
84: 86 102 | 99 80
44: 99 76 | 86 72
125: 76 99 | 131 86
18: 99 71 | 86 52
129: 37 86 | 111 99
102: 99 131 | 86 76
66: 86 105 | 99 41
99: "a"
9: 99 18 | 86 65
131: 17 99 | 99 86
39: 76 99 | 93 86
64: 115 99 | 114 86
57: 86 48 | 99 94
35: 72 86 | 51 99
0: 8 11
77: 86 83 | 99 106
118: 72 86 | 75 99
47: 99 103 | 86 85
23: 99 27 | 86 76
48: 119 99 | 78 86
49: 86 51 | 99 45
67: 86 120
61: 86 72 | 99 127
108: 72 99 | 72 86
95: 86 58 | 99 90
83: 86 27 | 99 131
75: 86 99 | 99 99
101: 51 99 | 27 86
103: 90 99 | 90 86
128: 86 69 | 99 33
70: 99 14 | 86 19
52: 127 86 | 90 99
21: 86 24 | 99 59
22: 86 63 | 99 12
42: 79 86 | 66 99
97: 51 17
104: 86 33 | 99 28
100: 99 16 | 86 39
72: 99 86
78: 86 43 | 99 50
55: 86 6 | 99 34
45: 99 99
5: 86 46 | 99 77
93: 99 99 | 99 86
6: 131 99 | 51 86
110: 71 86 | 28 99
68: 90 86 | 27 99
29: 87 86 | 122 99
80: 86 93 | 99 131
54: 120 86 | 75 99
43: 93 86
98: 99 103 | 86 117
7: 101 86 | 88 99
127: 17 86 | 99 99
96: 86 12 | 99 61
41: 99 5 | 86 112
79: 86 57 | 99 21
11: 42 31
86: "b"
111: 45 99 | 72 86
63: 76 99 | 127 86
124: 86 81 | 99 116
28: 86 75 | 99 58
82: 99 86 | 86 99
121: 64 86 | 74 99
87: 86 124 | 99 104
74: 99 26 | 86 9
31: 126 99 | 121 86
50: 99 72
119: 34 86 | 36 99
36: 86 82 | 99 75
91: 86 131
3: 58 99 | 27 86
114: 99 129 | 86 22
24: 86 89 | 99 128
53: 91 99 | 95 86
126: 29 86 | 30 99
109: 99 108 | 86 23
17: 86 | 99
76: 86 86 | 99 86
120: 17 17
89: 54 86 | 37 99
4: 99 131 | 86 58
69: 27 17
37: 99 58
123: 86 76 | 99 82
bbababbaabbaaabaaaabbabbbbbababbbababaaaabbaabaaaaaabaaaabbaabba
aaabbbabbabbbbbbaabbabababaaaaabaaabaaaaabaaaabbbbabbabb
babaabaabbabaaaaabbababb
babbabbaababbaaaababbaabbbbbaabaabbbababaabbbabbbabababaabbabbabaabbbaababbbbbbb
bababbbabaaabbaabbababab
aaaaabaaaabbaabaaaaabbaa
aabbbaaaaababbaaabaabbbbabbbaaaaabbaaaab
baaaabaaaabbababbaaabbab
ababababaaaaabaaaaabbaaa
baabaababaaabbaabbbababb
abbbabbbbbabaaabaabbabbb
aaababbbabababbbaabbaaaabababbaa
babbaaabbaaaabaababbbabb
bbbabbbabbabaaaabaabaaab
bbbbaaabaaaabbbaabbbbabb
aaaaaaaaaaaaabaabaaaabbb
babaabbababbabaababbaaba
bbabaaaabaaabbaaaabbbbbbbabbabbbbaaaabab
babaabbbbbbbbbaabbaaabaa
baabbbabababbababaabbbaa
baaaabaaaabaaaaaaaaaaaab
aaabbbbbbbabbbabbbbbabbb
bbabaaabaaababaabbbbbbba
baaabaaabbabbaaaaaaababb
abbabaabbaaaaaaaaabaabba
aaaabababbbbbbaabababbab
bbbbbbabababbaabaabbbabaaaabbabbaabbabbbbaababbbabaabbbbabbabaabababaabaaaaaabab
bbbabbaaaababbabaabaabbbabbbabab
bbbabbbababbbbaabbbbbbab
baabaaaaabaabbbbaaabaaaabbbbbbab
bbbbaaaaaabaaaaaabbbabaababbaabb
bbbbbabaabaaaaababbaaabbbaababbbbbaaabaa
aaabaabaaaabaaaaababbaaaaaababbbaaababab
bbaaaababbbaaabbabbabbabbabbbbabbababaabbbabbabbabaaabbabaaaabba
aababbbaaaabbbaabbbbababbabbaaaa
abbbaabbabaaaaababaaaaaa
babbabbabbaabababbabaaaaaabbbabbbabaabbbbabbbaabbaaaaaba
aabbbaabaaabbabbbbaabaaabbbabbababbaababababbbba
baabbabbbaabbbbbbbaaaaaababababaaabbbbabaabaabbaaaaabbab
bbabaaabbbbbaaaababbabbb
baabaabaaababbbabaaababa
aaaabbbbabbbaabbababaaaa
babbababaaaababababaabab
bbbaabbbabbbabaabbbabbbaaabbaabbabbbbbbbaaaabaaabaaabbaabbbbabbb
aabbaabbabbabbbabaaaabba
abaabbaaaaabbabbaaabbbabbabbaaaa
bababaabbaaabaaababbababbbbbbabbbaaabaab
aaababbbaabbaabbbbaaabbaaababaaabaabbbaa
abbaaababbaaababbaaaabba
bbaababaaabbabaaababbaabbaabbbbaaabbaabbabaaabbabbabbbbbabbbaaabbbababbb
bbaaabbbbbaaabbabaaaabba
abbbabaabbaabaaaaaabbaaa
bbbabaabbbbbbbaababbbbaaabbbabba
abbabbaaaaaabbbbbbabaaabbaaaaaab
bbaababaaaababaabaabbababbbbbaab
aabbababaaabbbaaaaabbabbaabbbbbbbabbbabb
aaabbbaaaababbabbababbbb
aababbababaaabaabababbbb
bbabbbabbbabbbabababbbba
aaabaaaaabbbbbbbbaaaaaab
babaabbbaaabbbabbaaaaaab
bbaabbbaaabbababbbaaabaa
aabbbaaaaaaaaaaaaaaaabaaaabbbbbabbabaaaaabbbbbab
abaaaaabaabbbaaaabbbaaab
abaabbabbabbbbbabbababaa
baaabbaaaabbbabbaaaabaaa
abbbbbaabbaaababbbbabaab
aababbaaaabbbbbabaababaabababaabbabbbaba
abaabaaabbabababababababbaabaaabbbaabaabaabbbababbbabbbabbabbbbbabababaabbabbaba
aaaaaabaaaaabababbbabbabbbaabbabaababbbb
babaaaababaaababaabbabba
ababbaaaabaaabbbbababaaa
baababbbabbbbaaabaababbbabbbbaababaaabaaaabbaabababababaaaaababa
bbaabbababbabaabbbabbabb
bbabbbbaababbaabbbbabbbbbabbabaaaaabbbababbbbaabaaaaaabbbababbbbbabbbabb
baaaaaaababaaaabbbbbaaaaabaabbbbbaababbb
aabbabaaabbbbbaabbbaabab
ababbabbbbaabaaabababaabaaaabbab
aaabbabaaaaabbbbabbbbaaa
bbaaaaabbaaaabaaabbbaaaa
abbbaaaaabbbabbbabbabaaa
bbaaaabbaaaababababaababaaaabbbaaabaabaaaababbabbbaaaabaabaaabbaababbbaaabaabbaababbbaabaabaabbb
bbaabbaaaababbababbaaabbbabbbababbbbbbaabbaabababbababaababbaababbbaaabbaabbbbab
aababbabaaabaaaabbaabbaa
babaaabbaaabaababbabbbbabbbaabaabbaabbbababbabaabababaabbbababbabbbbaababbaabaaa
baabbabbbbaabbbaaabbaaab
abaaaaabbbaababaabbaabab
aaabbbbbaaababaaabababaabbaababb
bbaaababbaabbbbababbbbbabbaabbabbbbbaaabbbabbabb
bbabbbbaabbbbbbbbaaaabba
aababbabaaabaababaabbabbabaaaabaaabbbabaaabbbabbbabaaaaa
babbbbbbaabbbaabbabbbabb
baabbbbaababbaabaaabbabb
aaabaabaabbbaabababbbbaaaaaabaabbabaabbbabaaabbbaaaabababaababbbababbabaaaaaabab
aabbabaabaaaaaaababbababaabaabba
ababbababbaabbbaabaabaababbaabbbaaaabbaa
aabbababaabbbbbbbaababaababbabba
baabbabbbaaaaaaaaaaabaaa
baabbbabaaabbabbbbbbbabb
babaabaaaabaaaaabbbaaaab
baaaaaaababbbbbaabbbbbab
bbabbbabababbaabbaaababa
bbbbabababaaaaababbabbbababbabaaabbaabababbababaaaaabbab
aabbbbbababbabaaabababaaaaabaababbbabbab
babbbbaabaabbbbabbbbbabb
aaabbbabbabaabbbabaaababbaaabaab
abbaaabbbbaaabbbbabbbbbbbbbbabaa
bbabbabaaaabbabbbbbababababbaaabbabaaaaababaaaba
bbaabaaaaabaaababaababbb
baabbaaaaaababbababbaabaabababbbabaaabbbbbbaaabbbbababaababaabbbbbabaaababbaaaabbbaaaaaa
aaabaaabbbbbaaaabbbbabba
abbbaabbbabbbaaaaabaabab
aaabbbaabbaabbabbaabbbbbbbabbaaaaaaabbbaaaaaabab
aaaaaaaaaabbaabaaabbbbaabbaaaaabaaabbaababbbbbab
bbbbababbabababbbbababba
abaaaabaabbbbaaaabbbbbbbbaababbabbbbaabbaabbbbbabaaabbbaaaaaabab
bbbbbbaabaabaaaaaaaaabbaaaaaaababbabbabaabbabbab
abbbbbbbbaaaabaaaababbabbbbbaabb
bababaabaababbbaabbaabab
abaaaabaabaabbabaaabbbbbbbaaaaaa
aaaaaabaababababbbaabbbabbaaaaba
abaabaabbbababbababbaabb
baaabbaabbbaabbbbabbabbb
baababaabaaabaaaabbabbbabababbaabbbbbbba
bbbaabbabbbabaabbaaabbaaaabababaaabbbbaaababbaab
abaabbbbabbabbbbaaaaabab
bbbabaababaabbbbbbbaaaab
abbaaabaaaaaaabaabaaaabaabbaaabbabbabbbbaabaabab
aabaaaaababbbaaaaaaababb
aaabbbaaabaabbbabbbbabaa
aaaaabaababaabbabaaaabaaabbaaaaa
aaaabaabababbbbbaaaaaaaaaabbbbbbbbbbbbababbbbabbbaaabaab
bbabbbabbaabbbbaaaabaabaabaaabbbaaaaaaababbbaaab
aabaaabaaabbababbabababa
babbbaaaaabbbaabbbabbababbbbbbbaabbababa
abbaabaabaabbaaaabaaaaaaababbaab
abaaaababbaabababaabbbababbabaabaaababbbbbbbabba
bbaaaabababbabababbabaabbbaaabbbbbbabbaa
aabbaabbaaabbbaabaaaaaab
bbaabbabaaaabbbabbabbabb
abbaaabbabbbaaaabbbbbaaabbabbabababbbbbbabaabbbbbabbaaaaabaababb
ababbaabbabbbbbbbbabaaaabbbbababbaaabbbabaabaabb
aaabbabaaabbbabaaaaabaabaaababbaabbbabbababbbbabaabbabbb
abbabbaaabababababbbabaaaaaabaabbabaabab
babaabaaababbaaaaabbaaab
aaaaaababababaababbaaaab
ababbabaaababbaaabbbaababaaaaabb
bbaaabbabaaaabaabbabaaaaaaaababbbbbabaaa
bababbbabbaabbabbbbbabba
bbaaabbaaabbbbaabababaabbabbaaaa
aaaabaabaaaaabbaababbaabababbaaa
ababbabaabbabbbbbbaababb
aabbbbbbbaaabbbababababa
bababbbaabbabbaabaaaabab
bbaaabbbaabbbbbaaabaabba
aabbbbaaababbbabbbaabbbb
baaaabaaabaaabbbababbbabaabbbabbaabbbaabbbbbbbabaaaabbaababbaabaaababbbb
babbbbabbbbababbabaaabba
babbbbaaababbbbbbabbbaaabaabbaab
bbbbbbaaaabbbabbaaabaaaabbbabaaaaabaabab
babbbbbabbabaaaaaaaaabbb
ababbbabbabaabbaaaabbabbaaaabbaa
bbbabbbabababbbabbaaabbbbbbbaaba
abbabbaaabaaababbaaaaabb
bbababbabababaaaaababbbbbabbbaabababbaabaabbbaababbaaaba
babbababaabbbaaaabbaaaab
abbaaabbbaaaaaaabbababab
bbbabbbabbabbabababbbbab
babbbaaabababaabaababbbababbbbbaabbbbaba
bbbababaabaabaabababbbbbabaaaababbabbbabbbaaabaababbaaaaabaaaabbaaaabbab
babababbabbabbbaaaaabbab
baabbabbabaabbaaababbbbb
aabbabaaaaaaabbaabbabbbaababbaabababbbbbbabbbababbbaaaba
aababababbbabbbaabbaaaaa
aabababaaabaaabaaabbaababbbabbaabbaaababbbbbbbababababbaabbbbbab
abbbaabbbbabbbbaabbabbab
aaaabbbbaabbaabbbabaaaaa
aababbababaabbbaaabaabba
baaaaabaaaaaabbababaabbbabaaaabbabaabbbaabaaabbaabaababaaaabbaaa
ababbaaabaababaabbbbbababaaabbbb
babbabababbbaaaabbbaabaa
baabbabbbaabbabaaabbbbaabbbaabbaabbabaababaaabaabbaababbbaaaabbb
abaabbbbaaaabaabbbbbbbba
baabbabaaaababaaabbaabbbbbbbbbbb
abbaaaabababbbbabababaabbbaaabbaababaabbbaaaaaaaaabaaaab
bbbabbabaaaabbababbaabababaaaabaaabbaaaabbbababa
bbbababababbbbbbababbbba
bbbbbbaaaaabbbaabaababab
aaaabbbaabbaaababaaababa
bbaaabbabbabaabaaaabaaaaabaaabbabaaababb
ababbabaabaabbaababaaaaa
bbbaabbaaaababbaabbbbabaaabaaaab
abbbabbbbbbabbaaabbaabbbababbbbaaabababb
bbbbbaaabaaabaabaabbaaab
bbaabbababaaababaaabbbabaaaababaabbaaababaabaaab
abbbabbbaabbbbbabbababbb
bbbaabbabbabbbabbaaaabba
bbabaabaababbbaababababaaabaabababaaaaaabaaababb
babaabaaaaaaabaaaabaabba
babbbbbaaabbbaaaaabbababbaababba
aababbaaababbbbbbabbabba
bbabbbabaabbaabbbbbbabaa
ababbababbbababaababbbaa
aaabbbaabbabaabaababbbba
bbaabbabbbabbaaabaabbbababaaabaabbbbbabbbbaaabaaababaaba
baababaabbaaabbabaaababb
abbaabbbababababaaababbbbaabaabb
baabbbbbaaabaababaababba
babaabaababaabbbbaabaabaaaababaababbabba
bbaaaaabaababbaaaabbaabaaabbabbbbababbaa
abbaaabbaaabbbbaaabbbbaaabbaaaabaabbaaabbaababbbabbabbabaaaababb
aaabbaabababaaaabaabaaab
bbaabbaabbbabaaabbabbbbbbbbabaabbabaaabababbbbabbaabbabbbbbabbaa
bbbabbbbbbabbbaabaababab
bbabbbbabbaabbbababbabba
aaabbbaabaabaababaabbabababbaaaabbbbbbba
babbaabababbabababbbbbbaababaabbbaabbbbababaaaabbbaaaaababbabaaabbbbaaaaabaaababbbbaabba
babbbabbbaaaaaaabbaabbbbabbbbabbaaabababaabbbbab
bbaaaaababaaabbaabbbaaaaaababbabbbaabaabaaabaaabbabaabab
baabbbbbabbaaababbbbaaabbbbbbaabbbbbbaabbaaaaababbaaaaaaaabbabba
bbabbbaaabaaabbbabbbabaaaababbaaaabbbaabababbbbabbababaaaaaababb
baaabaaaaabbababbbabbbbaabaabbbaaabbbaabbaaabbabbaaabaab
aaaaaabaaaaabbbabbbaabaa
bbaaabbbbabaaaabbabaaaabaabaaaaababaababaaaabaaaaababbbb
babbaaababbbaabaabbbbaab
aaabbaababbbbbabaaabbaaaaabbbbbaabaabaababababababbabbbb
babababbbaabaaaabaaabbbb
babbabaaaaabbbabbbbbbbaabbbaaaaa
aabbabaabaaabbbaaaaaabab
bbbabbaaabbbbabbbababbabaaabababaababaab
bbabaaaabaabbabbbbbabaabaaababbb
baababbbbaaaabbabbaabbbbbbbbbaaabbbbaaba
aabbaababaaaabaabaabbaba
bbbabbaababaabaaabbbaaaaabaaaabaaabaaababababaaabbababbbbbbbabba
bbabaabaabaaabaabbabbaab
aabaaaaaaaababbbaaababbbbbbaabab
baaaabaaabbbabbbabaaababbaabbaaa
baabbbbabababbbaaababbbabbabbbbabbaabbbaabbabababaaabababaabaabbbabbabba
baabaabaabababaabaaaabbb
abbaabbbbabaabaaababbababaabbabbbabbbbabbbbbaabababbaabb
abbbabbbbbbababaabbbabbabbbbbaab
abaaabbbbbbaabbbaabbaaab
ababbbabbbabbbaaabaaabaababababa
bbbbbbaaabbbaaaaaaabbabaabbbbaabbbbaaaab
bababbbbbabbbbbbbaabbbbbbbababbbbabbabbbabbbbaabbaaaabba
baaabbaaaaaaaababaaabbbaabaabaaabaabababaaabbaaaabbaabaa
aabbaabbbbbabaababaabaaaababbaaabbabbababbbbaabb
abbbbbaabbbabbbbbbbbaaba
aaabbabbbbbabbbababaaabb
abaabaaaaabbaaaababbbaab
aaaabaabbbbbaabababaaaaaaaaaaabb
bbbababaabbbabaabaababba
abbbaabbabaaababbbbbbabb
babbabbbaaaaabbbaababbabbaabbbbbbaaabbaaaabbbbbaabaababbbbaaaaba
aaaaaababbbababababaabab
bbaabaabbbaaaabbabbababaaaaaababaabaaabb
aabbabaababaaaababbbabab
ababbbababaabbbbbaaaabbbbbbbbaababbbbaaabbabbbaaabbbabbbbaaaabbbaaaaaaaaababaaab
bbbabaabaaaaabbaaaabaabb
babbaaabbaabaababbbbaaba
bbabaabababbbbbaabaabaaabbaaabbabbbabaaa
abbabaabbaaaabaabbbaaaba
aabbabaabaaabbbaaaabbbabbabababbbbbaabbb
aabbbbbbabababababbbbbab
abbabbbabbabaababaaabbbb
baaabbaaababbaaabaabaabb
bbbabbbaaaabaaaaabaaababaaaabbbbaabbaaaaabbbabab
aabbbabaaaababaabaaaaaba
abbbabbbababbabbbbaabbaa
abbbbbabaabababbbabababa
bbaabaabaababbaabababaaa
bbabaaabaababbbaaababbbaaaababba
abbaabaababbababaaaabbbaabbabaababbbaabaaaabaaabaabbbbab
babbbaaabbabbbaababbbbaaaabaababaaaabaaa
babababbabaaaabaaabbbabaaabbbabababaaaabbbabbaab
aabbbaababbaaabaababbaababaaabbbaaaaaabaababbaaaaabaaabbbbababaa
abbbabbbaaabbbbaaabaabab
abaabbaaaabbaabbbbbaaaaa
bbabaaabaaaabbbbaabbbaaaaabbbbbbabbbbbbabbbabaaa
bbbabbaababbbbbabbaaaaabbabaabaaababaababaaaaabb
abbbabbbababbaaabbabaaaaabbabbbabbabaabbbaaaaabbabbabaaabbbbbbbb
bababbbaaaabaabaabbababb
abbbbbbbabababaaabbaababbabaaababbaaaaaa
abbaabbbabaaaaabaaaaabbaabaaaaabababbbababbbabab
abbabbbbbbabaaaabbbabbbabbbbaaba
abbaabbbbaabaababaababba
bbabaaababaabbbaaaaaabbb
baabbabaaaaabbabaabbbbabbabbabbabbaaaaaa
babbbbbbababbababbabbbabaabbaaab
aaabaaabbbbabbbbaabbabbbbaaaaaabaabbbaabbaababaa
baabbbbbaaabaababababbab
babbaaabaaaabaababbabbaaaabaabaa
abaabbbbbbabaaaaaabaabab
aaaaabbaabababaabbbbbababbbababbbbaababb
abababababaabaaabbaaababbabbabbb
abaaaaabbbbbbabaaaaabbaa
aaaabbbbbbbbababbbabaabb
bbabbabaabaaabaaaaababab
aaabbbbbabbabbbbbabaababbbaabaababbababb
bbabaabaabbabbaaaabaabba
abbabaaababbaabaaaaabbbabbaaaaabbbaabbabbababaaabaabbaabbbbaaabaaaabbbaabbbbabba
ababbbabaaabbabbaaabbabaaabaabba
bbbabbbbbabbbbbbabaaabaaaaababbbbababaaa
babbabaaabbaaabbabbabaaa
babbbbaaabbbbbaaabaaabaabbbbababbaaababb
abbabbbbabababbbbbabbaaabaaababb
babbababbbaababaabbabbab
bbaaababbbbbaaababbbbabb
baaaabaababaabbbabaabbbaaabbbaabaaaabbab
abbaabbbbbaaaaabbbaabbabbaabbaab
aaaaaababbaababaaabaaabababbbabb
baaabbaabbbababaaababbbaaaaaabba
bbbbabaaaaabaaaaaaababbaaaababbbbbaabaaaaabaaaabaaaabbaabbbbbbbb
abaaabbbbaaabaaababbabba
aaaaabaaaaabbbaabbabaaaaabababaaabbbbbaabbaaaaba
ababbabababbbaaaaaaaabbb
aaababaaabaabbaababbabbb
ababababaabbbabbbaaabaab
baabbbabbaaabaaabaaabbbabbabbabb
bbbabbaabbabbababaabbbbaabaabbabaabaaabbbaaabbbb
aaabbbabaaabbbbbabbabbbbbbbaaaaa
aaabbababbaaababaaaabbaa
bbbabbaaababbbabaaabaabb
baababbabbbabaaababaaababababbaaaababaabbbbaaaabbabaaababbbabaababbabbbbbaaabbab
bbbabbaababaabbabbbbbaaa
abababaabaaaabaaabababbbbaababbbbbabbaaaaaabbaabbbbabababbabaabb
babbbababaaabbbabaababbbaaabababaaaababbbabbaabbabaabbba
bbbabbaabaabbbbaaaaaabaabaaabbab
bbbabbbbaabbaabaaaaabbbbbaabbabbabbaabaababbaabbaaabbaaa
aaababbbbaaaabaaabbabbbbabbbbaba
aaaaabbababaabbabaaaaaaaaaaaaababbbbbbaaababbaaaaabaabab
babbababbaaabbabbabbaaaabbaabaabbaaabbab

2
2020/data/day2.expected Normal file
View file

@ -0,0 +1,2 @@
603
404

1000
2020/data/day2.input Normal file

File diff suppressed because it is too large Load diff

2
2020/data/day21.expected Normal file
View file

@ -0,0 +1,2 @@
2075
zfcqk,mdtvbb,ggdbl,frpvd,mgczn,zsfzq,kdqls,kktsjbh

36
2020/data/day21.input Normal file
View file

@ -0,0 +1,36 @@
nncl snvzl jsrrk grbmvx qzczl zh kbbmsc bltrrnl jkpmsf hfxss shjvxj lnrjbft bgbvr kdvrrmmx kdqls sgslkt jlzhsl zdl pnhd vsv zgbh dlhx thbdr nmzz bmmb hkrnqnlt qfbh zrzh ghrnz nbdcsj gffbft shpglbr bgfdt jfjr pltnp dbxkrn kxjt hzc rhzgdm hdvkmd ggdbl dsvz ldpr scms rrqtp glc ddkk pgvqd qgqlv dcfj drrzq xncmd nnbn mgczn plhpz gcp zsfzq pbtq kbxcj pmzcrrd sgkmrlt frpvd nvhnjb cmqs zvd frtdmqzb scg xknmp gdnhx sxpv qzmnp ddtkx hbgsgt zppsxq gjmvxg tjlgcb zfcqk lfspxch qhrd qjvf kktsjbh gjjglc gbbs lcggks lsrxkjt gpzch xpqt bjgsll txqrj rgklhlj qcrdn (contains nuts, soy)
kdvrrmmx bgrrld xxltvc pvmj sdkvkg rzh ggdbl bgfdt vtcj vctgp tbfxdtm qqfr grbmvx zfcqk kxjt txqrj mqbv qjvf zgbh hbgsgt vpfnsz ngxmvj nrdz zfmx lqrl gxpmk mxrs zrzh sgskhk shpglbr nmzz jkpmsf trmkt mtdnt kvghnj kbbmsc phszhl scms mdtvbb kktsjbh zcqrgk qdmr rhzbf ggjslpt qhrd flfsv mgczn frpvd kdqls jsrrk fbbgv hnhrv vkxrzx hgn pnhd dcfp cdr scg fpqqbv dcfj bmmb sxpv thbdr pvhs cnmdp mcjbn nnbn frtdmqzb dzjhj vqh (contains fish, dairy)
vckt zsfzq vtbx qtgks pltnp bgfdt cdr pbtq jlzhsl txhs xncmd mvxdcbm kktsjbh rrqtp cnmdp kvk zfmx mcjbn hfxss nrktps lnrjbft nbdcsj grbmvx vtcj pgvqd zgbh rmvqb dzjhj gbbs pstspq qzczl tppntfp jgbmk qcrdn rnllc lsrxkjt kbj lthn mgczn gjmvxg mglzsz zstc zh zfcqk rzh kdqls qjvf vzsjd qqfr bgbvr tbfxdtm ddtkx bjgsll dzptlj dqcpjp xnrbnl zmtj ldpr jm phszhl kbbmsc ggjslpt hgn kbxcj vsxcjpp fpqqbv ggdbl mqbv xknmp ghrnz mdtvbb (contains dairy, soy)
drkgc hjhknn lthn rzh sdkvkg qgqlv nmzz fsdgvh dbxkrn zcqrgk mvxdcbm kdvrrmmx vsxcjpp zfmx gdzkp glc mndpbq xknmp dzjhj mdtvbb ggdbl zh gcp zmtj flfsv vzsjd mcjbn hkrnqnlt ldpr kxjt frtdmqzb kbj drrzq sgskhk rgklhlj kbxcj zdl mqbv bjgsll mlbp ghrnz jsrrk mgczn xpqt nvhnjb kvjr nncl tppntfp tzjvdj dlhx dlpvq htmkhr zjpzr vtbx frpvd dmtfl tjlgcb hnhrv zsfzq kvk lcggks cmqs shjvxj xvqbk grbmvx zstc mtdnt kdqls xncmd phszhl zfcqk lsrxkjt shpglbr bjqnjv bgrrld (contains nuts, sesame)
dzptlj nncl lfrcfd zsfzq gpbzq nrdz zppsxq jlzhsl gjmvxg ggdbl xvqbk dsvz lfzts hbgsgt grzznd drkgc xknmp rrqtp dcfj gxpmk tppntfp qhrd tbfxdtm gdzkp zfmx fpqqbv kktsjbh mdtvbb qzmnp kvghnj vctgp mlbp tkhkf pvhs dpclg kdqls mgczn xkrm zcqrgk xpgnz zfcqk mcjbn bgrrld rhzgdm qtgks zmtj gpzch rnllc zjpzr zvd vqh bjgsll vzsjd ggjslpt qqfr jfjr jm qjvf pgvqd lnrjbft ghrnz vkxrzx zrzh (contains wheat)
zjpzr dcfp mndpbq pmzcrrd plhpz thbdr jfjr drrzq gdzkp rzh pfnv gbbs grbmvx qgqlv kdvrrmmx zstc mdtvbb xncmd zsfzq bjgsll mbvpv kbxcj bgrrld vtcj frpvd ggdbl rrqtp nmzz zdl gpn kvjr lsrxkjt vsxcjpp kktsjbh xflfvx dcfj dzjhj mcjbn gjjglc gffbft vkxrzx vpfnsz svkjz gpbzq hbgsgt zcqrgk mqbv rnllc vctgp mgczn vckt mglzsz dlpvq lnrjbft nrdz zrzh gjmvxg trmkt xpgnz sdkvkg kdqls hkrnqnlt fpqqbv grzznd cnmdp jsjx cdr xpqt nbdcsj jlzhsl gcp tppntfp lfspxch xnrbnl frtdmqzb fbbgv (contains peanuts, fish, nuts)
xflfvx kvk vtbx pmzcrrd dmtfl xkrm qqfr vctgp cdr gdzkp gcp snvzl hnhrv bgbvr dcfp dbxkrn svkjz kxjt mglzsz zstc zfcqk kktsjbh xnrbnl gjjglc plhpz gxpmk scg trmkt pltnp frpvd sgkmrlt kdqls qjvf xknmp jlzhsl lsrxkjt mgczn lfspxch qgqlv nrdz zcqrgk ddkk qdmr nrktps jsrrk fsdgvh pnhd hfxss mdtvbb tjlgcb ggdbl dsvz tjrrm rhzbf zh fgfzb jm rgklhlj dqcpjp ghrnz (contains wheat, sesame, dairy)
zsfzq kvk tkhkf ddkk ggdbl zrzh lfspxch vkxrzx cnmdp kbj dpclg rnllc mlbp sxpv htmkhr nmzz xfkhp dmtfl vsv tzjvdj zstc gxpmk nncl lfrcfd zcqrgk dcfp bgrrld flfsv shpglbr ggjslpt vtbx ldpr xlzlv vmj jm bgfdt ngxmvj pfnv hjhknn kvghnj nbdcsj jgbmk mdtvbb zppsxq vqh scms zfcqk mgczn bgbvr rmvqb nnbn dcfj vfcppm ghrnz nvhnjb cmqs phszhl kktsjbh pgvqd dzptlj tppntfp pnhd pvmj gpbzq scg qfbh qgqlv snvzl grzznd kdqls (contains fish, sesame)
nnbn tjrrm frpvd vckt qfbh vfcppm zcqrgk flfsv jsjx ggdbl kvk gjjglc mdtvbb gpn txmjl tbfxdtm ghrnz sxpv dpclg zmtj fsdgvh xknmp dsvz vzsjd zfcqk lfzts pvhs bgfdt jm rhzgdm lthn ddkk phszhl scms kvjr jsrrk thbdr mqbv txqrj pfnv hfxss kktsjbh bgrrld fbbgv rgklhlj qdmr mndpbq grzznd drkgc xlzlv nncl qgqlv shmxg kdqls mgczn (contains nuts)
thbdr rgklhlj frpvd qcrdn pltnp svkjz ggjslpt shmxg gpn dmtfl vsxcjpp lthn vqh pmzcrrd vfcppm qzczl grzznd fpqqbv ldpr ggdbl ddkk tjrrm vtcj pdxcdlq zjpzr kvjr bmmb gjjglc xnrbnl xxltvc zfmx xpqt vtbx lnrjbft shjvxj xknmp dqcpjp mcjbn dsvz vzsjd mdtvbb mgczn gxpmk hzc kbxcj pbtq qfbh dcfj pvmj lcggks zsfzq hfxss xkrm dzptlj qqfr kdqls zfcqk qgqlv gpzch vckt nrktps mvxdcbm drrzq fbbgv (contains fish, peanuts)
jsrrk lsrxkjt rjhs vpfnsz zfcqk fbbgv qjvf trmkt mgczn mdtvbb mqhl bjqnjv mvxdcbm tbfxdtm xncmd fpqqbv frpvd pvmj mqbv zjpzr qhrd gjjglc zdl dmtfl zsfzq hgn smspv sgslkt zfmx mcjbn dlpvq pgvqd xflfvx mbvpv dzjhj cmqs bgfdt ghrnz rhzbf hkrnqnlt hzc dqcpjp flfsv qfbh zvd kktsjbh kdqls sgskhk scg (contains soy)
zfcqk kdqls drkgc fpqqbv nmzz zfmx zrzh grzznd trmkt kbj gdnhx zgbh gdzkp jsjx ggdbl dlpvq jgbmk tjrrm gbbs gpzch bgfdt vfcppm jkpmsf dlhx nncl rjhs tppntfp thbdr lfspxch xncmd sgslkt gpbzq ghrnz phszhl gjjglc dpclg pvmj gxpmk mgczn nrdz mdtvbb sxpv vpfnsz qgqlv zsfzq vckt kvk kdvrrmmx lfrcfd mtdnt rmvqb sgkmrlt kktsjbh txmjl xpqt rhzbf qjvf xkrm lqrl rgklhlj tkhkf qfbh frtdmqzb jfjr qcrdn dcfj vkxrzx (contains sesame)
hdvkmd dlpvq svkjz glc smspv nrktps ggdbl zgbh pdxcdlq vqh grzznd zfcqk flfsv hnhrv vfcppm zsfzq nbdcsj kbxcj zvd snvzl jlzhsl hfxss shmxg rhzbf xflfvx zrzh ddtkx vsv bmmb tjrrm kktsjbh hbgsgt ldpr nrdz jsrrk rmvqb mndpbq tbxmtm ghrnz phszhl mdtvbb bltrrnl sgkmrlt gdnhx bgrrld xncmd jsjx rgklhlj lnrjbft frpvd cmqs ddkk kdqls dmtfl lfspxch dbxkrn (contains soy, peanuts, fish)
kbj frpvd fbbgv xlzlv zmtj mdtvbb hbgsgt dbxkrn lfzts txmjl jfjr kktsjbh lcggks nmzz zjpzr mtdnt pgvqd hdvkmd bgrrld zfmx pvmj scms hzc pltnp vpfnsz qfbh jm kvjr xkrm kvk tbfxdtm rmvqb ldpr ggjslpt qqfr hjhknn rhzbf dpclg pvhs gbbs kvghnj tzjvdj xflfvx xnrbnl frtdmqzb dlpvq cmqs gpzch bltrrnl zppsxq fsdgvh dsvz pmzcrrd ggdbl qhrd gpbzq mndpbq fpqqbv pdxcdlq mgczn hgn kdqls svkjz txqrj zsfzq pbtq htmkhr zvd lfrcfd qzmnp dzjhj kdvrrmmx jlzhsl xfkhp dcfp mbvpv jsrrk (contains soy)
nrdz zfcqk rhzgdm qcrdn lqrl kdqls phszhl snvzl lthn sgkmrlt kxjt scms pgvqd glc gcp smspv sxpv qzmnp vfcppm sgskhk zrzh jgbmk lnrjbft vpfnsz vmj dqcpjp dcfj jsrrk zgbh dmtfl hkrnqnlt xlzlv zfmx txmjl pnhd mbvpv zsfzq mdtvbb fbbgv frpvd hgn bgfdt gxpmk rnllc qjvf vqh shpglbr kktsjbh dzjhj hzc qfbh qqfr rgklhlj hdvkmd gpn nvhnjb thbdr ddtkx kvjr hnhrv gdzkp vctgp ddkk drkgc jsjx mgczn tbxmtm (contains soy, shellfish)
bgfdt vtbx bjqnjv tjrrm kktsjbh xlzlv vkxrzx vtcj dlpvq kdqls rzh ngxmvj zgbh zvd xflfvx hfxss tppntfp bgrrld zh frpvd zjpzr smspv pmzcrrd mqhl dcfj sdkvkg lfrcfd flfsv mqbv nncl vsxcjpp zsfzq shmxg mcjbn sxpv dcfp grzznd rhzgdm ggdbl jsjx dlhx nvhnjb dbxkrn mtdnt qzmnp jsrrk jgbmk qdmr ldpr dpclg gdnhx mdtvbb dzptlj mlbp nnbn pltnp jm jkpmsf mgczn qjvf tzjvdj rrqtp rnllc zppsxq qtgks thbdr qzczl (contains sesame)
gdzkp pdxcdlq nvvm plhpz qzmnp dzjhj cdr zppsxq dsvz rmvqb qhrd zh hkrnqnlt xknmp snns lfrcfd gpbzq pstspq kvk nvhnjb hnhrv pnhd xlzlv ldpr gcp dzptlj zsfzq gxpmk kdqls lxtzr rhzgdm nmzz tf mgczn lfzts dmtfl cmqs kbbmsc smspv lfspxch dqcpjp kxjt xxltvc kktsjbh shpglbr frpvd qtgks bgrrld tbfxdtm vfcppm vpfnsz zfcqk ddkk frtdmqzb sgslkt nbdcsj vckt xpqt gpn shmxg vtbx xflfvx mdtvbb zjpzr bjgsll drkgc (contains soy)
fpqqbv dpclg vctgp mcjbn kxjt dbxkrn kdvrrmmx kbxcj jgbmk qdmr mgczn phszhl kktsjbh jlzhsl zvd pltnp dmtfl pstspq sgskhk mvxdcbm bmmb txmjl mxrs pnhd kdqls lcggks frtdmqzb hgn sgkmrlt smspv qgqlv lfspxch rzh dcfp tjrrm zgbh zfcqk xvqbk tppntfp pbtq gcp qzczl qqfr grzznd vfcppm hjhknn xfkhp ggdbl mqhl kbj zfmx xlzlv xxltvc ddkk rhzgdm gjmvxg qzmnp jsjx vtcj tkhkf vmj nvvm mdtvbb scg shmxg bjqnjv qcrdn frpvd pgvqd zh pvmj drkgc (contains soy)
grzznd jsrrk zdl kvk zsfzq ddtkx smspv ggdbl nrdz pfnv gpn scms txqrj gcp tzjvdj kvjr rmvqb gjjglc jm kktsjbh xknmp gxpmk tbxmtm dqcpjp fbbgv xkrm mcjbn shmxg hdvkmd mdtvbb kdqls jkpmsf lsrxkjt gdzkp mqhl bjgsll phszhl dlhx sgkmrlt pvhs tkhkf lthn zstc snvzl qcrdn qzmnp fgfzb lnrjbft vtbx bgbvr pstspq ddkk frtdmqzb bgrrld htmkhr qdmr vckt zh zfmx xncmd frpvd zfcqk hjhknn vsxcjpp tbfxdtm kvghnj pgvqd dlpvq (contains soy, wheat)
fsdgvh nbdcsj lfspxch dzjhj plhpz fgfzb gjmvxg thbdr jfjr ddtkx tkhkf ggdbl rmvqb scg nmzz mdtvbb kdqls qgqlv vkxrzx grzznd zfcqk dlhx frtdmqzb rrqtp zgbh tjrrm rjhs drkgc qzczl phszhl mgczn kktsjbh jm xknmp xfkhp vmj sgkmrlt qtgks xpqt kvk pdxcdlq pnhd mqhl tf hkrnqnlt mbvpv dbxkrn lxtzr kxjt bmmb frpvd snvzl lthn qqfr tbxmtm xflfvx kbxcj gdnhx zmtj cmqs xnrbnl (contains peanuts)
sxpv bmmb qtgks bltrrnl xpgnz mdtvbb qzczl vtcj zppsxq vkxrzx zsfzq zh gcp cnmdp kbbmsc qdmr kdqls qqfr vzsjd kbxcj xlzlv bgfdt hfxss sgkmrlt mgczn mqbv glc rhzgdm fpqqbv dzptlj rzh dlpvq frpvd hkrnqnlt zfmx gbbs qzmnp flfsv sdkvkg zfcqk qhrd kktsjbh qjvf txhs snns xfkhp (contains shellfish, fish, dairy)
kbj kbbmsc dsvz mbvpv qgqlv pbtq nnbn frpvd dqcpjp hkrnqnlt zsfzq gjjglc rmvqb fsdgvh drrzq kvjr mlbp gcp ggdbl kdqls mdtvbb vtcj lsrxkjt lxtzr nmzz tbfxdtm vsv snns phszhl xpqt hjhknn kvghnj htmkhr lfzts sgkmrlt mndpbq hgn mgczn jsrrk txqrj tjlgcb jlzhsl zfcqk smspv txhs gbbs dcfp thbdr bjqnjv bgfdt qzmnp bjgsll jsjx (contains soy, shellfish)
tzjvdj kktsjbh lfspxch bjqnjv frpvd jgbmk jsrrk qtgks vtbx txhs gxpmk zfcqk zrzh zjpzr gjmvxg xfkhp bmmb mvxdcbm rgklhlj ggdbl kdqls mgczn flfsv sdkvkg sxpv vmj mcjbn hgn bgbvr hzc lfzts xknmp nncl svkjz xvqbk kvjr mdtvbb dzptlj scg rmvqb dsvz qjvf tjrrm pmzcrrd mqhl nvvm (contains nuts, dairy)
txqrj nbdcsj jsrrk qdmr vkxrzx jfjr plhpz vqh mdtvbb rrqtp dqcpjp xflfvx jm bgbvr kdqls lthn htmkhr vsxcjpp qtgks zjpzr sdkvkg frpvd mgczn snvzl frtdmqzb gcp zsfzq zfcqk hzc xncmd dcfj zgbh pdxcdlq xpqt lcggks zmtj hkrnqnlt zfmx qzmnp gbbs snns xkrm kdvrrmmx dzjhj tzjvdj ggdbl sgkmrlt nrdz bgrrld ghrnz mcjbn hnhrv ddtkx xvqbk vtbx (contains fish)
xxltvc zfcqk kktsjbh dqcpjp gcp glc lcggks nbdcsj tppntfp trmkt snvzl qfbh xknmp gjmvxg ddtkx zppsxq ngxmvj sdkvkg pdxcdlq pstspq qtgks kbj lnrjbft zmtj qdmr bmmb rhzgdm dzptlj jsrrk bjgsll jgbmk mcjbn vqh vpfnsz kbxcj mlbp hfxss tjrrm qhrd hgn rgklhlj nrktps pmzcrrd mndpbq zfmx zvd cdr bgfdt xkrm frtdmqzb bjqnjv bltrrnl mgczn kxjt zsfzq kdqls xnrbnl tjlgcb sxpv nnbn vzsjd shjvxj frpvd rhzbf dzjhj hdvkmd sgkmrlt nmzz dbxkrn gffbft gdzkp fsdgvh vmj mdtvbb vsxcjpp lxtzr (contains fish, wheat, peanuts)
zsfzq grbmvx pdxcdlq mvxdcbm mndpbq pmzcrrd zjpzr mgczn lfspxch kdqls gpn mdtvbb hbgsgt nncl trmkt mcjbn vsv ldpr drrzq rrqtp vsxcjpp grzznd tbfxdtm qdmr zfmx txqrj xkrm nrdz qhrd gjjglc jlzhsl bltrrnl rjhs zrzh xlzlv cdr dzjhj flfsv ggjslpt kxjt pgvqd gdzkp zdl gpzch shpglbr ddkk vtbx zmtj vpfnsz rzh zvd gdnhx cnmdp zcqrgk kbbmsc hjhknn ghrnz kvjr hdvkmd zppsxq tjrrm zh zfcqk xxltvc vckt rhzgdm pvmj xpgnz svkjz frpvd thbdr gbbs hnhrv htmkhr dlhx pnhd sxpv kktsjbh tf gcp pfnv mxrs lsrxkjt gjmvxg (contains shellfish)
ddtkx gpn mbvpv frpvd gdnhx svkjz grbmvx mdtvbb kktsjbh vsv vckt vsxcjpp zsfzq rrqtp bgbvr sxpv fpqqbv dzptlj tkhkf qzczl txmjl frtdmqzb zfcqk dqcpjp tjlgcb tppntfp ghrnz pdxcdlq xvqbk kdqls zdl dpclg qhrd zh xxltvc gpbzq mtdnt mcjbn thbdr drkgc nvhnjb grzznd hzc sgskhk ggdbl hgn hkrnqnlt jgbmk shpglbr jsrrk bmmb vtcj kvghnj (contains wheat, dairy, nuts)
dlpvq fbbgv lthn gpn thbdr pmzcrrd hdvkmd qhrd kbj sdkvkg kvjr mqhl hgn ggdbl bltrrnl mxrs pbtq tjrrm xknmp zjpzr rnllc tf zmtj rrqtp mvxdcbm qqfr htmkhr zfcqk qjvf zcqrgk pstspq ldpr shmxg xxltvc bgfdt jsrrk gxpmk tbfxdtm txqrj bmmb ddkk mcjbn frpvd bgbvr dqcpjp nncl jkpmsf kdqls pvhs zsfzq sgskhk jlzhsl mdtvbb rhzgdm xflfvx glc nmzz shpglbr pgvqd sgkmrlt kktsjbh xkrm rhzbf tppntfp gbbs gpzch gdzkp zh cnmdp (contains wheat)
vsv xpqt gjjglc grbmvx mqhl qgqlv nmzz txqrj mbvpv zrzh jsjx vmj mgczn shmxg qqfr zcqrgk drkgc mxrs gpn fbbgv mdtvbb jm ggdbl jkpmsf pstspq lfzts kvjr vfcppm sgkmrlt tzjvdj bjgsll bgrrld lcggks kbbmsc zsfzq kktsjbh vkxrzx dzjhj snns dbxkrn pgvqd tf frpvd vtcj zjpzr hjhknn zstc zfcqk kxjt trmkt nncl ggjslpt xkrm gdzkp grzznd qfbh cnmdp fsdgvh bmmb tbxmtm qdmr xfkhp qhrd (contains shellfish, nuts, dairy)
pltnp zfcqk tbfxdtm jsrrk zvd kktsjbh fbbgv pdxcdlq ggdbl zjpzr bmmb snvzl lnrjbft kbxcj mdtvbb pstspq scg scms gpn gpbzq ghrnz xnrbnl kvghnj jsjx dqcpjp grzznd tzjvdj hdvkmd mglzsz sdkvkg nrktps pvmj shpglbr xvqbk zmtj kxjt rhzgdm kbbmsc bltrrnl qtgks mgczn mqhl sxpv qgqlv xxltvc frpvd zsfzq xfkhp xncmd nvhnjb shmxg qzczl flfsv zdl pmzcrrd bgfdt lqrl (contains dairy)
pstspq bgbvr rjhs qgqlv tjrrm plhpz qcrdn ggdbl tjlgcb hjhknn zgbh zfmx qjvf vctgp vzsjd pltnp xkrm gpzch gbbs drrzq vtbx xpqt lqrl mgczn shmxg nnbn gxpmk pvhs qhrd zcqrgk pmzcrrd qtgks qzmnp kbj trmkt xfkhp zsfzq nncl drkgc svkjz qzczl tkhkf htmkhr shpglbr vmj vsxcjpp jsrrk kdvrrmmx nvvm ghrnz mxrs kdqls mqhl bmmb xncmd vkxrzx fpqqbv gcp lthn tbxmtm hnhrv sgslkt hbgsgt lxtzr kktsjbh gjmvxg rnllc jm dpclg gffbft tf zmtj frpvd ldpr smspv tppntfp mdtvbb lfzts hgn dzptlj vpfnsz lcggks qfbh kvk (contains nuts)
mvxdcbm dzptlj gxpmk pltnp scg nvvm sdkvkg lnrjbft zdl frpvd shmxg vqh bmmb qcrdn pmzcrrd zrzh kktsjbh mxrs pvhs xxltvc qgqlv ghrnz jlzhsl gpn smspv zfcqk ggdbl zsfzq hkrnqnlt rmvqb gdzkp gpzch lcggks vctgp pdxcdlq kdqls vsxcjpp xncmd txqrj dqcpjp xflfvx mgczn rnllc gjmvxg zjpzr cnmdp vfcppm gcp mqhl nncl bltrrnl ddkk dlpvq zppsxq tbfxdtm fgfzb gpbzq (contains sesame, peanuts, soy)
tbxmtm jkpmsf pvhs jlzhsl xpqt kvghnj xlzlv kxjt zrzh qjvf rmvqb pnhd grzznd txhs scms jsjx mdtvbb shmxg phszhl tkhkf ggjslpt lfspxch trmkt zmtj zsfzq kdqls mxrs qhrd dsvz nvhnjb mbvpv mgczn dmtfl qqfr jsrrk vzsjd pbtq htmkhr hjhknn snvzl scg xvqbk glc bltrrnl mvxdcbm rgklhlj ggdbl pmzcrrd xkrm lxtzr tjrrm sdkvkg ngxmvj bjgsll nnbn plhpz hnhrv qfbh hkrnqnlt pvmj txmjl hfxss fsdgvh frpvd nncl nbdcsj jm gpbzq xflfvx ddkk svkjz hzc lfrcfd kktsjbh hdvkmd tf (contains wheat, nuts, peanuts)
ddkk qzczl fpqqbv dcfp zgbh qzmnp mqbv kdqls gpbzq qtgks mdtvbb kktsjbh fbbgv zrzh kvk cmqs bltrrnl lthn zsfzq shpglbr xfkhp smspv dmtfl mglzsz mbvpv nnbn zppsxq zfcqk jfjr gbbs zh ngxmvj cnmdp pltnp bmmb mgczn mvxdcbm drkgc qhrd zmtj qgqlv nvhnjb nrdz mndpbq vmj thbdr mtdnt xpqt nmzz frpvd gcp rhzgdm vsxcjpp (contains peanuts, dairy, shellfish)
qtgks xlzlv zrzh xflfvx vtbx mxrs gpn gbbs jsrrk xxltvc qgqlv jfjr svkjz sgskhk tjrrm fbbgv bgbvr zsfzq shjvxj tppntfp gdzkp ghrnz sxpv nvvm vtcj dmtfl mdtvbb mgczn dqcpjp rjhs kbxcj vckt pnhd jkpmsf dcfj dbxkrn dzjhj frpvd pvhs ddkk scg mndpbq mcjbn dsvz vzsjd qfbh vfcppm shpglbr cmqs grzznd flfsv htmkhr vctgp ggdbl nrktps dpclg zfcqk txqrj qjvf lqrl pgvqd tbxmtm kktsjbh tf kdvrrmmx cdr nncl (contains shellfish)
jlzhsl vfcppm nrktps lsrxkjt gjjglc kdqls sgslkt rjhs zsfzq rhzbf gpzch xvqbk scg frpvd bgrrld dsvz gcp xlzlv zjpzr qgqlv mcjbn drkgc hzc kktsjbh mgczn zfcqk qhrd xfkhp ggdbl tbxmtm lnrjbft thbdr nvhnjb vzsjd dcfj zh kdvrrmmx zfmx fbbgv pstspq pdxcdlq ddtkx pfnv (contains peanuts, dairy)

2
2020/data/day24.expected Normal file
View file

@ -0,0 +1,2 @@
512
4120

558
2020/data/day24.input Normal file
View file

@ -0,0 +1,558 @@
nwwnwnwnwsenwnwenwenwnwnwnwnwwneswwnw
nenewsesweeeeeeeeeeeeneeee
swswswseseneswseswnwseseseseswnewseswsesw
swseseseeswsesesesesesesesesesenw
wnenenwnenenenenenenesenwnenesenenenene
esesenwseewseseseseseeseseeesweseese
eseeeneeeeeeeeeweeeswewe
seeseeswnweeneswwswneweeseenwsee
nenwneswneneeenenewneneeneneswnwnene
enwnwwnewnwnewwsewnwnwnwnwswnwewnw
neneneneswnenenwnwnwnenene
seseswesenwnweenwseseseeneeesewsesw
eeseswsenweneeeswneseenwseeewse
nenwneseeeneneene
eeneswnweseeeeeeneenwee
nwnenenesewnwseswwenwnwnwnwnwnwswwnwnw
swwswwwnwswwwswwwwwwewewsww
wwsewnewwwwwwwswwwwwwww
nwwnwwnwswneswwsewwnewsesenewnwe
eneeswseeeeeeesweenewewene
swewswnwnwswwwswsewwwwwswswwsww
swwneseseneswseseweswnweswwswesese
eneneneeeneneeeesweeewenenee
wseeseseseseseeseeseseseseewsesene
sesenwswswnwswseeswsweswnwswwswswnwse
eeenwseeenweeseeeeeseeeswsee
eseewseneswseeewsewswnwnweenee
seeeseesenwseseeeeweseesesesee
neseenwneneneneneeewneweneswnenww
wnewseswswswseswseesewseswneswswseswsw
wswenwsenenweseswnwewnwe
swwswseswnwswnenesesewenesenesewneswsw
nwnenwnewnwnwnwnesenwnwswnwnenwnwsenwnw
nwnwnwenwnwnwnwnwnwswnwnwnw
eeeeseseswseseeeeeneswseeeneee
ewwwwwsewwnewwwswwwwwwsww
wswwwwwnwseewwnwenwnwnwnwnwne
wwwenwwnewswewwwnwwswwwww
senwnwseesenenwnwesw
sewswwwwwwwwwwwwwwsenwwnew
neneeeewneeeneeeseeneeeenee
neeeeeseeeseswenweseeeenwee
eeeeeeneeneneswweeeeeene
seswwswswneswswswswswswswswswsw
nenwsenenesenenwnwnenenwneswsewsenewnenene
seswnwsenwswswswswswswwseswswswnewswsww
senenwnenenenenenewneenenenwnwnewnenwnwnw
wnwnwnwnwnwnwwnwnwenwwswnwnwnwnwnwnw
ewswwwswswwswswwswswsw
nwnwnwnwnwnwnwsenwnwnwnwnwnwnwnwnew
nenenenenenenenenenwnenenenenenwswswnenene
nwnwswwseneseswweswswswswswwnewewe
eneeeswseswneswenewnwwee
neswnwnenenwesewnesenwnwnwnwswneneneenw
seseswesesesesewneswsesesesesesewsese
wwwwswwsewwwswswnenewwww
wwwwsewwswsewnenwww
sewswseswseswseswswnwswnwswswwnwwswnww
esenwnwenwnwnwwnwnenwnenewnenwnwnwne
nwnwwnenwseenenwnwnwewnwnwnwnwnwnwnwne
swnwnwnwnwnwnwnwwnwnwswwwenwnwnesenw
swswswswnwseswswswswwswswneswswswswwesw
wsewenenwswnwnweewswwneswenesww
swwwswwswwswswnewswwsewwwwww
nweesweeeewseneeenee
wwwwnewsewwwswewwwwwnwww
seseseseseswsesewnenwswnwswswswnwswsesese
swseswseseswswsewseswswswneneswnwesesese
wneswnwneneneneseneneneneneneneneneenenwnw
neseseesenwseseeseseswsenwseesewsee
wwwnewewwwwwwwswwwwwswe
weeenwweneswneseneeeseeneneee
nwnwseseweswswswswseswseswneseswswsenese
seswenewneswseewnwww
eseswneseswseswswwnwse
nesweeneneseweeseeeeweenwwee
seewseenwwnesenesewswwwwnwwnwseene
nwnwwnwnwnwnwswwnwnwnwnwnenwnwnwnwesw
wnwwwnwnwnewnwnwnewnenwnwsesewsesw
nwswswsesweswwewwswnwwsewswnewnesw
swseewseseseneeseseneeeseseseseew
seswswseseseneswsewseseneswseswswwswsw
wwwnwwwewnwwwwwswwwwwnww
nenwnenewnenenenwwnwneneeneneenenenenw
nenwnwnenenwnwneneswnwswnenenenenenwnwnwne
nwnenenwneswneneeswnwnenewenwnwneene
nwewnwnwseenesenenwwswnenenwnwnenwnw
wnwwnwsewnwnewwwwewwwwwnwww
wwwewnewwwwwewnwswwnwwwwwse
senweesweseseseeeseeswenweeeese
swnenenwnwnenwnwnwnwswnwnwnenwnwnwnwnenw
nwenwnewwnwnwenwnw
swnwnenwswneneeneeneee
seseseswseseseseseswseneswswwesesesesese
seseseesenwsesenweseeseweeseseseswse
eeneeeeeeseeseseseswseeee
swswwswseneseseswseswseswnwwswswnwswsene
wesewwewwwwwneswswnw
nweewnwwsenwnwnwwnwwnwswwnwswnenw
eeeweeewseseeseseeeeesenwne
wsenewwwwwwwwnwwsewwwnwne
seewswnwnweeenesweseswseneesewe
swnewnewseneswweewenwwweswswnw
swweswnwswwnenwwswwwsenewnenewew
nwnwwwewnwsesewnwsww
neweswwnwnewswnwwewswneseewnwnw
swnwnwnwsewnenwnwnewsenwnwew
neseesesesesesesesesesesesesesewwsesewne
swwwnewnweeneswswseeswenwseswneswne
swnewsesenenwswsewsewnwwewnwwnwe
neseewseseseeswswsesenesenwsesenwseswse
swswswswswwswswseswswswswneswsweswsww
swwsweneswseseseneesesenwnwseeesesee
sesesesesenwseseseswnwswseseseesesesesesw
wwenwwsenwwwenenw
nenenwnenenenenenenesenenenenenenenene
swseseseseenesesenwsese
swsweswsesesesesesesesesesenwwse
seeeswswnweseneneswwnwsweneweenee
nenenenwnenenwnwnenwsenwnenenenenwsww
enewsesewseswsesewseeweseneenenesee
eseswswseneswwswnwseseseewswwwneseswe
eeeneseseeseeseweeeeewese
nwswwwwwwnwnwwnwewwwnwwwnwnwe
swswseswsesweswneswwswwnwswnweneswswne
sweeeneeeeneeeesweeeneneee
neneeneneneneswnenenewneneneeneeneene
swwnwnwnwwnwnwnwnwnwsenwnwnwnewsenwnw
eeeeenwseeseseeewseseseswseeee
wwnwwwswwwnwwwnenwewnwnwwwww
enenwseneneneneneeneneneeeneene
eseswwswwsewswswswwwswwwnwwwnewne
eeeneswnewswsesenwwsenenesesenwee
senweseeseswseseseseseseseseseseseese
swneswwwswswswswwwwswwswswseswswnwsw
swswswsewswneswwswswwwswswnwwwwesw
eweewnesenwnwwswswnweseseeneese
swsenewnewneneneseneneneneneenenenewene
nwnwweswwwswwwwnwwswwweswesw
neneneswwnweeeweswneeswneswwsenwnww
nwswsweswnwnesenwnwwswneeswswwesese
nenwnesesenewesewnwnenenwwsweeww
swswswswswswwswnwnesweswswswesw
wwwnwenwnwnwewwwnweswenwnwneew
nwwwnwnwnwnwnwwwsenesenwnwnwnwwnwwnwnw
eneneseseeesewenwsesesesweswsesese
seswwswseseseseswswseneswseswswsesw
swewswswwsweswswswswswswswwswswswsww
wnewneenesenenenwnewnenwnenenesenwnenenw
seswseseswwwsesenesesesewseewseswnene
eeneswneneneeneneeneneeneenene
swswswswswswwswswwesw
wwwswswswswswewswnwswwwewwsenwsw
eseeeesenweeeeesewseeeseee
swswwswwwswswwneswsweswswswswswswsww
seseenwseseswswsesesesw
newsweeewnwenewnesewsewnewnene
nwnwnwnwnwnwnwswnwnwsenwnwwnwnwnwnwne
sesesesesenesesesesewswseseseseswsesese
seseseseseseeseswsesesesewsesese
wwseswnwseswswnewwswwnwswwswwew
sewweswseseseseseseswseseseweneseswsw
nwnweneewnwnenwswswnwnenwneswnwwenenw
swnwnwnenwsenwnwsenenwnenenweswswnwnenee
seswseneneswsewewwnewnewwnwwwnesw
seswswsenwswswswswswswseseswseswsenesesewsw
senwseeseneseseseewseseseswweesesew
seweswsesesesewnwnweseseeswseneseswse
eeseeseeeeweeesee
swwswwnwwwnwwwwwnewsewwewwswe
nesenwneswenenenwnwwnenenwsenenesesenew
wenwswseseseseswseeseswwneseesenwse
nwneenwneseswenewsweseseneswenwee
seeseseseseneseseseseseseenwsesesesesew
wnenewneneneeenwenweneswswswseswnwse
wwwswwsweswswwwswswswsww
eeeweeseseeeeeeeenweeene
eswwwswsewnwwswnwewwswwwwwwsw
enenenwneneeeneweneeneeneseswee
wswwsesweswwenwewwswnenwnwswnewew
seseenwwwseswswneswneswsewneseeswnee
swneeeeneneswnwesweeeneeenwene
neneswnwwseeswseswseneesenwswswwnwswese
seseseswseseseseseseenwsenwseenewnwsewe
wneswweseswseswsesesesesesesese
seseeeseswseseseseseseseseseesenw
nwnwsenwsenweeseewesesweseswseswe
wneweswwwwwwwwwwwwwswwwsw
ewwswseesenweenwnwneneeese
sesesesesesesesesewseneesesese
swswswswnwewswwswswswswswswsw
nenenewwnesewneneneeneeneneeeeenee
senenwewnenenenenenenenenenenenwnwnenesw
swwsewswwswenwswnwsweswswewswnenw
swswswwnwswswswwswwwswwwswwswesw
seweeeeneeweeswseewnweeeeese
nwneeseeweenwswswseeeenwseenesw
wwnenesenwnwsenwnwnwnenwwenwnwnenene
eseeeenweneswesesw
swsenwwwnenwwswsenenenewwneswnweww
newnwnwnwnwnenenwsenenwnenwnenwnenwsewnw
eeseneenwsweeneenwnwnwnwsewnesese
eneseneneenweseneweneeeesewnenee
wswswswneswswswseswswswswswswswswswswsw
swswswenwneswswwswswswswseswswswnwswse
wesewseseeseseeeeseeseseeeesee
senwswsesesesweweenewswswswnenwsenwese
eseeeeeeeeewneeseeeewseeese
wwwwewswwwnewwwwwwswnwww
nwseseseswseseseseseswnwseseswswsesesesene
enweenewneseeewneeseeenwesenew
nenenewenweswnwneeneweseseneswneee
ewwwnwwwwwsewwnwwwwnwwwsww
neneneseswnewnenwnwneneswnweswwsenwswne
nwnwnwswnwwwnwnwwswnwwnwnwnewwwe
nenenewneewneeseseneenenenenenenw
nwnwsenwwwnwenwnenwnwwwsewwwnwsw
nwnwwwnwenwwwnwsewnwnwwnwnwnwnwnww
sewswswswswseswswseseswswswseswswswsene
wsenwnweswnwswewswnwnwewwsenwwnwww
swswneswneswwswwwwswswnewsw
wnenwnwnweneneswwnwenwneneneseseswwnw
nwnwsenwnwwnwsweswnwenwwnwwnwwnww
sweeeeneseeesewenweesweeee
nesewneneneneswneenewnesewsenenenewne
ewwwwwwenewenwwwwsweseww
nwewnwwswwwnwnwsewwwnwnwwwwwnw
seseeeneswsewseeseeeseneswsesenenw
senweswnwnenenenwnwswnwnenenw
nwswnwswnwnwnwwnwwnwwnewnewwnw
swswseweswwswswswneswewwwwswwsww
eeeneneeeeswnenwneesweeneeeeee
swswswswsweseeseswsewswswnwseswswseswsw
neseseseseseseseseweswseswsewswsese
nwwseswwnwnwwnenwwnwswwenwwne
ewsweseneeewneeeeweeeseneeese
seeswneseneenwnwewswnweseseswnwesese
eswswseswswswseseseswswnwsw
nwesesenweseeeseseseeseseswseswee
nwnwswnwwnenewnwnenwswnwswnwwwwnwnwnw
enweeswneeswweenwewseeseswsese
wwnwswswwwwwwwswwwneswwseswwe
nweeeeeeeeeeseeeeeeeesw
eseenwsenwseeseseenwwseswsese
neeeeseeseswewsenweseseeeeseesee
wwswswneseswswesweswswswnwseswswswesw
neeneneeeeeweeeeeneswwe
seswseseseseswseswswswneseseswsese
newwnwnwswnwwesewnenwwweswwwnw
nenwneneneneneneswnewesee
wswwwwwwwwswswswwwnewwwsw
nwswswseseswewseseswseswswswswsesesw
eeeeseseswsesesesesenesewewsesesenw
nwnenwseswnwnwnenenwnwewnwnenwseenwwnw
seswwwwwswseneenwneswswnenwsewswe
seswsenwseswseseseseeseseswneswwswwsese
swneneneneesenwnenwnenenenewseswnenenee
nwswnwwnwnwnwswnwsenesenenwnwnwnwnenwsenw
nenenwnwwnwnwnwnwnenwnwnwnwenwnwnwnwsw
neswwsewneneneeneneneeneeneneenee
seseneseswswswnwswswswswseswswswswwesw
nwnwnwenwnwnwnwswswenwnesenwnwnwneneswnw
enweeneeesweeeneeeeeeeee
seseseneseseswsesesesesewseseswsesenesese
seseswswnwneswswwswswseswseswswseneswswesw
seseseseseseswseeeeeeeeseseenw
eseenweseeenwesweeeeeeeese
seewneeneeeeneenesweenenwneeene
nenwnweenenwswsewnwwwsewnweneewnw
eseseseseswseenwesesesenwseseesesesese
wswswswneswswsweneswwswwswnwswsw
wwwwwwswwwwswwseenewsewnwnw
seseeesweenwseseswseeseeseesesesenwse
nenwnwnwneswnenenwswseeeswswneneneseww
swwwswsewwswswwneesenwswsewnenww
wnwseseseseseenwsewneenweseseeswsw
enwnwnwnesenwnwwsewwsesewnewwwswe
nwnwwnwsenwwnwnwwewnw
seseneswseswwseswswseseswswseseseseswsw
nwnenenwnwnwnwnwnenenwnwnwnwwsenenwnwnw
weseeneneneneneswneeenenesenewenewe
wwwwnwnwnwnwenw
nwnwsenwseseseswsesenwsesweswswneseeswe
seseswsewseseneesesenwnwse
wswwseswswwwswswswwwswnwwwwwene
eneswnwwnenwwenweewsweeswnwnwswne
wwwwnwnwsweswwenwnweswnwnwwnwe
nwseswswnewsesewnweswneseenesenewew
swnesweewwswwwswswnwswsewwwwnw
neeswneswnwsesenewneneswnwnewnwnenwne
swswswswseswswswswneseswseswswswsewsesw
swseneswswswneswseseswswswseseseswswsese
swswswswswwnwswnesweseneseswnweswswsesw
wnwwwwnewsenwswsenwwwwwnww
seseneswswswswsenwswswseswseswswwsweswswse
enwweeeseeeseneeneeeneneenee
seeeswseeesenwesesewseseeseesee
sewwnwwwwwswswnwswseewwewswwnew
swwsweneneswswwswneswwwwswseswswswsw
nwswseseseseseseseseseseseneseswsesesesese
wswwwnwnwwswwsesesweneneneswwswwsww
newswwswsewwnenwwweseswsewnwswsenenw
swswswseseseseswseswnw
nenenenenweswneneneneneewneenenenesene
seeseneswseseseseseswsesewswswswswsese
ewwwnwswwnwwwnwenwsenwewwsesenw
nwswnenwnwnwnwnwnweenwnwswnewnwnenesenw
nwwswwwwswwswnesewwwswwwwwww
sewwswwnwwwwwwwewwwwwwwnew
wswnwwwwnesewnewwnewwwswseew
nwnewwewneswnwwsenwwesenwwnww
neneneweesweeneneenenenese
wnwwsewwwnwwwwnwww
nwswenwnwswwnwnwwnwenwnwnwnwwsewww
seseswesenwseseeesenwseseeeseswsew
enweeeseenesewsenesesewseeesew
ewnwnwseneneneswneneneneswneeneswnenee
seseseseseseewseseseseeneseseseesese
nenwswsenenenewwnwnesenenenwnenwneese
swenwnwwswwwswswwesenwwnewswsw
seewswseeesenweeweeneneewneeww
eseseseesenwseeseseseesesesewnwsee
neseneeseswseseswseseseese
swnewnwsenwnenwneenesee
nwnwnwnwnwnwnwnwnwnenwsenwnwnw
nwwseeswenwnenwwwswsenewnweewesw
swswswwswswswswswswswswwswwnwwneeswwsw
nwnwnwsenwnwnesewnwswenwnwnwwnwnwwnw
nenwnwseeneneswswswsese
eeneseneeneneenenwnesweeeeneenw
neneneswnwswneeeneeeneneneneneneenwne
nesweeeneneeeweweeneeneenene
eseneneeenwsenewnenenewseswnenenenwne
swnenwneenenenenenesenwenewnenenenenene
wwwnwnwwenwwwnwwsewwnwwnwnwnww
ewwwwnwwwewsewnewnwwswsewwnww
esenenwseeseseseseseswsewswe
weswswswswwswnewwwwwwwesewswswnw
wwswwswsweneewswswnwnewswwwwwww
nwneneneneneneeneneneneswwneneenenenese
neenwnenenwnwswnwnenenenwseneswnwswswnww
nwnwewnwnwwewwenwwswsesenewww
wwwwwsewwwwwwwwwwwwwne
wseseseseseseswseseseesesesese
nwnwswwnenenenenwnenenwnenwnesenwnwnwnenw
nwsesenwwwnwnwnwnwnwnwwwnwnwnwnwnww
nwwwwwnwwwnwswwnwewww
eseneeseeseseeenwseeseeneseswseesw
swsewswswseswswneswswwswswnwswsweswsw
wwnwwwswwnwwnewsewwwnwne
swswswsenwswswswwswswswswswsesweswswsw
swseswneswnwswswsweseswnewsweneswnwswsw
seeseseeeweewseseneseewseseee
eeswneeeneeeneenenenw
nwnwnwnwnwnwnenwnewsenwnwnwnwnwsesenwnenw
nesenenwswneeswseseneswswnwnwswnenwswnew
wwnwnwwwswwwsenwwwwwnwewwswne
nwnwnenwnwnwswnwsesewnwsenenwswnenwnenwnw
nesesewewneswswsenwnwseenwwnesweenwe
seswweweseeeeeenwneeswenesewe
sewwswwnwswswwswswswneswswwweswswwsw
seseneeseseseseeseswseseesenwesesese
nwnenwnwenwwnwnwnwnwnwnwwnwnwnwsewe
wwnweswsenewsweswwswswwnwwswwww
nenwnwneneneneneneswnenenewnenwnenesenenene
swnwnenwswenwneswnwnwwnwnwseneenwwnesw
sesesweswnwnwswsesesweswseswsewswswsw
enenwneneeeeneeneseeneneneeneswnwe
wnewwwwwwwsewswwnewwsewwnw
seswnesesesenesesenesesewswsesesewsese
wwwsewwneswwswwnewne
sesesesesesesesesesesesenwswseneswseese
eneneneneneseenenenwenwswneneneswnee
wnwwwsesenwnwnwnewwnwnenww
nwswnwwseewwwwwewswenwswnwswsw
swsesesenwseswswseswswsesenwswseswsesw
wwwwnewwswswwwwwswwww
sesesesesesewsesesesewneseneesesewse
esweeeenweeeeeeeeeeeee
wsewesesewseenwnwneeswswnesenesee
wswwnwweswswswwswswswswsenwswswsw
swnenwswnwsweseswenwnwwweswweewse
swnenwwwneswwwswwneswseswwswwsesw
neeeeneenwseeseeeenenewewee
nwnwnwnwnwnenwswnwnenwnwnwnwwnwnwenwnwnw
swneswswswseswswenwneseswswseswswswswsw
seeseseneneswsesesewneeseeeswseseeswne
nwnwnewsenwenwswnenwnwnwnenwnenenenwe
swneswneneneenwneneneswenenenwnenwnene
neswseswnwnenwswnenwnewneswwswnwnwnenwnw
neneneseswneseenwnenenewwwneneneenwne
newsweswnwswneswsweswwwswswwsewsww
ewenweseeeweeneeeneneseswee
wswseswswnenenewswswsewswswewseew
nweneeenwwswsweeeseneseneeewne
senwwsweswnwswswsenwsewseswnwneeswe
swseswwewwnenewswswwnwwswwswsenew
eenenenenenenwnenwswswnwsweeeenee
neneneeneneeneneeneneneneesewneene
swnwwnwswswweswswswswswswswwseswswwsw
wwwnwnwnwwwwwswwwwnwnwnwsenwwne
wwswnenwwnenwwwewwwwwesesew
eeeeewseeseneseseweseeeeese
nwseeeseseeneeeeseeseeseeewe
eswneeneeeneneweseeneeneneeee
wnwswswwswsesweswswswswnwswswswwswsw
enwneneneswneneneneneenwsenenwnesenewsw
swnwnwwswnwwnwwwwnwnwwwsenenenww
wnweseswnwnwwnwwswnwnwnweeenwenwse
nwnwswnwswnenwnenwnenwenwnwnenwnwnenwnw
seseeseseseneseenwswneseseswnwsweneswwe
swwwwwwnwnwwwnwswnwwwnewewwne
eneneneswneneneneenenwnenenene
nesewsesewneswnwwwnwwwwwwnewwnenw
enenenwnenenenenenenesenenee
seswseswswswesenwseseswnenwswneswswswsw
nenenenenenewwneneenenenenenenesenenene
swneswnewswwwwswswswwwswswseswwsw
nwnwewnwnwseeneswwswnwnwwnwwwnwnwnww
eeeswnweeeweweweee
enwwnwwenwwsww
wneswsewswwwwwswwswwwswwww
swwwwewnwwweweswewwenwww
wwseswenewwwwwwwwwwsewnwwww
nwsewseseneswesweseswnwwswnew
swneseswswswswswswswswseswswswswswswsene
nwneneneneswneneswnenenewnenenenwswenene
wwswwewswswswswswwwswnwwwwseswsw
nweeseeeeseseeseesweseenwsesene
wneswswneneneenenenesesenewenww
seswneeneenewseeneenenenweneeene
neswewsewnwnenwnwnenwnwesewneneeswe
eeeeenwseeseseeeseeee
ewnwseeseseseeesenweseneseseseseese
swwneswewwnwwewwwwsewswnewww
swwswnenwesewneseenwswenewnwenww
nwnwwnwnwnwwwnenwnenwwnwsewnwnwnwsw
swnwswswswwswwswwnweswswswwswswswwe
wnwneeeeneneeesesweeeeeenee
ewnwneenwnenwnwnenenenwneneneneswneswnene
wwwenwswwnewwwweswwwww
swseenwwswswnwnwswsewseswswseneeesw
swneseseswswswseseseswswseseseswsw
neneneenwneneswwnwnenwnesewnenewnwnee
swnwswswseswseseswseswswswswnwseswswsesese
wswwswwwwswswwswsweswwswswnwww
nwnwwneseseneenenenenenwwneswnwsenewne
wnwsenwwwwwnwwwneswwwwwnwnwnwe
swswseswneseswswsewswswswswswswswseswnee
swsesewswnewnenwsenwneswneswwwswwsw
swseswswswsesesesewswseeseswseeswsenwsw
seswswwseeswswenwswseswenwswwswsesw
neneneneneneneneneneneswneweneneneneene
swsweneenwnwsweeeeenweeeeee
neswnesenwwswwnweeswsweswnesewsww
nwesewnwseewswswnwwswneeenw
eeseenesewsweseswnweseesenwnesesee
wneswswswnwswweswnwwsweswnweswswesew
senwnenenenenenenewnewnenenwnesenwneswse
nesenweswnwnenwenenwnwnwswswnwnwnwsenene
seswsweswswwwswwswwwwwwwswnewsw
enwwwswswswswswswswswwswwseswswnenwswsw
nwewwenwwwewwswswwwwwwww
sewseneswesweweeweenwneeesee
nwnwwwewnwwnwnww
seseseeenwswwenwswswseenwseseeseeee
seseswseesenesenwsesenwsesewsesesesesese
wwswwsesewswswwswwwenewswwswsenene
nenwnwesenwnweswnwnwnwwnwnwnwswnwsee
seswswswswswseseseenesewwsesenwsesesenw
wswsweswsenwwwwswewneswsew
swneneweswenwswswseswswseswnwsesewswesw
nwnenwsweesenwwseswenwwwseswwswnw
wwnwenwnwnwnwswnwnwnwnwwnwnwnwwnw
swswswneneenwnenwnwnwsenwenwnwwwnweenw
nwnwwnenwenwswnwnwnwswwenwnwneneswnwnwsw
enwnweewenesesweeneneeeeeene
nwenwweeeeeenwneeeswseeeswse
nwseneeneneeeeneeeneeeneenenenesw
wwneswswswewswsesenewwseswswnwswsw
swseswswswswseswsesweswswswswswnwswswswnw
nwweswwseseeseseneswnesenweseesenewe
wnenwnwnwnwnwwnwnwnwsesenwnwnwnewnwsenwnw
nenenenwnwsenenwnwnwnwnenwnwnwnwnwnwnwsw
ewsweenwnweneeeseneweseeesew
wnwnwnwswswswswswseeswswwswswseswswe
nwwswnwneeeeswewwnwswnwenwswswenwnw
swswswneswsewswswnewne
swsesesenesewswseseseseswseswsesesesese
nenewneneneneneneneeeneweneneeenese
wwwwnwwwwwwwwwwwwsewnew
wwswswnwswwweswwwwwswwwwsww
nwnwnwnwnwnwsenwenenwneswnwsenwnwnenwnwnwse
neneneneneneenenwneseneeenee
eeneeeeneenwswnesenenweeeeenesw
swnenenwseewnesweseseenwsesewseswnwse
seseswnwsesesweseneswsesesenwseseseseswse
nesenenwnwnwnwnenenwnewnwnwnwnwnwnwnwne
nenwnwwswnenwenwsenwnwsewnwnwnwwww
neswswseswseswswsesenwswswseswnwsweswswne
nweneseswnwnwnewnwneenenewnwnwnenwnenenw
eeseneeswswnweswseesesenwnesesesesee
eseseswswswswneswwswswneseswswwswwsw
seseseneswewsesesesesenesesesesesesesese
swsweewnwsewwenwsenenewnwsenenee
wnwwwnwnwswwwenwseeenwnew
swnenwneseseswswswseswswseeswnwseswswswswe
nwnenwwwnenwwsenwnwsenenwnwnenwnwnwnwse
swnwnwnwnenenenwnwnwnwseneenewnwnwnwnwnene
wnwewnwwswwwnwnewwwnwnwwswwwnww
nwsenenwnenwnenenwnenwnewnwseswenenwnwne
neneseeeneneenewneneneneswnene
sweeenweeseweseseesewseeee
nwswseneeeneenwneneeeswseneswenwene
nwnwwnwnenwnwnwwnwnwswwwnw
wwnwwnwwwnwwnwwwewnwnwswnwenww
wwwwwswwwwwwwswwnwwswswswe
seswneswsenwweenwswnwseeneneswseseese
nwswsenwwseswseswswsenwewenwnenwnwew
swnenwnenwneneneneneneswnenenwnenenesene
weenenenwneeneneeneseese
nwnwnenwswnwseesewneenenenewnwne
eenweswenwseeneeeeseeeeeeew
seswsewseseseswseseseswsenwseseswnesesese
seseswseseseswnesesesewseseseswswswsese
wswswwswneseswwswnwswswwswswwwwsw
swswswseeswwswswswseswseneswswswseswsw
nwnwnwnwnwnwnwswenwnwnenwnwenew
nwnwnwnwnwenwnwnwnwwwnwnwwnwnwnwnw
nwesweenweeeeseesweeeeeeene
nwwwnwnwwnenwnwnwsw
nwnwswwnwnwnwnenwwsenwnweswnwnwenwnw
seseseesweseeenwseneeeee
nweeswswesenenweneswnwenwneweneesw
eeseswswseswwneswwneseseswwsenwseswe
neeneeneneeeweeseneneneneseneneew
nwsewnwnwnwwnwnwwnwsewwnwnwnwnwnwwnw
wswswneswwnwswwswweswwwswwsww
sesenwswseswseswseseeswseswnwsesesesese
nwenwnenwnwwnwnwnenwwenwnwnwnenwnene
sewseewswnwenwswneenenwnwnenewsww
nenwnwnwnwnwnwnwnwneswnwswsenwnenwnenwnwnw
seseseseseswseswwseseseeswseswswewsw
neseneenwwwsenesesenenwwe
wwswswneneswnwsewswswswsewswswseww
sewewswwwnwnwsenwnwsewnwwnwsewwnw
wnwnwwwwwnwewnwwnwnenwsww
wwswswswewwnewswnwwwwnesw
swwwwewnewnewswnwwnwnwsewnesenw
swnwnwnwnenenweswenwnwnwnwnwnwnwswsenwsw
eneneneswneeeneenene
swswnwswswswsweswswswswswswswswswswnwswnee
wwswwwswnweswwwnwwwweweew
wnwnenenenenenenwnenwnenwnesenenenenwnesenw
nenweenwnwsewenwneseswsenwnwnwsesesese
wwneeseswseesenenesweneswneswnenwnenw
swswswwswwwwswswnwswwwnewwwwswse
seeseswswsenwwswswsesenwswswesenwese

2
2020/data/day3.expected Normal file
View file

@ -0,0 +1,2 @@
205
3952146825

323
2020/data/day3.input Normal file
View file

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

2
2020/data/day4.expected Normal file
View file

@ -0,0 +1,2 @@
202
137

1068
2020/data/day4.input Normal file

File diff suppressed because it is too large Load diff

2
2020/data/day5.expected Normal file
View file

@ -0,0 +1,2 @@
998
676

960
2020/data/day5.input Normal file
View file

@ -0,0 +1,960 @@
BFBBBBBLLR
BBFFBBFRRL
FBFBFFFRRL
BBFFFBFRRL
BFFBFBFRLL
FFBBBFBLRL
BFFFBFFLLR
FBFFFFBLRR
FBFFBBBRRR
BFFBFFFLLR
BFFFFFBLLL
FFBBFFBLRR
BFFFFFBRLR
FBFBFBFLLL
FFBFBFFLLL
BBFFFFFLLL
FFFBBBFLLL
BBFFBFBLLR
FFBFBFBRRR
BFFBFFFRRR
BBFFBFBRLR
FFFBFBFLRL
BBFFBBBLRR
FBBFFFFLLR
BBBFBBFLLL
BFFFFBBRLL
FBBFBFBRRL
FFBBBFFRRR
BBFFFFBRRR
FBBBBFFLLR
BFFFFFBLRR
FFBBFBFLLR
BFFBFBBLLL
BBFBBBBLLL
FBFBBBFRLL
FF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is too large Load diff

2
2020/data/day7.expected Normal file
View file

@ -0,0 +1,2 @@
222
13264

594
2020/data/day7.input Normal file
View file

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

2
2020/data/day8.expected Normal file
View file

@ -0,0 +1,2 @@
1797
1036

625
2020/data/day8.input Normal file
View file

@ -0,0 +1,625 @@
acc +17
acc +37
acc -13
jmp +173
nop +100
acc -7
jmp +447
nop +283
acc +41
acc +32
jmp +1
jmp +585
jmp +1
acc -5
nop +71
acc +49
acc -18
jmp +527
jmp +130
jmp +253
acc +11
acc -11
jmp +390
jmp +597
jmp +1
acc +6
acc +0
jmp +588
acc -17
jmp +277
acc +2
nop +163
jmp +558
acc +38
jmp +369
acc +13
jmp +536
acc +38
acc +39
acc +6
jmp +84
acc +11
nop +517
acc +48
acc +47
jmp +1
acc +42
acc +0
acc +2
acc +24
jmp +335
acc +44
acc +47
jmp +446
nop +42
nop +74
acc +45
jmp +548
jmp +66
acc +1
jmp +212
acc +18
jmp +1
acc +4
acc -16
jmp +366
acc +0
jmp +398
acc +45
jmp +93
acc +40
acc +38
acc +21
nop +184
jmp -46
nop -9
jmp +53
acc +46
acc +36
jmp +368
acc +16
acc +8
acc -9
acc -4
jmp +328
acc -15
acc -5
acc +21
jmp +435
acc -5
acc +36
jmp +362
acc +26
jmp +447
jmp +1
jmp +412
acc +11
acc +41
nop -32
acc +17
jmp -63
jmp +1
nop +393
jmp +62
acc +18
acc +30
nop +417
jmp +74
acc +29
acc +23
jmp +455
jmp +396
jmp +395
acc +33
nop +137
nop +42
jmp +57
jmp +396
acc +7
acc +0
jmp +354
acc +15
acc +50
jmp -12
jmp +84
nop +175
acc +5
acc -2
jmp -82
acc +1
acc +26
jmp +288
nop -113
nop +366
acc +45
jmp +388
acc +21
acc +38
jmp +427
acc +33
jmp -94
nop -118
nop +411
jmp +472
nop +231
nop +470
acc +48
jmp -124
jmp +1
acc +5
acc +37
acc +42
jmp +301
acc -11
acc -17
acc +14
jmp +357
acc +6
acc +20
acc +13
jmp +361
jmp -65
acc +29
jmp +26
jmp +329
acc +32
acc +32
acc +17
jmp -102
acc -6
acc +33
acc +9
jmp +189
acc +3
jmp -128
jmp -142
acc +24
acc -5
jmp +403
acc +28
jmp +310
acc +34
acc +4
acc +33
acc +18
jmp +227
acc -8
acc -15
jmp +112
jmp +54
acc +21
acc +23
acc +20
jmp +320
acc +13
jmp -77
acc +15
nop +310
nop +335
jmp +232
acc -3
nop +50
acc +41
jmp +112
nop -10
acc +29
acc +27
jmp +52
acc +40
nop -132
acc -16
acc +27
jmp +309
acc -8
nop +147
acc +20
acc +46
jmp +202
acc +27
jmp -43
jmp +1
acc +33
acc -13
jmp +300
acc +1
jmp -202
acc -17
acc +0
acc +34
jmp -5
nop +335
acc -16
acc -17
jmp -120
acc -19
acc -13
acc +4
jmp +368
jmp +21
acc +39
acc +39
acc -18
jmp -157
nop +280
acc +33
nop -37
jmp +32
acc -16
acc +18
acc +46
jmp -121
acc -19
jmp +195
acc +28
jmp +124
jmp +331
jmp -228
jmp -146
jmp +85
jmp +60
acc +20
acc -9
jmp +303
jmp -122
jmp +111
acc +32
acc +0
acc +39
acc +29
jmp -31
nop +320
jmp -63
jmp +223
nop -149
acc -12
acc -11
acc +32
jmp +309
jmp -13
acc -19
jmp -123
acc +21
acc +18
acc +49
jmp +175
acc -14
nop -129
acc -2
acc +31
jmp +79
acc +23
acc +50
acc +39
acc +7
jmp -235
jmp -166
acc +9
jmp +293
acc -11
jmp +76
acc +44
acc +3
acc +37
jmp +123
nop -104
jmp -157
acc +14
acc +10
acc +28
jmp +25
acc +37
jmp +188
jmp -49
acc -11
jmp -90
acc -8
jmp +197
acc +5
jmp +115
acc +44
jmp -228
nop -2
acc +46
jmp +130
nop +183
nop +106
acc +27
acc +37
jmp -309
acc +28
acc -4
acc -12
acc +38
jmp +93
acc +8
acc +23
acc -9
acc +6
jmp -42
acc +10
acc +35
acc +4
jmp -231
acc +19
acc +7
acc +23
acc +11
jmp -90
acc +0
nop +158
nop -150
acc +33
jmp +107
acc +48
acc -2
jmp -104
acc +6
nop -57
nop +172
acc -11
jmp -7
acc +6
acc +50
acc -9
acc +12
jmp -171
acc +3
jmp +26
acc +42
acc +31
acc +20
acc +32
jmp -48
acc +13
jmp -6
jmp +178
acc +47
jmp -153
acc +28
nop +74
jmp -162
acc -15
nop -104
acc -9
jmp -227
acc +49
acc -19
acc +41
jmp -318
acc +9
acc +12
acc +7
jmp +34
jmp +137
nop -143
acc -8
acc +5
acc +31
jmp -20
jmp -237
acc +39
acc +0
jmp -298
acc +45
acc -19
acc +11
jmp -151
acc +40
acc +27
nop +150
nop -391
jmp -341
acc +1
acc +11
acc +18
nop -234
jmp +77
nop +104
jmp -65
acc +32
jmp -27
nop -317
nop +159
acc +14
acc -10
jmp -348
acc +29
jmp +32
acc +48
acc -19
jmp +17
jmp -201
jmp -224
nop +26
acc -7
acc +23
acc +46
jmp -6
acc +22
acc +39
acc +9
acc +23
jmp -30
jmp -243
acc +47
acc -15
jmp -298
jmp -393
jmp +1
acc +3
nop -24
acc +7
jmp -59
acc -6
acc +26
jmp -102
acc +34
acc +24
jmp -207
acc +36
acc +40
acc +41
jmp +1
jmp -306
jmp +57
jmp +1
nop +99
acc +28
jmp -391
acc +50
jmp -359
acc -5
jmp +9
jmp -355
acc +5
acc +2
jmp -77
acc +40
acc +28
acc +22
jmp -262
nop -287
acc +34
acc -4
nop +112
jmp -195
acc +29
nop -94
nop -418
jmp +24
jmp -190
acc +2
jmp -311
jmp -178
jmp -276
acc -12
acc -18
jmp +62
jmp -174
nop +31
acc +33
nop -158
jmp -417
acc +3
acc +21
acc +47
jmp +87
acc +45
jmp -77
acc +6
acc -10
jmp +1
jmp -240
acc +7
acc +47
jmp -379
acc -14
acc +50
nop -75
acc +30
jmp +70
jmp -392
jmp -430
acc +22
acc -2
jmp -492
jmp +1
acc -6
acc +38
jmp -36
nop -336
jmp -32
jmp +61
acc +20
acc -9
acc +2
jmp -175
acc +21
acc -2
jmp -6
jmp -527
acc +11
acc +16
jmp -262
jmp +1
nop -327
acc +29
jmp -114
acc +11
acc +17
acc +26
nop -104
jmp -428
nop -178
nop -242
acc +29
acc +5
jmp -245
jmp -417
jmp -278
acc +35
acc +21
jmp +1
nop -263
jmp +8
acc +42
jmp -95
nop -312
acc -11
acc +34
acc +0
jmp +19
acc +8
acc -13
acc +32
acc +21
jmp -208
acc +15
acc +39
nop -194
jmp -280
jmp +24
nop -516
acc +21
acc +48
jmp -367
jmp -121
acc +49
acc -16
jmp -136
acc +0
jmp -148
jmp -85
jmp -103
nop -446
jmp -242
acc -12
acc +13
acc +31
acc -1
jmp -435
nop -420
acc +22
acc -5
jmp -567
nop -354
acc +11
acc +33
acc +45
jmp -76
acc -2
acc +0
acc +25
acc +46
jmp -555
acc +0
acc +11
nop -2
jmp -394
jmp -395
acc +8
acc +14
acc +47
acc +22
jmp +1

2
2020/data/day9.expected Normal file
View file

@ -0,0 +1,2 @@
26134589
3535124

1000
2020/data/day9.input Normal file

File diff suppressed because it is too large Load diff

11
2020/day1/day1.hs Normal file
View file

@ -0,0 +1,11 @@
import AoC
import Data.List
import Data.Maybe
import Control.Monad
find_n_summing :: (Num a, Eq a) => a -> Int -> [a] -> Maybe [a]
find_n_summing to = (find ((to ==) . sum) .) . replicateM
main = runAoC (fmap read <$> lines) (solution 2) (solution 3)
where solution = product . fromJust .: find_n_summing 2020

21
2020/day1/day1.py Executable file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env python
import itertools
import sys
from typing import Iterable
def product(nums: Iterable[int]) -> int:
"""
Returns the product of all elements in 'nums'
"""
x = 1
for num in nums:
x *= num
return x
def find_summing(arity: int, nums: Iterable[int]) -> int:
return product(next(filter(lambda xs: sum(xs) == 2020, itertools.permutations(nums, r=arity))))
if __name__ == '__main__':
nums = [int(n) for n in sys.stdin.readlines()]
print(find_summing(2, nums))
print(find_summing(3, nums))

17
2020/day10/day10.hs Normal file
View file

@ -0,0 +1,17 @@
import AoC
import Data.List
pairs :: [a] -> [(a, a)]
pairs xs = zipWith (,) xs (tail xs)
part1 :: [Int] -> Int
part1 = product . map length . group . sort . map (uncurry $ flip (-)) . pairs
numArrangements :: [Int] -> Int
numArrangements = snd . head . go
where go xs = foldr (\x acc -> (x, sum . map snd . takeWhile (\(y, _) -> x-y <= 3) $ acc) : acc) [(last xs, 1)] $ init xs
main = runAoC (addPhonePort . sortReverse . (0:) . map read . lines) part1 numArrangements
where addPhonePort (x:xs) = (x+3):x:xs
sortReverse = sortBy (flip compare)

101
2020/day11/day11.py Normal file
View file

@ -0,0 +1,101 @@
#!/usr/bin/env python
from copy import deepcopy
from enum import Enum, auto
from functools import cache
from itertools import chain
import sys
from typing import Iterable, List, Optional, Tuple
NEIGHBOURS = [(dx, dy) for dy in (-1, 0, 1) for dx in (-1, 0, 1) if not dx == dy == 0]
class Tile(Enum):
FLOOR = '.'
FREE = 'L'
OCCUPIED = '#'
class Layout:
def __init__(
self,
s: str,
max_neighbour_steps: Optional[int],
occupied_neighbours_to_leave: int):
self._store = [[Tile(c) for c in line] for line in s.splitlines()]
self.num_rows = len(self._store)
self.num_cols = len(self._store[0])
self.max_neighbour_steps = max_neighbour_steps
self.occupied_neighbours_to_leave = occupied_neighbours_to_leave
def tiles(self) -> Iterable[Tile]:
return chain.from_iterable(self._store)
def get(self, row: int, col: int) -> Tile:
return self._store[row][col]
def set(self, row: int, col: int, t: Tile) -> None:
self._store[row][col] = t
def step(self) -> bool:
new_tiles = []
for row in range(self.num_rows):
for col in range(self.num_cols):
num_neighbours = self.count_neighbours(row, col)
tile = self.get(row, col)
new_tile = None
if tile == Tile.FREE and num_neighbours == 0:
new_tile = Tile.OCCUPIED
elif tile == Tile.OCCUPIED and num_neighbours >= self.occupied_neighbours_to_leave:
new_tile = Tile.FREE
if new_tile is not None:
new_tiles.append((row, col, new_tile))
for row, col, tile in new_tiles:
self.set(row, col, tile)
return len(new_tiles) != 0
def _find_neighbour(self, row: int, col: int, direction: Tuple[int, int]) -> Optional[Tuple[int, int]]:
steps = 0
while self.max_neighbour_steps is None or steps < self.max_neighbour_steps:
row += direction[0]
col += direction[1]
if row < 0 or row >= self.num_rows:
break
if col < 0 or col >= self.num_cols:
break
if self.get(row, col) != Tile.FLOOR:
return (row, col)
steps += 1
return None
@cache
def _neighbour_coords(self, row: int, col: int) -> List[Tuple[int, int]]:
coords = []
for direction in NEIGHBOURS:
neighbour = self._find_neighbour(row, col, direction)
if neighbour is not None:
coords.append(neighbour)
return coords
def neighbours(self, row: int, col: int) -> Iterable[Tile]:
for nrow, ncol in self._neighbour_coords(row, col):
yield self.get(nrow, ncol)
def count_neighbours(self, row: int, col: int) -> int:
return sum(1 for tile in self.neighbours(row, col) if tile == Tile.OCCUPIED)
def run(layout: Layout) -> int:
while layout.step():
pass
return len([t for t in layout.tiles() if t == Tile.OCCUPIED])
if __name__ == '__main__':
layout_str = sys.stdin.read()
print(run(Layout(layout_str, 1, 4)))
print(run(Layout(layout_str, None, 5)))

47
2020/day13/day13.hs Normal file
View file

@ -0,0 +1,47 @@
module Day13 where
import AoC
import Data.List
import Data.List.Split
import Data.Maybe
import Data.Ord
import Data.Tuple
-- | inverse integer modulus, "remainder until the next multiple of d"
--
-- @(n + n `'invMod'` d) `'mod'` d == 0@
invMod :: Integral a => a -> a -> a
invMod n d | r == 0 = 0
| otherwise = d - r
where r = n `mod` d
-- | @'combineRemainders' (r1, d1) (r2, d2) = (r3, d3)@ combines a relation of the form
--
-- @
-- x = r1 (mod d1)
-- x = r2 (mod d2)
-- @
--
-- into a single relation
--
-- @
-- x = r3 (mod d3)
-- @
--
-- @d1@ should be larger than @d2@ for better performance.
combineRemainders :: (Integral a) => (a, a) -> (a, a) -> (a, a)
combineRemainders (r1, d1) (r2, d2) = (fromJust . find (\x -> x `mod` d2 == r2) $ [r1,d1+r1..], d1*d2)
part1 :: Int -> [Int] -> Int
part1 arr = uncurry (*) . minimumBy (comparing snd) . map (toSnd $ invMod arr)
where toSnd f x = (x, f x)
part2 :: [Maybe Int] -> Int
part2 = fst . foldl1 combineRemainders . map (\(r, d) -> (r `invMod` d, d)) . catMaybes . map sequence . enumerate 0
where enumerate start (x:xs) = (start, x) : enumerate (succ start) xs
enumerate _ [] = []
main = runAoC (intoTuple . map (map (fmap read . justIf (/="x")) . splitOn ",") . lines) (uncurry part1 . fmap catMaybes) (part2 . snd)
where intoTuple [[Just x], y] = (x, y)
justIf p x = if p x then Just x else Nothing

82
2020/day14/day14.hs Normal file
View file

@ -0,0 +1,82 @@
{-# LANGUAGE NamedFieldPuns #-}
module Day14 where
import AoC
import Data.Bits
import Data.List
import Data.Map (Map)
import qualified Data.Map as M
import Data.Maybe
import Data.Tuple
import Data.Word
import Text.ParserCombinators.ReadP
import Text.Read.Lex
data Mask = Mask { set :: Word64
, clear :: Word64
, dontcare :: Word64
} deriving (Eq, Show)
data Store = Store { address :: Word64
, value :: Word64
} deriving (Show)
parseMaskDecl :: ReadP Mask
parseMaskDecl = do
string "mask = "
mask <- many1 (choice $ char <$> "01X")
let extractMask c = foldl setBit zeroBits . findIndices (==c) . reverse $ mask
return $ Mask { set = extractMask '1'
, clear = extractMask '0'
, dontcare = extractMask 'X'
}
parseStoreInstruction :: ReadP Store
parseStoreInstruction = do
string "mem"
address <- between (char '[') (char ']') readDecP
string " = "
value <- readDecP
return $ Store {address, value}
parseGroup :: ReadP (Mask, [Store])
parseGroup = do
mask <- parseMaskDecl
char '\n'
stores <- parseStoreInstruction `endBy` (char '\n')
return (mask, stores)
runStores :: [Store] -> Word64
runStores = sum . M.fromList . map (\(Store a v) -> (a, v))
applyMask :: Mask -> Word64 -> Word64
applyMask Mask{set, clear} n = (n .|. set) .&. complement clear
maskValues :: Mask -> [Store] -> [Store]
maskValues mask = map maskValue
where maskValue store@Store{value} = store {value = applyMask mask value}
maskAddresses :: Mask -> [Store] -> [Store]
maskAddresses mask = concatMap maskAddress
where maskAddress store@Store{address} = map (\m -> store {address = applyMask m address}) . evalDontcare $ mask { clear = 0 }
evalDontcare :: Mask -> [Mask]
evalDontcare = go 0
where go i mask@Mask{set, clear, dontcare}
| dontcare == 0 = [mask]
| dontcare `testBit` i = go (i+1) withSet ++ go (i+1) withClear
| otherwise = go (i+1) mask
where new = mask { dontcare = dontcare `clearBit` i }
withSet = new { set = set `setBit` i }
withClear = new { clear = clear `setBit` i }
part1 :: [(Mask, [Store])] -> Word64
part1 = runStores . concatMap (uncurry maskValues)
part2 :: [(Mask, [Store])] -> Word64
part2 = runStores . concatMap (uncurry maskAddresses)
main = runAoC readGroups part1 part2
where readGroups = fromJust . oneCompleteResult (many parseGroup)

27
2020/day15/day15.py Normal file
View file

@ -0,0 +1,27 @@
#!/usr/bin/env python
import sys
def run_game(init, iterations):
last_seen = {}
previous = None
for i, n in enumerate(init):
if previous is not None:
last_seen[previous] = i-1
previous = n
for i in range(i+1, iterations):
if previous in last_seen:
x = i - last_seen[previous] - 1
else:
x = 0
last_seen[previous] = i-1
previous = x
return previous
if __name__ == '__main__':
init = [int(n) for n in sys.stdin.read().split(',')]
print(run_game(init, 2020))
print(run_game(init, 30000000))

95
2020/day16/day16.hs Normal file
View file

@ -0,0 +1,95 @@
{-# LANGUAGE NamedFieldPuns #-}
module Day16 where
import AoC
import Data.List
import Data.Maybe
import qualified Data.Set as S
import Data.Set (Set)
import Text.ParserCombinators.ReadP
import Text.Read.Lex
data Field = Field { name :: String
, valids :: Set Int
} deriving (Show)
type Ticket = [Int]
data Input = Input { fields :: [Field]
, myTicket :: Ticket
, otherTickets :: [Ticket]
} deriving (Show)
line :: ReadP a -> ReadP a
line p = p <* char '\n'
parseField :: ReadP Field
parseField = do
name <- many1 $ satisfy (/=':')
string ": "
ranges <- parseRange `sepBy` string " or "
let valids = S.fromList . concat . map (uncurry enumFromTo) $ ranges
return $ Field { name, valids }
where parseRange = do
n1 <- readDecP
char '-'
n2 <- readDecP
return (n1, n2)
parseTicket :: ReadP Ticket
parseTicket = readDecP `sepBy` char ','
parseInput :: ReadP Input
parseInput = do
fields <- many1 $ line parseField
line $ string ""
line $ string "your ticket:"
myTicket <- line parseTicket
line $ string ""
line $ string "nearby tickets:"
otherTickets <- many1 $ line parseTicket
return $ Input {fields, myTicket, otherTickets }
matchesAnyField :: [Field] -> Int -> Bool
matchesAnyField fields n = any ((n `S.member`) . valids) fields
iterateUntilNothing :: (a -> Maybe a) -> a -> a
iterateUntilNothing f x = maybe x (iterateUntilNothing f) $ f x
data Resolve a = Resolved a | Choice (Set a) deriving (Show)
resolve :: Ord a => [[a]] -> Maybe [a]
resolve = sequence . map fromResolved . iterateUntilNothing resolve' . map (Choice . S.fromList)
where fromResolved (Resolved x) = Just x
fromResolved _ = Nothing
findSingletonChoice :: [Resolve a] -> Maybe (a, [Resolve a])
findSingletonChoice [] = Nothing
findSingletonChoice (x:xs) =
case x of
Choice s | S.size s == 1 -> let [r] = S.elems s
in Just (r, Resolved r : xs)
_ -> fmap (\(r, rest) -> (r, x:rest)) $ findSingletonChoice xs
resolve' :: Ord a => [Resolve a] -> Maybe [Resolve a]
resolve' xs = do
(r, xs') <- findSingletonChoice xs
return $ map (dropChoice r) xs'
where dropChoice x (Choice s) = Choice (S.delete x s)
dropChoice _ y = y
part1 :: Input -> Int
part1 Input { fields, otherTickets } = sum . filter (not . matchesAnyField fields) . concat $ otherTickets
part2 :: Input -> Int
part2 Input { fields, myTicket, otherTickets } = product departureValues
where validTickets = filter (all $ matchesAnyField fields) otherTickets
columns = transpose validTickets
fieldNames = fromJust . resolve . map findPossibleFields $ columns
departureIndices = findIndices ("departure" `isPrefixOf`) fieldNames
departureValues = map (myTicket !!) departureIndices
findPossibleFields col = map name . filter (\field -> all (`S.member` valids field) col) $ fields
main = runAoC (fromJust . oneCompleteResult parseInput) part1 part2

23
2020/day17/day17.hs Normal file
View file

@ -0,0 +1,23 @@
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, DataKinds #-}
module Day17 where
import AoC
import Conway
import Data.List
import Data.Vector.Sized (Vector)
import qualified Data.Vector.Sized as V
import Data.Set (Set)
import qualified Data.Set as S
instance (Num a, Eq a) => Index (Vector n a) where
neighbours i = filter (/= i) . V.mapM (flip map [-1, 0, 1] . (+)) $ i
addIndex = V.zipWith (+)
run6 :: (Index i, Ord i) => Set i -> Int
run6 = S.size . (!! 6) . iterate (update (==3) (`notElem` [2, 3]))
main = runAoC (toIndices . lines) (run6 . S.fromList . map extendIndex) (run6 . S.fromList . map (extendIndex . extendIndex))
where toIndices input = [V.fromTuple (row, col) :: Vector 2 Int | (row, line) <- zip [0..] input, (col, '#') <- zip [0..] line]
extendIndex = V.cons 0

56
2020/day18/day18.hs Normal file
View file

@ -0,0 +1,56 @@
module Day18 where
import AoC
import Control.Applicative
import Data.Maybe
import Text.ParserCombinators.ReadP
import Text.Read.Lex
data Expression = Literal Int
| Addition Expression Expression
| Multiplication Expression Expression
| Bracketed Expression
type ApplicationSequencer = Expression -> String -> Expression -> Expression
parseLiteral :: ReadP Expression
parseLiteral = Literal <$> readDecP
parseBracketed :: ApplicationSequencer -> ReadP Expression
parseBracketed seq = Bracketed <$> between (char '(') (char ')') (parseExpression seq)
parseOperations :: ApplicationSequencer -> ReadP Expression
parseOperations seq =
do l <- parseLiteral <|> parseBracketed seq
apps <- many1 $ parseApplication seq
return $ foldl (\l (op, r) -> seq l op r) l apps
parseApplication :: ApplicationSequencer -> ReadP (String, Expression)
parseApplication seq =
do skipSpaces
op <- choice $ map string ["*", "+"]
skipSpaces
r <- parseLiteral <|> parseBracketed seq
return $ (op, r)
parseExpression :: ApplicationSequencer -> ReadP Expression
parseExpression seq = parseLiteral <|> parseOperations seq <|> parseBracketed seq
sequenceLeftToRight :: ApplicationSequencer
sequenceLeftToRight l op r = toOperation op l r
where toOperation "*" = Multiplication
toOperation "+" = Addition
sequenceAdditionPrecedence :: ApplicationSequencer
sequenceAdditionPrecedence (Multiplication l r) "+" rr = Multiplication l (Addition r rr)
sequenceAdditionPrecedence l op r = sequenceLeftToRight l op r
eval :: Expression -> Int
eval (Literal n) = n
eval (Addition l r) = eval l + eval r
eval (Multiplication l r) = eval l * eval r
eval (Bracketed x) = eval x
main = runAoC lines (run sequenceLeftToRight) (run sequenceAdditionPrecedence)
where run seq = sum . map (eval . fromJust . oneCompleteResult (parseExpression seq))

45
2020/day19/day19.hs Normal file
View file

@ -0,0 +1,45 @@
module Day19 where
import AoC
import Control.Applicative
import Data.Char
import Data.Foldable
import Data.Map (Map, (!))
import qualified Data.Map as M
import Data.Maybe
import Data.Tuple
import Text.ParserCombinators.ReadP
import Text.Read.Lex
data RuleElement = Literal String | Reference Int
parseElement :: ReadP RuleElement
parseElement = parseRef <|> parseLit
where parseRef = Reference <$> readDecP
parseLit = Literal <$> between (char '"') (char '"') (many1 $ satisfy isAlphaNum)
parseRule :: ReadP (Int, [[RuleElement]])
parseRule = do ruleNum <- readDecP
string ": "
alternatives <- parseAlternatives
return (ruleNum, alternatives)
where parseAlternatives = parseSequence `sepBy` string " | "
parseSequence = parseElement `sepBy` char ' '
buildParser :: Map Int [[RuleElement]] -> Int -> ReadP String
buildParser m i = buildAlternatives $ m ! i
where buildAlternatives = asum . map buildSequence
buildSequence = foldl1 (liftA2 (++)) . map buildElement
buildElement (Literal s) = string s
buildElement (Reference j) = buildParser m j
countRootMatches :: [String] -> Map Int [[RuleElement]] -> Int
countRootMatches input rules = length . filter (isJust . oneCompleteResult rootParser) $ input
where rootParser = buildParser rules 0
main = runAoC splitInput run (run . withExtraRules)
where splitInput = swap . fmap tail . break (=="") . lines
withExtraRules = fmap (++ ["8: 42 | 42 8", "11: 42 31 | 42 11 31"])
run = uncurry countRootMatches . fmap parseRules
parseRules = M.fromList . map (fromJust . oneCompleteResult parseRule)

40
2020/day2/day2.hs Normal file
View file

@ -0,0 +1,40 @@
module Day2 where
import AoC
import Data.Char
import Data.Maybe
import Text.ParserCombinators.ReadP
import Text.Read.Lex
data Line = Line
{ num1 :: Int
, num2 :: Int
, letter :: Char
, password :: String
}
instance Show Line where
show (Line num1 num2 letter password) = show num1 ++ "-" ++ show num2 ++ " " ++ [letter] ++ ": " ++ password
parseLine :: ReadP Line
parseLine = do
num1 <- readDecP
string "-"
num2 <- readDecP
string " "
letter <- get
string ": "
password <- munch1 $ const True
eof
return (Line num1 num2 letter password)
valid_1 :: Line -> Bool
valid_1 (Line min max letter password) = within min max $ length $ filter (== letter) password
where within x y z = x <= z && z <= y
valid_2 :: Line -> Bool
valid_2 (Line pos1 pos2 letter password) = (matchesAt pos1) /= (matchesAt pos2)
where matchesAt pos = password !! (pos-1) == letter
main = runAoC (map (fromJust . oneCompleteResult parseLine) . lines) (length . filter valid_1) (length . filter valid_2)

22
2020/day2/day2.py Executable file
View file

@ -0,0 +1,22 @@
#!/usr/bin/env python
import re
import sys
from collections import Counter
r = re.compile(r'(\d+)-(\d+) (.): (.*)')
def requirements_met_1(min_required, max_required, letter, password):
return min_required <= Counter(password)[letter] <= max_required
def requirements_met_2(first_pos, second_pos, letter, password):
return (password[first_pos-1] == letter) != (password[second_pos-1] == letter)
def do_line(req_func, line):
min_required, max_required, letter, password = r.match(line).groups()
return req_func(int(min_required), int(max_required), letter, password)
if __name__ == '__main__':
lines = list(sys.stdin.readlines())
for func in (requirements_met_1, requirements_met_2):
print(len(list(filter(lambda line: do_line(func, line), lines))))

5
2020/day2/vhdl/.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
workdir/
*.o
*.ghw
sim
top_syn.vhd

86
2020/day2/vhdl/parser.vhd Normal file
View file

@ -0,0 +1,86 @@
library ieee;
use ieee.std_logic_1164.all;
entity parser is
port (
clk : in std_logic;
reset : in std_logic;
is_record : in std_logic;
is_data : out std_logic;
char : in character;
num1, num2 : out natural range 0 to 99;
letter : out character
);
end entity;
architecture behaviour of parser is
type state_t is (S_NUM1, S_NUM2, S_LETTER, S_COLON, S_END_SPACE, S_DATA);
signal state : state_t := S_NUM1;
subtype digit is natural range 0 to 9;
type multiples_lookup_t is array(digit) of natural range 0 to 90;
constant TEN_MULTIPLES : multiples_lookup_t := (0, 10, 20, 30, 40, 50, 60, 70, 80, 90);
-- most significant digit of number
signal prev_digit : digit := 0;
signal current_digit : digit;
signal complete_num : natural range 0 to 99;
function char_to_digit(input : in character) return digit is
begin
if input >= '0' and input <= '9' then
return character'pos(input) - character'pos('0');
else
return 0;
end if;
end function;
begin
current_digit <= char_to_digit(char);
complete_num <= TEN_MULTIPLES(prev_digit) + current_digit;
process(clk)
begin
if rising_edge(clk) then
if reset then
prev_digit <= 0;
state <= S_NUM1;
else
prev_digit <= 0;
case state is
when S_NUM1 =>
if is_record then
if char = '-' then
state <= S_NUM2;
else
num1 <= complete_num;
prev_digit <= current_digit;
end if;
end if;
when S_NUM2 =>
if char = ' ' then
state <= S_LETTER;
else
num2 <= complete_num;
prev_digit <= current_digit;
end if;
when S_LETTER =>
letter <= char;
state <= S_COLON;
when S_COLON =>
state <= S_END_SPACE;
when S_END_SPACE =>
state <= S_DATA;
when S_DATA =>
if not is_record then
state <= S_NUM1;
end if;
end case;
end if;
end if;
end process;
is_data <= '1' when state = S_DATA else '0';
end architecture;

25
2020/day2/vhdl/run.sh Executable file
View file

@ -0,0 +1,25 @@
#!/usr/bin/bash
set -eu
INPUT=$(readlink --canonicalize-existing "$1")
MODE=${2:-}
GHDLFLAGS="--std=08 --workdir=workdir"
cd "$(dirname "${BASH_SOURCE[0]}")"
mkdir -p workdir
if [[ $MODE = "--synth" ]]; then
for step in 1 2; do
ghdl remove $GHDLFLAGS
ghdl synth $GHDLFLAGS -gCOUNTER_WIDTH=12 -gSTEP="$step" parser.vhd verifier.vhd top.vhd -e top > top_syn.vhd 2>/dev/null
ghdl analyze $GHDLFLAGS top_syn.vhd sim.vhd
ghdl elab-run $GHDLFLAGS sim -gSTEP="$step" --ieee-asserts=disable < "$INPUT"
done
else
ghdl remove $GHDLFLAGS
ghdl analyze $GHDLFLAGS parser.vhd verifier.vhd top.vhd sim.vhd
ghdl elab-run $GHDLFLAGS sim -gSTEP=1 < "$INPUT"
ghdl elab-run $GHDLFLAGS sim -gSTEP=2 < "$INPUT"
fi

47
2020/day2/vhdl/sim.gtkw Normal file
View file

@ -0,0 +1,47 @@
[*]
[*] GTKWave Analyzer v3.3.104 (w)1999-2020 BSI
[*] Wed Dec 2 10:02:23 2020
[*]
[dumpfile] "/home/xiretza/dev/aoc2020/day2/sim.ghw"
[dumpfile_mtime] "Wed Dec 2 10:01:08 2020"
[dumpfile_size] 410436
[savefile] "/home/xiretza/dev/aoc2020/day2/sim.gtkw"
[timestart] 410945000000
[size] 1600 853
[pos] -1 -1
*-27.864407 226600000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
[treeopen] top.
[treeopen] top.sim.
[treeopen] top.sim.top.
[sst_width] 221
[signals_width] 260
[sst_expanded] 1
[sst_vpaned_height] 233
@28
top.sim.clk
top.sim.reset
top.sim.top.parser_inst.is_record
@420
top.sim.top.char
@200
-
@28
top.sim.top.parser_inst.is_data
@420
top.sim.top.num1
top.sim.top.num2
top.sim.top.letter
@200
-
@420
top.sim.top.verifier_inst.count
@28
top.sim.top.verifier_inst.verified
@200
-
@24
#{top.sim.num_verified[11:0]} top.sim.num_verified[11] top.sim.num_verified[10] top.sim.num_verified[9] top.sim.num_verified[8] top.sim.num_verified[7] top.sim.num_verified[6] top.sim.num_verified[5] top.sim.num_verified[4] top.sim.num_verified[3] top.sim.num_verified[2] top.sim.num_verified[1] top.sim.num_verified[0]
@29
top.sim.top.record_ended
[pattern_trace] 1
[pattern_trace] 0

86
2020/day2/vhdl/sim.vhd Normal file
View file

@ -0,0 +1,86 @@
library ieee;
use ieee.std_logic_1164.all,
ieee.numeric_std.all;
use std.textio.all;
entity sim is
generic (
COUNTER_WIDTH : positive := 12;
STEP : natural range 1 to 2
);
end entity;
architecture a of sim is
signal char_in : character;
signal clk, reset, is_record : std_logic;
signal num_verified : unsigned(COUNTER_WIDTH-1 downto 0);
procedure print(s: string) is
variable l : line;
begin
write(l, s);
writeline(output, l);
end procedure;
begin
process
variable current_line : line;
variable current_char : character;
variable good : boolean;
procedure cycle_clock is
begin
wait for 10 ns;
clk <= '0';
wait for 10 ns;
clk <= '1';
wait for 0 ns;
end procedure;
begin
clk <= '0';
is_record <= '0';
char_in <= NUL;
reset <= '1';
cycle_clock;
reset <= '0';
cycle_clock;
lines_loop: loop
exit lines_loop when endfile(input);
readline(input, current_line);
is_record <= '1';
chars_loop: loop
read(current_line, current_char, good);
exit chars_loop when not good;
char_in <= current_char;
cycle_clock;
end loop;
is_record <= '0';
cycle_clock;
end loop;
cycle_clock;
print(to_string(to_integer(num_verified)));
wait;
end process;
top: entity work.top
generic map (
COUNTER_WIDTH => COUNTER_WIDTH,
STEP => STEP
)
port map (
clk => clk,
reset => reset,
char => char_in,
is_record => is_record,
num_verified => num_verified
);
end architecture;

84
2020/day2/vhdl/top.vhd Normal file
View file

@ -0,0 +1,84 @@
library ieee;
use ieee.std_logic_1164.all,
ieee.numeric_std.all;
entity top is
generic (
COUNTER_WIDTH : positive;
STEP : natural range 1 to 2
);
port (
clk : in std_logic;
reset : in std_logic;
char : in character;
is_record : in std_logic;
num_verified : out unsigned(COUNTER_WIDTH-1 downto 0)
);
end entity;
architecture behaviour of top is
signal is_data : std_logic;
signal num1, num2 : natural range 0 to 99;
signal letter : character;
signal prev_is_record : std_logic;
signal record_ended : std_logic;
signal verified : std_logic;
begin
record_ended <= prev_is_record and not is_record;
parser_inst: entity work.parser
port map (
clk => clk,
reset => reset,
is_record => is_record,
is_data => is_data,
char => char,
num1 => num1,
num2 => num2,
letter => letter
);
generate_verifier: if step = 1 generate
verifier_inst: entity work.verifier(step1)
port map (
clk => clk,
reset => reset or record_ended,
is_data => is_data,
num1 => num1,
num2 => num2,
letter => letter,
char => char,
verified => verified
);
elsif step = 2 generate
verifier_inst: entity work.verifier(step2)
port map (
clk => clk,
reset => reset or record_ended,
is_data => is_data,
num1 => num1,
num2 => num2,
letter => letter,
char => char,
verified => verified
);
else generate
assert false report "Bad value for ""step""" severity failure;
end generate;
process(clk)
begin
if rising_edge(clk) then
prev_is_record <= is_record;
if reset then
prev_is_record <= '0';
num_verified <= (others => '0');
elsif record_ended and verified then
num_verified <= num_verified + 1;
end if;
end if;
end process;
end architecture;

View file

@ -0,0 +1,58 @@
library ieee;
use ieee.std_logic_1164.all;
entity verifier is
port (
clk : in std_logic;
reset : in std_logic;
is_data : in std_logic;
num1, num2 : in natural range 0 to 99;
letter : in character;
char : in character;
verified : out std_logic
);
end entity;
architecture step1 of verifier is
signal count : natural range 0 to 99;
begin
process(clk)
begin
if rising_edge(clk) then
if reset then
count <= 0;
elsif is_data then
if char = letter then
count <= count + 1;
end if;
end if;
end if;
end process;
verified <= '1' when num1 <= count and count <= num2 else '0';
end architecture;
architecture step2 of verifier is
signal count : natural range 1 to 99;
signal parity : std_logic;
begin
process(clk)
begin
if rising_edge(clk) then
if reset then
count <= 1;
parity <= '0';
elsif is_data then
count <= count + 1;
if (count = num1 or count = num2) and char = letter then
parity <= not parity;
end if;
end if;
end if;
end process;
verified <= parity;
end architecture;

34
2020/day21/day21.py Executable file
View file

@ -0,0 +1,34 @@
#!/usr/bin/env python
import sys
def parse_line(line):
ingredients, allergens = line.split('(contains ')
return (set(ingredients.strip().split(' ')), set(allergens.strip().strip(')').split(', ')))
def reduce(allergen_name_candidates):
name, allergen = next((list(names)[0], allergen) for allergen, names in allergen_name_candidates.items() if len(names) == 1)
for names in allergen_name_candidates.values():
names.discard(name)
del allergen_name_candidates[allergen]
return name, allergen
if __name__ == '__main__':
lines = [parse_line(line) for line in sys.stdin.readlines()]
allergens = set.union(*(allergens for _, allergens in lines))
allergen_name_candidates = {}
for allergen in allergens:
allergen_name_candidates[allergen] = set.intersection(*(ingredients for ingredients, allergens in lines if allergen in allergens))
allergen_names = {}
while allergen_name_candidates:
name, allergen = reduce(allergen_name_candidates)
assert name not in allergen_names
allergen_names[name] = allergen
total = sum(len(ingredients - set(allergen_names)) for ingredients, _ in lines)
print(total)
names = ','.join(name for name, _ in sorted(list(allergen_names.items()), key=lambda x: x[1]))
print(names)

33
2020/day24/day24.hs Normal file
View file

@ -0,0 +1,33 @@
module Day24 where
import AoC
import Conway
import Data.List
import qualified Data.Set as S
import Optics.Core hiding (Index)
import Optics.TH
data Coord = Coord { east :: Int
, northeast :: Int
} deriving (Eq, Ord)
instance Index Coord where
neighbours c = map (addIndex c . uncurry Coord) offsets
where offsets = [(0, -1), (0, 1), (1, -1), (1, 0), (-1, 0), (-1, 1)]
addIndex (Coord x1 y1) (Coord x2 y2) = Coord (x1 + x2) (y1 + y2)
parseSteps :: String -> Coord
parseSteps [] = Coord 0 0
parseSteps xs = case xs of
('n':'w':xs) -> go (-1, 1) xs
('w':xs) -> go (-1, 0) xs
('s':'w':xs) -> go (0, -1) xs
('n':'e':xs) -> go (0, 1) xs
('e':xs) -> go (1, 0) xs
('s':'e':xs) -> go (1, -1) xs
where go (e, ne) xs = addIndex (Coord e ne) $ parseSteps xs
main = runAoC (onlySet . map parseSteps . lines) length (length . conwayN 100 . S.fromList)
where onlySet = map head . filter (odd . length) . group . sort
conwayN n = last . take n . tail . iterate (update (==2) (`notElem` [1, 2]))

28
2020/day3/day3.hs Normal file
View file

@ -0,0 +1,28 @@
import AoC
import Control.Applicative (empty)
import Control.Monad.Zip (mzip)
import Data.List (intercalate)
import Data.Maybe (catMaybes)
compose2 :: (a' -> b' -> c) -> (a -> a') -> (b -> b') -> a -> b -> c
compose2 f g h x y = f (g x) (h y)
(??) :: Functor f => f (a -> b) -> a -> f b
f ?? x = fmap ($ x) f
countHits :: (Int, Int) -> [[Bool]] -> Int
countHits = length . filterMap lookup . catMaybes .: compose2 (zipWith mzip) maybeIndices justLines
where justRightSteps = map (pure . Just) . enumFromThen 0
downNothings = flip replicate Nothing . pred
maybeIndices = uncurry $ compose2 (flip intercalate) justRightSteps downNothings
justLines = map Just
lookup = uncurry $ flip (!!)
filterMap = filter id .: map
treeCharToBool :: Char -> Bool
treeCharToBool = (== '#')
main = runAoC (map (cycle . map treeCharToBool) . lines) part1 part2
where part1 = countHits (3, 1)
part2 = product . (fmap countHits [(1,1), (3,1), (5,1), (7,1), (1,2)] ??)

21
2020/day3/day3.py Executable file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env python
import sys
def count_trees(right, down, lines):
n = 0
for i, line in enumerate(lines[::down]):
c = line[(i*right) % len(line)]
if c == '#':
n += 1
return n
if __name__ == '__main__':
lines = [line.strip() for line in sys.stdin.readlines()]
print(count_trees(3, 1, lines))
hits_multiplied = 1
for slope in ((1,1), (3,1), (5,1), (7,1), (1,2)):
hits_multiplied *= count_trees(*slope, lines)
print(hits_multiplied)

97
2020/day4/day4.hs Normal file
View file

@ -0,0 +1,97 @@
import AoC
import Control.Applicative ((<|>))
import Control.Monad (guard, mfilter)
import Data.Char (isDigit)
import Data.List (intercalate)
import Data.Maybe (mapMaybe)
import Text.ParserCombinators.ReadP
import Text.Read (readMaybe)
data HeightUnit = Centimeter | Inch deriving (Show, Eq)
data ColourSpec = Amber | Blue | Brown | Gray | Green | Hazel | Other
deriving (Show, Eq)
data Field = BirthYear Int
| IssueYear Int
| ExpirationYear Int
| Height Int HeightUnit
| HairColour String
| EyeColour ColourSpec
| PassportID String
| CountryID String
deriving (Show, Eq)
fieldSpecs :: [(String, ReadP Field)]
fieldSpecs = [ ("byr", BirthYear <$> parseYearIn 1920 2002)
, ("iyr", IssueYear <$> parseYearIn 2010 2020)
, ("eyr", ExpirationYear <$> parseYearIn 2020 2030)
, ("hgt", do h <- parseNumber 2 <|> parseNumber 3
u <- parseHeightUnit
case u of
Inch -> guard $ within 59 76 h
Centimeter -> guard $ within 150 193 h
return $ Height h u)
, ("hcl", char '#' >> HairColour <$> count 6 parseHexDigit)
, ("ecl", EyeColour <$> parseColourSpec)
, ("pid", PassportID <$> count 9 (satisfy $ const True))
, ("cid", CountryID <$> munch1 (/= ' '))
]
where parseYearIn = flip mfilter (parseNumber 4) .: within
parseHexDigit = choice . map char $ ['0'..'9']++['a'..'f']
within :: Ord a => a -> a -> a -> Bool
within a b x = a <= x && x <= b
parseNumber :: (Num a, Read a) => Int -> ReadP a
parseNumber n = do
Just digits <- readMaybe <$> count n (satisfy isDigit)
return digits
parseHeightUnit :: ReadP HeightUnit
parseHeightUnit = choice [ string "cm" >> return Centimeter
, string "in" >> return Inch
]
parseColourSpec :: ReadP ColourSpec
parseColourSpec = choice [ string "amb" >> return Amber
, string "blu" >> return Blue
, string "brn" >> return Brown
, string "gry" >> return Gray
, string "grn" >> return Green
, string "hzl" >> return Hazel
, string "oth" >> return Other
]
parseKeyValue :: ReadP k -> ReadP v -> ReadP (k, v)
parseKeyValue kp vp = do k <- kp
char ':'
v <- vp
return (k, v)
parseFieldName :: ReadP String
parseFieldName = fmap fst $ choice
$ map (\(k, _) -> parseKeyValue (string k) (munch1 (/= ' ')))
$ fieldSpecs
parseField :: ReadP Field
parseField = fmap snd $ choice
$ map (\(k, v) -> parseKeyValue (string k) v)
$ fieldSpecs
spaceSeparated :: ReadP a -> ReadP [a]
spaceSeparated = flip sepBy (many1 $ char ' ')
parseFieldNames :: ReadP [String]
parseFieldNames = spaceSeparated parseFieldName
parsePassport :: ReadP [Field]
parsePassport = spaceSeparated parseField
hasAllRequiredFields :: String -> Bool
hasAllRequiredFields = maybe False containsAllFields . fieldNames
where requiredFieldNames = ["byr", "iyr", "eyr", "hgt", "hcl", "ecl", "pid"]
containsAllFields fields = all (`elem` fields) requiredFieldNames
fieldNames = oneCompleteResult parseFieldNames
main = runAoC (filter hasAllRequiredFields . map unwords . splitOnEmptyLines) length (length . mapMaybe (oneCompleteResult parsePassport))

59
2020/day4/day4.py Executable file
View file

@ -0,0 +1,59 @@
#!/usr/bin/env python
import sys
def within(a, b, x):
return a <= x <= b
PASSPORT_FIELDS = {
'byr': lambda s: len(s) == 4 and within(1920, 2002, int(s)),
'iyr': lambda s: len(s) == 4 and within(2010, 2020, int(s)),
'eyr': lambda s: len(s) == 4 and within(2020, 2030, int(s)),
'hgt': lambda s: within(*{'cm': (150, 193), 'in': (59, 76)}[s[-2:]], int(s[:-2])),
'hcl': lambda s: len(s) == 7 and s[0] == '#' and all(c in "0123456789abcdef" for c in s[1:]),
'ecl': lambda s: s in ('amb', 'blu', 'brn', 'gry', 'grn', 'hzl', 'oth'),
'pid': lambda s: len(s) == 9 and s.isdigit(),
}
def parse_passport(line):
d = {}
for entry in line.split():
k, v = entry.split(':', maxsplit=1)
d[k] = v
return d
def check_passport_fields_exist(passport):
return set(PASSPORT_FIELDS.keys()) <= set(passport.keys())
def check_passport_fields_valid(passport):
for name, spec in PASSPORT_FIELDS.items():
try:
valid = spec(passport[name])
except:
valid = False
if not valid:
return False
return True
def split_on(f, it):
current_part = []
for el in it:
if f(el):
yield current_part
current_part = []
else:
current_part.append(el)
if current_part != []:
yield current_part
if __name__ == '__main__':
lines = [line.strip() for line in sys.stdin.readlines()]
specs = list(' '.join(lines) for lines in split_on(lambda l: l == "", lines))
passports = [parse_passport(spec) for spec in specs]
print(len(list(filter(check_passport_fields_exist, passports))))
print(len(list(filter(check_passport_fields_valid, passports))))

23
2020/day5/day5.hs Normal file
View file

@ -0,0 +1,23 @@
import AoC
import Data.List (sort)
import Data.Maybe (fromJust)
import Numeric (readInt)
import Text.ParserCombinators.ReadP
binarify :: String -> Maybe Int
binarify = oneCompleteResult . readS_to_P $ readInt 2 (`elem` "BFLR") digitValue
where digitValue 'F' = 0
digitValue 'B' = 1
digitValue 'L' = 0
digitValue 'R' = 1
findHole :: (Enum a, Eq a) => [a] -> Maybe a
findHole (x:y:ys) | y == next = findHole $ y:ys
| otherwise = Just next
where next = succ x
findHole _ = Nothing
main = runAoC (map (fromJust . binarify) . lines) part1 part2
where part1 = foldr1 max
part2 = fromJust . findHole . sort

9
2020/day6/day6.hs Normal file
View file

@ -0,0 +1,9 @@
import AoC
import qualified Data.Set as S
import Data.Set (Set)
main = runAoC ((fmap . fmap) S.fromList . splitOnEmptyLines) part1 part2
where part1 = countSetsFolded S.union
part2 = countSetsFolded S.intersection
countSetsFolded f = sum . map (S.size . foldr1 f)

50
2020/day7/day7.py Normal file
View file

@ -0,0 +1,50 @@
#!/usr/bin/env python
from collections import defaultdict
import regex
import sys
RULE_REGEX = regex.compile(r'(.*) bags contain (?:(no|\d+) (.*?) bags?(?:, )?)+\.')
def process_rules(rules):
rules_dict = {}
for rule in rules:
m = regex.fullmatch(RULE_REGEX, rule)
if m is None:
raise ValueError(f"Couldn't parse rule: {rule!r}")
colour = m.group(1)
child_nums = m.captures(2)
child_colours = m.captures(3)
children = {}
for n, c in zip(child_nums, child_colours):
if n == 'no':
continue
children[c] = int(n)
rules_dict[colour] = children
return rules_dict
def parents_of(rules, colour):
parents = set()
for parent, children in rules.items():
if colour in children:
parents.add(parent)
parents |= parents_of(rules, parent)
return parents
def children_of(rules, colour):
children = defaultdict(lambda: 0)
for child_colour, child_num in rules[colour].items():
children[child_colour] += child_num
for col, num in children_of(rules, child_colour).items():
children[col] += child_num * num
return children
if __name__ == '__main__':
bag_rules = [rule.strip() for rule in sys.stdin.readlines()]
rules = process_rules(bag_rules)
print(len(parents_of(rules, 'shiny gold')))
print(sum(children_of(rules, 'shiny gold').values()))

119
2020/day8/day8.hs Normal file
View file

@ -0,0 +1,119 @@
{-# LANGUAGE FlexibleContexts #-}
import AoC
import Control.Applicative
import Control.Monad
import Control.Monad.ST
import Control.Monad.Trans.Class
import Control.Monad.Trans.Except
import Control.Monad.Trans.Maybe
import Data.Array.ST
import Data.Maybe
import Text.ParserCombinators.ReadP
import Text.Read.Lex
data Instruction = Nop Int | Acc Int | Jmp Int deriving (Show)
data MemoryCell = MemoryCell { instruction :: Instruction
, executed :: Bool
}
deriving (Show)
type Memory s = STArray s Int MemoryCell
data Machine s = Machine { pc :: Int
, acc :: Int
, memory :: Memory s
}
data RunError = OutOfRange | WouldLoop | Breakpoint deriving (Show)
type MachineRunner s = Machine s -> ExceptT RunError (ST s) (Machine s)
parseInstruction :: ReadP Instruction
parseInstruction = choice [ Nop <$> parseIns "nop"
, Acc <$> parseIns "acc"
, Jmp <$> parseIns "jmp"
]
where parseIns name = string name >> char ' ' >> parseNumber
parseNumber = do
sign <- option '+' (choice $ map char $ "+-")
num <- readDecP
return $ case sign of
'+' -> num
'-' -> -num
newMemory :: [Instruction] -> ST s (Memory s)
newMemory insns = newListArray (0, length insns-1) $ [MemoryCell { instruction = ins, executed = False } | ins <- insns]
newMachine :: [Instruction] -> ST s (Machine s)
newMachine insns = do
mem <- newMemory insns
return $ Machine { pc = 0, acc = 0, memory = mem }
stepMachine :: Machine s -> ST s (Machine s)
stepMachine m = do
cell <- readArray (memory m) (pc m)
writeArray (memory m) (pc m) $ cell { executed = True }
(pcF, accF) <- case instruction cell of
Nop _ -> return ((+1), id)
Acc i -> return ((+1), (+i))
Jmp i -> return ((+i), id)
let newPc = pcF $ pc m
newAcc = accF $ acc m
return $ m { pc = newPc, acc = newAcc }
runUnless :: (Machine s -> MaybeT (ST s) RunError) -> MachineRunner s -> MachineRunner s
runUnless p stepper m = do
res <- lift $ runMaybeT $ p m
case res of
Nothing -> stepper m
Just e -> throwE e
breakOnLoop :: MachineRunner s -> MachineRunner s
breakOnLoop = runUnless alreadyExecuted
where alreadyExecuted m =
do cell <- lift $ readArray (memory m) (pc m)
unless (executed cell) empty
return WouldLoop
breakOnAddr :: Int -> MachineRunner s -> MachineRunner s
breakOnAddr addr = runUnless $ fetchFrom addr
where fetchFrom addr m =
do unless (pc m == addr) empty
return Breakpoint
runUntilError :: MachineRunner s -> Machine s -> ST s (RunError, Int, Int)
runUntilError step m = do
result <- runExceptT $ step m
case result of
Right m' -> runUntilError step m'
Left e -> return (e, (pc m), (acc m))
part1 :: [Instruction] -> Int
part1 is = fromJust $ runST $ runMaybeT $ do
(WouldLoop, _, acc) <- lift $ newMachine is >>= runUntilError stepper
return acc
where stepper = breakOnLoop (lift . stepMachine)
tryTerminate :: Machine s -> MaybeT (ST s) Int
tryTerminate m = do
breakpoint <- fmap (\(_, max) -> max + 1) $ lift $ getBounds (memory m)
(Breakpoint, _, acc) <- lift $ runUntilError (stepper breakpoint) m
return acc
where stepper b = breakOnAddr b . breakOnLoop $ (lift . stepMachine)
jmpNopFlips :: [Instruction] -> [[Instruction]]
jmpNopFlips [] = []
jmpNopFlips (x:xs) = case x of
Jmp i -> (Nop i:xs) : rest
Nop i -> (Jmp i:xs) : rest
_ -> rest
where rest = (x:) <$> jmpNopFlips xs
part2 :: [Instruction] -> Int
part2 instructions = fromJust $ msum $ runST $ mapM testInstructions possibleInstructions
where testInstructions is = runMaybeT $ lift (newMachine is) >>= tryTerminate
possibleInstructions = instructions : jmpNopFlips instructions
main = runAoC (map (fromJust . oneCompleteResult parseInstruction) . lines) part1 part2

30
2020/day9/day9.hs Normal file
View file

@ -0,0 +1,30 @@
import AoC
import Control.Monad
import Data.List
import Data.Maybe
slidingWindow :: Int -> [a] -> [[a]]
slidingWindow n xs
| length xs < n = []
| otherwise = take n xs : slidingWindow n (tail xs)
summingTo :: (Eq a, Num a) => Int -> a -> [a] -> Maybe [a]
n `summingTo` x = find ((==x) . sum) . replicateM n
sublistSummingTo :: (Num a, Ord a) => a -> [a] -> Maybe [a]
sublistSummingTo n = fmap snd . find ((== n) . fst) . scanl go (0, [])
where go = dropNeeded .: addToAcc
addToAcc (sum, parts) x = (sum+x, parts++[x])
dropNeeded = fromJust . find ((<= n) . fst) . iterate dropPart
dropPart (sum, (x:xs)) = (sum-x, xs)
part1 :: [Int] -> Int
part1 = snd . fromJust . find (not . uncurry doesSum) . map (\xs -> (init xs, last xs)) . slidingWindow 26
where doesSum xs y = isJust $ 2 `summingTo` y $ xs
part2 :: [Int] -> Int
part2 xs = minimum range + maximum range
where range = fromJust $ sublistSummingTo (part1 xs) xs
main = runAoC (map read . lines) part1 part2

2
2021/data/day1.expected Normal file
View file

@ -0,0 +1,2 @@
1791
1822

2000
2021/data/day1.input Normal file

File diff suppressed because it is too large Load diff

25
2021/day1/day1_rs/Cargo.lock generated Normal file
View file

@ -0,0 +1,25 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "day1_rs"
version = "0.1.0"
dependencies = [
"itertools",
]
[[package]]
name = "either"
version = "1.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
[[package]]
name = "itertools"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69ddb889f9d0d08a67338271fa9b62996bc788c7796a5c18cf057420aaed5eaf"
dependencies = [
"either",
]

View file

@ -0,0 +1,9 @@
[package]
name = "day1_rs"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
itertools = "0.10.1"

View file

@ -0,0 +1,24 @@
use itertools::Itertools;
use std::io::{self, BufRead};
fn count_increasing(i: impl Iterator<Item = impl Ord + Clone>) -> usize {
i.tuple_windows().filter(|(x, y)| x < y).count()
}
fn main() {
let numbers: Vec<usize> = io::stdin()
.lock()
.lines()
.map(|l| str::parse(&l.unwrap()).unwrap())
.collect();
println!("{}", count_increasing(numbers.iter()));
println!(
"{}",
count_increasing(
numbers
.windows(3)
.map(|window| -> usize { window.iter().sum() })
)
);
}

63
test.sh Executable file
View file

@ -0,0 +1,63 @@
#!/usr/bin/bash
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")/2020"
run_solution() {
if [ -d "$solution" ]; then
runfile=$solution/run.sh
[ -f "$runfile" ] || { echo "Error: $runfile not found" >&2; exit 1; }
"$runfile" "$input"
else
case "$(basename "$solution")" in
*.hs)
runhaskell -icommon "$solution" < "$input"
;;
*.py)
python "$solution" < "$input"
;;
*)
echo "Error: Unknown solution type: $solution" >&2
exit 1
;;
esac
fi
}
shopt -s dotglob nullglob
for n in $(seq 1 25); do
input=data/day$n.input
expected=data/day$n.expected
for solution in "day$n"/*; do
echo -n "$solution... "
case "${solution##*/}" in
example*|.*)
echo SKIP
continue
esac
solution_output=$(mktemp)
trap "rm -f '$solution_output'" EXIT
run_solution "$solution" > "$solution_output"
if ! diff -u "$expected" "$solution_output"; then
echo FAIL
rv=$?
case "$rv" in
1)
exit 2
;;
*)
exit 1
;;
esac
else
echo ok
fi
rm "$solution_output"
done
done