diff options
author | Yigit Sever | 2021-12-12 01:24:32 +0300 |
---|---|---|
committer | Yigit Sever | 2021-12-12 01:24:32 +0300 |
commit | 4bb6f8d06c0e384f3394012b1d48da58ed28cc5e (patch) | |
tree | d6478c85c0488a1059567ccd2882cb10039c2546 /2020/day7 | |
parent | ae3853b6e8ab02023ccd74baac6dc177b1ee879a (diff) | |
download | aoc-4bb6f8d06c0e384f3394012b1d48da58ed28cc5e.tar.gz aoc-4bb6f8d06c0e384f3394012b1d48da58ed28cc5e.tar.bz2 aoc-4bb6f8d06c0e384f3394012b1d48da58ed28cc5e.zip |
2020, tracking
Diffstat (limited to '2020/day7')
-rw-r--r-- | 2020/day7/haversacks.py | 35 | ||||
-rw-r--r-- | 2020/day7/input | 594 | ||||
-rw-r--r-- | 2020/day7/inside_shiny.py | 45 |
3 files changed, 674 insertions, 0 deletions
diff --git a/2020/day7/haversacks.py b/2020/day7/haversacks.py new file mode 100644 index 0000000..4f7292d --- /dev/null +++ b/2020/day7/haversacks.py | |||
@@ -0,0 +1,35 @@ | |||
1 | import networkx as nx | ||
2 | import re | ||
3 | |||
4 | bagtree = nx.DiGraph() | ||
5 | bagremover = re.compile(r" bags?\.?$") | ||
6 | numremover = re.compile(r"^\d+ ") | ||
7 | |||
8 | with open("input", "r") as baglines: | ||
9 | for line in baglines: | ||
10 | (miniroot, child_str) = list(map(str.strip, line.split("contain"))) | ||
11 | |||
12 | miniroot = miniroot.replace(" bags", "") | ||
13 | |||
14 | children = list( | ||
15 | map( | ||
16 | lambda b: re.sub(numremover, "", b), | ||
17 | list( | ||
18 | map( | ||
19 | lambda a: re.sub(bagremover, "", a), | ||
20 | list(map(str.strip, child_str.split(","))), | ||
21 | ) | ||
22 | ), | ||
23 | ) | ||
24 | ) | ||
25 | |||
26 | if "no other" in children: | ||
27 | continue | ||
28 | |||
29 | for kid in children: | ||
30 | bagtree.add_edge(kid, miniroot) | ||
31 | |||
32 | lengths = dict(nx.all_pairs_shortest_path(bagtree)) | ||
33 | |||
34 | # we don't count the shiny gold itself | ||
35 | print(len(lengths["shiny gold"]) - 1) | ||
diff --git a/2020/day7/input b/2020/day7/input new file mode 100644 index 0000000..820cca0 --- /dev/null +++ b/2020/day7/input | |||
@@ -0,0 +1,594 @@ | |||
1 | muted lavender bags contain 5 dull brown bags, 4 pale maroon bags, 2 drab orange bags. | ||
2 | plaid aqua bags contain 1 posh violet bag, 5 pale yellow bags, 4 bright salmon bags. | ||
3 | wavy lime bags contain 3 vibrant indigo bags, 1 posh gray bag. | ||
4 | pale coral bags contain 5 mirrored olive bags, 2 posh salmon bags. | ||
5 | faded chartreuse bags contain 1 plaid blue bag, 4 clear salmon bags, 5 muted teal bags. | ||
6 | vibrant indigo bags contain 4 pale red bags, 1 vibrant violet bag. | ||
7 | vibrant salmon bags contain 1 dull crimson bag, 5 dim coral bags, 4 pale salmon bags, 3 pale fuchsia bags. | ||
8 | light yellow bags contain 5 clear beige bags, 3 dotted beige bags. | ||
9 | muted plum bags contain 5 posh silver bags, 3 pale turquoise bags, 3 faded chartreuse bags. | ||
10 | mirrored indigo bags contain 4 pale tan bags, 1 posh indigo bag, 3 shiny salmon bags, 4 wavy indigo bags. | ||
11 | pale indigo bags contain 3 dark white bags. | ||
12 | plaid indigo bags contain 4 mirrored teal bags. | ||
13 | shiny brown bags contain 1 striped gold bag. | ||
14 | drab violet bags contain 1 drab magenta bag, 5 posh orange bags, 1 mirrored brown bag, 4 wavy salmon bags. | ||
15 | pale olive bags contain 2 light black bags, 2 faded tomato bags. | ||
16 | dark teal bags contain 3 striped fuchsia bags. | ||
17 | plaid white bags contain 4 shiny salmon bags. | ||
18 | muted gold bags contain 5 faded lavender bags, 3 striped aqua bags. | ||
19 | pale cyan bags contain 3 muted tan bags, 5 bright purple bags, 1 posh blue bag. | ||
20 | pale tan bags contain 3 bright teal bags. | ||
21 | bright aqua bags contain 5 plaid magenta bags, 5 muted lavender bags, 4 dim turquoise bags, 1 shiny turquoise bag. | ||
22 | dark gold bags contain 4 dull indigo bags, 5 mirrored orange bags, 5 bright teal bags, 1 dim gold bag. | ||
23 | muted salmon bags contain 3 muted gray bags, 4 pale salmon bags. | ||
24 | striped plum bags contain 1 dark indigo bag, 1 vibrant violet bag. | ||
25 | posh yellow bags contain 3 shiny tan bags, 4 dull lavender bags, 5 pale yellow bags. | ||
26 | plaid lime bags contain 2 bright brown bags, 4 dull lavender bags. | ||
27 | mirrored gray bags contain 4 mirrored teal bags, 3 muted indigo bags. | ||
28 | muted olive bags contain 3 dim fuchsia bags, 2 dim salmon bags, 4 shiny maroon bags. | ||
29 | dotted blue bags contain 4 plaid orange bags, 5 faded black bags, 2 muted black bags, 5 mirrored lime bags. | ||
30 | wavy beige bags contain 5 dark aqua bags, 3 mirrored lavender bags, 3 drab fuchsia bags. | ||
31 | shiny indigo bags contain 3 wavy black bags, 2 dull plum bags. | ||
32 | drab lavender bags contain 4 mirrored chartreuse bags. | ||
33 | vibrant tomato bags contain 3 wavy white bags, 1 dull plum bag. | ||
34 | plaid teal bags contain 3 mirrored bronze bags. | ||
35 | pale chartreuse bags contain no other bags. | ||
36 | muted coral bags contain 1 striped lavender bag, 5 dotted crimson bags, 2 faded tomato bags. | ||
37 | faded aqua bags contain 2 bright plum bags, 3 faded gold bags, 1 mirrored bronze bag, 2 dull lavender bags. | ||
38 | pale brown bags contain 1 clear salmon bag, 4 drab tan bags, 1 light orange bag, 1 light silver bag. | ||
39 | drab orange bags contain 3 faded beige bags. | ||
40 | pale blue bags contain 3 pale plum bags, 3 dotted green bags, 4 dark lime bags, 5 clear beige bags. | ||
41 | dull purple bags contain 5 posh aqua bags, 1 muted blue bag, 1 bright gray bag, 1 muted chartreuse bag. | ||
42 | bright silver bags contain 5 dark turquoise bags, 2 dark teal bags, 1 muted tan bag, 3 vibrant tan bags. | ||
43 | dim silver bags contain 4 plaid black bags. | ||
44 | faded violet bags contain 5 dark maroon bags. | ||
45 | pale maroon bags contain 5 dark maroon bags, 4 drab chartreuse bags. | ||
46 | shiny green bags contain 1 bright chartreuse bag. | ||
47 | vibrant crimson bags contain 3 dotted red bags, 2 striped violet bags, 1 light bronze bag. | ||
48 | clear lavender bags contain 1 faded teal bag, 5 clear cyan bags. | ||
49 | mirrored red bags contain 2 dim gray bags, 2 drab orange bags, 4 muted purple bags, 3 muted white bags. | ||
50 | striped green bags contain 2 light purple bags, 4 light gold bags, 3 posh magenta bags. | ||
51 | dim yellow bags contain 1 light crimson bag, 2 muted indigo bags. | ||
52 | dotted orange bags contain 3 wavy salmon bags, 1 dim fuchsia bag. | ||
53 | vibrant gray bags contain 1 plaid brown bag, 5 mirrored black bags, 4 plaid olive bags. | ||
54 | mirrored silver bags contain 2 striped magenta bags, 3 striped coral bags. | ||
55 | pale magenta bags contain 4 posh tomato bags, 4 plaid blue bags, 2 shiny gold bags, 3 faded beige bags. | ||
56 | vibrant black bags contain 4 dotted brown bags. | ||
57 | muted violet bags contain 1 clear tomato bag, 1 striped beige bag. | ||
58 | clear salmon bags contain 1 drab chartreuse bag, 4 dotted beige bags, 5 light crimson bags, 3 dotted orange bags. | ||
59 | posh indigo bags contain 3 mirrored teal bags, 5 drab gold bags. | ||
60 | wavy black bags contain 5 dotted purple bags, 5 plaid chartreuse bags, 3 striped gold bags. | ||
61 | mirrored lavender bags contain 2 dim black bags. | ||
62 | shiny maroon bags contain 2 dotted beige bags. | ||
63 | drab magenta bags contain 2 dim yellow bags. | ||
64 | pale orange bags contain 1 shiny purple bag, 5 striped turquoise bags, 2 light crimson bags. | ||
65 | shiny beige bags contain 5 clear white bags, 2 striped turquoise bags, 4 pale yellow bags, 1 muted black bag. | ||
66 | striped cyan bags contain 2 plaid yellow bags, 2 clear teal bags, 3 wavy olive bags, 4 posh violet bags. | ||
67 | dull cyan bags contain 1 striped salmon bag. | ||
68 | vibrant green bags contain 4 dull coral bags, 4 drab yellow bags, 4 dark cyan bags. | ||
69 | wavy cyan bags contain 5 light salmon bags, 5 dim blue bags, 2 pale green bags, 1 faded indigo bag. | ||
70 | drab plum bags contain 3 dark magenta bags. | ||
71 | light aqua bags contain 4 bright bronze bags, 3 wavy lavender bags, 3 dull cyan bags, 2 bright green bags. | ||
72 | pale plum bags contain 5 clear plum bags. | ||
73 | vibrant silver bags contain 1 dim lavender bag, 4 bright teal bags. | ||
74 | wavy white bags contain 1 light crimson bag, 4 wavy salmon bags. | ||
75 | shiny chartreuse bags contain 2 plaid gray bags, 5 mirrored white bags. | ||
76 | dull chartreuse bags contain 1 dull cyan bag, 3 striped white bags, 4 posh indigo bags. | ||
77 | clear magenta bags contain 1 plaid coral bag, 5 light plum bags, 1 bright yellow bag. | ||
78 | muted white bags contain 2 dull salmon bags, 5 bright turquoise bags, 3 wavy gray bags, 1 plaid black bag. | ||
79 | dull brown bags contain 3 faded lavender bags. | ||
80 | muted turquoise bags contain 4 mirrored plum bags, 4 mirrored brown bags, 4 drab salmon bags, 4 mirrored tomato bags. | ||
81 | posh tomato bags contain 2 drab orange bags, 4 dim lavender bags. | ||
82 | shiny fuchsia bags contain 3 dull black bags, 5 wavy coral bags. | ||
83 | dim gray bags contain 3 drab gray bags. | ||
84 | striped olive bags contain 5 light purple bags, 5 wavy yellow bags, 1 striped fuchsia bag. | ||
85 | muted maroon bags contain 2 bright white bags. | ||
86 | light tomato bags contain 1 striped indigo bag, 5 plaid plum bags, 4 clear indigo bags, 4 drab tan bags. | ||
87 | plaid violet bags contain 2 dim coral bags. | ||
88 | striped chartreuse bags contain 2 shiny gray bags. | ||
89 | mirrored white bags contain 4 striped beige bags. | ||
90 | dim beige bags contain 3 wavy bronze bags, 4 vibrant silver bags, 1 striped white bag, 2 dark plum bags. | ||
91 | striped violet bags contain 5 dull teal bags, 2 vibrant red bags. | ||
92 | drab green bags contain 1 striped olive bag, 2 light salmon bags, 1 faded cyan bag, 3 vibrant fuchsia bags. | ||
93 | clear lime bags contain 2 plaid coral bags, 1 light lavender bag, 4 posh salmon bags. | ||
94 | striped indigo bags contain 2 pale maroon bags, 5 dotted aqua bags, 3 drab gray bags. | ||
95 | dim blue bags contain 5 faded bronze bags, 4 dark blue bags. | ||
96 | faded fuchsia bags contain 3 muted fuchsia bags, 1 light orange bag, 2 striped beige bags, 1 dotted red bag. | ||
97 | plaid red bags contain 5 pale maroon bags, 3 dark beige bags, 2 striped fuchsia bags. | ||
98 | drab silver bags contain 1 dim salmon bag, 2 shiny salmon bags. | ||
99 | dark chartreuse bags contain 1 dull aqua bag. | ||
100 | clear chartreuse bags contain 5 faded brown bags, 3 dotted aqua bags. | ||
101 | plaid silver bags contain 5 pale red bags. | ||
102 | wavy chartreuse bags contain 5 mirrored red bags, 1 dull teal bag. | ||
103 | clear gray bags contain 5 striped salmon bags, 5 plaid silver bags, 1 clear black bag. | ||
104 | shiny white bags contain 1 shiny gray bag, 5 vibrant gray bags. | ||
105 | posh coral bags contain 2 muted white bags. | ||
106 | light red bags contain 5 muted indigo bags, 1 wavy fuchsia bag. | ||
107 | dull fuchsia bags contain 4 light plum bags, 4 faded red bags. | ||
108 | dotted gold bags contain 1 plaid brown bag, 4 dotted aqua bags, 2 pale purple bags. | ||
109 | faded orange bags contain 3 dotted beige bags. | ||
110 | bright coral bags contain 2 dark cyan bags, 1 wavy tan bag, 1 vibrant yellow bag. | ||
111 | striped brown bags contain 5 light yellow bags, 4 dull indigo bags, 4 clear maroon bags. | ||
112 | light fuchsia bags contain 3 dotted gray bags, 1 striped orange bag, 1 mirrored olive bag, 2 wavy fuchsia bags. | ||
113 | dotted bronze bags contain 2 dull salmon bags. | ||
114 | faded red bags contain 2 posh indigo bags, 5 dotted aqua bags. | ||
115 | wavy teal bags contain 3 faded tomato bags, 4 dark silver bags, 3 shiny cyan bags. | ||
116 | dim tomato bags contain 4 wavy silver bags, 3 drab red bags. | ||
117 | muted beige bags contain 1 bright gray bag, 1 dark red bag. | ||
118 | shiny yellow bags contain 2 light plum bags. | ||
119 | wavy indigo bags contain 1 faded red bag, 1 plaid yellow bag, 2 dull aqua bags. | ||
120 | plaid maroon bags contain 5 vibrant beige bags. | ||
121 | wavy tan bags contain 5 plaid maroon bags. | ||
122 | striped coral bags contain 1 pale silver bag, 4 clear beige bags, 3 dotted aqua bags, 3 striped turquoise bags. | ||
123 | shiny black bags contain 1 clear silver bag, 1 mirrored blue bag. | ||
124 | muted silver bags contain 1 posh teal bag, 4 faded teal bags, 4 plaid aqua bags, 2 striped olive bags. | ||
125 | pale gray bags contain 4 dotted silver bags. | ||
126 | light white bags contain 2 dull salmon bags, 5 vibrant violet bags, 1 dull black bag. | ||
127 | mirrored beige bags contain 3 dark teal bags, 3 wavy coral bags, 3 plaid black bags. | ||
128 | mirrored tomato bags contain 5 muted bronze bags, 2 drab gold bags, 4 dark plum bags. | ||
129 | dull magenta bags contain 1 wavy black bag, 5 dull gray bags. | ||
130 | pale crimson bags contain 3 wavy brown bags, 5 dark green bags, 3 pale fuchsia bags. | ||
131 | pale beige bags contain 3 posh black bags, 4 dotted gold bags, 1 plaid blue bag. | ||
132 | dull red bags contain 2 light chartreuse bags, 1 striped tomato bag, 4 plaid green bags, 3 dull chartreuse bags. | ||
133 | dotted violet bags contain 4 dark plum bags, 3 dull plum bags, 4 pale red bags. | ||
134 | muted bronze bags contain 2 muted teal bags, 5 shiny purple bags, 4 pale chartreuse bags, 4 wavy salmon bags. | ||
135 | dark coral bags contain 5 dull indigo bags, 1 vibrant plum bag, 2 mirrored black bags, 4 drab gold bags. | ||
136 | shiny magenta bags contain 5 light turquoise bags, 4 striped olive bags. | ||
137 | faded olive bags contain 2 clear white bags. | ||
138 | pale aqua bags contain 2 vibrant fuchsia bags. | ||
139 | vibrant yellow bags contain 4 muted teal bags, 1 mirrored teal bag. | ||
140 | dotted lime bags contain 5 dotted white bags, 2 wavy aqua bags, 3 pale salmon bags. | ||
141 | dark bronze bags contain 1 clear beige bag, 1 muted olive bag. | ||
142 | dim lavender bags contain 1 dull indigo bag, 2 shiny purple bags, 4 dull teal bags. | ||
143 | wavy gold bags contain 5 dull black bags, 1 muted fuchsia bag, 4 dark red bags, 1 light crimson bag. | ||
144 | striped crimson bags contain 5 shiny gray bags, 3 mirrored crimson bags, 2 drab chartreuse bags, 4 dull aqua bags. | ||
145 | dark aqua bags contain 1 bright indigo bag, 5 muted white bags, 2 shiny crimson bags, 3 mirrored orange bags. | ||
146 | posh black bags contain 3 pale tan bags, 1 dim brown bag, 5 clear green bags. | ||
147 | bright beige bags contain 4 dotted black bags. | ||
148 | dull maroon bags contain 1 drab red bag, 4 faded turquoise bags, 1 pale olive bag. | ||
149 | dull salmon bags contain 3 mirrored olive bags, 3 dull indigo bags, 1 dim brown bag, 4 shiny lime bags. | ||
150 | faded purple bags contain 4 faded indigo bags. | ||
151 | light beige bags contain 1 posh gray bag, 3 dotted white bags, 1 striped silver bag. | ||
152 | vibrant magenta bags contain 4 drab red bags, 1 dotted white bag, 5 striped aqua bags. | ||
153 | light maroon bags contain 1 dull black bag. | ||
154 | light olive bags contain 3 dull tan bags. | ||
155 | vibrant lime bags contain 2 dim lavender bags. | ||
156 | muted aqua bags contain 3 bright olive bags, 1 muted teal bag, 3 dull crimson bags. | ||
157 | dotted beige bags contain no other bags. | ||
158 | dotted indigo bags contain 2 light lavender bags, 5 dark white bags, 3 wavy gray bags, 4 plaid chartreuse bags. | ||
159 | drab yellow bags contain 4 mirrored aqua bags, 5 plaid olive bags, 5 dull black bags, 4 striped turquoise bags. | ||
160 | light lime bags contain 3 striped turquoise bags, 4 muted coral bags, 5 muted yellow bags, 4 mirrored silver bags. | ||
161 | dark crimson bags contain 2 light bronze bags, 1 vibrant chartreuse bag. | ||
162 | clear plum bags contain 1 muted indigo bag, 5 dim red bags, 2 pale orange bags, 5 light black bags. | ||
163 | mirrored violet bags contain 3 wavy salmon bags. | ||
164 | striped silver bags contain 5 bright olive bags, 5 dim brown bags, 2 posh blue bags, 1 posh purple bag. | ||
165 | posh gold bags contain 5 faded lavender bags. | ||
166 | striped lime bags contain 4 striped coral bags. | ||
167 | plaid tomato bags contain 2 dull white bags, 1 wavy white bag, 5 drab red bags. | ||
168 | drab tan bags contain 1 mirrored bronze bag, 1 mirrored tomato bag, 2 mirrored green bags. | ||
169 | posh purple bags contain 4 dull cyan bags. | ||
170 | plaid blue bags contain 2 muted fuchsia bags, 1 bright teal bag, 2 pale chartreuse bags. | ||
171 | dim lime bags contain 4 drab gold bags, 1 muted fuchsia bag, 1 posh tomato bag. | ||
172 | dark white bags contain 2 wavy gold bags. | ||
173 | bright red bags contain 4 light fuchsia bags, 1 plaid orange bag, 1 pale red bag. | ||
174 | wavy blue bags contain 4 striped red bags, 1 mirrored black bag. | ||
175 | light teal bags contain 1 faded orange bag, 5 muted white bags. | ||
176 | shiny blue bags contain 1 drab red bag, 3 shiny brown bags, 2 dark teal bags, 2 dotted silver bags. | ||
177 | bright gray bags contain 3 muted teal bags, 2 clear plum bags, 5 light olive bags, 5 dark red bags. | ||
178 | bright black bags contain 5 posh yellow bags, 1 striped maroon bag. | ||
179 | shiny gold bags contain 3 wavy gold bags, 2 plaid chartreuse bags, 2 shiny lime bags, 5 dull indigo bags. | ||
180 | striped teal bags contain 4 dark lime bags, 4 light yellow bags, 2 dull brown bags. | ||
181 | wavy coral bags contain 3 dim yellow bags, 1 clear red bag, 4 pale chartreuse bags. | ||
182 | plaid chartreuse bags contain 1 striped maroon bag, 5 dotted yellow bags. | ||
183 | pale turquoise bags contain 3 clear yellow bags, 2 dim coral bags. | ||
184 | vibrant plum bags contain 3 dotted yellow bags. | ||
185 | drab cyan bags contain 5 vibrant green bags. | ||
186 | wavy crimson bags contain 1 mirrored gray bag, 2 dim teal bags. | ||
187 | wavy maroon bags contain 3 pale tan bags. | ||
188 | light orange bags contain 4 vibrant silver bags, 2 dim olive bags, 2 drab red bags. | ||
189 | plaid brown bags contain 2 bright turquoise bags, 4 shiny tan bags, 2 dull indigo bags, 3 plaid olive bags. | ||
190 | posh silver bags contain 5 wavy coral bags. | ||
191 | wavy bronze bags contain 1 plaid yellow bag, 1 dim gold bag. | ||
192 | shiny violet bags contain 5 plaid coral bags, 2 mirrored brown bags. | ||
193 | posh lime bags contain 3 wavy bronze bags, 2 striped tomato bags, 2 pale tan bags. | ||
194 | dim salmon bags contain 3 dim brown bags, 5 drab chartreuse bags. | ||
195 | faded beige bags contain no other bags. | ||
196 | dotted gray bags contain 5 dark lime bags, 2 posh black bags, 3 muted fuchsia bags. | ||
197 | dull crimson bags contain 5 vibrant fuchsia bags. | ||
198 | drab brown bags contain 5 pale maroon bags, 5 light crimson bags. | ||
199 | bright blue bags contain 5 vibrant brown bags. | ||
200 | bright violet bags contain 1 light white bag, 5 clear beige bags, 2 dull crimson bags. | ||
201 | plaid magenta bags contain 2 light plum bags, 1 wavy white bag, 5 pale green bags, 1 bright tomato bag. | ||
202 | faded silver bags contain 5 light black bags, 5 mirrored teal bags, 5 vibrant plum bags. | ||
203 | wavy brown bags contain 4 faded gray bags, 3 dotted olive bags, 1 light silver bag. | ||
204 | clear teal bags contain 2 mirrored black bags, 2 wavy gold bags, 2 striped red bags, 5 light silver bags. | ||
205 | posh crimson bags contain 5 drab tan bags. | ||
206 | clear fuchsia bags contain 4 faded tomato bags, 1 dotted beige bag. | ||
207 | bright maroon bags contain 2 wavy teal bags, 2 shiny gray bags, 5 dull gray bags, 3 dull teal bags. | ||
208 | drab gray bags contain 3 dark white bags, 2 pale salmon bags, 4 bright teal bags. | ||
209 | vibrant brown bags contain 4 wavy salmon bags. | ||
210 | bright green bags contain 2 clear cyan bags, 3 wavy lavender bags, 2 plaid blue bags, 2 faded gold bags. | ||
211 | light salmon bags contain 1 muted tan bag, 5 plaid plum bags. | ||
212 | plaid bronze bags contain 4 mirrored chartreuse bags, 3 plaid turquoise bags, 2 wavy orange bags, 5 dotted yellow bags. | ||
213 | dull bronze bags contain 2 vibrant lime bags, 2 muted purple bags, 2 dark magenta bags. | ||
214 | bright orange bags contain 4 pale violet bags, 2 light fuchsia bags, 3 dull purple bags. | ||
215 | wavy fuchsia bags contain 4 dotted olive bags, 1 dull brown bag. | ||
216 | mirrored olive bags contain 4 muted fuchsia bags, 4 striped turquoise bags. | ||
217 | shiny salmon bags contain 2 dark white bags. | ||
218 | striped tan bags contain 4 mirrored purple bags. | ||
219 | dull coral bags contain 3 posh coral bags, 1 dotted green bag. | ||
220 | drab teal bags contain 4 wavy yellow bags, 5 mirrored aqua bags. | ||
221 | shiny tan bags contain 5 striped maroon bags, 5 vibrant red bags. | ||
222 | bright crimson bags contain 1 muted magenta bag. | ||
223 | shiny lime bags contain 1 faded teal bag, 1 light crimson bag. | ||
224 | posh white bags contain 3 posh orange bags, 4 pale gray bags, 5 dull maroon bags, 5 plaid plum bags. | ||
225 | dotted brown bags contain 1 vibrant indigo bag, 1 plaid olive bag. | ||
226 | faded coral bags contain 5 muted bronze bags, 3 mirrored lavender bags. | ||
227 | faded brown bags contain 1 bright turquoise bag, 3 posh indigo bags, 2 pale fuchsia bags, 3 dark indigo bags. | ||
228 | vibrant aqua bags contain 2 clear beige bags, 3 posh olive bags, 3 dark turquoise bags, 2 posh magenta bags. | ||
229 | dark turquoise bags contain 1 striped gold bag, 1 mirrored red bag. | ||
230 | drab gold bags contain 2 clear beige bags, 4 striped turquoise bags, 1 pale orange bag, 1 clear salmon bag. | ||
231 | mirrored green bags contain 4 dotted beige bags, 3 pale chartreuse bags, 3 light crimson bags. | ||
232 | clear violet bags contain 3 posh orange bags, 4 faded beige bags, 3 drab red bags, 4 shiny salmon bags. | ||
233 | posh plum bags contain 1 shiny white bag, 1 striped lavender bag. | ||
234 | vibrant purple bags contain 5 bright teal bags. | ||
235 | dark salmon bags contain 4 striped olive bags, 5 mirrored crimson bags, 5 plaid lime bags, 3 dark tomato bags. | ||
236 | shiny silver bags contain 2 vibrant red bags. | ||
237 | dull turquoise bags contain 3 faded crimson bags, 1 drab maroon bag, 5 drab gold bags. | ||
238 | dull orange bags contain 1 dark yellow bag, 3 bright beige bags. | ||
239 | bright bronze bags contain 3 posh salmon bags, 1 mirrored violet bag, 2 muted white bags, 3 dotted orange bags. | ||
240 | bright teal bags contain 4 dim fuchsia bags. | ||
241 | clear turquoise bags contain 1 faded teal bag, 2 dull teal bags. | ||
242 | wavy magenta bags contain 4 dim teal bags, 3 mirrored bronze bags, 3 plaid plum bags, 5 wavy lavender bags. | ||
243 | faded bronze bags contain 2 striped salmon bags, 3 dark red bags, 1 dark indigo bag. | ||
244 | faded plum bags contain 1 clear green bag. | ||
245 | faded maroon bags contain 1 striped maroon bag, 5 dim black bags, 1 vibrant indigo bag. | ||
246 | muted teal bags contain 4 light crimson bags, 5 drab chartreuse bags. | ||
247 | vibrant maroon bags contain 3 dark fuchsia bags, 3 plaid turquoise bags, 1 pale silver bag, 4 shiny cyan bags. | ||
248 | plaid crimson bags contain 3 mirrored olive bags. | ||
249 | clear tan bags contain 1 vibrant purple bag, 1 wavy aqua bag. | ||
250 | clear aqua bags contain 4 bright white bags. | ||
251 | striped red bags contain 3 wavy coral bags, 3 dark white bags, 4 muted fuchsia bags, 4 posh tomato bags. | ||
252 | posh violet bags contain 1 muted fuchsia bag, 3 dim coral bags, 2 drab orange bags. | ||
253 | plaid cyan bags contain 2 shiny indigo bags. | ||
254 | light chartreuse bags contain 5 wavy tan bags, 4 clear indigo bags. | ||
255 | vibrant lavender bags contain 3 light gray bags, 4 striped beige bags, 5 dark maroon bags, 3 drab fuchsia bags. | ||
256 | dim red bags contain 4 pale orange bags, 3 drab chartreuse bags. | ||
257 | vibrant turquoise bags contain 3 clear tomato bags, 4 posh blue bags. | ||
258 | muted green bags contain 4 clear bronze bags, 3 dotted black bags, 3 dull beige bags. | ||
259 | faded salmon bags contain 2 drab gold bags, 2 clear red bags, 2 dark indigo bags, 5 plaid teal bags. | ||
260 | posh chartreuse bags contain 4 dotted orange bags. | ||
261 | dotted turquoise bags contain 5 shiny fuchsia bags, 2 vibrant indigo bags, 3 vibrant fuchsia bags, 5 muted green bags. | ||
262 | wavy turquoise bags contain 1 dark white bag, 4 posh tan bags. | ||
263 | clear purple bags contain 2 vibrant gray bags, 3 dark plum bags, 1 shiny fuchsia bag, 4 plaid indigo bags. | ||
264 | pale tomato bags contain 2 striped silver bags, 1 mirrored aqua bag. | ||
265 | pale salmon bags contain 4 muted indigo bags, 4 faded teal bags. | ||
266 | dark maroon bags contain 5 dotted orange bags, 5 faded beige bags, 3 wavy salmon bags, 5 dim lavender bags. | ||
267 | faded green bags contain 3 wavy coral bags, 5 dull indigo bags, 4 dim salmon bags, 1 pale gray bag. | ||
268 | bright gold bags contain 4 drab lavender bags. | ||
269 | dull white bags contain 4 clear salmon bags, 2 shiny gold bags. | ||
270 | drab olive bags contain 3 pale lime bags, 3 striped crimson bags, 5 plaid gray bags, 2 posh magenta bags. | ||
271 | bright cyan bags contain 4 dotted black bags. | ||
272 | drab beige bags contain 4 shiny yellow bags. | ||
273 | dotted salmon bags contain 5 light maroon bags, 5 dotted gray bags. | ||
274 | posh gray bags contain 3 dark red bags, 2 mirrored gray bags, 2 dim brown bags, 4 dotted aqua bags. | ||
275 | dull gray bags contain 2 shiny beige bags, 5 posh silver bags. | ||
276 | light blue bags contain 1 dim coral bag, 5 vibrant plum bags, 1 clear salmon bag, 1 clear yellow bag. | ||
277 | striped gray bags contain 5 striped indigo bags, 1 faded lime bag, 2 light tomato bags. | ||
278 | dark violet bags contain 1 posh gray bag, 5 shiny cyan bags, 2 pale indigo bags, 4 light coral bags. | ||
279 | striped black bags contain 5 dotted maroon bags, 1 drab blue bag. | ||
280 | shiny coral bags contain 1 clear yellow bag, 5 striped plum bags, 4 dull tomato bags. | ||
281 | faded tan bags contain 5 vibrant bronze bags, 5 muted fuchsia bags, 1 pale coral bag, 4 dull indigo bags. | ||
282 | pale white bags contain 4 clear cyan bags, 2 bright yellow bags, 4 vibrant tomato bags. | ||
283 | plaid plum bags contain 5 pale violet bags, 3 posh yellow bags, 3 faded silver bags. | ||
284 | bright fuchsia bags contain 5 clear black bags. | ||
285 | dotted red bags contain 3 dark magenta bags, 5 clear indigo bags, 1 faded bronze bag, 4 dotted gray bags. | ||
286 | plaid turquoise bags contain 2 dark indigo bags. | ||
287 | pale lavender bags contain 4 posh fuchsia bags, 1 clear black bag, 4 wavy lime bags. | ||
288 | bright lavender bags contain 2 wavy magenta bags, 5 plaid blue bags, 1 drab yellow bag, 1 muted gray bag. | ||
289 | bright white bags contain 4 light gray bags. | ||
290 | dull black bags contain 2 shiny lime bags, 3 muted indigo bags, 5 faded beige bags. | ||
291 | muted tomato bags contain 2 dark yellow bags. | ||
292 | plaid fuchsia bags contain 2 dull lavender bags. | ||
293 | dark indigo bags contain 2 dim lavender bags, 3 shiny maroon bags. | ||
294 | mirrored magenta bags contain 1 mirrored chartreuse bag. | ||
295 | vibrant violet bags contain 5 dotted beige bags, 5 plaid olive bags. | ||
296 | pale lime bags contain 1 vibrant silver bag, 4 shiny white bags, 2 wavy orange bags, 3 plaid coral bags. | ||
297 | mirrored aqua bags contain 5 light yellow bags, 3 plaid silver bags, 2 dark white bags, 2 dull teal bags. | ||
298 | striped turquoise bags contain 1 bright turquoise bag, 2 faded beige bags. | ||
299 | faded indigo bags contain 2 dotted purple bags. | ||
300 | plaid green bags contain 3 dim orange bags. | ||
301 | dotted lavender bags contain 5 dotted crimson bags, 5 bright turquoise bags, 3 muted lavender bags, 4 mirrored olive bags. | ||
302 | muted tan bags contain 2 faded orange bags, 5 mirrored gray bags, 1 faded green bag. | ||
303 | dark plum bags contain 2 mirrored olive bags, 4 muted fuchsia bags, 2 shiny maroon bags, 1 dim fuchsia bag. | ||
304 | light cyan bags contain 4 dotted gray bags, 4 wavy red bags, 1 dull white bag. | ||
305 | striped gold bags contain 2 wavy silver bags, 2 muted purple bags, 3 wavy coral bags. | ||
306 | striped white bags contain 4 wavy coral bags, 4 pale plum bags, 2 wavy black bags, 5 dim olive bags. | ||
307 | mirrored yellow bags contain 3 plaid chartreuse bags, 4 muted gold bags, 1 mirrored bronze bag. | ||
308 | clear tomato bags contain 3 striped indigo bags, 3 dim fuchsia bags, 2 wavy gray bags. | ||
309 | faded teal bags contain no other bags. | ||
310 | faded lavender bags contain 2 clear bronze bags, 3 muted teal bags, 2 dotted yellow bags, 5 shiny purple bags. | ||
311 | posh lavender bags contain 5 posh gray bags. | ||
312 | bright brown bags contain 2 dull crimson bags, 5 muted bronze bags, 4 dark indigo bags, 5 mirrored orange bags. | ||
313 | faded crimson bags contain 3 dotted crimson bags. | ||
314 | mirrored teal bags contain 1 plaid blue bag, 1 clear red bag, 5 striped turquoise bags, 4 dotted beige bags. | ||
315 | dark fuchsia bags contain 1 faded green bag. | ||
316 | dim coral bags contain 5 clear salmon bags, 4 dotted beige bags, 1 pale salmon bag, 2 plaid chartreuse bags. | ||
317 | posh blue bags contain 3 pale maroon bags, 5 dim coral bags. | ||
318 | light indigo bags contain 1 vibrant silver bag, 1 bright chartreuse bag, 1 light black bag. | ||
319 | shiny lavender bags contain 4 dotted olive bags, 5 faded brown bags, 1 plaid tomato bag. | ||
320 | dotted white bags contain 4 dim olive bags. | ||
321 | dotted chartreuse bags contain 4 striped turquoise bags, 1 dotted silver bag. | ||
322 | faded black bags contain 2 muted white bags, 3 drab teal bags, 3 wavy gray bags. | ||
323 | vibrant white bags contain 4 dark white bags, 4 clear violet bags, 3 plaid magenta bags, 5 dark green bags. | ||
324 | faded magenta bags contain 3 faded green bags, 4 plaid olive bags, 5 plaid brown bags, 1 wavy salmon bag. | ||
325 | dull plum bags contain 3 muted purple bags. | ||
326 | dim indigo bags contain 5 dotted fuchsia bags, 5 drab red bags, 1 dull green bag, 5 dim fuchsia bags. | ||
327 | pale yellow bags contain 4 mirrored bronze bags. | ||
328 | light violet bags contain 5 dull black bags. | ||
329 | posh green bags contain 1 plaid plum bag, 3 pale violet bags, 5 muted salmon bags. | ||
330 | mirrored purple bags contain 3 mirrored aqua bags, 1 plaid blue bag. | ||
331 | clear orange bags contain 3 light beige bags. | ||
332 | striped tomato bags contain 4 dark orange bags, 1 bright aqua bag. | ||
333 | dark gray bags contain 1 posh violet bag. | ||
334 | plaid beige bags contain 5 pale beige bags. | ||
335 | plaid gray bags contain 3 mirrored bronze bags, 3 clear green bags, 5 dark chartreuse bags. | ||
336 | mirrored coral bags contain 1 pale tan bag, 2 plaid coral bags, 5 striped bronze bags. | ||
337 | dull silver bags contain 1 vibrant purple bag, 3 drab lavender bags, 2 mirrored salmon bags. | ||
338 | clear yellow bags contain 1 shiny gold bag, 4 dotted beige bags, 4 dark lime bags. | ||
339 | light gold bags contain 3 shiny white bags, 4 dim violet bags, 1 light olive bag. | ||
340 | drab white bags contain 5 shiny lavender bags, 4 dotted lavender bags. | ||
341 | faded yellow bags contain 2 dull crimson bags, 3 muted indigo bags, 2 plaid crimson bags, 3 clear green bags. | ||
342 | light gray bags contain 2 plaid orange bags, 5 plaid lavender bags. | ||
343 | dim bronze bags contain 1 vibrant coral bag, 1 wavy teal bag, 1 pale crimson bag. | ||
344 | shiny gray bags contain 5 light lavender bags, 3 drab red bags, 1 plaid chartreuse bag. | ||
345 | striped beige bags contain 3 light black bags, 1 dull teal bag. | ||
346 | dotted fuchsia bags contain 3 faded indigo bags, 2 dim gray bags. | ||
347 | plaid yellow bags contain 4 pale maroon bags, 5 dull black bags, 1 plaid chartreuse bag, 3 drab orange bags. | ||
348 | muted orange bags contain 3 muted lavender bags. | ||
349 | muted crimson bags contain 4 muted cyan bags, 1 dull plum bag. | ||
350 | muted red bags contain 5 faded turquoise bags, 5 light silver bags, 5 dotted aqua bags. | ||
351 | vibrant chartreuse bags contain 4 wavy violet bags, 1 plaid beige bag, 2 clear cyan bags, 2 dull lavender bags. | ||
352 | pale fuchsia bags contain 3 plaid blue bags, 3 muted bronze bags, 4 faded blue bags. | ||
353 | dotted tomato bags contain 4 dark tomato bags, 3 plaid orange bags, 5 posh teal bags. | ||
354 | dim green bags contain 1 dull white bag. | ||
355 | dim aqua bags contain 2 light silver bags, 3 faded silver bags, 3 dotted orange bags, 4 vibrant salmon bags. | ||
356 | dim brown bags contain no other bags. | ||
357 | muted chartreuse bags contain 2 dark coral bags, 5 striped plum bags. | ||
358 | drab indigo bags contain 2 posh brown bags. | ||
359 | dark orange bags contain 4 plaid blue bags, 1 dark brown bag, 2 striped indigo bags, 1 dark magenta bag. | ||
360 | bright yellow bags contain 3 clear tomato bags. | ||
361 | clear bronze bags contain 4 wavy salmon bags. | ||
362 | dotted olive bags contain 4 striped beige bags, 3 drab orange bags, 3 bright teal bags. | ||
363 | dull violet bags contain 4 plaid salmon bags, 5 faded olive bags. | ||
364 | clear white bags contain 2 plaid coral bags, 1 muted indigo bag, 1 striped beige bag. | ||
365 | dull tan bags contain 5 dim red bags, 5 posh gold bags, 2 clear red bags. | ||
366 | mirrored plum bags contain 4 dim beige bags. | ||
367 | wavy purple bags contain 2 posh silver bags, 5 shiny tan bags, 3 pale red bags, 3 dull salmon bags. | ||
368 | dim black bags contain 3 light yellow bags. | ||
369 | dotted coral bags contain 3 pale violet bags. | ||
370 | posh bronze bags contain 1 posh tomato bag, 1 drab purple bag, 3 dim fuchsia bags, 2 bright brown bags. | ||
371 | wavy salmon bags contain no other bags. | ||
372 | dull blue bags contain 5 dark plum bags, 4 light yellow bags. | ||
373 | faded lime bags contain 2 dim red bags, 3 drab lavender bags, 5 muted black bags, 2 light coral bags. | ||
374 | vibrant coral bags contain 4 muted purple bags, 5 pale chartreuse bags, 5 dotted black bags. | ||
375 | mirrored chartreuse bags contain 5 muted olive bags. | ||
376 | dark lime bags contain 1 dark magenta bag. | ||
377 | light coral bags contain 2 dull lavender bags. | ||
378 | bright lime bags contain 2 wavy bronze bags. | ||
379 | mirrored orange bags contain 1 pale salmon bag, 1 light orange bag. | ||
380 | muted brown bags contain 3 clear beige bags, 1 faded salmon bag, 2 vibrant cyan bags, 4 clear white bags. | ||
381 | posh orange bags contain 2 dark lime bags, 3 wavy purple bags. | ||
382 | posh magenta bags contain 2 dark teal bags. | ||
383 | drab salmon bags contain 5 drab tomato bags. | ||
384 | muted fuchsia bags contain no other bags. | ||
385 | wavy tomato bags contain 4 wavy black bags, 4 faded teal bags. | ||
386 | dim chartreuse bags contain 5 drab green bags, 4 drab magenta bags. | ||
387 | dotted crimson bags contain 2 dark white bags, 5 wavy black bags, 4 dull crimson bags. | ||
388 | posh maroon bags contain 4 plaid silver bags, 4 vibrant lime bags, 4 posh gray bags, 3 dull maroon bags. | ||
389 | dull green bags contain 5 muted tan bags, 5 drab red bags. | ||
390 | clear maroon bags contain 3 faded brown bags. | ||
391 | striped yellow bags contain 4 faded lavender bags, 1 wavy coral bag, 5 clear maroon bags. | ||
392 | dull tomato bags contain 2 shiny white bags, 2 light silver bags, 4 dotted chartreuse bags, 4 dark brown bags. | ||
393 | drab chartreuse bags contain 3 dotted beige bags, 3 pale chartreuse bags, 2 muted fuchsia bags, 5 light crimson bags. | ||
394 | plaid purple bags contain 3 drab yellow bags. | ||
395 | light plum bags contain 1 dotted aqua bag, 2 dark white bags. | ||
396 | mirrored brown bags contain 3 mirrored teal bags, 2 dull cyan bags. | ||
397 | mirrored crimson bags contain 3 dull chartreuse bags, 2 dark silver bags, 5 bright cyan bags, 4 dark tomato bags. | ||
398 | dull gold bags contain 4 muted salmon bags. | ||
399 | wavy olive bags contain 3 mirrored brown bags, 5 clear indigo bags. | ||
400 | faded turquoise bags contain 2 clear salmon bags, 2 mirrored gray bags, 1 dark lime bag. | ||
401 | bright indigo bags contain 2 faded lavender bags, 1 shiny gray bag, 4 mirrored indigo bags. | ||
402 | pale teal bags contain 3 dark violet bags, 5 shiny salmon bags. | ||
403 | plaid orange bags contain 5 faded green bags, 5 pale magenta bags. | ||
404 | shiny crimson bags contain 5 shiny green bags, 1 bright tomato bag, 3 vibrant lime bags, 3 clear purple bags. | ||
405 | muted indigo bags contain 4 dim brown bags, 1 dotted beige bag. | ||
406 | dark cyan bags contain 2 striped yellow bags. | ||
407 | dull teal bags contain 1 muted indigo bag, 2 drab chartreuse bags, 5 faded beige bags. | ||
408 | striped fuchsia bags contain 1 mirrored teal bag, 3 dull black bags, 2 dim salmon bags, 5 wavy salmon bags. | ||
409 | drab crimson bags contain 5 dim teal bags, 2 wavy red bags, 3 dark brown bags. | ||
410 | dull olive bags contain 1 clear yellow bag, 4 plaid indigo bags, 4 posh tomato bags, 1 dotted orange bag. | ||
411 | muted lime bags contain 2 light white bags, 5 dotted violet bags, 5 posh gold bags, 2 bright cyan bags. | ||
412 | dark purple bags contain 1 light lavender bag, 2 plaid olive bags, 5 striped maroon bags, 1 dotted gold bag. | ||
413 | dull yellow bags contain 5 mirrored beige bags. | ||
414 | dotted maroon bags contain 3 clear salmon bags, 1 light salmon bag. | ||
415 | dull beige bags contain 5 shiny fuchsia bags. | ||
416 | clear green bags contain 4 muted lavender bags, 5 faded orange bags, 4 faded silver bags, 4 clear red bags. | ||
417 | striped magenta bags contain 2 dotted plum bags. | ||
418 | posh beige bags contain 5 vibrant maroon bags, 1 dim lavender bag. | ||
419 | striped blue bags contain 3 clear turquoise bags, 3 dark purple bags, 3 shiny yellow bags, 5 clear teal bags. | ||
420 | muted magenta bags contain 3 striped orange bags, 5 dim brown bags. | ||
421 | vibrant orange bags contain 1 bright teal bag, 1 drab salmon bag, 5 dull silver bags. | ||
422 | pale violet bags contain 4 shiny tan bags, 2 clear turquoise bags, 2 pale salmon bags, 2 dotted aqua bags. | ||
423 | dotted aqua bags contain 2 striped turquoise bags, 1 dim fuchsia bag, 2 pale chartreuse bags, 2 bright turquoise bags. | ||
424 | clear black bags contain 4 dotted beige bags, 1 dull brown bag, 2 dull teal bags. | ||
425 | light tan bags contain 3 dotted red bags, 1 dark red bag. | ||
426 | pale green bags contain 4 dull salmon bags, 4 dim brown bags. | ||
427 | dim tan bags contain 2 posh silver bags, 2 dark fuchsia bags. | ||
428 | plaid coral bags contain 2 vibrant plum bags, 5 vibrant red bags, 3 dim salmon bags. | ||
429 | wavy lavender bags contain 2 dark gold bags, 5 plaid blue bags, 1 dim yellow bag. | ||
430 | dim violet bags contain 2 clear tan bags, 5 pale magenta bags. | ||
431 | dotted black bags contain 4 dark magenta bags. | ||
432 | mirrored salmon bags contain 3 vibrant beige bags, 3 vibrant purple bags. | ||
433 | dark green bags contain 4 dotted yellow bags, 1 faded green bag, 3 muted lavender bags. | ||
434 | faded blue bags contain 4 clear turquoise bags, 1 posh indigo bag, 2 faded green bags. | ||
435 | pale black bags contain 2 pale coral bags, 3 faded black bags, 3 mirrored teal bags, 4 muted chartreuse bags. | ||
436 | plaid black bags contain 3 posh brown bags, 3 dark maroon bags, 1 mirrored black bag. | ||
437 | dim olive bags contain 5 posh indigo bags. | ||
438 | dark lavender bags contain 3 light gold bags, 5 dim purple bags. | ||
439 | shiny turquoise bags contain 3 dim fuchsia bags, 4 faded silver bags, 4 dim salmon bags. | ||
440 | light green bags contain 1 drab red bag. | ||
441 | wavy plum bags contain 2 wavy gold bags, 5 bright tan bags. | ||
442 | vibrant tan bags contain 3 drab gray bags. | ||
443 | shiny orange bags contain 2 clear plum bags, 1 posh red bag. | ||
444 | dull lime bags contain 3 pale silver bags. | ||
445 | shiny cyan bags contain 3 shiny purple bags. | ||
446 | posh brown bags contain 1 striped salmon bag, 2 dotted beige bags. | ||
447 | mirrored blue bags contain 2 muted olive bags, 5 mirrored aqua bags. | ||
448 | dark red bags contain 2 shiny purple bags, 4 dim salmon bags, 2 wavy salmon bags. | ||
449 | wavy gray bags contain 4 striped fuchsia bags, 2 wavy salmon bags, 4 faded silver bags. | ||
450 | clear gold bags contain 2 vibrant plum bags. | ||
451 | dark silver bags contain 4 striped gold bags, 4 plaid teal bags, 1 pale yellow bag. | ||
452 | dim cyan bags contain 4 mirrored blue bags, 1 vibrant red bag, 5 shiny indigo bags, 5 muted gray bags. | ||
453 | bright chartreuse bags contain 4 light yellow bags, 3 faded lavender bags. | ||
454 | dotted green bags contain 3 pale indigo bags, 3 drab gray bags, 2 dark white bags, 4 light yellow bags. | ||
455 | vibrant bronze bags contain 5 light white bags, 1 dim lime bag, 5 dim brown bags, 5 plaid coral bags. | ||
456 | muted purple bags contain 3 dark maroon bags. | ||
457 | bright salmon bags contain 3 clear beige bags. | ||
458 | mirrored lime bags contain 1 wavy coral bag, 1 mirrored gray bag. | ||
459 | faded cyan bags contain 2 pale bronze bags, 3 vibrant plum bags. | ||
460 | dull aqua bags contain 2 dark coral bags, 3 clear turquoise bags. | ||
461 | posh aqua bags contain 1 pale teal bag, 2 dim coral bags. | ||
462 | wavy aqua bags contain 2 posh indigo bags, 4 shiny cyan bags, 3 muted tan bags. | ||
463 | dark magenta bags contain 1 pale red bag, 1 dull brown bag, 3 faded lavender bags. | ||
464 | striped lavender bags contain 4 striped gold bags, 3 mirrored olive bags, 2 dim lime bags, 1 muted indigo bag. | ||
465 | bright turquoise bags contain no other bags. | ||
466 | dim teal bags contain 5 dark white bags, 2 faded chartreuse bags, 1 striped beige bag, 4 muted gold bags. | ||
467 | wavy yellow bags contain 4 pale fuchsia bags. | ||
468 | muted black bags contain 1 striped salmon bag, 1 shiny gold bag, 3 plaid gray bags. | ||
469 | dark beige bags contain 3 wavy gray bags, 5 dim red bags. | ||
470 | mirrored tan bags contain 2 faded purple bags, 4 faded lime bags, 5 dull lavender bags, 4 dark plum bags. | ||
471 | vibrant teal bags contain 1 dark teal bag, 4 dotted chartreuse bags. | ||
472 | bright plum bags contain 1 vibrant silver bag. | ||
473 | dotted purple bags contain 3 faded beige bags, 3 muted lavender bags. | ||
474 | faded tomato bags contain 1 muted olive bag, 5 faded orange bags, 5 light yellow bags. | ||
475 | light crimson bags contain no other bags. | ||
476 | drab fuchsia bags contain 2 vibrant silver bags, 1 dim fuchsia bag, 3 clear plum bags, 1 drab gold bag. | ||
477 | muted blue bags contain 1 dotted silver bag, 5 dull beige bags, 3 posh silver bags. | ||
478 | dark brown bags contain 1 clear red bag, 2 light yellow bags, 1 wavy gold bag, 2 plaid olive bags. | ||
479 | dim gold bags contain 4 dotted purple bags, 3 plaid blue bags. | ||
480 | dim crimson bags contain 5 muted magenta bags. | ||
481 | shiny teal bags contain 1 dotted bronze bag, 4 vibrant teal bags, 4 pale blue bags. | ||
482 | drab blue bags contain 3 dark salmon bags. | ||
483 | bright olive bags contain 5 pale fuchsia bags. | ||
484 | mirrored gold bags contain 2 posh brown bags, 2 bright purple bags, 5 shiny cyan bags. | ||
485 | dim turquoise bags contain 4 pale cyan bags, 2 mirrored violet bags. | ||
486 | clear silver bags contain 4 dark plum bags, 4 pale gray bags, 5 mirrored bronze bags. | ||
487 | clear olive bags contain 4 muted green bags. | ||
488 | drab lime bags contain 3 dotted aqua bags, 2 faded blue bags, 3 faded salmon bags, 3 dim yellow bags. | ||
489 | dim fuchsia bags contain no other bags. | ||
490 | mirrored black bags contain 1 dark white bag. | ||
491 | clear cyan bags contain 3 plaid chartreuse bags, 3 plaid teal bags, 5 dark gold bags, 5 dim lime bags. | ||
492 | bright tomato bags contain 4 dark green bags. | ||
493 | dim white bags contain 2 shiny yellow bags, 1 pale maroon bag. | ||
494 | light turquoise bags contain 5 posh blue bags, 2 light fuchsia bags. | ||
495 | shiny olive bags contain 5 vibrant white bags, 3 dark salmon bags, 5 dotted tan bags. | ||
496 | striped maroon bags contain 1 mirrored olive bag. | ||
497 | striped salmon bags contain 3 muted indigo bags, 5 wavy salmon bags, 4 shiny maroon bags, 4 dim fuchsia bags. | ||
498 | striped orange bags contain 2 dotted purple bags, 4 shiny cyan bags, 1 drab gold bag, 4 dark beige bags. | ||
499 | posh olive bags contain 3 faded tomato bags, 5 posh blue bags, 1 clear red bag. | ||
500 | shiny plum bags contain 3 pale purple bags, 3 dim beige bags. | ||
501 | dark olive bags contain 4 dull coral bags. | ||
502 | dotted teal bags contain 5 plaid lavender bags, 4 clear bronze bags, 4 dim lime bags, 3 pale maroon bags. | ||
503 | clear brown bags contain 2 wavy teal bags, 1 faded green bag, 5 light white bags. | ||
504 | clear crimson bags contain 4 pale turquoise bags, 5 plaid green bags, 3 shiny aqua bags, 5 wavy turquoise bags. | ||
505 | mirrored maroon bags contain 5 bright coral bags, 5 drab orange bags. | ||
506 | wavy violet bags contain 4 mirrored tomato bags, 4 striped gold bags. | ||
507 | plaid olive bags contain 3 dotted silver bags. | ||
508 | light purple bags contain 2 dark red bags, 5 dull cyan bags, 4 plaid black bags. | ||
509 | wavy orange bags contain 1 dim green bag, 4 dark coral bags. | ||
510 | vibrant red bags contain 4 posh brown bags. | ||
511 | wavy silver bags contain 5 faded orange bags, 2 wavy coral bags, 4 faded silver bags. | ||
512 | dark tan bags contain 3 mirrored brown bags, 2 bright plum bags, 2 plaid silver bags. | ||
513 | vibrant blue bags contain 1 wavy salmon bag, 5 pale green bags. | ||
514 | shiny bronze bags contain 5 wavy white bags, 1 dim indigo bag, 5 muted crimson bags, 5 shiny lime bags. | ||
515 | clear red bags contain 1 dotted aqua bag, 3 pale chartreuse bags, 2 muted teal bags, 5 posh brown bags. | ||
516 | dotted silver bags contain 2 dark maroon bags, 3 dim brown bags. | ||
517 | bright tan bags contain 1 posh black bag, 5 striped orange bags, 5 drab gold bags. | ||
518 | drab red bags contain 5 posh gray bags. | ||
519 | striped purple bags contain 1 striped silver bag, 1 pale blue bag, 4 mirrored black bags. | ||
520 | striped bronze bags contain 2 striped gold bags, 5 light crimson bags, 5 faded tomato bags, 3 wavy indigo bags. | ||
521 | pale red bags contain 2 mirrored olive bags, 5 faded orange bags, 4 faded chartreuse bags, 2 plaid chartreuse bags. | ||
522 | dim plum bags contain 4 vibrant coral bags, 3 clear purple bags, 3 dull blue bags. | ||
523 | muted yellow bags contain 2 clear red bags, 3 pale plum bags. | ||
524 | posh salmon bags contain 3 pale tan bags, 3 wavy gold bags. | ||
525 | mirrored bronze bags contain 4 faded bronze bags, 1 clear black bag, 5 dark white bags. | ||
526 | muted cyan bags contain 2 dim plum bags. | ||
527 | vibrant fuchsia bags contain 1 faded teal bag, 2 muted teal bags, 3 pale chartreuse bags, 3 bright teal bags. | ||
528 | mirrored fuchsia bags contain 4 dull red bags, 1 light cyan bag, 3 wavy crimson bags, 3 wavy yellow bags. | ||
529 | clear indigo bags contain 5 clear bronze bags, 4 dark coral bags, 4 drab chartreuse bags. | ||
530 | pale bronze bags contain 2 faded salmon bags, 1 shiny black bag, 3 pale yellow bags, 3 dotted chartreuse bags. | ||
531 | pale purple bags contain 4 mirrored black bags, 1 vibrant silver bag, 2 striped beige bags, 5 dotted chartreuse bags. | ||
532 | muted gray bags contain 4 shiny purple bags, 4 light green bags, 1 pale fuchsia bag. | ||
533 | clear blue bags contain 5 dotted olive bags, 4 light purple bags. | ||
534 | posh cyan bags contain 5 muted tan bags, 1 dotted cyan bag, 4 wavy gold bags. | ||
535 | bright purple bags contain 4 wavy salmon bags, 1 dark teal bag, 4 pale yellow bags. | ||
536 | drab aqua bags contain 1 vibrant red bag. | ||
537 | pale silver bags contain 4 light lavender bags, 2 mirrored bronze bags, 1 striped teal bag. | ||
538 | dark blue bags contain 3 dull beige bags, 4 faded salmon bags, 1 dull black bag, 5 posh salmon bags. | ||
539 | plaid tan bags contain 1 plaid lavender bag, 5 pale lavender bags, 4 light aqua bags. | ||
540 | posh tan bags contain 3 dotted lime bags. | ||
541 | drab maroon bags contain 5 mirrored chartreuse bags. | ||
542 | dim magenta bags contain 1 pale fuchsia bag, 2 light fuchsia bags, 5 bright bronze bags, 1 faded gray bag. | ||
543 | shiny purple bags contain 2 pale chartreuse bags. | ||
544 | drab turquoise bags contain 4 light turquoise bags. | ||
545 | light bronze bags contain 2 posh black bags, 3 dark yellow bags, 3 faded plum bags. | ||
546 | plaid gold bags contain 4 dark teal bags, 4 shiny plum bags. | ||
547 | dim maroon bags contain 2 clear plum bags, 3 striped aqua bags, 2 striped teal bags. | ||
548 | drab coral bags contain 3 faded chartreuse bags, 2 drab plum bags, 3 faded red bags, 1 dark blue bag. | ||
549 | faded gray bags contain 3 pale gray bags, 2 dull beige bags, 5 wavy indigo bags. | ||
550 | dotted magenta bags contain 2 light salmon bags. | ||
551 | light magenta bags contain 3 posh yellow bags, 3 dotted green bags, 1 drab violet bag. | ||
552 | dotted cyan bags contain 2 faded plum bags. | ||
553 | dim orange bags contain 5 light brown bags, 5 bright yellow bags. | ||
554 | posh teal bags contain 1 faded beige bag, 5 mirrored gold bags, 5 bright teal bags. | ||
555 | dim purple bags contain 2 light silver bags, 5 muted red bags, 1 mirrored gold bag, 2 posh orange bags. | ||
556 | shiny tomato bags contain 3 striped coral bags, 3 dark plum bags, 5 plaid turquoise bags. | ||
557 | vibrant olive bags contain 3 vibrant lime bags, 5 mirrored white bags, 1 pale bronze bag, 2 striped cyan bags. | ||
558 | dull lavender bags contain 5 muted gold bags, 5 pale maroon bags. | ||
559 | light black bags contain 1 dark plum bag, 1 shiny gold bag. | ||
560 | bright magenta bags contain 3 striped turquoise bags, 3 dim gray bags. | ||
561 | drab tomato bags contain 3 vibrant purple bags, 4 shiny purple bags, 2 light maroon bags. | ||
562 | posh turquoise bags contain 2 bright aqua bags, 2 striped salmon bags, 5 muted green bags. | ||
563 | dotted yellow bags contain 3 dark red bags, 3 wavy gold bags. | ||
564 | plaid lavender bags contain 4 striped turquoise bags, 1 dotted olive bag, 1 clear green bag, 4 shiny beige bags. | ||
565 | drab black bags contain 5 dotted magenta bags, 2 drab yellow bags, 2 striped turquoise bags, 1 dark bronze bag. | ||
566 | clear beige bags contain 4 striped salmon bags. | ||
567 | light lavender bags contain 1 wavy silver bag, 1 dark indigo bag. | ||
568 | posh red bags contain 4 muted olive bags, 3 light tan bags, 4 clear gray bags, 2 dim lime bags. | ||
569 | clear coral bags contain 3 light lime bags, 2 posh violet bags. | ||
570 | plaid salmon bags contain 2 pale yellow bags, 5 dark plum bags. | ||
571 | pale gold bags contain 2 striped teal bags, 3 faded crimson bags. | ||
572 | wavy red bags contain 4 faded green bags, 5 dim coral bags, 4 wavy silver bags, 4 plaid brown bags. | ||
573 | faded white bags contain 2 posh tomato bags, 1 posh green bag, 4 vibrant lavender bags. | ||
574 | dull indigo bags contain 3 muted olive bags, 4 shiny purple bags, 3 drab chartreuse bags, 1 dotted orange bag. | ||
575 | wavy green bags contain 3 pale indigo bags, 1 striped purple bag, 5 dotted coral bags, 1 shiny tan bag. | ||
576 | shiny red bags contain 4 pale fuchsia bags, 2 posh salmon bags. | ||
577 | vibrant cyan bags contain 1 faded salmon bag, 1 faded black bag, 4 striped coral bags. | ||
578 | dark tomato bags contain 3 clear maroon bags, 4 plaid maroon bags, 5 dotted aqua bags. | ||
579 | vibrant gold bags contain 1 shiny fuchsia bag. | ||
580 | dark black bags contain 2 wavy lime bags, 1 pale cyan bag, 4 posh brown bags. | ||
581 | posh fuchsia bags contain 4 pale purple bags, 2 dull lavender bags. | ||
582 | light silver bags contain 2 vibrant plum bags, 2 pale magenta bags, 4 pale chartreuse bags, 3 plaid chartreuse bags. | ||
583 | dark yellow bags contain 1 dotted crimson bag, 3 faded orange bags, 5 posh teal bags, 1 clear plum bag. | ||
584 | mirrored turquoise bags contain 2 muted teal bags. | ||
585 | drab purple bags contain 5 dotted plum bags, 1 plaid plum bag. | ||
586 | dotted tan bags contain 1 pale plum bag, 1 dotted aqua bag. | ||
587 | drab bronze bags contain 4 vibrant red bags, 4 light blue bags. | ||
588 | mirrored cyan bags contain 1 dark white bag, 4 dark lime bags, 5 vibrant silver bags. | ||
589 | shiny aqua bags contain 5 wavy plum bags, 4 drab maroon bags, 2 drab chartreuse bags. | ||
590 | striped aqua bags contain 1 plaid blue bag, 1 dark plum bag, 4 faded lavender bags. | ||
591 | dotted plum bags contain 5 mirrored green bags, 1 dark plum bag, 4 dark maroon bags. | ||
592 | faded gold bags contain 4 pale yellow bags. | ||
593 | vibrant beige bags contain 2 light lavender bags, 3 faded indigo bags. | ||
594 | light brown bags contain 3 drab brown bags, 4 dark violet bags, 3 faded indigo bags. | ||
diff --git a/2020/day7/inside_shiny.py b/2020/day7/inside_shiny.py new file mode 100644 index 0000000..00df40b --- /dev/null +++ b/2020/day7/inside_shiny.py | |||
@@ -0,0 +1,45 @@ | |||
1 | import networkx as nx | ||
2 | import re | ||
3 | |||
4 | |||
5 | def fits_in(root): | ||
6 | """recursively count the number of bags that fit in other bags | ||
7 | |||
8 | :root: the node to count bags from | ||
9 | :returns: total | ||
10 | |||
11 | """ | ||
12 | total = 1 | ||
13 | for neighbour in bagtree[root]: | ||
14 | total += int(bagtree[root][neighbour]["weight"]) * fits_in(neighbour) | ||
15 | return total | ||
16 | |||
17 | |||
18 | bagtree = nx.DiGraph() | ||
19 | bagremover = re.compile(r" bags?\.?$") | ||
20 | countandbag = re.compile(r"(\d+) (\w+ \w+)") | ||
21 | |||
22 | with open("input", "r") as baglines: | ||
23 | for line in baglines: | ||
24 | (miniroot, child_str) = list(map(str.strip, line.split("contain"))) | ||
25 | |||
26 | miniroot = miniroot.replace(" bags", "") | ||
27 | |||
28 | children = list( | ||
29 | map( | ||
30 | lambda a: re.sub(bagremover, "", a), | ||
31 | list(map(str.strip, child_str.split(","))), | ||
32 | ) | ||
33 | ) | ||
34 | |||
35 | if "no other" in children: | ||
36 | continue | ||
37 | |||
38 | for kid in children: | ||
39 | matches = re.match(countandbag, kid) | ||
40 | bagtree.add_edge(miniroot, matches.groups()[1], weight=matches.groups()[0]) | ||
41 | |||
42 | lengths = dict(nx.all_pairs_shortest_path(bagtree)) | ||
43 | |||
44 | # we don't count the shiny gold itself | ||
45 | print(fits_in("shiny gold") - 1) | ||