|
|
@ -54,16 +54,40 @@ PartI ← (
|
|
|
|
):
|
|
|
|
):
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Prune ← ▽≡(≠0⊢⇌).
|
|
|
|
PartII ← (
|
|
|
|
PartII ← (
|
|
|
|
↘6⊔⊃⊢(↘1)⊜□≠@\n.
|
|
|
|
↘6⊔⊃⊢(↘1)⊜□≠@\n.
|
|
|
|
⊓(
|
|
|
|
⊓(
|
|
|
|
↯¯1_2⊜parse≠@ .
|
|
|
|
↯¯1_2⊜parse≠@ .
|
|
|
|
| ∧(
|
|
|
|
| ∧(
|
|
|
|
>@9⊢.⊔
|
|
|
|
>@9⊢.⊔
|
|
|
|
(⍜(⊔⊢⇌|(⊂|¤;)type.):⊜parse≠@ .|⊂⊙i;)
|
|
|
|
(
|
|
|
|
|
|
|
|
⊜parse≠@ .
|
|
|
|
|
|
|
|
⍜⍘[⊙⊙∘]⊃(⋅∘|⋅⋅∘|-:)
|
|
|
|
|
|
|
|
⍜(⊔⊢⇌|(⊂|¤;)type.):
|
|
|
|
|
|
|
|
| ⊂⊙i;
|
|
|
|
|
|
|
|
)
|
|
|
|
)⊙{}
|
|
|
|
)⊙{}
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
:
|
|
|
|
|
|
|
|
∧(
|
|
|
|
|
|
|
|
⊙⊙[]⊔
|
|
|
|
|
|
|
|
∧(
|
|
|
|
|
|
|
|
⊙⊙[]
|
|
|
|
|
|
|
|
∧(
|
|
|
|
|
|
|
|
⊙(↙2.)
|
|
|
|
|
|
|
|
≡\-◫2[⊃(∘|↧↥⊙:⊙⊙∘|↥⊙↧⊙⊙⋅∘|⋅∘)]∩⍘⊟∩\+
|
|
|
|
|
|
|
|
⊃(⋅∘|Prune⊂⊏0_2⊙⋅∘|Prune⊂¤⍜⊢+⊡1⊙(⊡2)⊙⊙⋅∘)
|
|
|
|
|
|
|
|
):
|
|
|
|
|
|
|
|
;
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
⊏⍏≡⊢.⊂
|
|
|
|
|
|
|
|
∧((⊂|⍜(⊡0_1)+:⊡1)=⊃(⊢|/+⊢⋅∘|⊙∘))⊃(↘1|¤⊢)
|
|
|
|
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
/↧ PartI TestInput
|
|
|
|
/↧ PartI TestInput
|
|
|
|
PartII TestInput
|
|
|
|
/↧≡⊢ PartII TestInput
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/↧ PartI &fras "day05.in"
|
|
|
|
|
|
|
|
/↧≡⊢ PartII &fras "day05.in"
|
|
|
|