Day[9] gh-pages
authorGreg Burri <greg.burri@gmail.com>
Thu, 10 Dec 2020 06:51:52 +0000 (07:51 +0100)
committerGreg Burri <greg.burri@gmail.com>
Thu, 10 Dec 2020 06:51:52 +0000 (07:51 +0100)
advent_of_code_2020.jl
advent_of_code_2020.jl.html
data/day09.txt [new file with mode: 0644]

index e1f2303..8ac82fa 100644 (file)
@@ -607,6 +607,88 @@ md"
 **Result for part 2**: $(fix_to_not_loop(input_day8))
 "
 
+# ╔═╡ ed5f09a0-3a2d-11eb-3592-6bec15fbc19b
+md"## Day [9]"
+
+# ╔═╡ f5750b80-3a2d-11eb-2edc-a767123b4bee
+function parse_day9(lines)
+       parse.(Int64, lines)
+end
+
+# ╔═╡ 2c12b6f0-3a2f-11eb-2aca-b54f0aeb9807
+function first_number_without_valid_pair(numbers, preamble_size)       
+       for i ∈ preamble_size+1:length(numbers)
+               previous = numbers[i-preamble_size:i-1]
+               n = numbers[i]
+               if n ∉ [a + b for a ∈ previous for b ∈ previous if a ≠ b]
+                       return n
+               end
+       end
+end
+
+# ╔═╡ 0218f5c0-3a35-11eb-3833-a7472bcbc11b
+function find_encryption_weakness(numbers, target)
+       l = length(numbers)
+       for i ∈ 1:l
+               for j ∈ i+1:l                 
+                       ξ = numbers[i:j]
+                       s = sum(ξ)
+                       if s == target 
+                               return maximum(ξ) + minimum(ξ)
+                       elseif s > target
+                               break
+                       end
+               end
+       end
+end
+
+# ╔═╡ 2c96db10-3a2f-11eb-266d-3db1dfe51f8c
+let
+       input = "35
+20
+15
+25
+47
+40
+62
+55
+65
+95
+102
+117
+150
+182
+127
+219
+299
+277
+309
+576"
+       numbers = parse_day9(split(input, '\n'))        
+       
+       result_part1 = first_number_without_valid_pair(numbers, 5)
+       result_part2 = find_encryption_weakness(numbers, result_part1)
+       
+       md"
+Test 1, part 1: $(result_part1 == 127)
+       
+Test 1, part 2: $(result_part2 == 62)
+       "
+end
+
+# ╔═╡ 299e6950-3a34-11eb-1080-6d172718b1ba
+input_day9 = parse_day9(readlines("data/day09.txt"))
+
+# ╔═╡ 484f9ea0-3a34-11eb-28a2-a95d5444ad50
+let
+       target = first_number_without_valid_pair(input_day9, 25)        
+       md"
+**Result for part 1**: $target
+
+**Result for part 2**: $(find_encryption_weakness(input_day9, target))
+"
+end
+
 # ╔═╡ Cell order:
 # ╟─661be9a0-353b-11eb-3598-a5b5245368cb
 # ╟─f0dd4400-3313-11eb-3295-af913c2212fb
@@ -665,3 +747,10 @@ md"
 # ╟─d6afedee-3a0a-11eb-31d7-3f16633dbf5d
 # ╟─aa322be0-3a0e-11eb-27ec-d13acf9084aa
 # ╟─d867dd80-3a12-11eb-1ae7-3119a294b25a
+# ╟─ed5f09a0-3a2d-11eb-3592-6bec15fbc19b
+# ╠═f5750b80-3a2d-11eb-2edc-a767123b4bee
+# ╠═2c12b6f0-3a2f-11eb-2aca-b54f0aeb9807
+# ╠═0218f5c0-3a35-11eb-3833-a7472bcbc11b
+# ╟─2c96db10-3a2f-11eb-266d-3db1dfe51f8c
+# ╟─299e6950-3a34-11eb-1080-6d172718b1ba
+# ╟─484f9ea0-3a34-11eb-28a2-a95d5444ad50
index 1bb5451..83a5677 100644 (file)
@@ -149,12 +149,12 @@ foreignObject[data-mjx-xml] {
 </style>
             </head>
             <body>
-                <main><preamble><button class="runallchanged" title="Save and run all changed cells"><span></span></button></preamble><pluto-notebook id="d05137ce-39f0-11eb-3d37-e7ff06a0e186"><pluto-cell class="code_folded " id="661be9a0-353b-11eb-3598-a5b5245368cb"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><style>
+                <main><preamble><button class="runallchanged" title="Save and run all changed cells"><span></span></button></preamble><pluto-notebook id="b7a18e20-3ab2-11eb-28e4-81e601cde6f1"><pluto-cell class="code_folded " id="661be9a0-353b-11eb-3598-a5b5245368cb"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><style>
 main {
        max-width: 100%;
        margin-right: 0;
 }</style>
-</div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">9.5&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="f0dd4400-3313-11eb-3295-af913c2212fb"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><h1>🦌 Advent Of Code 2020</h1>
+</div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">2.7&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="f0dd4400-3313-11eb-3295-af913c2212fb"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><h1>🦌 Advent Of Code 2020</h1>
 <p>The goals are:</p>
 <ul>
 <li><p>Learn <em>Julia</em></p>
@@ -165,18 +165,18 @@ main {
 </li>
 </ul>
 <p>See <a href="https://adventofcode.com/2020">Advent Of Code 2020</a> for more information.</p>
-</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">12.7&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="0b7b8920-3314-11eb-2cfb-7d20c0967e67"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><h2>Day 1</h2>
-</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">8.8&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="877b32e0-3315-11eb-0e96-650b19da693e"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="" mime="application/vnd.pluto.tree+object"><assignee>input_day1</assignee><div><jltree class="collapsed">Int64<jlarray class="Array"><r><k>1</k><v><pre>156</pre></v></r><r><k>2</k><v><pre>413</pre></v></r><r><k>3</k><v><pre>444</pre></v></r><r><k>4</k><v><pre>508</pre></v></r><r><k>5</k><v><pre>684</pre></v></r><r><k>6</k><v><pre>847</pre></v></r><r><k>7</k><v><pre>900</pre></v></r><r><k>8</k><v><pre>961</pre></v></r><r><k>9</k><v><pre>1068</pre></v></r><r><k>10</k><v><pre>1083</pre></v></r><r><k>11</k><v><pre>1094</pre></v></r><r><k>12</k><v><pre>1105</pre></v></r><r><k>13</k><v><pre>1123</pre></v></r><r><k>14</k><v><pre>1130</pre></v></r><r><k>15</k><v><pre>1137</pre></v></r><r><k>16</k><v><pre>1140</pre></v></r><r><k>17</k><v><pre>1146</pre></v></r><r><k>18</k><v><pre>1154</pre></v></r><r><k>19</k><v><pre>1157</pre></v></r><r><k>20</k><v><pre>1165</pre></v></r><r><jlmore class="">more</jlmore></r><r><k>191</k><v><pre>1986</pre></v></r><r><k>192</k><v><pre>1990</pre></v></r><r><k>193</k><v><pre>1991</pre></v></r><r><k>194</k><v><pre>1994</pre></v></r><r><k>195</k><v><pre>1995</pre></v></r><r><k>196</k><v><pre>1999</pre></v></r><r><k>197</k><v><pre>2000</pre></v></r><r><k>198</k><v><pre>2001</pre></v></r><r><k>199</k><v><pre>2005</pre></v></r><r><k>200</k><v><pre>2007</pre></v></r></jlarray></jltree></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">39.2&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="4adcf8d0-33a8-11eb-0220-696f06894ef3"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>day1_part1 (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 50px; left: 240.55px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors" style="visibility: hidden;"><div class="CodeMirror-cursor" style="left: 210.55px; top: 45px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">day1_part1</span>(<span class="cm-variable">input</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-keyword">for</span> <span class="cm-variable">n</span> <span class="cm-operator">∈</span> <span class="cm-variable">input</span><span class="cm-tab" role="presentation" cm-text="       ">   </span><span class="cm-tab" role="presentation" cm-text="  ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">r</span> <span class="cm-operator">=</span> <span class="cm-builtin">searchsorted</span>(<span class="cm-variable">input_day1</span>, <span class="cm-number">2020</span> <span class="cm-operator">-</span> <span class="cm-variable">n</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">if</span> <span class="cm-variable">r</span><span class="cm-operator">.</span><span class="cm-variable">start</span> <span class="cm-operator">≤</span> <span class="cm-variable">r</span><span class="cm-operator">.</span><span class="cm-variable">stop</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">return</span> <span class="cm-variable">n</span> <span class="cm-operator">*</span> <span class="cm-variable">input</span>[<span class="cm-variable">r</span><span class="cm-operator">.</span><span class="cm-variable">start</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 128px;"></div><div class="CodeMirror-gutters" style="height: 161px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">36.2&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="1e8e7230-33ae-11eb-0a77-035e6a4b9ba8"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>day1_part2 (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 95px; left: 194.65px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors" style="visibility: hidden;"><div class="CodeMirror-cursor" style="left: 164.65px; top: 90px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">day1_part2</span>(<span class="cm-variable">input</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-variable">l</span> <span class="cm-operator">=</span> <span class="cm-builtin">length</span>(<span class="cm-variable">input</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-keyword">for</span> <span class="cm-variable">i</span> <span class="cm-operator">∈</span> <span class="cm-number">1</span><span class="cm-operator">:</span><span class="cm-variable">l</span><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-tab" role="presentation" cm-text="    ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">for</span> <span class="cm-variable">j</span> <span class="cm-operator">∈</span> <span class="cm-variable">i</span><span class="cm-operator">+</span><span class="cm-number">1</span><span class="cm-operator">:</span><span class="cm-variable">l</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">v</span> <span class="cm-operator">=</span> <span class="cm-number">2020</span> <span class="cm-operator">-</span> <span class="cm-variable">input</span>[<span class="cm-variable">i</span>] <span class="cm-operator">-</span> <span class="cm-variable">input</span>[<span class="cm-variable">j</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">if</span> <span class="cm-variable">v</span> <span class="cm-operator">≤</span> <span class="cm-number">0</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">break</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">9</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">r</span> <span class="cm-operator">=</span> <span class="cm-builtin">searchsorted</span>(<span class="cm-variable">input_day1</span>, <span class="cm-variable">v</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">10</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">if</span> <span class="cm-variable">r</span><span class="cm-operator">.</span><span class="cm-variable">start</span> <span class="cm-operator">≤</span> <span class="cm-variable">r</span><span class="cm-operator">.</span><span class="cm-variable">stop</span><span class="cm-tab" role="presentation" cm-text="     "> </span><span class="cm-tab" role="presentation" cm-text="    ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">11</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">return</span> <span class="cm-variable">input</span>[<span class="cm-variable">i</span>] <span class="cm-operator">*</span> <span class="cm-variable">input</span>[<span class="cm-variable">j</span>] <span class="cm-operator">*</span> <span class="cm-variable">input</span>[<span class="cm-variable">r</span><span class="cm-operator">.</span><span class="cm-variable">start</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">12</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">13</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">14</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">15</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 233px;"></div><div class="CodeMirror-gutters" style="height: 266px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">42.9&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="7a037310-33ac-11eb-34fb-9bf552883937"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p><strong>Result for part 1:</strong> 913824</p>
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">3.4&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="0b7b8920-3314-11eb-2cfb-7d20c0967e67"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><h2>Day 1</h2>
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">6.3&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="877b32e0-3315-11eb-0e96-650b19da693e"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="" mime="application/vnd.pluto.tree+object"><assignee>input_day1</assignee><div><jltree class="collapsed">Int64<jlarray class="Array"><r><k>1</k><v><pre>156</pre></v></r><r><k>2</k><v><pre>413</pre></v></r><r><k>3</k><v><pre>444</pre></v></r><r><k>4</k><v><pre>508</pre></v></r><r><k>5</k><v><pre>684</pre></v></r><r><k>6</k><v><pre>847</pre></v></r><r><k>7</k><v><pre>900</pre></v></r><r><k>8</k><v><pre>961</pre></v></r><r><k>9</k><v><pre>1068</pre></v></r><r><k>10</k><v><pre>1083</pre></v></r><r><k>11</k><v><pre>1094</pre></v></r><r><k>12</k><v><pre>1105</pre></v></r><r><k>13</k><v><pre>1123</pre></v></r><r><k>14</k><v><pre>1130</pre></v></r><r><k>15</k><v><pre>1137</pre></v></r><r><k>16</k><v><pre>1140</pre></v></r><r><k>17</k><v><pre>1146</pre></v></r><r><k>18</k><v><pre>1154</pre></v></r><r><k>19</k><v><pre>1157</pre></v></r><r><k>20</k><v><pre>1165</pre></v></r><r><jlmore class="">more</jlmore></r><r><k>191</k><v><pre>1986</pre></v></r><r><k>192</k><v><pre>1990</pre></v></r><r><k>193</k><v><pre>1991</pre></v></r><r><k>194</k><v><pre>1994</pre></v></r><r><k>195</k><v><pre>1995</pre></v></r><r><k>196</k><v><pre>1999</pre></v></r><r><k>197</k><v><pre>2000</pre></v></r><r><k>198</k><v><pre>2001</pre></v></r><r><k>199</k><v><pre>2005</pre></v></r><r><k>200</k><v><pre>2007</pre></v></r></jlarray></jltree></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">69.6&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="4adcf8d0-33a8-11eb-0220-696f06894ef3"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>day1_part1 (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>8</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">day1_part1</span>(<span class="cm-variable">input</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-keyword">for</span> <span class="cm-variable">n</span> <span class="cm-operator">∈</span> <span class="cm-variable">input</span><span class="cm-tab" role="presentation" cm-text="       ">   </span><span class="cm-tab" role="presentation" cm-text="  ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">r</span> <span class="cm-operator">=</span> <span class="cm-builtin">searchsorted</span>(<span class="cm-variable">input_day1</span>, <span class="cm-number">2020</span> <span class="cm-operator">-</span> <span class="cm-variable">n</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">if</span> <span class="cm-variable">r</span><span class="cm-operator">.</span><span class="cm-variable">start</span> <span class="cm-operator">≤</span> <span class="cm-variable">r</span><span class="cm-operator">.</span><span class="cm-variable">stop</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">return</span> <span class="cm-variable">n</span> <span class="cm-operator">*</span> <span class="cm-variable">input</span>[<span class="cm-variable">r</span><span class="cm-operator">.</span><span class="cm-variable">start</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 128px;"></div><div class="CodeMirror-gutters" style="height: 161px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">29.5&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="1e8e7230-33ae-11eb-0a77-035e6a4b9ba8"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>day1_part2 (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>15</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">day1_part2</span>(<span class="cm-variable">input</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-variable">l</span> <span class="cm-operator">=</span> <span class="cm-builtin">length</span>(<span class="cm-variable">input</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-keyword">for</span> <span class="cm-variable">i</span> <span class="cm-operator">∈</span> <span class="cm-number">1</span><span class="cm-operator">:</span><span class="cm-variable">l</span><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-tab" role="presentation" cm-text="    ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">for</span> <span class="cm-variable">j</span> <span class="cm-operator">∈</span> <span class="cm-variable">i</span><span class="cm-operator">+</span><span class="cm-number">1</span><span class="cm-operator">:</span><span class="cm-variable">l</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">v</span> <span class="cm-operator">=</span> <span class="cm-number">2020</span> <span class="cm-operator">-</span> <span class="cm-variable">input</span>[<span class="cm-variable">i</span>] <span class="cm-operator">-</span> <span class="cm-variable">input</span>[<span class="cm-variable">j</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">if</span> <span class="cm-variable">v</span> <span class="cm-operator">≤</span> <span class="cm-number">0</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">break</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">9</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">r</span> <span class="cm-operator">=</span> <span class="cm-builtin">searchsorted</span>(<span class="cm-variable">input_day1</span>, <span class="cm-variable">v</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">10</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">if</span> <span class="cm-variable">r</span><span class="cm-operator">.</span><span class="cm-variable">start</span> <span class="cm-operator">≤</span> <span class="cm-variable">r</span><span class="cm-operator">.</span><span class="cm-variable">stop</span><span class="cm-tab" role="presentation" cm-text="     "> </span><span class="cm-tab" role="presentation" cm-text="    ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">11</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">return</span> <span class="cm-variable">input</span>[<span class="cm-variable">i</span>] <span class="cm-operator">*</span> <span class="cm-variable">input</span>[<span class="cm-variable">j</span>] <span class="cm-operator">*</span> <span class="cm-variable">input</span>[<span class="cm-variable">r</span><span class="cm-operator">.</span><span class="cm-variable">start</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">12</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">13</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">14</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">15</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 233px;"></div><div class="CodeMirror-gutters" style="height: 266px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">45.7&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="7a037310-33ac-11eb-34fb-9bf552883937"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p><strong>Result for part 1:</strong> 913824</p>
 <p><strong>Result for part 2:</strong> 240889536</p>
-</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">30.0&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="5d9712b0-3472-11eb-1423-719331dfe52f"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><h2>Day 2</h2>
-</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">10.3&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="b9144990-3473-11eb-0ba9-59f3fe6ddbc0"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y rich_output " mime="text/plain"><assignee></assignee><div></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>5</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">struct</span> <span class="cm-def">Password</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-variable">policy_range</span> <span class="cm-builtin">::</span> <span class="cm-variable">UnitRange</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-variable">policy_char</span> <span class="cm-builtin">::</span> <span class="cm-variable">Char</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">p</span> <span class="cm-builtin">::</span> <span class="cm-variable">String</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span><span class="cm-tab" role="presentation" cm-text="      "> </span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 83px;"></div><div class="CodeMirror-gutters" style="height: 116px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">520&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="bbda1c1e-347a-11eb-0e7a-756906c4c9f4"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>nb_of_valid_passwords_part2 (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>7</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-def">nb_of_valid_passwords_part2</span>(<span class="cm-variable">passwords</span>) <span class="cm-operator">=</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">count</span>(</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">password</span> <span class="cm-operator">-&gt;</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span>(<span class="cm-variable">password</span><span class="cm-operator">.</span><span class="cm-variable">p</span>[<span class="cm-variable">password</span><span class="cm-operator">.</span><span class="cm-variable">policy_range</span><span class="cm-operator">.</span><span class="cm-variable">start</span>] <span class="cm-operator">==</span> <span class="cm-variable">password</span><span class="cm-operator">.</span><span class="cm-variable">policy_char</span>) <span class="cm-operator">⊻</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span>(<span class="cm-variable">password</span><span class="cm-operator">.</span><span class="cm-variable">p</span>[<span class="cm-variable">password</span><span class="cm-operator">.</span><span class="cm-variable">policy_range</span><span class="cm-operator">.</span><span class="cm-variable">stop</span>] <span class="cm-operator">==</span> <span class="cm-variable">password</span><span class="cm-operator">.</span><span class="cm-variable">policy_char</span>),</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">passwords</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span>)</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 113px;"></div><div class="CodeMirror-gutters" style="height: 146px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">54.3&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="10f5ffa0-3474-11eb-2a36-d5c6f78f18c6"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>parse_day2 (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>14</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">parse_day2</span>(<span class="cm-variable">lines</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-variable">line_regexp</span> <span class="cm-operator">=</span> <span class="cm-string">r"^(\d+)-(\d+) ([a-z]): ([a-z]+)$"</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-keyword">function</span> <span class="cm-def">parse_line</span>(<span class="cm-variable">line</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">m</span> <span class="cm-operator">=</span> <span class="cm-builtin">match</span>(<span class="cm-variable">line_regexp</span>, <span class="cm-variable">line</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">Password</span>(</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">UnitRange</span>(<span class="cm-builtin">parse</span>(<span class="cm-variable">Int</span>, <span class="cm-variable">m</span><span class="cm-operator">.</span><span class="cm-variable">captures</span>[<span class="cm-number">1</span>]), <span class="cm-builtin">parse</span>(<span class="cm-variable">Int</span>, <span class="cm-variable">m</span><span class="cm-operator">.</span><span class="cm-variable">captures</span>[<span class="cm-number">2</span>])),</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">m</span><span class="cm-operator">.</span><span class="cm-variable">captures</span>[<span class="cm-number">3</span>][<span class="cm-number">1</span>],</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">9</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">m</span><span class="cm-operator">.</span><span class="cm-variable">captures</span>[<span class="cm-number">4</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">10</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">11</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">12</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">13</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-variable">parse_line</span><span class="cm-operator">.</span>(<span class="cm-variable">lines</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">14</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 218px;"></div><div class="CodeMirror-gutters" style="height: 251px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">51.0&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="6695038e-3472-11eb-1846-3b1c041be59d"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>nb_of_valid_passwords_part1 (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>5</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-def">nb_of_valid_passwords_part1</span>(<span class="cm-variable">passwords</span>) <span class="cm-operator">=</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-builtin">count</span>(</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">password</span> <span class="cm-operator">-&gt;</span> <span class="cm-builtin">count</span>(<span class="cm-operator">==</span>(<span class="cm-variable">password</span><span class="cm-operator">.</span><span class="cm-variable">policy_char</span>), <span class="cm-variable">password</span><span class="cm-operator">.</span><span class="cm-variable">p</span>) <span class="cm-operator">∈</span> <span class="cm-variable">password</span><span class="cm-operator">.</span><span class="cm-variable">policy_range</span>,</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">passwords</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span>)</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 83px;"></div><div class="CodeMirror-gutters" style="height: 116px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">39.7&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="a0cfb670-3474-11eb-1a05-c12914658a0a"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p>Test 1, part 1: true      </p>
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">60.1&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="5d9712b0-3472-11eb-1423-719331dfe52f"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><h2>Day 2</h2>
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">4.2&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="b9144990-3473-11eb-0ba9-59f3fe6ddbc0"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y rich_output " mime="text/plain"><assignee></assignee><div></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>5</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">struct</span> <span class="cm-def">Password</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-variable">policy_range</span> <span class="cm-builtin">::</span> <span class="cm-variable">UnitRange</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-variable">policy_char</span> <span class="cm-builtin">::</span> <span class="cm-variable">Char</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">p</span> <span class="cm-builtin">::</span> <span class="cm-variable">String</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span><span class="cm-tab" role="presentation" cm-text="      "> </span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 83px;"></div><div class="CodeMirror-gutters" style="height: 116px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">495&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="bbda1c1e-347a-11eb-0e7a-756906c4c9f4"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>nb_of_valid_passwords_part2 (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>7</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-def">nb_of_valid_passwords_part2</span>(<span class="cm-variable">passwords</span>) <span class="cm-operator">=</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">count</span>(</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">password</span> <span class="cm-operator">-&gt;</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span>(<span class="cm-variable">password</span><span class="cm-operator">.</span><span class="cm-variable">p</span>[<span class="cm-variable">password</span><span class="cm-operator">.</span><span class="cm-variable">policy_range</span><span class="cm-operator">.</span><span class="cm-variable">start</span>] <span class="cm-operator">==</span> <span class="cm-variable">password</span><span class="cm-operator">.</span><span class="cm-variable">policy_char</span>) <span class="cm-operator">⊻</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span>(<span class="cm-variable">password</span><span class="cm-operator">.</span><span class="cm-variable">p</span>[<span class="cm-variable">password</span><span class="cm-operator">.</span><span class="cm-variable">policy_range</span><span class="cm-operator">.</span><span class="cm-variable">stop</span>] <span class="cm-operator">==</span> <span class="cm-variable">password</span><span class="cm-operator">.</span><span class="cm-variable">policy_char</span>),</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">passwords</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span>)</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 113px;"></div><div class="CodeMirror-gutters" style="height: 146px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">40.2&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="10f5ffa0-3474-11eb-2a36-d5c6f78f18c6"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>parse_day2 (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>14</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">parse_day2</span>(<span class="cm-variable">lines</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-variable">line_regexp</span> <span class="cm-operator">=</span> <span class="cm-string">r"^(\d+)-(\d+) ([a-z]): ([a-z]+)$"</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-keyword">function</span> <span class="cm-def">parse_line</span>(<span class="cm-variable">line</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">m</span> <span class="cm-operator">=</span> <span class="cm-builtin">match</span>(<span class="cm-variable">line_regexp</span>, <span class="cm-variable">line</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">Password</span>(</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">UnitRange</span>(<span class="cm-builtin">parse</span>(<span class="cm-variable">Int</span>, <span class="cm-variable">m</span><span class="cm-operator">.</span><span class="cm-variable">captures</span>[<span class="cm-number">1</span>]), <span class="cm-builtin">parse</span>(<span class="cm-variable">Int</span>, <span class="cm-variable">m</span><span class="cm-operator">.</span><span class="cm-variable">captures</span>[<span class="cm-number">2</span>])),</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">m</span><span class="cm-operator">.</span><span class="cm-variable">captures</span>[<span class="cm-number">3</span>][<span class="cm-number">1</span>],</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">9</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">m</span><span class="cm-operator">.</span><span class="cm-variable">captures</span>[<span class="cm-number">4</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">10</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">11</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">12</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">13</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-variable">parse_line</span><span class="cm-operator">.</span>(<span class="cm-variable">lines</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">14</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 218px;"></div><div class="CodeMirror-gutters" style="height: 251px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">47.3&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="6695038e-3472-11eb-1846-3b1c041be59d"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>nb_of_valid_passwords_part1 (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>5</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-def">nb_of_valid_passwords_part1</span>(<span class="cm-variable">passwords</span>) <span class="cm-operator">=</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-builtin">count</span>(</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">password</span> <span class="cm-operator">-&gt;</span> <span class="cm-builtin">count</span>(<span class="cm-operator">==</span>(<span class="cm-variable">password</span><span class="cm-operator">.</span><span class="cm-variable">policy_char</span>), <span class="cm-variable">password</span><span class="cm-operator">.</span><span class="cm-variable">p</span>) <span class="cm-operator">∈</span> <span class="cm-variable">password</span><span class="cm-operator">.</span><span class="cm-variable">policy_range</span>,</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">passwords</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span>)</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 83px;"></div><div class="CodeMirror-gutters" style="height: 116px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">33.9&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="a0cfb670-3474-11eb-1a05-c12914658a0a"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p>Test 1, part 1: true      </p>
 <p>Test 1, part 2: true</p>
-</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">187&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="4a629040-347a-11eb-2aae-6f37a4c89168"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="" mime="application/vnd.pluto.tree+object"><assignee>input_day2</assignee><div><jltree class="collapsed">Main.workspace219.Password<jlarray class="Array"><r><k>1</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>1:13</pre></v></r><r><k>policy_char</k><v><pre>'r'</pre></v></r><r><k>p</k><v><pre>"gqdrspndrpsrjfjx"</pre></v></r></jlstruct></jltree></v></r><r><k>2</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>5:16</pre></v></r><r><k>policy_char</k><v><pre>'j'</pre></v></r><r><k>p</k><v><pre>"jjjjkjjzjjjjjfjzjjj"</pre></v></r></jlstruct></jltree></v></r><r><k>3</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>14:16</pre></v></r><r><k>policy_char</k><v><pre>'r'</pre></v></r><r><k>p</k><v><pre>"rrrnrrrrrcnrgxrr"</pre></v></r></jlstruct></jltree></v></r><r><k>4</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>1:3</pre></v></r><r><k>policy_char</k><v><pre>'k'</pre></v></r><r><k>p</k><v><pre>"bkktwhgktv"</pre></v></r></jlstruct></jltree></v></r><r><k>5</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>3:5</pre></v></r><r><k>policy_char</k><v><pre>'q'</pre></v></r><r><k>p</k><v><pre>"dxqqqzmqvs"</pre></v></r></jlstruct></jltree></v></r><r><k>6</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>11:14</pre></v></r><r><k>policy_char</k><v><pre>'s'</pre></v></r><r><k>p</k><v><pre>"sssssssssssssv"</pre></v></r></jlstruct></jltree></v></r><r><k>7</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>1:3</pre></v></r><r><k>policy_char</k><v><pre>'d'</pre></v></r><r><k>p</k><v><pre>"cdzdq"</pre></v></r></jlstruct></jltree></v></r><r><k>8</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>13:16</pre></v></r><r><k>policy_char</k><v><pre>'q'</pre></v></r><r><k>p</k><v><pre>"scdqpdgpkvbwwqbv"</pre></v></r></jlstruct></jltree></v></r><r><k>9</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>9:10</pre></v></r><r><k>policy_char</k><v><pre>'d'</pre></v></r><r><k>p</k><v><pre>"ddrdddlddd"</pre></v></r></jlstruct></jltree></v></r><r><k>10</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>15:17</pre></v></r><r><k>policy_char</k><v><pre>'v'</pre></v></r><r><k>p</k><v><pre>"jvvvvvvgcvvvvrcvnv"</pre></v></r></jlstruct></jltree></v></r><r><k>11</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>2:3</pre></v></r><r><k>policy_char</k><v><pre>'s'</pre></v></r><r><k>p</k><v><pre>"xssx"</pre></v></r></jlstruct></jltree></v></r><r><k>12</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>8:15</pre></v></r><r><k>policy_char</k><v><pre>'j'</pre></v></r><r><k>p</k><v><pre>"jwjjjjkhjjjltjmjjjr"</pre></v></r></jlstruct></jltree></v></r><r><k>13</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>7:15</pre></v></r><r><k>policy_char</k><v><pre>'m'</pre></v></r><r><k>p</k><v><pre>"wqspfmtpjftmplwp"</pre></v></r></jlstruct></jltree></v></r><r><k>14</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>1:11</pre></v></r><r><k>policy_char</k><v><pre>'s'</pre></v></r><r><k>p</k><v><pre>"swdgzhgsxtssndzfm"</pre></v></r></jlstruct></jltree></v></r><r><k>15</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>3:4</pre></v></r><r><k>policy_char</k><v><pre>'b'</pre></v></r><r><k>p</k><v><pre>"bgjrg"</pre></v></r></jlstruct></jltree></v></r><r><k>16</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>1:12</pre></v></r><r><k>policy_char</k><v><pre>'x'</pre></v></r><r><k>p</k><v><pre>"jxgxxxpjwpsht"</pre></v></r></jlstruct></jltree></v></r><r><k>17</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>5:15</pre></v></r><r><k>policy_char</k><v><pre>'x'</pre></v></r><r><k>p</k><v><pre>"xxjxwshpxjxxxxsnxvz"</pre></v></r></jlstruct></jltree></v></r><r><k>18</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>4:11</pre></v></r><r><k>policy_char</k><v><pre>'r'</pre></v></r><r><k>p</k><v><pre>"bjnrpswfprrng"</pre></v></r></jlstruct></jltree></v></r><r><k>19</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>12:14</pre></v></r><r><k>policy_char</k><v><pre>'j'</pre></v></r><r><k>p</k><v><pre>"wjjzmwnmmvzsjhnnkj"</pre></v></r></jlstruct></jltree></v></r><r><k>20</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>3:4</pre></v></r><r><k>policy_char</k><v><pre>'d'</pre></v></r><r><k>p</k><v><pre>"dddv"</pre></v></r></jlstruct></jltree></v></r><r><jlmore class="">more</jlmore></r><r><k>991</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>14:15</pre></v></r><r><k>policy_char</k><v><pre>'z'</pre></v></r><r><k>p</k><v><pre>"nlzzzzzzzzzdzzzzzz"</pre></v></r></jlstruct></jltree></v></r><r><k>992</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>8:12</pre></v></r><r><k>policy_char</k><v><pre>'r'</pre></v></r><r><k>p</k><v><pre>"zrrrrprrxrrrrkrhk"</pre></v></r></jlstruct></jltree></v></r><r><k>993</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>1:2</pre></v></r><r><k>policy_char</k><v><pre>'z'</pre></v></r><r><k>p</k><v><pre>"qlfzd"</pre></v></r></jlstruct></jltree></v></r><r><k>994</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>1:6</pre></v></r><r><k>policy_char</k><v><pre>'j'</pre></v></r><r><k>p</k><v><pre>"kqjpjzpsgjjqz"</pre></v></r></jlstruct></jltree></v></r><r><k>995</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>1:5</pre></v></r><r><k>policy_char</k><v><pre>'s'</pre></v></r><r><k>p</k><v><pre>"qfssks"</pre></v></r></jlstruct></jltree></v></r><r><k>996</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>2:5</pre></v></r><r><k>policy_char</k><v><pre>'r'</pre></v></r><r><k>p</k><v><pre>"nrrzrr"</pre></v></r></jlstruct></jltree></v></r><r><k>997</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>4:6</pre></v></r><r><k>policy_char</k><v><pre>'g'</pre></v></r><r><k>p</k><v><pre>"kggggg"</pre></v></r></jlstruct></jltree></v></r><r><k>998</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>6:7</pre></v></r><r><k>policy_char</k><v><pre>'c'</pre></v></r><r><k>p</k><v><pre>"cccccdqcc"</pre></v></r></jlstruct></jltree></v></r><r><k>999</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>2:6</pre></v></r><r><k>policy_char</k><v><pre>'x'</pre></v></r><r><k>p</k><v><pre>"vjkxbrfwnj"</pre></v></r></jlstruct></jltree></v></r><r><k>1000</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>16:18</pre></v></r><r><k>policy_char</k><v><pre>'s'</pre></v></r><r><k>p</k><v><pre>"kssssssswssssssssssb"</pre></v></r></jlstruct></jltree></v></r></jlarray></jltree></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">11.0&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="5825aa50-347a-11eb-37ca-811e1b59d37a"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p><strong>Result for part 1</strong>: 600</p>
-</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">117&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="de3c2f00-347b-11eb-0aec-8b776a855f6a"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p><strong>Result for part 2</strong>: 245</p>
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">116&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="4a629040-347a-11eb-2aae-6f37a4c89168"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="" mime="application/vnd.pluto.tree+object"><assignee>input_day2</assignee><div><jltree class="collapsed">Main.workspace6.Password<jlarray class="Array"><r><k>1</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>1:13</pre></v></r><r><k>policy_char</k><v><pre>'r'</pre></v></r><r><k>p</k><v><pre>"gqdrspndrpsrjfjx"</pre></v></r></jlstruct></jltree></v></r><r><k>2</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>5:16</pre></v></r><r><k>policy_char</k><v><pre>'j'</pre></v></r><r><k>p</k><v><pre>"jjjjkjjzjjjjjfjzjjj"</pre></v></r></jlstruct></jltree></v></r><r><k>3</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>14:16</pre></v></r><r><k>policy_char</k><v><pre>'r'</pre></v></r><r><k>p</k><v><pre>"rrrnrrrrrcnrgxrr"</pre></v></r></jlstruct></jltree></v></r><r><k>4</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>1:3</pre></v></r><r><k>policy_char</k><v><pre>'k'</pre></v></r><r><k>p</k><v><pre>"bkktwhgktv"</pre></v></r></jlstruct></jltree></v></r><r><k>5</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>3:5</pre></v></r><r><k>policy_char</k><v><pre>'q'</pre></v></r><r><k>p</k><v><pre>"dxqqqzmqvs"</pre></v></r></jlstruct></jltree></v></r><r><k>6</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>11:14</pre></v></r><r><k>policy_char</k><v><pre>'s'</pre></v></r><r><k>p</k><v><pre>"sssssssssssssv"</pre></v></r></jlstruct></jltree></v></r><r><k>7</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>1:3</pre></v></r><r><k>policy_char</k><v><pre>'d'</pre></v></r><r><k>p</k><v><pre>"cdzdq"</pre></v></r></jlstruct></jltree></v></r><r><k>8</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>13:16</pre></v></r><r><k>policy_char</k><v><pre>'q'</pre></v></r><r><k>p</k><v><pre>"scdqpdgpkvbwwqbv"</pre></v></r></jlstruct></jltree></v></r><r><k>9</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>9:10</pre></v></r><r><k>policy_char</k><v><pre>'d'</pre></v></r><r><k>p</k><v><pre>"ddrdddlddd"</pre></v></r></jlstruct></jltree></v></r><r><k>10</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>15:17</pre></v></r><r><k>policy_char</k><v><pre>'v'</pre></v></r><r><k>p</k><v><pre>"jvvvvvvgcvvvvrcvnv"</pre></v></r></jlstruct></jltree></v></r><r><k>11</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>2:3</pre></v></r><r><k>policy_char</k><v><pre>'s'</pre></v></r><r><k>p</k><v><pre>"xssx"</pre></v></r></jlstruct></jltree></v></r><r><k>12</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>8:15</pre></v></r><r><k>policy_char</k><v><pre>'j'</pre></v></r><r><k>p</k><v><pre>"jwjjjjkhjjjltjmjjjr"</pre></v></r></jlstruct></jltree></v></r><r><k>13</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>7:15</pre></v></r><r><k>policy_char</k><v><pre>'m'</pre></v></r><r><k>p</k><v><pre>"wqspfmtpjftmplwp"</pre></v></r></jlstruct></jltree></v></r><r><k>14</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>1:11</pre></v></r><r><k>policy_char</k><v><pre>'s'</pre></v></r><r><k>p</k><v><pre>"swdgzhgsxtssndzfm"</pre></v></r></jlstruct></jltree></v></r><r><k>15</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>3:4</pre></v></r><r><k>policy_char</k><v><pre>'b'</pre></v></r><r><k>p</k><v><pre>"bgjrg"</pre></v></r></jlstruct></jltree></v></r><r><k>16</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>1:12</pre></v></r><r><k>policy_char</k><v><pre>'x'</pre></v></r><r><k>p</k><v><pre>"jxgxxxpjwpsht"</pre></v></r></jlstruct></jltree></v></r><r><k>17</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>5:15</pre></v></r><r><k>policy_char</k><v><pre>'x'</pre></v></r><r><k>p</k><v><pre>"xxjxwshpxjxxxxsnxvz"</pre></v></r></jlstruct></jltree></v></r><r><k>18</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>4:11</pre></v></r><r><k>policy_char</k><v><pre>'r'</pre></v></r><r><k>p</k><v><pre>"bjnrpswfprrng"</pre></v></r></jlstruct></jltree></v></r><r><k>19</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>12:14</pre></v></r><r><k>policy_char</k><v><pre>'j'</pre></v></r><r><k>p</k><v><pre>"wjjzmwnmmvzsjhnnkj"</pre></v></r></jlstruct></jltree></v></r><r><k>20</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>3:4</pre></v></r><r><k>policy_char</k><v><pre>'d'</pre></v></r><r><k>p</k><v><pre>"dddv"</pre></v></r></jlstruct></jltree></v></r><r><jlmore class="">more</jlmore></r><r><k>991</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>14:15</pre></v></r><r><k>policy_char</k><v><pre>'z'</pre></v></r><r><k>p</k><v><pre>"nlzzzzzzzzzdzzzzzz"</pre></v></r></jlstruct></jltree></v></r><r><k>992</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>8:12</pre></v></r><r><k>policy_char</k><v><pre>'r'</pre></v></r><r><k>p</k><v><pre>"zrrrrprrxrrrrkrhk"</pre></v></r></jlstruct></jltree></v></r><r><k>993</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>1:2</pre></v></r><r><k>policy_char</k><v><pre>'z'</pre></v></r><r><k>p</k><v><pre>"qlfzd"</pre></v></r></jlstruct></jltree></v></r><r><k>994</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>1:6</pre></v></r><r><k>policy_char</k><v><pre>'j'</pre></v></r><r><k>p</k><v><pre>"kqjpjzpsgjjqz"</pre></v></r></jlstruct></jltree></v></r><r><k>995</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>1:5</pre></v></r><r><k>policy_char</k><v><pre>'s'</pre></v></r><r><k>p</k><v><pre>"qfssks"</pre></v></r></jlstruct></jltree></v></r><r><k>996</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>2:5</pre></v></r><r><k>policy_char</k><v><pre>'r'</pre></v></r><r><k>p</k><v><pre>"nrrzrr"</pre></v></r></jlstruct></jltree></v></r><r><k>997</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>4:6</pre></v></r><r><k>policy_char</k><v><pre>'g'</pre></v></r><r><k>p</k><v><pre>"kggggg"</pre></v></r></jlstruct></jltree></v></r><r><k>998</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>6:7</pre></v></r><r><k>policy_char</k><v><pre>'c'</pre></v></r><r><k>p</k><v><pre>"cccccdqcc"</pre></v></r></jlstruct></jltree></v></r><r><k>999</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>2:6</pre></v></r><r><k>policy_char</k><v><pre>'x'</pre></v></r><r><k>p</k><v><pre>"vjkxbrfwnj"</pre></v></r></jlstruct></jltree></v></r><r><k>1000</k><v><jltree class="collapsed">Password<jlstruct><r><k>policy_range</k><v><pre>16:18</pre></v></r><r><k>policy_char</k><v><pre>'s'</pre></v></r><r><k>p</k><v><pre>"kssssssswssssssssssb"</pre></v></r></jlstruct></jltree></v></r></jlarray></jltree></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">7.5&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="5825aa50-347a-11eb-37ca-811e1b59d37a"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p><strong>Result for part 1</strong>: 600</p>
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">157&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="de3c2f00-347b-11eb-0aec-8b776a855f6a"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p><strong>Result for part 2</strong>: 245</p>
 </div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">130&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="14e39f60-3536-11eb-0c2a-5945a1ccb638"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><h2>Day 3</h2>
-</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">13.1&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="1b7ec110-3536-11eb-04c4-af7b43e6c68e"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>parse_day3 (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>3</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation"><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">parse_day3</span>(<span class="cm-variable">lines</span>)<span class="cm-tab" role="presentation" cm-text="        ">  </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-builtin">map</span>(<span class="cm-operator">==</span>(<span class="cm-string">"#"</span>), <span class="cm-builtin">hcat</span>(<span class="cm-variable">split</span><span class="cm-operator">.</span>(<span class="cm-variable">lines</span>, <span class="cm-string">""</span>)<span class="cm-operator">...</span>))<span class="cm-operator">'</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 53px;"></div><div class="CodeMirror-gutters" style="height: 86px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">29.5&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="a6abdfc0-3536-11eb-3003-c13c39952d78"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>nb_trees_encountered (generic function with 2 methods)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>8</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">nb_trees_encountered</span>(<span class="cm-variable">area</span> <span class="cm-builtin">::</span> <span class="cm-variable">AbstractArray</span>{<span class="cm-variable">Bool</span>, <span class="cm-number">2</span>}, <span class="cm-variable">moves</span> <span class="cm-operator">=</span> [(<span class="cm-number">1</span>, <span class="cm-number">3</span>)])</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-variable">m</span>, <span class="cm-variable">n</span> <span class="cm-operator">=</span> <span class="cm-builtin">size</span>(<span class="cm-variable">area</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">map</span>(<span class="cm-variable">moves</span>) <span class="cm-keyword">do</span> (<span class="cm-variable">di</span>, <span class="cm-variable">dj</span>)<span class="cm-tab" role="presentation" cm-text="        ">  </span><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">foldl</span>(<span class="cm-number">1</span><span class="cm-operator">:</span><span class="cm-variable">di</span><span class="cm-operator">:</span><span class="cm-variable">m</span>, <span class="cm-variable">init</span> <span class="cm-operator">=</span> (<span class="cm-number">1</span>, <span class="cm-number">0</span>)) <span class="cm-keyword">do</span> (<span class="cm-variable">j</span>, <span class="cm-variable">sum</span>), <span class="cm-variable">i</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">mod1</span>(<span class="cm-variable">j</span> <span class="cm-operator">+</span> <span class="cm-variable">dj</span>, <span class="cm-variable">n</span>), <span class="cm-variable">sum</span> <span class="cm-operator">+</span> <span class="cm-variable">area</span>[<span class="cm-variable">i</span>, <span class="cm-variable">j</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span>[<span class="cm-number">2</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 128px;"></div><div class="CodeMirror-gutters" style="height: 161px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">158&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="1814fa70-353c-11eb-20de-51f779e98bdb"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>nb_trees_encountered_part2 (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>1</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation"><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-def">nb_trees_encountered_part2</span>(<span class="cm-variable">area</span>) <span class="cm-operator">=</span> <span class="cm-builtin">nb_trees_encountered</span>(<span class="cm-variable">area</span>, [(<span class="cm-number">1</span>, <span class="cm-number">1</span>), (<span class="cm-number">1</span>, <span class="cm-number">3</span>), (<span class="cm-number">1</span>, <span class="cm-number">5</span>), (<span class="cm-number">1</span>, <span class="cm-number">7</span>), (<span class="cm-number">2</span>, <span class="cm-number">1</span>)])</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 23px;"></div><div class="CodeMirror-gutters" style="height: 56px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">25.9&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="da0fb260-3536-11eb-2c09-8f1b322090ab"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p>Test 1, part 1: true</p>
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">4.6&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="1b7ec110-3536-11eb-04c4-af7b43e6c68e"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>parse_day3 (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>3</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation"><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">parse_day3</span>(<span class="cm-variable">lines</span>)<span class="cm-tab" role="presentation" cm-text=" ">  </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-builtin">map</span>(<span class="cm-operator">==</span>(<span class="cm-string">"#"</span>), <span class="cm-builtin">hcat</span>(<span class="cm-variable">split</span><span class="cm-operator">.</span>(<span class="cm-variable">lines</span>, <span class="cm-string">""</span>)<span class="cm-operator">...</span>))<span class="cm-operator">'</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 53px;"></div><div class="CodeMirror-gutters" style="height: 86px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">51.6&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="a6abdfc0-3536-11eb-3003-c13c39952d78"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>nb_trees_encountered (generic function with 2 methods)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>8</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">nb_trees_encountered</span>(<span class="cm-variable">area</span> <span class="cm-builtin">::</span> <span class="cm-variable">AbstractArray</span>{<span class="cm-variable">Bool</span>, <span class="cm-number">2</span>}, <span class="cm-variable">moves</span> <span class="cm-operator">=</span> [(<span class="cm-number">1</span>, <span class="cm-number">3</span>)])</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-variable">m</span>, <span class="cm-variable">n</span> <span class="cm-operator">=</span> <span class="cm-builtin">size</span>(<span class="cm-variable">area</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">map</span>(<span class="cm-variable">moves</span>) <span class="cm-keyword">do</span> (<span class="cm-variable">di</span>, <span class="cm-variable">dj</span>)<span class="cm-tab" role="presentation" cm-text="        ">  </span><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">foldl</span>(<span class="cm-number">1</span><span class="cm-operator">:</span><span class="cm-variable">di</span><span class="cm-operator">:</span><span class="cm-variable">m</span>, <span class="cm-variable">init</span> <span class="cm-operator">=</span> (<span class="cm-number">1</span>, <span class="cm-number">0</span>)) <span class="cm-keyword">do</span> (<span class="cm-variable">j</span>, <span class="cm-variable">sum</span>), <span class="cm-variable">i</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">mod1</span>(<span class="cm-variable">j</span> <span class="cm-operator">+</span> <span class="cm-variable">dj</span>, <span class="cm-variable">n</span>), <span class="cm-variable">sum</span> <span class="cm-operator">+</span> <span class="cm-variable">area</span>[<span class="cm-variable">i</span>, <span class="cm-variable">j</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span>[<span class="cm-number">2</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 128px;"></div><div class="CodeMirror-gutters" style="height: 161px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">127&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="1814fa70-353c-11eb-20de-51f779e98bdb"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>nb_trees_encountered_part2 (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>1</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation"><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-def">nb_trees_encountered_part2</span>(<span class="cm-variable">area</span>) <span class="cm-operator">=</span> <span class="cm-builtin">nb_trees_encountered</span>(<span class="cm-variable">area</span>, [(<span class="cm-number">1</span>, <span class="cm-number">1</span>), (<span class="cm-number">1</span>, <span class="cm-number">3</span>), (<span class="cm-number">1</span>, <span class="cm-number">5</span>), (<span class="cm-number">1</span>, <span class="cm-number">7</span>), (<span class="cm-number">2</span>, <span class="cm-number">1</span>)])</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 23px;"></div><div class="CodeMirror-gutters" style="height: 56px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">31.0&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="da0fb260-3536-11eb-2c09-8f1b322090ab"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p>Test 1, part 1: true</p>
 <p>Test 1, part 2: true</p>
-</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">463&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="6b1aac80-3553-11eb-0816-6b74dcff2b86"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee>input_day3</assignee><div><pre><code>323×31 LinearAlgebra.Adjoint{Bool,Array{Bool,2}}:
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">421&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="6b1aac80-3553-11eb-0816-6b74dcff2b86"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee>input_day3</assignee><div><pre><code>323×31 LinearAlgebra.Adjoint{Bool,Array{Bool,2}}:
  0  0  1  0  0  0  0  0  0  1  1  1  0  0  …  0  0  1  1  0  0  1  0  1  0  0  0  0
  0  1  0  1  0  0  0  0  0  1  0  1  1  0     1  1  1  0  0  0  1  1  0  0  0  1  1
  0  0  1  0  1  0  0  1  0  0  0  0  0  0     0  1  0  1  0  0  1  0  0  0  0  0  0
@@ -190,29 +190,29 @@ main {
  0  0  0  0  0  0  0  0  1  0  1  1  1  1     0  0  0  0  0  1  0  1  0  1  0  0  0
  1  0  0  0  0  0  0  0  0  0  0  0  1  1  …  0  0  0  0  0  0  0  0  0  1  0  0  1
  0  0  0  0  0  0  0  0  0  0  0  1  0  0     0  0  0  1  0  0  0  1  0  1  0  0  0
- 0  0  0  0  1  1  0  0  0  1  1  0  0  0     0  0  0  0  1  0  0  0  0  0  0  0  0</code></pre></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">62.6&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="ab7f3260-3539-11eb-3f97-fde10d5d852b"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p><strong>Result for part 1</strong>: 262</p>
+ 0  0  0  0  1  1  0  0  0  1  1  0  0  0     0  0  0  0  1  0  0  0  0  0  0  0  0</code></pre></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">113&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="ab7f3260-3539-11eb-3f97-fde10d5d852b"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p><strong>Result for part 1</strong>: 262</p>
 <p><strong>Result for part 2</strong>: 2698900776</p>
-</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">12.8&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="e43e2c90-35fd-11eb-1bf4-179363184fad"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><h2>Day 4</h2>
-</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">11.7&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="eba88520-35fd-11eb-1810-819e3fb57682"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>parse_day4 (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>14</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">parse_day4</span>(<span class="cm-variable">lines</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-variable">passports</span> <span class="cm-operator">=</span> [<span class="cm-builtin">Dict</span>{<span class="cm-variable">String</span>, <span class="cm-variable">String</span>}()]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-keyword">for</span> <span class="cm-variable">line</span> <span class="cm-operator">∈</span> <span class="cm-variable">lines</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">if</span> <span class="cm-variable">line</span> <span class="cm-operator">==</span> <span class="cm-string">""</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">push!</span>(<span class="cm-variable">passports</span>, <span class="cm-builtin">Dict</span>())</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">else</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">for</span> <span class="cm-variable">value</span> <span class="cm-operator">in</span> <span class="cm-builtin">split</span>(<span class="cm-variable">line</span>, <span class="cm-string">' '</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">key_value</span> <span class="cm-operator">=</span> <span class="cm-builtin">split</span>(<span class="cm-variable">value</span>, <span class="cm-string">':'</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">9</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">last</span>(<span class="cm-variable">passports</span>)[<span class="cm-variable">key_value</span>[<span class="cm-number">1</span>]] <span class="cm-operator">=</span> <span class="cm-variable">key_value</span>[<span class="cm-number">2</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">10</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">11</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">12</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">13</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-variable">passports</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">14</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 218px;"></div><div class="CodeMirror-gutters" style="height: 251px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">51.2&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="419cea1e-35fe-11eb-350c-19bf6016e01c"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>count_nb_valid_passport (generic function with 2 methods)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>24</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">count_nb_valid_passport</span>(<span class="cm-variable">passports</span> <span class="cm-builtin">::</span> <span class="cm-variable">AbstractArray</span>{<span class="cm-variable">Dict</span>{<span class="cm-variable">String</span>,<span class="cm-variable">String</span>}}, <span class="cm-variable">check_fields_integrity</span> <span class="cm-operator">=</span> <span class="cm-builtin">false</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-variable">required_fields</span> <span class="cm-operator">=</span> [<span class="cm-string">"byr"</span>, <span class="cm-string">"iyr"</span>, <span class="cm-string">"eyr"</span>, <span class="cm-string">"hgt"</span>, <span class="cm-string">"hcl"</span>, <span class="cm-string">"ecl"</span>, <span class="cm-string">"pid"</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-keyword">function</span> <span class="cm-def">check_field</span>(<span class="cm-variable">field</span>, <span class="cm-variable">value</span>)<span class="cm-tab" role="presentation" cm-text=" ">  </span><span class="cm-tab" role="presentation" cm-text="   ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">try</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">field</span> <span class="cm-operator">==</span> <span class="cm-string">"byr"</span> <span class="cm-operator">&amp;&amp;</span> <span class="cm-number">1920</span> <span class="cm-operator">≤</span> <span class="cm-builtin">parse</span>(<span class="cm-variable">Int</span>, <span class="cm-variable">value</span>) <span class="cm-operator">≤</span> <span class="cm-number">2020</span> <span class="cm-operator">||</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">field</span> <span class="cm-operator">==</span> <span class="cm-string">"iyr"</span> <span class="cm-operator">&amp;&amp;</span> <span class="cm-number">2010</span> <span class="cm-operator">≤</span> <span class="cm-builtin">parse</span>(<span class="cm-variable">Int</span>, <span class="cm-variable">value</span>) <span class="cm-operator">≤</span> <span class="cm-number">2020</span> <span class="cm-operator">||</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">field</span> <span class="cm-operator">==</span> <span class="cm-string">"eyr"</span> <span class="cm-operator">&amp;&amp;</span> <span class="cm-number">2020</span> <span class="cm-operator">≤</span> <span class="cm-builtin">parse</span>(<span class="cm-variable">Int</span>, <span class="cm-variable">value</span>) <span class="cm-operator">≤</span> <span class="cm-number">2030</span> <span class="cm-operator">||</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">field</span> <span class="cm-operator">==</span> <span class="cm-string">"hgt"</span> <span class="cm-operator">&amp;&amp;</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">9</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span>((<span class="cm-variable">inches</span> <span class="cm-operator">=</span> <span class="cm-builtin">match</span>(<span class="cm-string">r"(\d+)in"</span>, <span class="cm-variable">value</span>)) <span class="cm-operator">≠</span> <span class="cm-builtin">nothing</span> <span class="cm-operator">&amp;&amp;</span> <span class="cm-number">59</span> <span class="cm-operator">≤</span> <span class="cm-builtin">parse</span>(<span class="cm-variable">Int</span>, <span class="cm-variable">inches</span><span class="cm-operator">.</span><span class="cm-variable">captures</span>[<span class="cm-number">1</span>]) <span class="cm-operator">≤</span> <span class="cm-number">76</span> <span class="cm-operator">||</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">10</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span> (<span class="cm-variable">cm</span> <span class="cm-operator">=</span> <span class="cm-builtin">match</span>(<span class="cm-string">r"(\d+)cm"</span>, <span class="cm-variable">value</span>)) <span class="cm-operator">≠</span> <span class="cm-builtin">nothing</span> <span class="cm-operator">&amp;&amp;</span> <span class="cm-number">150</span> <span class="cm-operator">≤</span> <span class="cm-builtin">parse</span>(<span class="cm-variable">Int</span>, <span class="cm-variable">cm</span><span class="cm-operator">.</span><span class="cm-variable">captures</span>[<span class="cm-number">1</span>]) <span class="cm-operator">≤</span> <span class="cm-number">193</span>) <span class="cm-operator">||</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">11</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">field</span> <span class="cm-operator">==</span> <span class="cm-string">"hcl"</span> <span class="cm-operator">&amp;&amp;</span> <span class="cm-builtin">occursin</span>(<span class="cm-string">r"^#[0-9a-f]{6}$"</span>, <span class="cm-variable">value</span>) <span class="cm-operator">||</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">12</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">field</span> <span class="cm-operator">==</span> <span class="cm-string">"ecl"</span> <span class="cm-operator">&amp;&amp;</span> <span class="cm-variable">value</span> <span class="cm-operator">∈</span> [<span class="cm-string">"amb"</span>, <span class="cm-string">"blu"</span>, <span class="cm-string">"brn"</span>, <span class="cm-string">"gry"</span>, <span class="cm-string">"grn"</span>, <span class="cm-string">"hzl"</span>, <span class="cm-string">"oth"</span>] <span class="cm-operator">||</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">13</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">field</span> <span class="cm-operator">==</span> <span class="cm-string">"pid"</span> <span class="cm-operator">&amp;&amp;</span> <span class="cm-builtin">occursin</span>(<span class="cm-string">r"^[0-9]{9}$"</span>, <span class="cm-variable">value</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">14</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">catch</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">15</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">false</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">16</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">17</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">18</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">19</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-builtin">count</span>(<span class="cm-variable">passports</span>) <span class="cm-keyword">do</span> <span class="cm-variable">p</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">20</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">all</span>(<span class="cm-variable">required_fields</span>) <span class="cm-keyword">do</span> <span class="cm-variable">f</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">21</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">haskey</span>(<span class="cm-variable">p</span>, <span class="cm-variable">f</span>) <span class="cm-operator">&amp;&amp;</span> (<span class="cm-operator">!</span><span class="cm-variable">check_fields_integrity</span> <span class="cm-operator">||</span> <span class="cm-builtin">check_field</span>(<span class="cm-variable">f</span>, <span class="cm-variable">p</span>[<span class="cm-variable">f</span>]))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">22</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">23</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">24</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 368px;"></div><div class="CodeMirror-gutters" style="height: 401px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">169&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="b8d2afc0-35ff-11eb-2fb1-7dba5d323768"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p>Test 1, part 1: true</p>
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">10.5&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="e43e2c90-35fd-11eb-1bf4-179363184fad"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><h2>Day 4</h2>
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">4.9&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="eba88520-35fd-11eb-1810-819e3fb57682"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>parse_day4 (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>14</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">parse_day4</span>(<span class="cm-variable">lines</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-variable">passports</span> <span class="cm-operator">=</span> [<span class="cm-builtin">Dict</span>{<span class="cm-variable">String</span>, <span class="cm-variable">String</span>}()]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-keyword">for</span> <span class="cm-variable">line</span> <span class="cm-operator">∈</span> <span class="cm-variable">lines</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">if</span> <span class="cm-variable">line</span> <span class="cm-operator">==</span> <span class="cm-string">""</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">push!</span>(<span class="cm-variable">passports</span>, <span class="cm-builtin">Dict</span>())</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">else</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">for</span> <span class="cm-variable">value</span> <span class="cm-operator">in</span> <span class="cm-builtin">split</span>(<span class="cm-variable">line</span>, <span class="cm-string">' '</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">key_value</span> <span class="cm-operator">=</span> <span class="cm-builtin">split</span>(<span class="cm-variable">value</span>, <span class="cm-string">':'</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">9</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">last</span>(<span class="cm-variable">passports</span>)[<span class="cm-variable">key_value</span>[<span class="cm-number">1</span>]] <span class="cm-operator">=</span> <span class="cm-variable">key_value</span>[<span class="cm-number">2</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">10</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">11</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">12</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">13</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-variable">passports</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">14</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 218px;"></div><div class="CodeMirror-gutters" style="height: 251px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">45.5&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="419cea1e-35fe-11eb-350c-19bf6016e01c"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>count_nb_valid_passport (generic function with 2 methods)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>24</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">count_nb_valid_passport</span>(<span class="cm-variable">passports</span> <span class="cm-builtin">::</span> <span class="cm-variable">AbstractArray</span>{<span class="cm-variable">Dict</span>{<span class="cm-variable">String</span>,<span class="cm-variable">String</span>}}, <span class="cm-variable">check_fields_integrity</span> <span class="cm-operator">=</span> <span class="cm-builtin">false</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-variable">required_fields</span> <span class="cm-operator">=</span> [<span class="cm-string">"byr"</span>, <span class="cm-string">"iyr"</span>, <span class="cm-string">"eyr"</span>, <span class="cm-string">"hgt"</span>, <span class="cm-string">"hcl"</span>, <span class="cm-string">"ecl"</span>, <span class="cm-string">"pid"</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-keyword">function</span> <span class="cm-def">check_field</span>(<span class="cm-variable">field</span>, <span class="cm-variable">value</span>)<span class="cm-tab" role="presentation" cm-text=" ">  </span><span class="cm-tab" role="presentation" cm-text="   ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">try</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">field</span> <span class="cm-operator">==</span> <span class="cm-string">"byr"</span> <span class="cm-operator">&amp;&amp;</span> <span class="cm-number">1920</span> <span class="cm-operator">≤</span> <span class="cm-builtin">parse</span>(<span class="cm-variable">Int</span>, <span class="cm-variable">value</span>) <span class="cm-operator">≤</span> <span class="cm-number">2020</span> <span class="cm-operator">||</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">field</span> <span class="cm-operator">==</span> <span class="cm-string">"iyr"</span> <span class="cm-operator">&amp;&amp;</span> <span class="cm-number">2010</span> <span class="cm-operator">≤</span> <span class="cm-builtin">parse</span>(<span class="cm-variable">Int</span>, <span class="cm-variable">value</span>) <span class="cm-operator">≤</span> <span class="cm-number">2020</span> <span class="cm-operator">||</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">field</span> <span class="cm-operator">==</span> <span class="cm-string">"eyr"</span> <span class="cm-operator">&amp;&amp;</span> <span class="cm-number">2020</span> <span class="cm-operator">≤</span> <span class="cm-builtin">parse</span>(<span class="cm-variable">Int</span>, <span class="cm-variable">value</span>) <span class="cm-operator">≤</span> <span class="cm-number">2030</span> <span class="cm-operator">||</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">field</span> <span class="cm-operator">==</span> <span class="cm-string">"hgt"</span> <span class="cm-operator">&amp;&amp;</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">9</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span>((<span class="cm-variable">inches</span> <span class="cm-operator">=</span> <span class="cm-builtin">match</span>(<span class="cm-string">r"(\d+)in"</span>, <span class="cm-variable">value</span>)) <span class="cm-operator">≠</span> <span class="cm-builtin">nothing</span> <span class="cm-operator">&amp;&amp;</span> <span class="cm-number">59</span> <span class="cm-operator">≤</span> <span class="cm-builtin">parse</span>(<span class="cm-variable">Int</span>, <span class="cm-variable">inches</span><span class="cm-operator">.</span><span class="cm-variable">captures</span>[<span class="cm-number">1</span>]) <span class="cm-operator">≤</span> <span class="cm-number">76</span> <span class="cm-operator">||</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">10</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span> (<span class="cm-variable">cm</span> <span class="cm-operator">=</span> <span class="cm-builtin">match</span>(<span class="cm-string">r"(\d+)cm"</span>, <span class="cm-variable">value</span>)) <span class="cm-operator">≠</span> <span class="cm-builtin">nothing</span> <span class="cm-operator">&amp;&amp;</span> <span class="cm-number">150</span> <span class="cm-operator">≤</span> <span class="cm-builtin">parse</span>(<span class="cm-variable">Int</span>, <span class="cm-variable">cm</span><span class="cm-operator">.</span><span class="cm-variable">captures</span>[<span class="cm-number">1</span>]) <span class="cm-operator">≤</span> <span class="cm-number">193</span>) <span class="cm-operator">||</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">11</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">field</span> <span class="cm-operator">==</span> <span class="cm-string">"hcl"</span> <span class="cm-operator">&amp;&amp;</span> <span class="cm-builtin">occursin</span>(<span class="cm-string">r"^#[0-9a-f]{6}$"</span>, <span class="cm-variable">value</span>) <span class="cm-operator">||</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">12</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">field</span> <span class="cm-operator">==</span> <span class="cm-string">"ecl"</span> <span class="cm-operator">&amp;&amp;</span> <span class="cm-variable">value</span> <span class="cm-operator">∈</span> [<span class="cm-string">"amb"</span>, <span class="cm-string">"blu"</span>, <span class="cm-string">"brn"</span>, <span class="cm-string">"gry"</span>, <span class="cm-string">"grn"</span>, <span class="cm-string">"hzl"</span>, <span class="cm-string">"oth"</span>] <span class="cm-operator">||</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">13</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">field</span> <span class="cm-operator">==</span> <span class="cm-string">"pid"</span> <span class="cm-operator">&amp;&amp;</span> <span class="cm-builtin">occursin</span>(<span class="cm-string">r"^[0-9]{9}$"</span>, <span class="cm-variable">value</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">14</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">catch</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">15</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">false</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">16</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">17</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">18</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">19</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-builtin">count</span>(<span class="cm-variable">passports</span>) <span class="cm-keyword">do</span> <span class="cm-variable">p</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">20</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">all</span>(<span class="cm-variable">required_fields</span>) <span class="cm-keyword">do</span> <span class="cm-variable">f</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">21</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">haskey</span>(<span class="cm-variable">p</span>, <span class="cm-variable">f</span>) <span class="cm-operator">&amp;&amp;</span> (<span class="cm-operator">!</span><span class="cm-variable">check_fields_integrity</span> <span class="cm-operator">||</span> <span class="cm-builtin">check_field</span>(<span class="cm-variable">f</span>, <span class="cm-variable">p</span>[<span class="cm-variable">f</span>]))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">22</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">23</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">24</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 368px;"></div><div class="CodeMirror-gutters" style="height: 401px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">191&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="b8d2afc0-35ff-11eb-2fb1-7dba5d323768"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p>Test 1, part 1: true</p>
 <p>Test 1, part 2: true</p>
 <p>Test 2, part 2: true</p>
-</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">187&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="6c01cf90-3600-11eb-0762-ad046d0d0775"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="" mime="application/vnd.pluto.tree+object"><assignee>input_day4</assignee><div><jltree class="collapsed">Dict{String,String}<jlarray class="Array"><r><k>1</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#6c4ab1"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"oth"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"189"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"174cm"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2015"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2026"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"526744288"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1947"</pre></v></r></jldict></jltree></v></r><r><k>2</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#808e9e"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"grn"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"688706448"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"162cm"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2017"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"174"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2025"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1943"</pre></v></r></jldict></jltree></v></r><r><k>3</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#733820"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"oth"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"124"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"111220591"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2019"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2001"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"159in"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1933"</pre></v></r></jldict></jltree></v></r><r><k>4</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#fffffd"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"oth"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"812929897"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"159cm"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2026"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"291"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2024"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1942"</pre></v></r></jldict></jltree></v></r><r><k>5</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#ceb3a1"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"amb"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"83"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"524032739"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2013"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"191cm"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2028"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1974"</pre></v></r></jldict></jltree></v></r><r><k>6</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"eefed5"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"gry"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"88405792"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"183cm"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"221"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2029"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1963"</pre></v></r></jldict></jltree></v></r><r><k>7</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#18171d"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"grn"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"777881168"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"181cm"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2018"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2021"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1923"</pre></v></r></jldict></jltree></v></r><r><k>8</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#a5e1b5"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"gry"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"062495008"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"178cm"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2016"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2027"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1941"</pre></v></r></jldict></jltree></v></r><r><k>9</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#efcc98"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"56"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"649868696"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2011"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2025"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"164cm"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1971"</pre></v></r></jldict></jltree></v></r><r><k>10</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#888785"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"blu"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"117915262"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"188cm"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2020"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2023"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1925"</pre></v></r></jldict></jltree></v></r><r><k>11</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"ecl"</pre></k><v><pre>"brn"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"174"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"143293382"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2012"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2024"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"193cm"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1946"</pre></v></r></jldict></jltree></v></r><r><k>12</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#602927"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"blu"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"192cm"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"251564680"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2011"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2021"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1976"</pre></v></r></jldict></jltree></v></r><r><k>13</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#b6652a"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"blu"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"164cm"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"695538656"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2010"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2022"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"244"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1973"</pre></v></r></jldict></jltree></v></r><r><k>14</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#ceb3a1"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"hzl"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"358398181"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"74in"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2014"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2027"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"329"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1949"</pre></v></r></jldict></jltree></v></r><r><k>15</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#623a2f"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"blu"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"211"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"172cm"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2019"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2023"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"657051725"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1954"</pre></v></r></jldict></jltree></v></r><r><k>16</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#602927"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"amb"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"562699115"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"162cm"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2018"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2026"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"2000"</pre></v></r></jldict></jltree></v></r><r><k>17</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#b6652a"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"brn"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"835184859"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"157cm"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2013"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2027"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1981"</pre></v></r></jldict></jltree></v></r><r><k>18</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#cfa07d"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"brn"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"763432667"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"63in"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2010"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"107"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2027"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1981"</pre></v></r></jldict></jltree></v></r><r><k>19</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"f55bf8"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"amb"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"177cm"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"314"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"632519974"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2025"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2015"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"2009"</pre></v></r></jldict></jltree></v></r><r><k>20</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#602927"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"hzl"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"614239656"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"169cm"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2014"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2024"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1992"</pre></v></r></jldict></jltree></v></r><r><jlmore class="">more</jlmore></r><r><k>286</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"ecl"</pre></k><v><pre>"oth"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"136852264"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"339"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2011"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2024"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1949"</pre></v></r></jldict></jltree></v></r><r><k>287</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#6b5442"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"brn"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"772739059"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"157cm"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2020"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2025"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1945"</pre></v></r></jldict></jltree></v></r><r><k>288</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#18171d"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"grn"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"053763751"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2018"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2022"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1933"</pre></v></r></jldict></jltree></v></r><r><k>289</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#18171d"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"oth"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"214212776"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"122"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2020"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2030"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"170cm"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1988"</pre></v></r></jldict></jltree></v></r><r><k>290</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"ecl"</pre></k><v><pre>"brn"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"883116919"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"187cm"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2018"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2020"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1938"</pre></v></r></jldict></jltree></v></r><r><k>291</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#a97842"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"grn"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"329"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"636649774"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2020"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2025"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"158cm"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1946"</pre></v></r></jldict></jltree></v></r><r><k>292</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#341e13"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"blu"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"161cm"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"461889565"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2020"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2023"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"97"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1951"</pre></v></r></jldict></jltree></v></r><r><k>293</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#cfa07d"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"hzl"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"168cm"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"492241189"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2013"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2029"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"150"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1980"</pre></v></r></jldict></jltree></v></r><r><k>294</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#733820"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"gry"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"150cm"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"401735295"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"153"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2024"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2016"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1998"</pre></v></r></jldict></jltree></v></r><r><k>295</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#a97842"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"hzl"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"184cm"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"453480077"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2018"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2025"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"2001"</pre></v></r></jldict></jltree></v></r></jlarray></jltree></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">10.8&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="953ee8c2-3600-11eb-1684-79ff44185b5f"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p><strong>Result for part 1</strong>: 264</p>
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">140&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="6c01cf90-3600-11eb-0762-ad046d0d0775"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="" mime="application/vnd.pluto.tree+object"><assignee>input_day4</assignee><div><jltree class="collapsed">Dict{String,String}<jlarray class="Array"><r><k>1</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#6c4ab1"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"oth"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"189"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"174cm"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2015"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2026"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"526744288"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1947"</pre></v></r></jldict></jltree></v></r><r><k>2</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#808e9e"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"grn"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"688706448"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"162cm"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2017"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"174"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2025"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1943"</pre></v></r></jldict></jltree></v></r><r><k>3</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#733820"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"oth"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"124"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"111220591"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2019"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2001"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"159in"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1933"</pre></v></r></jldict></jltree></v></r><r><k>4</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#fffffd"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"oth"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"812929897"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"159cm"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2026"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"291"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2024"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1942"</pre></v></r></jldict></jltree></v></r><r><k>5</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#ceb3a1"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"amb"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"83"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"524032739"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2013"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"191cm"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2028"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1974"</pre></v></r></jldict></jltree></v></r><r><k>6</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"eefed5"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"gry"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"88405792"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"183cm"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"221"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2029"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1963"</pre></v></r></jldict></jltree></v></r><r><k>7</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#18171d"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"grn"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"777881168"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"181cm"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2018"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2021"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1923"</pre></v></r></jldict></jltree></v></r><r><k>8</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#a5e1b5"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"gry"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"062495008"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"178cm"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2016"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2027"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1941"</pre></v></r></jldict></jltree></v></r><r><k>9</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#efcc98"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"56"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"649868696"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2011"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2025"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"164cm"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1971"</pre></v></r></jldict></jltree></v></r><r><k>10</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#888785"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"blu"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"117915262"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"188cm"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2020"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2023"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1925"</pre></v></r></jldict></jltree></v></r><r><k>11</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"ecl"</pre></k><v><pre>"brn"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"174"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"143293382"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2012"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2024"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"193cm"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1946"</pre></v></r></jldict></jltree></v></r><r><k>12</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#602927"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"blu"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"192cm"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"251564680"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2011"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2021"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1976"</pre></v></r></jldict></jltree></v></r><r><k>13</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#b6652a"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"blu"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"164cm"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"695538656"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2010"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2022"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"244"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1973"</pre></v></r></jldict></jltree></v></r><r><k>14</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#ceb3a1"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"hzl"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"358398181"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"74in"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2014"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2027"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"329"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1949"</pre></v></r></jldict></jltree></v></r><r><k>15</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#623a2f"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"blu"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"211"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"172cm"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2019"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2023"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"657051725"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1954"</pre></v></r></jldict></jltree></v></r><r><k>16</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#602927"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"amb"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"562699115"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"162cm"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2018"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2026"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"2000"</pre></v></r></jldict></jltree></v></r><r><k>17</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#b6652a"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"brn"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"835184859"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"157cm"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2013"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2027"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1981"</pre></v></r></jldict></jltree></v></r><r><k>18</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#cfa07d"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"brn"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"763432667"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"63in"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2010"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"107"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2027"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1981"</pre></v></r></jldict></jltree></v></r><r><k>19</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"f55bf8"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"amb"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"177cm"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"314"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"632519974"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2025"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2015"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"2009"</pre></v></r></jldict></jltree></v></r><r><k>20</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#602927"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"hzl"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"614239656"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"169cm"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2014"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2024"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1992"</pre></v></r></jldict></jltree></v></r><r><jlmore class="">more</jlmore></r><r><k>286</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"ecl"</pre></k><v><pre>"oth"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"136852264"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"339"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2011"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2024"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1949"</pre></v></r></jldict></jltree></v></r><r><k>287</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#6b5442"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"brn"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"772739059"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"157cm"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2020"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2025"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1945"</pre></v></r></jldict></jltree></v></r><r><k>288</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#18171d"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"grn"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"053763751"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2018"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2022"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1933"</pre></v></r></jldict></jltree></v></r><r><k>289</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#18171d"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"oth"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"214212776"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"122"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2020"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2030"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"170cm"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1988"</pre></v></r></jldict></jltree></v></r><r><k>290</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"ecl"</pre></k><v><pre>"brn"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"883116919"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"187cm"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2018"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2020"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1938"</pre></v></r></jldict></jltree></v></r><r><k>291</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#a97842"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"grn"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"329"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"636649774"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2020"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2025"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"158cm"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1946"</pre></v></r></jldict></jltree></v></r><r><k>292</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#341e13"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"blu"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"161cm"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"461889565"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2020"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2023"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"97"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1951"</pre></v></r></jldict></jltree></v></r><r><k>293</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#cfa07d"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"hzl"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"168cm"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"492241189"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2013"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2029"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"150"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1980"</pre></v></r></jldict></jltree></v></r><r><k>294</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#733820"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"gry"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"150cm"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"401735295"</pre></v></r><r><k><pre>"cid"</pre></k><v><pre>"153"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2024"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2016"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"1998"</pre></v></r></jldict></jltree></v></r><r><k>295</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"hcl"</pre></k><v><pre>"#a97842"</pre></v></r><r><k><pre>"ecl"</pre></k><v><pre>"hzl"</pre></v></r><r><k><pre>"hgt"</pre></k><v><pre>"184cm"</pre></v></r><r><k><pre>"pid"</pre></k><v><pre>"453480077"</pre></v></r><r><k><pre>"iyr"</pre></k><v><pre>"2018"</pre></v></r><r><k><pre>"eyr"</pre></k><v><pre>"2025"</pre></v></r><r><k><pre>"byr"</pre></k><v><pre>"2001"</pre></v></r></jldict></jltree></v></r></jlarray></jltree></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">9.1&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="953ee8c2-3600-11eb-1684-79ff44185b5f"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p><strong>Result for part 1</strong>: 264</p>
 <p><strong>Result for part 2</strong>: 224</p>
-</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">902&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="11d48ec0-3864-11eb-2dcf-3302fbb74b2d"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><h2>Day 5</h2>
-</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">12.2&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="18269980-3864-11eb-19d6-71f75b104ae5"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>parse_day5 (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>7</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">parse_day5</span>(<span class="cm-variable">lines</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-builtin">map</span>(<span class="cm-variable">lines</span>) <span class="cm-keyword">do</span> <span class="cm-variable">line</span><span class="cm-tab" role="presentation" cm-text="     ">  </span><span class="cm-tab" role="presentation" cm-text="   ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">row</span> <span class="cm-operator">=</span> <span class="cm-builtin">parse</span>(<span class="cm-variable">Int</span>, <span class="cm-builtin">join</span>(<span class="cm-builtin">replace</span>(<span class="cm-builtin">split</span>(<span class="cm-variable">line</span>[<span class="cm-number">1</span><span class="cm-operator">:</span><span class="cm-number">7</span>], <span class="cm-string">""</span>), <span class="cm-string">"F"</span> <span class="cm-operator">=&gt;</span> <span class="cm-string">"0"</span>, <span class="cm-string">"B"</span> <span class="cm-operator">=&gt;</span> <span class="cm-string">"1"</span>)); <span class="cm-variable">base</span> <span class="cm-operator">=</span> <span class="cm-number">2</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">col</span> <span class="cm-operator">=</span> <span class="cm-builtin">parse</span>(<span class="cm-variable">Int</span>, <span class="cm-builtin">join</span>(<span class="cm-builtin">replace</span>(<span class="cm-builtin">split</span>(<span class="cm-variable">line</span>[<span class="cm-number">8</span><span class="cm-operator">:</span><span class="cm-number">10</span>], <span class="cm-string">""</span>), <span class="cm-string">"L"</span> <span class="cm-operator">=&gt;</span> <span class="cm-string">"0"</span>, <span class="cm-string">"R"</span> <span class="cm-operator">=&gt;</span> <span class="cm-string">"1"</span>)); <span class="cm-variable">base</span> <span class="cm-operator">=</span> <span class="cm-number">2</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">row</span> <span class="cm-operator">*</span> <span class="cm-number">8</span> <span class="cm-operator">+</span> <span class="cm-variable">col</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 113px;"></div><div class="CodeMirror-gutters" style="height: 146px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">103&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="9d237b60-3866-11eb-2dd8-c19a6cbded5b"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p>Test 1, part 1: true</p>
-</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">217&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="e881a6d0-3867-11eb-3261-0d86b4370065"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>find_missing_id (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>8</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">find_missing_id</span>(<span class="cm-variable">ids</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-variable">sorted_ids</span> <span class="cm-operator">=</span> <span class="cm-builtin">sort</span>(<span class="cm-variable">ids</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-keyword">for</span> <span class="cm-variable">i</span> <span class="cm-operator">∈</span> <span class="cm-number">1</span><span class="cm-operator">:</span><span class="cm-builtin">length</span>(<span class="cm-variable">sorted_ids</span>)<span class="cm-operator">-</span><span class="cm-number">1</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">if</span> <span class="cm-variable">sorted_ids</span>[<span class="cm-variable">i</span>] <span class="cm-operator">+</span> <span class="cm-number">1</span> <span class="cm-operator">≠</span> <span class="cm-variable">sorted_ids</span>[<span class="cm-variable">i</span> <span class="cm-operator">+</span> <span class="cm-number">1</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">return</span> <span class="cm-variable">sorted_ids</span>[<span class="cm-variable">i</span>] <span class="cm-operator">+</span> <span class="cm-number">1</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 128px;"></div><div class="CodeMirror-gutters" style="height: 161px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">46.4&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="cb986040-3867-11eb-0d78-594ac9d9a547"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="" mime="application/vnd.pluto.tree+object"><assignee>input_day5</assignee><div><jltree class="collapsed">Int64<jlarray class="Array"><r><k>1</k><v><pre>594</pre></v></r><r><k>2</k><v><pre>699</pre></v></r><r><k>3</k><v><pre>683</pre></v></r><r><k>4</k><v><pre>645</pre></v></r><r><k>5</k><v><pre>823</pre></v></r><r><k>6</k><v><pre>452</pre></v></r><r><k>7</k><v><pre>160</pre></v></r><r><k>8</k><v><pre>836</pre></v></r><r><k>9</k><v><pre>459</pre></v></r><r><k>10</k><v><pre>38</pre></v></r><r><k>11</k><v><pre>684</pre></v></r><r><k>12</k><v><pre>152</pre></v></r><r><k>13</k><v><pre>613</pre></v></r><r><k>14</k><v><pre>387</pre></v></r><r><k>15</k><v><pre>335</pre></v></r><r><k>16</k><v><pre>159</pre></v></r><r><k>17</k><v><pre>454</pre></v></r><r><k>18</k><v><pre>246</pre></v></r><r><k>19</k><v><pre>632</pre></v></r><r><k>20</k><v><pre>729</pre></v></r><r><jlmore class="">more</jlmore></r><r><k>830</k><v><pre>220</pre></v></r><r><k>831</k><v><pre>468</pre></v></r><r><k>832</k><v><pre>734</pre></v></r><r><k>833</k><v><pre>644</pre></v></r><r><k>834</k><v><pre>571</pre></v></r><r><k>835</k><v><pre>251</pre></v></r><r><k>836</k><v><pre>797</pre></v></r><r><k>837</k><v><pre>630</pre></v></r><r><k>838</k><v><pre>810</pre></v></r><r><k>839</k><v><pre>638</pre></v></r></jlarray></jltree></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">13.4&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="bdc1be30-3867-11eb-1939-1f0a42a4ac92"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p><strong>Result for part 1</strong>: 850</p>
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">1.3&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="11d48ec0-3864-11eb-2dcf-3302fbb74b2d"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><h2>Day 5</h2>
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">4.5&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="18269980-3864-11eb-19d6-71f75b104ae5"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>parse_day5 (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>7</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">parse_day5</span>(<span class="cm-variable">lines</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-builtin">map</span>(<span class="cm-variable">lines</span>) <span class="cm-keyword">do</span> <span class="cm-variable">line</span><span class="cm-tab" role="presentation" cm-text="     ">  </span><span class="cm-tab" role="presentation" cm-text="   ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">row</span> <span class="cm-operator">=</span> <span class="cm-builtin">parse</span>(<span class="cm-variable">Int</span>, <span class="cm-builtin">join</span>(<span class="cm-builtin">replace</span>(<span class="cm-builtin">split</span>(<span class="cm-variable">line</span>[<span class="cm-number">1</span><span class="cm-operator">:</span><span class="cm-number">7</span>], <span class="cm-string">""</span>), <span class="cm-string">"F"</span> <span class="cm-operator">=&gt;</span> <span class="cm-string">"0"</span>, <span class="cm-string">"B"</span> <span class="cm-operator">=&gt;</span> <span class="cm-string">"1"</span>)); <span class="cm-variable">base</span> <span class="cm-operator">=</span> <span class="cm-number">2</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">col</span> <span class="cm-operator">=</span> <span class="cm-builtin">parse</span>(<span class="cm-variable">Int</span>, <span class="cm-builtin">join</span>(<span class="cm-builtin">replace</span>(<span class="cm-builtin">split</span>(<span class="cm-variable">line</span>[<span class="cm-number">8</span><span class="cm-operator">:</span><span class="cm-number">10</span>], <span class="cm-string">""</span>), <span class="cm-string">"L"</span> <span class="cm-operator">=&gt;</span> <span class="cm-string">"0"</span>, <span class="cm-string">"R"</span> <span class="cm-operator">=&gt;</span> <span class="cm-string">"1"</span>)); <span class="cm-variable">base</span> <span class="cm-operator">=</span> <span class="cm-number">2</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">row</span> <span class="cm-operator">*</span> <span class="cm-number">8</span> <span class="cm-operator">+</span> <span class="cm-variable">col</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 113px;"></div><div class="CodeMirror-gutters" style="height: 146px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">52.3&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="9d237b60-3866-11eb-2dd8-c19a6cbded5b"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p>Test 1, part 1: true</p>
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">147&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="e881a6d0-3867-11eb-3261-0d86b4370065"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>find_missing_id (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>8</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">find_missing_id</span>(<span class="cm-variable">ids</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-variable">sorted_ids</span> <span class="cm-operator">=</span> <span class="cm-builtin">sort</span>(<span class="cm-variable">ids</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-keyword">for</span> <span class="cm-variable">i</span> <span class="cm-operator">∈</span> <span class="cm-number">1</span><span class="cm-operator">:</span><span class="cm-builtin">length</span>(<span class="cm-variable">sorted_ids</span>)<span class="cm-operator">-</span><span class="cm-number">1</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">if</span> <span class="cm-variable">sorted_ids</span>[<span class="cm-variable">i</span>] <span class="cm-operator">+</span> <span class="cm-number">1</span> <span class="cm-operator">≠</span> <span class="cm-variable">sorted_ids</span>[<span class="cm-variable">i</span> <span class="cm-operator">+</span> <span class="cm-number">1</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">return</span> <span class="cm-variable">sorted_ids</span>[<span class="cm-variable">i</span>] <span class="cm-operator">+</span> <span class="cm-number">1</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 128px;"></div><div class="CodeMirror-gutters" style="height: 161px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">35.2&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="cb986040-3867-11eb-0d78-594ac9d9a547"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="" mime="application/vnd.pluto.tree+object"><assignee>input_day5</assignee><div><jltree class="collapsed">Int64<jlarray class="Array"><r><k>1</k><v><pre>594</pre></v></r><r><k>2</k><v><pre>699</pre></v></r><r><k>3</k><v><pre>683</pre></v></r><r><k>4</k><v><pre>645</pre></v></r><r><k>5</k><v><pre>823</pre></v></r><r><k>6</k><v><pre>452</pre></v></r><r><k>7</k><v><pre>160</pre></v></r><r><k>8</k><v><pre>836</pre></v></r><r><k>9</k><v><pre>459</pre></v></r><r><k>10</k><v><pre>38</pre></v></r><r><k>11</k><v><pre>684</pre></v></r><r><k>12</k><v><pre>152</pre></v></r><r><k>13</k><v><pre>613</pre></v></r><r><k>14</k><v><pre>387</pre></v></r><r><k>15</k><v><pre>335</pre></v></r><r><k>16</k><v><pre>159</pre></v></r><r><k>17</k><v><pre>454</pre></v></r><r><k>18</k><v><pre>246</pre></v></r><r><k>19</k><v><pre>632</pre></v></r><r><k>20</k><v><pre>729</pre></v></r><r><jlmore class="">more</jlmore></r><r><k>830</k><v><pre>220</pre></v></r><r><k>831</k><v><pre>468</pre></v></r><r><k>832</k><v><pre>734</pre></v></r><r><k>833</k><v><pre>644</pre></v></r><r><k>834</k><v><pre>571</pre></v></r><r><k>835</k><v><pre>251</pre></v></r><r><k>836</k><v><pre>797</pre></v></r><r><k>837</k><v><pre>630</pre></v></r><r><k>838</k><v><pre>810</pre></v></r><r><k>839</k><v><pre>638</pre></v></r></jlarray></jltree></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">9.3&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="bdc1be30-3867-11eb-1939-1f0a42a4ac92"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p><strong>Result for part 1</strong>: 850</p>
 <p><strong>Result for part 2</strong>: 599</p>
-</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">32.8&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="dc7eabf0-386a-11eb-22e7-578a73e3cd8f"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><h2>Day 6</h2>
-</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">16.8&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="e1658df0-386a-11eb-39d9-218b9b2d494f"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>parse_day6 (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>11</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">parse_day6</span>(<span class="cm-variable">lines</span>) <span class="cm-builtin">::</span> <span class="cm-variable">Array</span>{<span class="cm-variable">Array</span>{<span class="cm-variable">Set</span>{<span class="cm-variable">Char</span>}}}</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-variable">groups</span> <span class="cm-operator">=</span> [[]]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-keyword">for</span> <span class="cm-variable">line</span> <span class="cm-operator">∈</span> <span class="cm-variable">lines</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">if</span> <span class="cm-variable">line</span> <span class="cm-operator">==</span> <span class="cm-string">""</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">push!</span>(<span class="cm-variable">groups</span>, [])</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">else</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">push!</span>(<span class="cm-builtin">last</span>(<span class="cm-variable">groups</span>), <span class="cm-builtin">Set</span>(<span class="cm-variable">line</span>))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">9</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">10</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-variable">groups</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">11</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 173px;"></div><div class="CodeMirror-gutters" style="height: 206px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">45.4&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="cb221aa0-386e-11eb-22de-9d7379db14e2"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>sum_of_group_lengths (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>5</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">sum_of_group_lengths</span>(<span class="cm-variable">groups</span>, <span class="cm-variable">f</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-builtin">map</span>(<span class="cm-variable">groups</span>) <span class="cm-keyword">do</span> <span class="cm-variable">group</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">length</span>(<span class="cm-builtin">reduce</span>(<span class="cm-variable">f</span>, <span class="cm-variable">group</span>))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-keyword">end</span> <span class="cm-operator">|&gt;</span> <span class="cm-variable">sum</span><span class="cm-tab" role="presentation" cm-text="  ">  </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 83px;"></div><div class="CodeMirror-gutters" style="height: 116px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">48.1&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="e9696760-386a-11eb-1aa3-ad421dc1fe83"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p>Test 1, part 1: true</p>
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">22.8&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="dc7eabf0-386a-11eb-22e7-578a73e3cd8f"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><h2>Day 6</h2>
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">3.4&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="e1658df0-386a-11eb-39d9-218b9b2d494f"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>parse_day6 (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>11</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">parse_day6</span>(<span class="cm-variable">lines</span>) <span class="cm-builtin">::</span> <span class="cm-variable">Array</span>{<span class="cm-variable">Array</span>{<span class="cm-variable">Set</span>{<span class="cm-variable">Char</span>}}}</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-variable">groups</span> <span class="cm-operator">=</span> [[]]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-keyword">for</span> <span class="cm-variable">line</span> <span class="cm-operator">∈</span> <span class="cm-variable">lines</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">if</span> <span class="cm-variable">line</span> <span class="cm-operator">==</span> <span class="cm-string">""</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">push!</span>(<span class="cm-variable">groups</span>, [])</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">else</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">push!</span>(<span class="cm-builtin">last</span>(<span class="cm-variable">groups</span>), <span class="cm-builtin">Set</span>(<span class="cm-variable">line</span>))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">9</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">10</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-variable">groups</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">11</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 173px;"></div><div class="CodeMirror-gutters" style="height: 206px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">39.4&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="cb221aa0-386e-11eb-22de-9d7379db14e2"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>sum_of_group_lengths (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>5</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">sum_of_group_lengths</span>(<span class="cm-variable">groups</span>, <span class="cm-variable">f</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-builtin">map</span>(<span class="cm-variable">groups</span>) <span class="cm-keyword">do</span> <span class="cm-variable">group</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">length</span>(<span class="cm-builtin">reduce</span>(<span class="cm-variable">f</span>, <span class="cm-variable">group</span>))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-keyword">end</span> <span class="cm-operator">|&gt;</span> <span class="cm-variable">sum</span><span class="cm-tab" role="presentation" cm-text="  ">  </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 83px;"></div><div class="CodeMirror-gutters" style="height: 116px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">45.1&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="e9696760-386a-11eb-1aa3-ad421dc1fe83"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p>Test 1, part 1: true</p>
 <p>Test 1, part 2: true</p>
-</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">792&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="0a51a420-386f-11eb-025d-b9d1e1b79fd8"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p>Number of groups read from <em>data/day06.txt</em>: 490</p>
-</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">1.1&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="dd1a2f00-3872-11eb-2ae9-ad73995fc382"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p><strong>Result for part 1</strong>: 6735</p>
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">631&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="0a51a420-386f-11eb-025d-b9d1e1b79fd8"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p>Number of groups read from <em>data/day06.txt</em>: 490</p>
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">37.4&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="dd1a2f00-3872-11eb-2ae9-ad73995fc382"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p><strong>Result for part 1</strong>: 6735</p>
 <p><strong>Result for part 2</strong>: 3221</p>
-</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">2.5&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="22426ef0-388f-11eb-38a3-232fb088ef4f"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><h2>Day 7</h2>
-</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">14.6&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="94a84a10-389d-11eb-12a7-630db0e13276"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y rich_output " mime="text/plain"><assignee></assignee><div></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>4</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation"><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">struct</span> <span class="cm-def">Bags</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-variable">matrix</span> <span class="cm-builtin">::</span> <span class="cm-variable">Array</span>{<span class="cm-variable">Int</span>, <span class="cm-number">2</span>}</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-variable">names</span> <span class="cm-builtin">::</span> <span class="cm-variable">Dict</span>{<span class="cm-variable">String</span>, <span class="cm-variable">Int</span>}</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 68px;"></div><div class="CodeMirror-gutters" style="height: 101px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">847&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="295cabb0-388f-11eb-2227-d73ae2c1e781"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>parse_day7 (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>19</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">parse_day7</span>(<span class="cm-variable">lines</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">l</span> <span class="cm-operator">=</span> <span class="cm-builtin">length</span>(<span class="cm-variable">lines</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-variable">m</span> <span class="cm-operator">=</span> <span class="cm-builtin">zeros</span>(<span class="cm-variable">Int</span>, <span class="cm-variable">l</span>, <span class="cm-variable">l</span>)<span class="cm-tab" role="presentation" cm-text="        ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-variable">name_indices</span> <span class="cm-operator">=</span> <span class="cm-builtin">Dict</span>{<span class="cm-variable">String</span>, <span class="cm-variable">Int</span>}()</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-def">get_bag_index</span>(<span class="cm-variable">name</span>) <span class="cm-operator">=</span> <span class="cm-builtin">get!</span>(<span class="cm-variable">name_indices</span>, <span class="cm-variable">name</span>, <span class="cm-builtin">length</span>(<span class="cm-variable">name_indices</span>) <span class="cm-operator">+</span> <span class="cm-number">1</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-keyword">for</span> <span class="cm-variable">i</span> <span class="cm-operator">∈</span> <span class="cm-number">1</span><span class="cm-operator">:</span><span class="cm-variable">l</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">9</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">line</span> <span class="cm-operator">=</span> <span class="cm-variable">lines</span>[<span class="cm-variable">i</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">10</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">bag</span> <span class="cm-operator">=</span> <span class="cm-builtin">match</span>(<span class="cm-string">r"^\w+ \w+"</span>, <span class="cm-variable">line</span>)<span class="cm-operator">.</span><span class="cm-variable">match</span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">11</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">bag_index</span> <span class="cm-operator">=</span> <span class="cm-builtin">get_bag_index</span>(<span class="cm-variable">bag</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">12</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">for</span> <span class="cm-variable">inner_bag</span> <span class="cm-operator">∈</span> <span class="cm-builtin">eachmatch</span>(<span class="cm-string">r"(\d+) (\w+ \w+) bag"</span>, <span class="cm-variable">line</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">13</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">n</span> <span class="cm-operator">=</span> <span class="cm-builtin">parse</span>(<span class="cm-variable">Int</span>, <span class="cm-variable">inner_bag</span>[<span class="cm-number">1</span>])</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">14</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">m</span>[<span class="cm-variable">bag_index</span>, <span class="cm-builtin">get_bag_index</span>(<span class="cm-variable">inner_bag</span>[<span class="cm-number">2</span>])] <span class="cm-operator">=</span> <span class="cm-variable">n</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">15</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">16</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">17</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">18</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-builtin">Bags</span>(<span class="cm-variable">m</span>, <span class="cm-variable">name_indices</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">19</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 293px;"></div><div class="CodeMirror-gutters" style="height: 326px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">94.5&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="3ae9b650-38a0-11eb-1840-21cc6c2841b6"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>bags_that_contain (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>13</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">bags_that_contain</span>(<span class="cm-variable">name</span>, <span class="cm-variable">bags</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">visited</span> <span class="cm-operator">=</span> <span class="cm-builtin">falses</span>(<span class="cm-builtin">length</span>(<span class="cm-variable">bags</span><span class="cm-operator">.</span><span class="cm-variable">names</span>))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-variable">to_visit</span> <span class="cm-operator">=</span> [<span class="cm-variable">bags</span><span class="cm-operator">.</span><span class="cm-variable">names</span>[<span class="cm-variable">name</span>]]<span class="cm-tab" role="presentation" cm-text="      ">   </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-keyword">while</span> <span class="cm-operator">!</span><span class="cm-builtin">isempty</span>(<span class="cm-variable">to_visit</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">current</span> <span class="cm-operator">=</span> <span class="cm-builtin">pop!</span>(<span class="cm-variable">to_visit</span>)<span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">visited</span>[<span class="cm-variable">current</span>] <span class="cm-operator">=</span> <span class="cm-builtin">true</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">containing</span> <span class="cm-operator">=</span> <span class="cm-builtin">findall</span>(<span class="cm-operator">≠</span>(<span class="cm-number">0</span>), <span class="cm-variable">bags</span><span class="cm-operator">.</span><span class="cm-variable">matrix</span>[<span class="cm-operator">:</span>, <span class="cm-variable">current</span>] <span class="cm-operator">.*</span> <span class="cm-operator">.!</span><span class="cm-variable">visited</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">9</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span> </span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">10</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">append!</span>(<span class="cm-variable">to_visit</span>, <span class="cm-variable">containing</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">11</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-keyword">end</span><span class="cm-tab" role="presentation" cm-text="      "> </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">12</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-builtin">findall</span>(<span class="cm-variable">visited</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">13</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 203px;"></div><div class="CodeMirror-gutters" style="height: 236px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">52.1&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="c26e4ed0-39f2-11eb-1338-57a3ce8069e0"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>nb_bags_contained (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>10</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">nb_bags_contained</span>(<span class="cm-variable">name</span>, <span class="cm-variable">bags</span>)<span class="cm-tab" role="presentation" cm-text="  ">  </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-keyword">function</span> <span class="cm-def">nb_bags_contained</span>(<span class="cm-variable">bag_index</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">content</span> <span class="cm-operator">=</span> <span class="cm-variable">bags</span><span class="cm-operator">.</span><span class="cm-variable">matrix</span>[<span class="cm-variable">bag_index</span>, <span class="cm-operator">:</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">indexes</span> <span class="cm-operator">=</span> <span class="cm-builtin">findall</span>(<span class="cm-operator">≠</span>(<span class="cm-number">0</span>), <span class="cm-variable">content</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-number">1</span> <span class="cm-operator">+</span> (<span class="cm-builtin">isempty</span>(<span class="cm-variable">indexes</span>) <span class="cm-operator">?</span> <span class="cm-number">0</span> <span class="cm-operator">:</span> <span class="cm-builtin">sum</span>(<span class="cm-variable">nb_bags_contained</span><span class="cm-operator">.</span>(<span class="cm-variable">indexes</span>) <span class="cm-operator">.*</span> <span class="cm-builtin">filter</span>(<span class="cm-operator">≠</span>(<span class="cm-number">0</span>), <span class="cm-variable">content</span>)))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">9</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-builtin">nb_bags_contained</span>(<span class="cm-variable">bags</span><span class="cm-operator">.</span><span class="cm-variable">names</span>[<span class="cm-variable">name</span>]) <span class="cm-operator">-</span> <span class="cm-number">1</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">10</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 158px;"></div><div class="CodeMirror-gutters" style="height: 191px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">75.8&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="30488570-388f-11eb-2ede-b10bdd1a06e8"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p>Test 1, part 1: true</p>
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">2.0&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="22426ef0-388f-11eb-38a3-232fb088ef4f"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><h2>Day 7</h2>
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">6.3&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="94a84a10-389d-11eb-12a7-630db0e13276"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y rich_output " mime="text/plain"><assignee></assignee><div></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>4</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation"><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">struct</span> <span class="cm-def">Bags</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-variable">matrix</span> <span class="cm-builtin">::</span> <span class="cm-variable">Array</span>{<span class="cm-variable">Int</span>, <span class="cm-number">2</span>}</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-variable">names</span> <span class="cm-builtin">::</span> <span class="cm-variable">Dict</span>{<span class="cm-variable">String</span>, <span class="cm-variable">Int</span>}</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 68px;"></div><div class="CodeMirror-gutters" style="height: 101px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">607&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="295cabb0-388f-11eb-2227-d73ae2c1e781"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>parse_day7 (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>19</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">parse_day7</span>(<span class="cm-variable">lines</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">l</span> <span class="cm-operator">=</span> <span class="cm-builtin">length</span>(<span class="cm-variable">lines</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-variable">m</span> <span class="cm-operator">=</span> <span class="cm-builtin">zeros</span>(<span class="cm-variable">Int</span>, <span class="cm-variable">l</span>, <span class="cm-variable">l</span>)<span class="cm-tab" role="presentation" cm-text="        ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-variable">name_indices</span> <span class="cm-operator">=</span> <span class="cm-builtin">Dict</span>{<span class="cm-variable">String</span>, <span class="cm-variable">Int</span>}()</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-def">get_bag_index</span>(<span class="cm-variable">name</span>) <span class="cm-operator">=</span> <span class="cm-builtin">get!</span>(<span class="cm-variable">name_indices</span>, <span class="cm-variable">name</span>, <span class="cm-builtin">length</span>(<span class="cm-variable">name_indices</span>) <span class="cm-operator">+</span> <span class="cm-number">1</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-keyword">for</span> <span class="cm-variable">i</span> <span class="cm-operator">∈</span> <span class="cm-number">1</span><span class="cm-operator">:</span><span class="cm-variable">l</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">9</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">line</span> <span class="cm-operator">=</span> <span class="cm-variable">lines</span>[<span class="cm-variable">i</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">10</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">bag</span> <span class="cm-operator">=</span> <span class="cm-builtin">match</span>(<span class="cm-string">r"^\w+ \w+"</span>, <span class="cm-variable">line</span>)<span class="cm-operator">.</span><span class="cm-variable">match</span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">11</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">bag_index</span> <span class="cm-operator">=</span> <span class="cm-builtin">get_bag_index</span>(<span class="cm-variable">bag</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">12</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">for</span> <span class="cm-variable">inner_bag</span> <span class="cm-operator">∈</span> <span class="cm-builtin">eachmatch</span>(<span class="cm-string">r"(\d+) (\w+ \w+) bag"</span>, <span class="cm-variable">line</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">13</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">n</span> <span class="cm-operator">=</span> <span class="cm-builtin">parse</span>(<span class="cm-variable">Int</span>, <span class="cm-variable">inner_bag</span>[<span class="cm-number">1</span>])</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">14</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">m</span>[<span class="cm-variable">bag_index</span>, <span class="cm-builtin">get_bag_index</span>(<span class="cm-variable">inner_bag</span>[<span class="cm-number">2</span>])] <span class="cm-operator">=</span> <span class="cm-variable">n</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">15</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">16</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">17</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">18</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-builtin">Bags</span>(<span class="cm-variable">m</span>, <span class="cm-variable">name_indices</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">19</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 293px;"></div><div class="CodeMirror-gutters" style="height: 326px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">69.9&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="3ae9b650-38a0-11eb-1840-21cc6c2841b6"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>bags_that_contain (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>13</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">bags_that_contain</span>(<span class="cm-variable">name</span>, <span class="cm-variable">bags</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">visited</span> <span class="cm-operator">=</span> <span class="cm-builtin">falses</span>(<span class="cm-builtin">length</span>(<span class="cm-variable">bags</span><span class="cm-operator">.</span><span class="cm-variable">names</span>))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-variable">to_visit</span> <span class="cm-operator">=</span> [<span class="cm-variable">bags</span><span class="cm-operator">.</span><span class="cm-variable">names</span>[<span class="cm-variable">name</span>]]<span class="cm-tab" role="presentation" cm-text="      ">   </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-keyword">while</span> <span class="cm-operator">!</span><span class="cm-builtin">isempty</span>(<span class="cm-variable">to_visit</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">current</span> <span class="cm-operator">=</span> <span class="cm-builtin">pop!</span>(<span class="cm-variable">to_visit</span>)<span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">visited</span>[<span class="cm-variable">current</span>] <span class="cm-operator">=</span> <span class="cm-builtin">true</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">containing</span> <span class="cm-operator">=</span> <span class="cm-builtin">findall</span>(<span class="cm-operator">≠</span>(<span class="cm-number">0</span>), <span class="cm-variable">bags</span><span class="cm-operator">.</span><span class="cm-variable">matrix</span>[<span class="cm-operator">:</span>, <span class="cm-variable">current</span>] <span class="cm-operator">.*</span> <span class="cm-operator">.!</span><span class="cm-variable">visited</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">9</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span> </span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">10</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">append!</span>(<span class="cm-variable">to_visit</span>, <span class="cm-variable">containing</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">11</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-keyword">end</span><span class="cm-tab" role="presentation" cm-text="      "> </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">12</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-builtin">findall</span>(<span class="cm-variable">visited</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">13</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 203px;"></div><div class="CodeMirror-gutters" style="height: 236px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">42.4&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="c26e4ed0-39f2-11eb-1338-57a3ce8069e0"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>nb_bags_contained (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>10</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">nb_bags_contained</span>(<span class="cm-variable">name</span>, <span class="cm-variable">bags</span>)<span class="cm-tab" role="presentation" cm-text="  ">  </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-keyword">function</span> <span class="cm-def">nb_bags_contained</span>(<span class="cm-variable">bag_index</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">content</span> <span class="cm-operator">=</span> <span class="cm-variable">bags</span><span class="cm-operator">.</span><span class="cm-variable">matrix</span>[<span class="cm-variable">bag_index</span>, <span class="cm-operator">:</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">indexes</span> <span class="cm-operator">=</span> <span class="cm-builtin">findall</span>(<span class="cm-operator">≠</span>(<span class="cm-number">0</span>), <span class="cm-variable">content</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-number">1</span> <span class="cm-operator">+</span> (<span class="cm-builtin">isempty</span>(<span class="cm-variable">indexes</span>) <span class="cm-operator">?</span> <span class="cm-number">0</span> <span class="cm-operator">:</span> <span class="cm-builtin">sum</span>(<span class="cm-variable">nb_bags_contained</span><span class="cm-operator">.</span>(<span class="cm-variable">indexes</span>) <span class="cm-operator">.*</span> <span class="cm-builtin">filter</span>(<span class="cm-operator">≠</span>(<span class="cm-number">0</span>), <span class="cm-variable">content</span>)))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">9</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-builtin">nb_bags_contained</span>(<span class="cm-variable">bags</span><span class="cm-operator">.</span><span class="cm-variable">names</span>[<span class="cm-variable">name</span>]) <span class="cm-operator">-</span> <span class="cm-number">1</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">10</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 158px;"></div><div class="CodeMirror-gutters" style="height: 191px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">59.2&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="30488570-388f-11eb-2ede-b10bdd1a06e8"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p>Test 1, part 1: true</p>
 <p>Test 1, part 2: true</p>
 <p>Test 2, part 2: true</p>
-</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">127&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="20351e70-396e-11eb-25da-87d7ef27f902"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="" mime="application/vnd.pluto.tree+object"><assignee>input_day7</assignee><div><jltree class="collapsed">Bags<jlstruct><r><k>matrix</k><v><pre>594×594 Array{Int64,2}:
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">385&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="20351e70-396e-11eb-25da-87d7ef27f902"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="" mime="application/vnd.pluto.tree+object"><assignee>input_day7</assignee><div><jltree class="collapsed">Bags<jlstruct><r><k>matrix</k><v><pre>594×594 Array{Int64,2}:
  0  3  0  0  0  0  0  0  0  0  0  0  0  0  …  0  0  0  0  0  0  0  0  0  0  0  0  0
  0  0  0  0  0  0  0  0  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0  0
  0  0  0  1  1  0  0  0  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0  0
@@ -226,14 +226,19 @@ main {
  0  0  0  0  0  0  0  0  0  0  0  0  0  0  …  0  0  0  0  0  0  0  0  0  0  0  0  0
  0  0  0  0  0  0  0  0  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0  0
  0  0  0  0  0  0  0  0  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0  0
- 0  0  0  0  0  0  0  0  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0  0</pre></v></r><r><k>names</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"posh teal"</pre></k><v><pre>213</pre></v></r><r><k><pre>"clear teal"</pre></k><v><pre>277</pre></v></r><r><k><pre>"faded tomato"</pre></k><v><pre>118</pre></v></r><r><k><pre>"dull indigo"</pre></k><v><pre>193</pre></v></r><r><k><pre>"drab indigo"</pre></k><v><pre>17</pre></v></r><r><k><pre>"mirrored chartreuse"</pre></k><v><pre>385</pre></v></r><r><k><pre>"shiny lime"</pre></k><v><pre>66</pre></v></r><r><k><pre>"dark brown"</pre></k><v><pre>429</pre></v></r><r><k><pre>"dotted fuchsia"</pre></k><v><pre>264</pre></v></r><r><k><pre>"shiny green"</pre></k><v><pre>519</pre></v></r><r><k><pre>"mirrored violet"</pre></k><v><pre>157</pre></v></r><r><k><pre>"posh gray"</pre></k><v><pre>529</pre></v></r><r><k><pre>"bright brown"</pre></k><v><pre>493</pre></v></r><r><k><pre>"drab cyan"</pre></k><v><pre>462</pre></v></r><r><k><pre>"posh brown"</pre></k><v><pre>557</pre></v></r><r><k><pre>"dim aqua"</pre></k><v><pre>259</pre></v></r><r><k><pre>"vibrant violet"</pre></k><v><pre>88</pre></v></r><r><k><pre>"light lime"</pre></k><v><pre>325</pre></v></r><r><k><pre>"shiny silver"</pre></k><v><pre>408</pre></v></r><r><k><pre>"vibrant silver"</pre></k><v><pre>518</pre></v></r><r><k><pre>"muted olive"</pre></k><v><pre>523</pre></v></r><r><k><pre>"dotted bronze"</pre></k><v><pre>498</pre></v></r><r><k><pre>"wavy aqua"</pre></k><v><pre>285</pre></v></r><r><k><pre>"vibrant bronze"</pre></k><v><pre>108</pre></v></r><r><k><pre>"wavy beige"</pre></k><v><pre>536</pre></v></r><r><k><pre>"mirrored olive"</pre></k><v><pre>332</pre></v></r><r><k><pre>"faded crimson"</pre></k><v><pre>503</pre></v></r><r><k><pre>"dull blue"</pre></k><v><pre>391</pre></v></r><r><k><pre>"faded magenta"</pre></k><v><pre>588</pre></v></r><r><k><pre>"posh coral"</pre></k><v><pre>172</pre></v></r><r><jlmore class="">more</jlmore></r></jldict></jltree></v></r></jlstruct></jltree></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">3.4&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="e825e690-39f9-11eb-21bc-099cc7a9e389"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p><strong>Result for part 1</strong>: 335</p>
+ 0  0  0  0  0  0  0  0  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0  0</pre></v></r><r><k>names</k><v><jltree class="collapsed">Dict<jldict class="Dict"><r><k><pre>"posh teal"</pre></k><v><pre>213</pre></v></r><r><k><pre>"clear teal"</pre></k><v><pre>277</pre></v></r><r><k><pre>"faded tomato"</pre></k><v><pre>118</pre></v></r><r><k><pre>"dull indigo"</pre></k><v><pre>193</pre></v></r><r><k><pre>"drab indigo"</pre></k><v><pre>17</pre></v></r><r><k><pre>"mirrored chartreuse"</pre></k><v><pre>385</pre></v></r><r><k><pre>"shiny lime"</pre></k><v><pre>66</pre></v></r><r><k><pre>"dark brown"</pre></k><v><pre>429</pre></v></r><r><k><pre>"dotted fuchsia"</pre></k><v><pre>264</pre></v></r><r><k><pre>"shiny green"</pre></k><v><pre>519</pre></v></r><r><k><pre>"mirrored violet"</pre></k><v><pre>157</pre></v></r><r><k><pre>"posh gray"</pre></k><v><pre>529</pre></v></r><r><k><pre>"bright brown"</pre></k><v><pre>493</pre></v></r><r><k><pre>"drab cyan"</pre></k><v><pre>462</pre></v></r><r><k><pre>"posh brown"</pre></k><v><pre>557</pre></v></r><r><k><pre>"dim aqua"</pre></k><v><pre>259</pre></v></r><r><k><pre>"vibrant violet"</pre></k><v><pre>88</pre></v></r><r><k><pre>"light lime"</pre></k><v><pre>325</pre></v></r><r><k><pre>"shiny silver"</pre></k><v><pre>408</pre></v></r><r><k><pre>"vibrant silver"</pre></k><v><pre>518</pre></v></r><r><k><pre>"muted olive"</pre></k><v><pre>523</pre></v></r><r><k><pre>"dotted bronze"</pre></k><v><pre>498</pre></v></r><r><k><pre>"wavy aqua"</pre></k><v><pre>285</pre></v></r><r><k><pre>"vibrant bronze"</pre></k><v><pre>108</pre></v></r><r><k><pre>"wavy beige"</pre></k><v><pre>536</pre></v></r><r><k><pre>"mirrored olive"</pre></k><v><pre>332</pre></v></r><r><k><pre>"faded crimson"</pre></k><v><pre>503</pre></v></r><r><k><pre>"dull blue"</pre></k><v><pre>391</pre></v></r><r><k><pre>"faded magenta"</pre></k><v><pre>588</pre></v></r><r><k><pre>"posh coral"</pre></k><v><pre>172</pre></v></r><r><jlmore class="">more</jlmore></r></jldict></jltree></v></r></jlstruct></jltree></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">17.3&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="e825e690-39f9-11eb-21bc-099cc7a9e389"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p><strong>Result for part 1</strong>: 335</p>
 <p><strong>Result for part 2</strong>: 2431</p>
-</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">2.2&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="c35b8110-3a0a-11eb-11e8-73b1b2080079"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><h2>Day 8</h2>
-</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">30.1&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="7c64c710-3a0c-11eb-17bb-1db527c932a3"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y rich_output " mime="text/plain"><assignee></assignee><div></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 171.7px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors" style=""><div class="CodeMirror-cursor" style="left: 141.7px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation"><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">struct</span> <span class="cm-def">Instruction</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-variable">operator</span> <span class="cm-builtin">::</span> <span class="cm-variable">Symbol</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-variable">argument</span> <span class="cm-builtin">::</span> <span class="cm-variable">Int</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 68px;"></div><div class="CodeMirror-gutters" style="height: 101px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">1.0&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="c8548b80-3a0a-11eb-067d-9dc6716dc325"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>parse_day8 (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 50px; left: 171.7px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like">x</pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors" style=""><div class="CodeMirror-cursor" style="left: 141.7px; top: 45px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">parse_day8</span>(<span class="cm-variable">lines</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-builtin">map</span>(<span class="cm-variable">lines</span>) <span class="cm-keyword">do</span> <span class="cm-variable">line</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">splitted</span> <span class="cm-operator">=</span> <span class="cm-builtin">split</span>(<span class="cm-variable">line</span>, <span class="cm-string">' '</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">Instruction</span>(<span class="cm-builtin">Symbol</span>(<span class="cm-variable">splitted</span>[<span class="cm-number">1</span>]), <span class="cm-builtin">parse</span>(<span class="cm-variable">Int</span>, <span class="cm-variable">splitted</span>[<span class="cm-number">2</span>]))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 98px;"></div><div class="CodeMirror-gutters" style="height: 131px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">33.7&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="9d1a8980-3a0d-11eb-380e-8fcaf30c849c"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>execute (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 260px; left: 187px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors" style="visibility: hidden;"><div class="CodeMirror-cursor" style="left: 157px; top: 255px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-comment"># The returned boolean is true if the execution has finished correctly or false if there is a infinite loop.</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-comment"># The returned integer is the accumulator when the inifinite loop is detected or when the execution has finished correctly.</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">execute</span>(<span class="cm-variable">instructions</span>) <span class="cm-builtin">::</span> <span class="cm-variable">Tuple</span>{<span class="cm-variable">Bool</span>, <span class="cm-variable">Int</span>}</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-variable">pos</span> <span class="cm-operator">=</span> <span class="cm-number">1</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-variable">accumulator</span> <span class="cm-operator">=</span> <span class="cm-number">0</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-variable">n</span> <span class="cm-operator">=</span> <span class="cm-builtin">length</span>(<span class="cm-variable">instructions</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-variable">visited_positions</span> <span class="cm-operator">=</span> <span class="cm-builtin">falses</span>(<span class="cm-variable">n</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">9</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-keyword">while</span> <span class="cm-variable">pos</span> <span class="cm-operator">≤</span> <span class="cm-variable">n</span> <span class="cm-operator">&amp;&amp;</span> <span class="cm-operator">!</span><span class="cm-variable">visited_positions</span>[<span class="cm-variable">pos</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">10</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">visited_positions</span>[<span class="cm-variable">pos</span>] <span class="cm-operator">=</span> <span class="cm-builtin">true</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">11</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">ins</span> <span class="cm-operator">=</span> <span class="cm-variable">instructions</span>[<span class="cm-variable">pos</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">12</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">if</span> <span class="cm-variable">ins</span><span class="cm-operator">.</span><span class="cm-variable">operator</span> <span class="cm-operator">==</span> <span class="cm-builtin">:acc</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">13</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">accumulator</span> <span class="cm-operator">+=</span> <span class="cm-variable">ins</span><span class="cm-operator">.</span><span class="cm-variable">argument</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">14</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">pos</span> <span class="cm-operator">+=</span> <span class="cm-number">1</span><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">15</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">elseif</span> <span class="cm-variable">ins</span><span class="cm-operator">.</span><span class="cm-variable">operator</span> <span class="cm-operator">==</span> <span class="cm-builtin">:jmp</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">16</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">pos</span> <span class="cm-operator">+=</span> <span class="cm-variable">ins</span><span class="cm-operator">.</span><span class="cm-variable">argument</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">17</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">else</span> <span class="cm-comment"># :nop.</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">18</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">pos</span> <span class="cm-operator">+=</span> <span class="cm-number">1</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">19</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">20</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">21</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-variable">pos</span> <span class="cm-operator">&gt;</span> <span class="cm-variable">n</span>, <span class="cm-variable">accumulator</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">22</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 338px;"></div><div class="CodeMirror-gutters" style="height: 371px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">43.4&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="0f1d5380-3a10-11eb-2a71-1f0fddf65b70"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>fix_to_not_loop (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 140px; left: 156.4px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors" style=""><div class="CodeMirror-cursor" style="left: 126.4px; top: 135px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">fix_to_not_loop</span>(<span class="cm-variable">instructions</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-variable">copy</span> <span class="cm-operator">=</span> <span class="cm-builtin">deepcopy</span>(<span class="cm-variable">instructions</span>) <span class="cm-comment"># To avoid modifying the input.</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-keyword">function</span> <span class="cm-def">switch</span>(<span class="cm-variable">pos</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">if</span> <span class="cm-variable">copy</span>[<span class="cm-variable">pos</span>]<span class="cm-operator">.</span><span class="cm-variable">operator</span> <span class="cm-operator">==</span> <span class="cm-builtin">:jmp</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">copy</span>[<span class="cm-variable">pos</span>] <span class="cm-operator">=</span> <span class="cm-builtin">Instruction</span>(<span class="cm-builtin">:nop</span>, <span class="cm-variable">copy</span>[<span class="cm-variable">pos</span>]<span class="cm-operator">.</span><span class="cm-variable">argument</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">true</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">elseif</span> <span class="cm-variable">copy</span>[<span class="cm-variable">pos</span>]<span class="cm-operator">.</span><span class="cm-variable">operator</span> <span class="cm-operator">==</span> <span class="cm-builtin">:nop</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">9</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">copy</span>[<span class="cm-variable">pos</span>] <span class="cm-operator">=</span> <span class="cm-builtin">Instruction</span>(<span class="cm-builtin">:jmp</span>, <span class="cm-variable">copy</span>[<span class="cm-variable">pos</span>]<span class="cm-operator">.</span><span class="cm-variable">argument</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">10</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">true</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">11</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">else</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">12</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">false</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">13</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">14</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">15</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">16</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-keyword">for</span> <span class="cm-variable">i</span> <span class="cm-operator">∈</span> <span class="cm-number">1</span><span class="cm-operator">:</span><span class="cm-builtin">length</span>(<span class="cm-variable">copy</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">17</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">if</span> <span class="cm-builtin">switch</span>(<span class="cm-variable">i</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">18</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">finished</span>, <span class="cm-variable">accumulator</span> <span class="cm-operator">=</span> <span class="cm-builtin">execute</span>(<span class="cm-variable">copy</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">19</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">if</span> <span class="cm-variable">finished</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">20</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">return</span> <span class="cm-variable">accumulator</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">21</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">22</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">switch</span>(<span class="cm-variable">i</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">23</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">24</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">25</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 383px;"></div><div class="CodeMirror-gutters" style="height: 416px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">67.1&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="d6afedee-3a0a-11eb-31d7-3f16633dbf5d"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p>Test 1, part 1: true</p>
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">1.6&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="c35b8110-3a0a-11eb-11e8-73b1b2080079"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><h2>Day 8</h2>
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">5.4&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="7c64c710-3a0c-11eb-17bb-1db527c932a3"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y rich_output " mime="text/plain"><assignee></assignee><div></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>4</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation"><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">struct</span> <span class="cm-def">Instruction</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-variable">operator</span> <span class="cm-builtin">::</span> <span class="cm-variable">Symbol</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-variable">argument</span> <span class="cm-builtin">::</span> <span class="cm-variable">Int</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 68px;"></div><div class="CodeMirror-gutters" style="height: 101px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">623&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="c8548b80-3a0a-11eb-067d-9dc6716dc325"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>parse_day8 (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>6</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">parse_day8</span>(<span class="cm-variable">lines</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-builtin">map</span>(<span class="cm-variable">lines</span>) <span class="cm-keyword">do</span> <span class="cm-variable">line</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">splitted</span> <span class="cm-operator">=</span> <span class="cm-builtin">split</span>(<span class="cm-variable">line</span>, <span class="cm-string">' '</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">Instruction</span>(<span class="cm-builtin">Symbol</span>(<span class="cm-variable">splitted</span>[<span class="cm-number">1</span>]), <span class="cm-builtin">parse</span>(<span class="cm-variable">Int</span>, <span class="cm-variable">splitted</span>[<span class="cm-number">2</span>]))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 98px;"></div><div class="CodeMirror-gutters" style="height: 131px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">32.3&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="9d1a8980-3a0d-11eb-380e-8fcaf30c849c"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>execute (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>22</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-comment"># The returned boolean is true if the execution has finished correctly or false if there is a infinite loop.</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-comment"># The returned integer is the accumulator when the inifinite loop is detected or when the execution has finished correctly.</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">execute</span>(<span class="cm-variable">instructions</span>) <span class="cm-builtin">::</span> <span class="cm-variable">Tuple</span>{<span class="cm-variable">Bool</span>, <span class="cm-variable">Int</span>}</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-variable">pos</span> <span class="cm-operator">=</span> <span class="cm-number">1</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-variable">accumulator</span> <span class="cm-operator">=</span> <span class="cm-number">0</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-variable">n</span> <span class="cm-operator">=</span> <span class="cm-builtin">length</span>(<span class="cm-variable">instructions</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-variable">visited_positions</span> <span class="cm-operator">=</span> <span class="cm-builtin">falses</span>(<span class="cm-variable">n</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">9</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-keyword">while</span> <span class="cm-variable">pos</span> <span class="cm-operator">≤</span> <span class="cm-variable">n</span> <span class="cm-operator">&amp;&amp;</span> <span class="cm-operator">!</span><span class="cm-variable">visited_positions</span>[<span class="cm-variable">pos</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">10</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">visited_positions</span>[<span class="cm-variable">pos</span>] <span class="cm-operator">=</span> <span class="cm-builtin">true</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">11</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">ins</span> <span class="cm-operator">=</span> <span class="cm-variable">instructions</span>[<span class="cm-variable">pos</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">12</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">if</span> <span class="cm-variable">ins</span><span class="cm-operator">.</span><span class="cm-variable">operator</span> <span class="cm-operator">==</span> <span class="cm-builtin">:acc</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">13</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">accumulator</span> <span class="cm-operator">+=</span> <span class="cm-variable">ins</span><span class="cm-operator">.</span><span class="cm-variable">argument</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">14</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">pos</span> <span class="cm-operator">+=</span> <span class="cm-number">1</span><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">15</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">elseif</span> <span class="cm-variable">ins</span><span class="cm-operator">.</span><span class="cm-variable">operator</span> <span class="cm-operator">==</span> <span class="cm-builtin">:jmp</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">16</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">pos</span> <span class="cm-operator">+=</span> <span class="cm-variable">ins</span><span class="cm-operator">.</span><span class="cm-variable">argument</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">17</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">else</span> <span class="cm-comment"># :nop.</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">18</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">pos</span> <span class="cm-operator">+=</span> <span class="cm-number">1</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">19</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">20</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">21</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-variable">pos</span> <span class="cm-operator">&gt;</span> <span class="cm-variable">n</span>, <span class="cm-variable">accumulator</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">22</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 338px;"></div><div class="CodeMirror-gutters" style="height: 371px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">40.5&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="0f1d5380-3a10-11eb-2a71-1f0fddf65b70"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>fix_to_not_loop (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>25</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">fix_to_not_loop</span>(<span class="cm-variable">instructions</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-variable">copy</span> <span class="cm-operator">=</span> <span class="cm-builtin">deepcopy</span>(<span class="cm-variable">instructions</span>) <span class="cm-comment"># To avoid modifying the input.</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-keyword">function</span> <span class="cm-def">switch</span>(<span class="cm-variable">pos</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">if</span> <span class="cm-variable">copy</span>[<span class="cm-variable">pos</span>]<span class="cm-operator">.</span><span class="cm-variable">operator</span> <span class="cm-operator">==</span> <span class="cm-builtin">:jmp</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">copy</span>[<span class="cm-variable">pos</span>] <span class="cm-operator">=</span> <span class="cm-builtin">Instruction</span>(<span class="cm-builtin">:nop</span>, <span class="cm-variable">copy</span>[<span class="cm-variable">pos</span>]<span class="cm-operator">.</span><span class="cm-variable">argument</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">true</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">elseif</span> <span class="cm-variable">copy</span>[<span class="cm-variable">pos</span>]<span class="cm-operator">.</span><span class="cm-variable">operator</span> <span class="cm-operator">==</span> <span class="cm-builtin">:nop</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">9</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">copy</span>[<span class="cm-variable">pos</span>] <span class="cm-operator">=</span> <span class="cm-builtin">Instruction</span>(<span class="cm-builtin">:jmp</span>, <span class="cm-variable">copy</span>[<span class="cm-variable">pos</span>]<span class="cm-operator">.</span><span class="cm-variable">argument</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">10</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">true</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">11</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">else</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">12</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">false</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">13</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">14</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">15</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">16</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-keyword">for</span> <span class="cm-variable">i</span> <span class="cm-operator">∈</span> <span class="cm-number">1</span><span class="cm-operator">:</span><span class="cm-builtin">length</span>(<span class="cm-variable">copy</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">17</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">if</span> <span class="cm-builtin">switch</span>(<span class="cm-variable">i</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">18</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">finished</span>, <span class="cm-variable">accumulator</span> <span class="cm-operator">=</span> <span class="cm-builtin">execute</span>(<span class="cm-variable">copy</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">19</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">if</span> <span class="cm-variable">finished</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">20</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">return</span> <span class="cm-variable">accumulator</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">21</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">22</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-builtin">switch</span>(<span class="cm-variable">i</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">23</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">24</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">25</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 383px;"></div><div class="CodeMirror-gutters" style="height: 416px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">56.4&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="d6afedee-3a0a-11eb-31d7-3f16633dbf5d"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p>Test 1, part 1: true</p>
 <p>Test 1, part 2: true</p>
-</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">43.0&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="aa322be0-3a0e-11eb-27ec-d13acf9084aa"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="" mime="application/vnd.pluto.tree+object"><assignee>input_day8</assignee><div><jltree class="collapsed">Main.workspace572.Instruction<jlarray class="Array"><r><k>1</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>-8</pre></v></r></jlstruct></jltree></v></r><r><k>2</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:jmp</pre></v></r><r><k>argument</k><v><pre>5</pre></v></r></jlstruct></jltree></v></r><r><k>3</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>0</pre></v></r></jlstruct></jltree></v></r><r><k>4</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>44</pre></v></r></jlstruct></jltree></v></r><r><k>5</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>42</pre></v></r></jlstruct></jltree></v></r><r><k>6</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:jmp</pre></v></r><r><k>argument</k><v><pre>324</pre></v></r></jlstruct></jltree></v></r><r><k>7</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>-17</pre></v></r></jlstruct></jltree></v></r><r><k>8</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:jmp</pre></v></r><r><k>argument</k><v><pre>1</pre></v></r></jlstruct></jltree></v></r><r><k>9</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>-17</pre></v></r></jlstruct></jltree></v></r><r><k>10</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:jmp</pre></v></r><r><k>argument</k><v><pre>51</pre></v></r></jlstruct></jltree></v></r><r><k>11</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>-13</pre></v></r></jlstruct></jltree></v></r><r><k>12</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>4</pre></v></r></jlstruct></jltree></v></r><r><k>13</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:jmp</pre></v></r><r><k>argument</k><v><pre>1</pre></v></r></jlstruct></jltree></v></r><r><k>14</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:nop</pre></v></r><r><k>argument</k><v><pre>608</pre></v></r></jlstruct></jltree></v></r><r><k>15</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:jmp</pre></v></r><r><k>argument</k><v><pre>274</pre></v></r></jlstruct></jltree></v></r><r><k>16</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>-17</pre></v></r></jlstruct></jltree></v></r><r><k>17</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:jmp</pre></v></r><r><k>argument</k><v><pre>169</pre></v></r></jlstruct></jltree></v></r><r><k>18</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>28</pre></v></r></jlstruct></jltree></v></r><r><k>19</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:nop</pre></v></r><r><k>argument</k><v><pre>508</pre></v></r></jlstruct></jltree></v></r><r><k>20</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:jmp</pre></v></r><r><k>argument</k><v><pre>1</pre></v></r></jlstruct></jltree></v></r><r><jlmore class="">more</jlmore></r><r><k>666</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:jmp</pre></v></r><r><k>argument</k><v><pre>-112</pre></v></r></jlstruct></jltree></v></r><r><k>667</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:jmp</pre></v></r><r><k>argument</k><v><pre>-613</pre></v></r></jlstruct></jltree></v></r><r><k>668</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>26</pre></v></r></jlstruct></jltree></v></r><r><k>669</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:nop</pre></v></r><r><k>argument</k><v><pre>-151</pre></v></r></jlstruct></jltree></v></r><r><k>670</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:jmp</pre></v></r><r><k>argument</k><v><pre>-471</pre></v></r></jlstruct></jltree></v></r><r><k>671</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>50</pre></v></r></jlstruct></jltree></v></r><r><k>672</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>16</pre></v></r></jlstruct></jltree></v></r><r><k>673</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:nop</pre></v></r><r><k>argument</k><v><pre>-119</pre></v></r></jlstruct></jltree></v></r><r><k>674</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>46</pre></v></r></jlstruct></jltree></v></r><r><k>675</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:jmp</pre></v></r><r><k>argument</k><v><pre>1</pre></v></r></jlstruct></jltree></v></r></jlarray></jltree></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">497&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="d867dd80-3a12-11eb-1ae7-3119a294b25a"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p><strong>Result for part 1</strong>: (false, 1928)</p>
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">90.3&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="aa322be0-3a0e-11eb-27ec-d13acf9084aa"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="" mime="application/vnd.pluto.tree+object"><assignee>input_day8</assignee><div><jltree class="collapsed">Main.workspace6.Instruction<jlarray class="Array"><r><k>1</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>-8</pre></v></r></jlstruct></jltree></v></r><r><k>2</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:jmp</pre></v></r><r><k>argument</k><v><pre>5</pre></v></r></jlstruct></jltree></v></r><r><k>3</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>0</pre></v></r></jlstruct></jltree></v></r><r><k>4</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>44</pre></v></r></jlstruct></jltree></v></r><r><k>5</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>42</pre></v></r></jlstruct></jltree></v></r><r><k>6</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:jmp</pre></v></r><r><k>argument</k><v><pre>324</pre></v></r></jlstruct></jltree></v></r><r><k>7</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>-17</pre></v></r></jlstruct></jltree></v></r><r><k>8</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:jmp</pre></v></r><r><k>argument</k><v><pre>1</pre></v></r></jlstruct></jltree></v></r><r><k>9</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>-17</pre></v></r></jlstruct></jltree></v></r><r><k>10</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:jmp</pre></v></r><r><k>argument</k><v><pre>51</pre></v></r></jlstruct></jltree></v></r><r><k>11</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>-13</pre></v></r></jlstruct></jltree></v></r><r><k>12</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>4</pre></v></r></jlstruct></jltree></v></r><r><k>13</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:jmp</pre></v></r><r><k>argument</k><v><pre>1</pre></v></r></jlstruct></jltree></v></r><r><k>14</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:nop</pre></v></r><r><k>argument</k><v><pre>608</pre></v></r></jlstruct></jltree></v></r><r><k>15</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:jmp</pre></v></r><r><k>argument</k><v><pre>274</pre></v></r></jlstruct></jltree></v></r><r><k>16</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>-17</pre></v></r></jlstruct></jltree></v></r><r><k>17</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:jmp</pre></v></r><r><k>argument</k><v><pre>169</pre></v></r></jlstruct></jltree></v></r><r><k>18</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>28</pre></v></r></jlstruct></jltree></v></r><r><k>19</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:nop</pre></v></r><r><k>argument</k><v><pre>508</pre></v></r></jlstruct></jltree></v></r><r><k>20</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:jmp</pre></v></r><r><k>argument</k><v><pre>1</pre></v></r></jlstruct></jltree></v></r><r><jlmore class="">more</jlmore></r><r><k>666</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:jmp</pre></v></r><r><k>argument</k><v><pre>-112</pre></v></r></jlstruct></jltree></v></r><r><k>667</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:jmp</pre></v></r><r><k>argument</k><v><pre>-613</pre></v></r></jlstruct></jltree></v></r><r><k>668</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>26</pre></v></r></jlstruct></jltree></v></r><r><k>669</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:nop</pre></v></r><r><k>argument</k><v><pre>-151</pre></v></r></jlstruct></jltree></v></r><r><k>670</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:jmp</pre></v></r><r><k>argument</k><v><pre>-471</pre></v></r></jlstruct></jltree></v></r><r><k>671</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>50</pre></v></r></jlstruct></jltree></v></r><r><k>672</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>16</pre></v></r></jlstruct></jltree></v></r><r><k>673</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:nop</pre></v></r><r><k>argument</k><v><pre>-119</pre></v></r></jlstruct></jltree></v></r><r><k>674</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:acc</pre></v></r><r><k>argument</k><v><pre>46</pre></v></r></jlstruct></jltree></v></r><r><k>675</k><v><jltree class="collapsed">Instruction<jlstruct><r><k>operator</k><v><pre>:jmp</pre></v></r><r><k>argument</k><v><pre>1</pre></v></r></jlstruct></jltree></v></r></jlarray></jltree></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">8.3&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="d867dd80-3a12-11eb-1ae7-3119a294b25a"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p><strong>Result for part 1</strong>: (false, 1928)</p>
 <p><strong>Result for part 2</strong>: 1319</p>
-</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">1.8&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell></pluto-notebook><dropruler></dropruler></main>
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">1.1&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="ed5f09a0-3a2d-11eb-3592-6bec15fbc19b"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><h2>Day [9]</h2>
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">5.2&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="f5750b80-3a2d-11eb-2edc-a767123b4bee"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>parse_day9 (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>3</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation"><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">parse_day9</span>(<span class="cm-variable">lines</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-variable">parse</span><span class="cm-operator">.</span>(<span class="cm-variable">Int64</span>, <span class="cm-variable">lines</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 53px;"></div><div class="CodeMirror-gutters" style="height: 86px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">25.9&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="2c12b6f0-3a2f-11eb-2aca-b54f0aeb9807"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>first_number_without_valid_pair (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>9</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">first_number_without_valid_pair</span>(<span class="cm-variable">numbers</span>, <span class="cm-variable">preamble_size</span>)<span class="cm-tab" role="presentation" cm-text="       ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-keyword">for</span> <span class="cm-variable">i</span> <span class="cm-operator">∈</span> <span class="cm-variable">preamble_size</span><span class="cm-operator">+</span><span class="cm-number">1</span><span class="cm-operator">:</span><span class="cm-builtin">length</span>(<span class="cm-variable">numbers</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">previous</span> <span class="cm-operator">=</span> <span class="cm-variable">numbers</span>[<span class="cm-variable">i</span><span class="cm-operator">-</span><span class="cm-variable">preamble_size</span><span class="cm-operator">:</span><span class="cm-variable">i</span><span class="cm-operator">-</span><span class="cm-number">1</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">n</span> <span class="cm-operator">=</span> <span class="cm-variable">numbers</span>[<span class="cm-variable">i</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">if</span> <span class="cm-variable">n</span> <span class="cm-operator">∉</span> [<span class="cm-variable">a</span> <span class="cm-operator">+</span> <span class="cm-variable">b</span> <span class="cm-keyword">for</span> <span class="cm-variable">a</span> <span class="cm-operator">∈</span> <span class="cm-variable">previous</span> <span class="cm-keyword">for</span> <span class="cm-variable">b</span> <span class="cm-operator">∈</span> <span class="cm-variable">previous</span> <span class="cm-keyword">if</span> <span class="cm-variable">a</span> <span class="cm-operator">≠</span> <span class="cm-variable">b</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">return</span> <span class="cm-variable">n</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="     ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">9</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 143px;"></div><div class="CodeMirror-gutters" style="height: 176px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">79.7&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="0218f5c0-3a35-11eb-3833-a7472bcbc11b"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>find_encryption_weakness (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 140px; left: 194.65px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -17px; border-right-width: 33px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors" style=""><div class="CodeMirror-cursor" style="left: 164.65px; top: 135px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">find_encryption_weakness</span>(<span class="cm-variable">numbers</span>, <span class="cm-variable">target</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">l</span> <span class="cm-operator">=</span> <span class="cm-builtin">length</span>(<span class="cm-variable">numbers</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-keyword">for</span> <span class="cm-variable">i</span> <span class="cm-operator">∈</span> <span class="cm-number">1</span><span class="cm-operator">:</span><span class="cm-variable">l</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">for</span> <span class="cm-variable">j</span> <span class="cm-operator">∈</span> <span class="cm-variable">i</span><span class="cm-operator">+</span><span class="cm-number">1</span><span class="cm-operator">:</span><span class="cm-variable">l</span><span class="cm-tab" role="presentation" cm-text="     ">   </span><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">ξ</span> <span class="cm-operator">=</span> <span class="cm-variable">numbers</span>[<span class="cm-variable">i</span><span class="cm-operator">:</span><span class="cm-variable">j</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="       ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-variable">s</span> <span class="cm-operator">=</span> <span class="cm-builtin">sum</span>(<span class="cm-variable">ξ</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">if</span> <span class="cm-variable">s</span> <span class="cm-operator">==</span> <span class="cm-variable">target</span> </span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">return</span> <span class="cm-builtin">maximum</span>(<span class="cm-variable">ξ</span>) <span class="cm-operator">+</span> <span class="cm-builtin">minimum</span>(<span class="cm-variable">ξ</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">9</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="   ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">elseif</span> <span class="cm-variable">s</span> <span class="cm-operator">&gt;</span> <span class="cm-variable">target</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">10</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="      ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">break</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">11</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="        ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">12</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-tab" role="presentation" cm-text=" ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">13</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text="  ">    </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">14</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 218px;"></div><div class="CodeMirror-gutters" style="height: 251px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">38.0&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="2c96db10-3a2f-11eb-266d-3db1dfe51f8c"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p>Test 1, part 1: true</p>
+<p>Test 1, part 2: true</p>
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">40.7&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="299e6950-3a34-11eb-1080-6d172718b1ba"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="" mime="application/vnd.pluto.tree+object"><assignee>input_day9</assignee><div><jltree class="collapsed">Int64<jlarray class="Array"><r><k>1</k><v><pre>10</pre></v></r><r><k>2</k><v><pre>21</pre></v></r><r><k>3</k><v><pre>30</pre></v></r><r><k>4</k><v><pre>41</pre></v></r><r><k>5</k><v><pre>7</pre></v></r><r><k>6</k><v><pre>31</pre></v></r><r><k>7</k><v><pre>43</pre></v></r><r><k>8</k><v><pre>13</pre></v></r><r><k>9</k><v><pre>18</pre></v></r><r><k>10</k><v><pre>16</pre></v></r><r><k>11</k><v><pre>8</pre></v></r><r><k>12</k><v><pre>27</pre></v></r><r><k>13</k><v><pre>48</pre></v></r><r><k>14</k><v><pre>49</pre></v></r><r><k>15</k><v><pre>19</pre></v></r><r><k>16</k><v><pre>46</pre></v></r><r><k>17</k><v><pre>50</pre></v></r><r><k>18</k><v><pre>37</pre></v></r><r><k>19</k><v><pre>9</pre></v></r><r><k>20</k><v><pre>26</pre></v></r><r><jlmore class="">more</jlmore></r><r><k>991</k><v><pre>81140653782337</pre></v></r><r><k>992</k><v><pre>134921301295717</pre></v></r><r><k>993</k><v><pre>81753820513729</pre></v></r><r><k>994</k><v><pre>89128049157277</pre></v></r><r><k>995</k><v><pre>110682581369284</pre></v></r><r><k>996</k><v><pre>86295433501493</pre></v></r><r><k>997</k><v><pre>100234164113687</pre></v></r><r><k>998</k><v><pre>115503232106027</pre></v></r><r><k>999</k><v><pre>108042699036276</pre></v></r><r><k>1000</k><v><pre>182767846428000</pre></v></r></jlarray></jltree></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">9.9&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="code_folded " id="484f9ea0-3a34-11eb-28a2-a95d5444ad50"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="rich_output " mime="text/html"><assignee></assignee><div><div class="markdown"><p><strong>Result for part 1</strong>: 31161678</p>
+<p><strong>Result for part 2</strong>: 5453868</p>
+</div></div></pluto-output><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">27.6&nbsp;ms</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell></pluto-notebook><dropruler></dropruler></main>
                 <svg style="display: none;" id="MJX-SVG-global-cache"><defs></defs></svg>
             </body>
             </html>
diff --git a/data/day09.txt b/data/day09.txt
new file mode 100644 (file)
index 0000000..100df13
--- /dev/null
@@ -0,0 +1,1000 @@
+10
+21
+30
+41
+7
+31
+43
+13
+18
+16
+8
+27
+48
+49
+19
+46
+50
+37
+9
+26
+42
+15
+23
+47
+14
+17
+20
+29
+21
+92
+22
+31
+76
+24
+25
+28
+30
+73
+41
+33
+32
+34
+45
+38
+35
+36
+37
+70
+39
+50
+42
+51
+43
+46
+47
+49
+61
+52
+58
+53
+63
+102
+65
+66
+67
+68
+87
+71
+88
+73
+75
+76
+95
+85
+140
+89
+90
+115
+96
+100
+101
+118
+128
+116
+131
+129
+132
+246
+208
+135
+139
+165
+164
+148
+161
+151
+166
+179
+181
+205
+289
+186
+196
+277
+201
+217
+268
+290
+247
+316
+261
+328
+312
+286
+449
+287
+327
+299
+309
+317
+403
+347
+367
+377
+382
+387
+397
+413
+615
+749
+529
+508
+533
+534
+547
+843
+573
+664
+616
+586
+596
+608
+714
+676
+1094
+724
+1222
+915
+759
+1193
+784
+1357
+1145
+1459
+1080
+1318
+1142
+1067
+1081
+1120
+1159
+1169
+1182
+1194
+1204
+1272
+1284
+1460
+1400
+1508
+1869
+1543
+1674
+1826
+2454
+1851
+2324
+2222
+2236
+2147
+2262
+2148
+2868
+4087
+2289
+2351
+3656
+3636
+2488
+3226
+2556
+3821
+2908
+3751
+5104
+3217
+3910
+3500
+3677
+3998
+4175
+4369
+7498
+4383
+7407
+6544
+4704
+4640
+5396
+4907
+7136
+5044
+5464
+7128
+5773
+9547
+9217
+6408
+6717
+6894
+7127
+7177
+9219
+8544
+8173
+8879
+9413
+9779
+9023
+13184
+11776
+11881
+10104
+10440
+9951
+10508
+10817
+15301
+12181
+17567
+13302
+13585
+13125
+13611
+14021
+18903
+22478
+16717
+17196
+17052
+18292
+19127
+22132
+18974
+20391
+20459
+24402
+34204
+20948
+27869
+22998
+23942
+25306
+25483
+26427
+32488
+26710
+32738
+27632
+39195
+35009
+44719
+33769
+44280
+43376
+39586
+38101
+39922
+40850
+41339
+41407
+43946
+44890
+46431
+46940
+48304
+49248
+79678
+51910
+66827
+54342
+92250
+107677
+82991
+123841
+126367
+77715
+73355
+126109
+86297
+77687
+89643
+80772
+82189
+121017
+96188
+88836
+93194
+203824
+95244
+97552
+118737
+106252
+121169
+137333
+127697
+154127
+151042
+151070
+155402
+155544
+158459
+159652
+159876
+310946
+162961
+169608
+171025
+175383
+184080
+255840
+186388
+248622
+192796
+201496
+203804
+246434
+299048
+609994
+265030
+278739
+318363
+326425
+306472
+313861
+438615
+343732
+319528
+322837
+332569
+346408
+622471
+355105
+421817
+370468
+379184
+405300
+582988
+716876
+447930
+450238
+668251
+543769
+571502
+578891
+585211
+620333
+793970
+629309
+633389
+1033141
+642365
+652097
+655406
+678977
+701513
+776922
+938093
+1084277
+749652
+855538
+853230
+1662450
+1473563
+1068263
+1205544
+1115271
+2206219
+1221256
+1212280
+1297771
+2600543
+1262698
+1532207
+1275754
+1432328
+1294462
+2199548
+2708082
+1380490
+2768025
+1526574
+1602882
+4241588
+1605190
+2865580
+4806762
+2183534
+2273807
+3878997
+2320815
+2336527
+4473355
+2592233
+3886695
+2538452
+2557160
+4859267
+2807961
+6076237
+3654297
+2674952
+4373215
+2907064
+3131764
+3129456
+3208072
+7540992
+4874979
+7682940
+5990824
+4457341
+4504349
+4594622
+4657342
+4928760
+4893687
+6965448
+5095612
+5213404
+7485920
+5232112
+5582016
+5482913
+5804408
+5806716
+7802694
+6036520
+8440184
+6261220
+6337528
+7865414
+10024372
+8961690
+9114683
+15606388
+9051963
+9523382
+9251964
+13333871
+10107091
+9989299
+10309016
+10327724
+10445516
+11287321
+19595091
+24046572
+15006295
+12141936
+11843236
+14063914
+12297740
+12598748
+14126634
+14202942
+16827104
+18013653
+18638065
+18166646
+20317023
+19697480
+19579688
+19241263
+22288752
+20096390
+20434815
+23429257
+35333893
+37493171
+31030046
+32701979
+23985172
+24140976
+30612401
+33305177
+24896488
+26424374
+32216595
+28329576
+32369588
+38448468
+36180299
+36804711
+39793870
+38820951
+38938743
+39676078
+39337653
+31161678
+40531205
+51047216
+63732025
+48126148
+48881660
+49037464
+50409546
+50565350
+51320862
+53226064
+71308331
+64690358
+62604673
+71037546
+59491254
+142345877
+67341977
+67966389
+87214257
+69982629
+70837756
+70100421
+115468125
+70499331
+140481960
+91096555
+114141571
+97919124
+97007808
+99447010
+99602814
+100974896
+132656747
+104546926
+123326485
+122095927
+124181612
+133642219
+194680943
+264663572
+211319716
+135308366
+137949018
+140083050
+140599752
+167845564
+161196976
+221542937
+300502311
+188104363
+220334293
+196454818
+203993936
+355877919
+199049824
+405049237
+228728538
+226642853
+227873411
+262130630
+345724549
+366725903
+268950585
+273257384
+446977146
+349268734
+305794582
+278548770
+395718975
+308445316
+329042540
+423327606
+384559181
+387154187
+392098299
+400448754
+395504642
+651201017
+425692677
+426923235
+454516264
+455371391
+570575946
+490004041
+531081215
+597993125
+542207969
+547499355
+700543615
+754735217
+627817504
+584343352
+637487856
+755965775
+693004497
+882102340
+1179293381
+771713368
+817790976
+787602941
+854965018
+821197319
+852615912
+880208941
+881439499
+909887655
+945375432
+1427708296
+1131842707
+1240503852
+1393453631
+1089707324
+1636837557
+2264655061
+2518939897
+1212160856
+1221831208
+1330492353
+1448970272
+1944672342
+1971809664
+2093600355
+1697999917
+1670406888
+3166503550
+1673813231
+2372346559
+1732824853
+1761648440
+2035082756
+2150391507
+2077218139
+2221550031
+3365263295
+2301868180
+2311538532
+4236464725
+3796731196
+4554022653
+2552323561
+2661131128
+2892238096
+2779462625
+3119377160
+3344220119
+3371813148
+3368406805
+4738349267
+3494473293
+3406638084
+4046159790
+3767907609
+3810042992
+3838866579
+6938397886
+4227609646
+4298768170
+4523418211
+4613406712
+6005351247
+6862880098
+6576193821
+5213454689
+6491190308
+7184549339
+5440593753
+5671700721
+5898839785
+11314543088
+6712626924
+7599422794
+12496541555
+6901111377
+9668203399
+10622353611
+7577950601
+10415060400
+7648909571
+17198547432
+8526377816
+17019959766
+8822186381
+9136824923
+10054000465
+14577418676
+13477305198
+13476790386
+10885155410
+26156784689
+12341705130
+12153220677
+21300215810
+12611466709
+13613738301
+14312049718
+14479061978
+17663202739
+15427489193
+30675852630
+22568281077
+16400136982
+16175287387
+16471095952
+39039377029
+22140116117
+22299491579
+17959011304
+21290045600
+20939155875
+23038376087
+25197205128
+27090528687
+23226860540
+24494925807
+25955443431
+24764687386
+32871232934
+26225205010
+27925788019
+32438073282
+29906551171
+31602776580
+38743568464
+32575424369
+32646383339
+68945928200
+34134298691
+34430107256
+46904803503
+43238647454
+46054732986
+59682724339
+57843588467
+43977531962
+48424065668
+57832339190
+50720130817
+50989892396
+80896443567
+66669356483
+107121648577
+54150993029
+60363861301
+59528564599
+61509327751
+62481975540
+85753769609
+71318992833
+80484840242
+66780682030
+68564405947
+77668754710
+93958671855
+99413958064
+105583297585
+102575058697
+92401597630
+139904762638
+94697662779
+108822231586
+101710023213
+204285081910
+105140885425
+114514854330
+137988349316
+113679557628
+115660320780
+121873189052
+121037892350
+201522732592
+342273431226
+171139464644
+170274429160
+135345087977
+144449436740
+237533509832
+170070352340
+197984895215
+325322974260
+215735555129
+187099260409
+194111620843
+239147099519
+223337085916
+206850908638
+215389580841
+218820443053
+249024645605
+229339878408
+305415440317
+341413893804
+236698213130
+322444348386
+422586463767
+279794524717
+305619517137
+358238725053
+388890795393
+383596536259
+314519789080
+417448706759
+357169612749
+381210881252
+393950169047
+764807417511
+423451499251
+400962529481
+655933682884
+746060408142
+422240489479
+534959395545
+533340232133
+478364524013
+466038091538
+516492737847
+542317730267
+1168300897621
+585414041854
+594314313797
+715408337802
+772487331652
+671689401829
+1134951203535
+695730670332
+715482318561
+1008355821805
+738380494001
+823203018960
+794912698528
+1262553145989
+824414028732
+1533293192529
+1150053925842
+994857261860
+888278581017
+1161768761870
+1332694807798
+1060352405335
+982530829385
+1058810468114
+1127731772121
+1290044984129
+1179728355651
+1266003715626
+1367420072161
+1387171720390
+1410069895830
+1411212988893
+2132584755227
+1538685337521
+1733237755861
+2113248003089
+1618115717488
+2191834100893
+3294353517097
+2041341297499
+1870809410402
+2188084177456
+1883135842877
+2298348476847
+2537801667951
+3271923093382
+2238538823765
+3500004827388
+2186542240235
+5005160849243
+3307345013125
+2445732071277
+2797241616220
+2754591792551
+2798384709283
+3726769514977
+2949898326414
+3156801055009
+3846485758950
+3351353473349
+3488925127890
+3501251560365
+3753945253279
+3912150707901
+4069678083112
+4057351650637
+4071220020333
+4121674666642
+4425081064000
+4632274311512
+4684270895042
+4941134032786
+7473028139991
+4983783856455
+5704490118965
+5753077084402
+5552976501834
+6106699381423
+7482655604325
+5748283035697
+9595624509313
+6301251799763
+9665227792303
+8546755730642
+6840278601239
+13177518258956
+11781412634025
+7666095961180
+7969502358538
+8701952394624
+10645624151751
+8496301084333
+8753948978154
+10736860940857
+9316545206554
+22518273574882
+9924917889241
+20328168364667
+15148601011147
+11301259537531
+11306053586236
+11659675883257
+11854982417120
+19233162025190
+20535361612179
+26808276894404
+15542230995863
+19241463095795
+14506374562419
+15635598319718
+16162397045513
+16723451336692
+35562225872558
+16671454753162
+17198253478957
+24131899404051
+27490580736838
+18070494184708
+27463656583044
+20617804744085
+21226177426772
+21230971475477
+22607313123767
+23156241954651
+22960935420788
+22965729469493
+23514658300377
+28526437170282
+52041095470659
+37393368520990
+30048605558282
+31229825899111
+55361725303162
+30141972882137
+31797995365231
+32833851798675
+33394906089854
+33869708232119
+51274782985054
+38688298928793
+43833490550539
+39296671611480
+44191906896265
+41843982170857
+44382419381423
+42457148902249
+43838284599244
+46670900255028
+64624731988965
+90729394399452
+66703560030794
+53563263858659
+68736904487075
+60190578440419
+61278431457393
+61371798781248
+61939968247368
+62975824680812
+64011681114256
+124124300489306
+66228757888529
+67264614321973
+77984970540273
+89963081913847
+81140653782337
+134921301295717
+81753820513729
+89128049157277
+110682581369284
+86295433501493
+100234164113687
+115503232106027
+108042699036276
+182767846428000