|
|
@ -1,33 +1,33 @@
|
|
|
|
$ seeds: 79 14 55 13
|
|
|
|
$ seeds: 79 14 55 13
|
|
|
|
$
|
|
|
|
$
|
|
|
|
$ seed-to-soil map:
|
|
|
|
$ seed-to-soil map:
|
|
|
|
$ 50 98 2
|
|
|
|
$ 50 98 2
|
|
|
|
$ 52 50 48
|
|
|
|
$ 52 50 48
|
|
|
|
$
|
|
|
|
$
|
|
|
|
$ soil-to-fertilizer map:
|
|
|
|
$ soil-to-fertilizer map:
|
|
|
|
$ 0 15 37
|
|
|
|
$ 0 15 37
|
|
|
|
$ 37 52 2
|
|
|
|
$ 37 52 2
|
|
|
|
$ 39 0 15
|
|
|
|
$ 39 0 15
|
|
|
|
$
|
|
|
|
$
|
|
|
|
$ fertilizer-to-water map:
|
|
|
|
$ fertilizer-to-water map:
|
|
|
|
$ 49 53 8
|
|
|
|
$ 49 53 8
|
|
|
|
$ 0 11 42
|
|
|
|
$ 0 11 42
|
|
|
|
$ 42 0 7
|
|
|
|
$ 42 0 7
|
|
|
|
$ 57 7 4
|
|
|
|
$ 57 7 4
|
|
|
|
$
|
|
|
|
$
|
|
|
|
$ water-to-light map:
|
|
|
|
$ water-to-light map:
|
|
|
|
$ 88 18 7
|
|
|
|
$ 88 18 7
|
|
|
|
$ 18 25 70
|
|
|
|
$ 18 25 70
|
|
|
|
$
|
|
|
|
$
|
|
|
|
$ light-to-temperature map:
|
|
|
|
$ light-to-temperature map:
|
|
|
|
$ 45 77 23
|
|
|
|
$ 45 77 23
|
|
|
|
$ 81 45 19
|
|
|
|
$ 81 45 19
|
|
|
|
$ 68 64 13
|
|
|
|
$ 68 64 13
|
|
|
|
$
|
|
|
|
$
|
|
|
|
$ temperature-to-humidity map:
|
|
|
|
$ temperature-to-humidity map:
|
|
|
|
$ 0 69 1
|
|
|
|
$ 0 69 1
|
|
|
|
$ 1 0 69
|
|
|
|
$ 1 0 69
|
|
|
|
$
|
|
|
|
$
|
|
|
|
$ humidity-to-location map:
|
|
|
|
$ humidity-to-location map:
|
|
|
|
$ 60 56 37
|
|
|
|
$ 60 56 37
|
|
|
|
$ 56 93 4
|
|
|
|
$ 56 93 4
|
|
|
@ -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"
|
|
|
|