From 71f7171443696cd63d1bb3f78b7976086f10a0fb Mon Sep 17 00:00:00 2001 From: aprzn Date: Thu, 14 Dec 2023 22:00:15 -0500 Subject: [PATCH] day 14 part 2 done --- day14.ua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/day14.ua b/day14.ua index 2b9caa8..1c906fe 100644 --- a/day14.ua +++ b/day14.ua @@ -26,7 +26,27 @@ PartIOriginal ← ( SlideLeft ← ≡(⍜⊜□(≡(□⊐/⊂⊕□∩°□)=@..)≠@#.) PartI ← /+♭×⊃(¤-⇡.⧻⊢|=@O)SlideLeft⍉ +Cycle ← ( + ⍜⍉SlideLeft # Up + SlideLeft # Left + ⍜(⍉⇌)SlideLeft # Down + ⍜≡⇌SlideLeft # Right +) + +# this code is fucking awful +PartII ← ( + ¤Cycle + ⍢(⊂Cycle⊢.)(¬∊⊃(⊢|↘1)) + ≡≍⊃↙↘1. + ⊙(+1)∩(⊗1)⇌. + ⍜(-|◿:)⊙1000000000 + ? + ⊡-1⊙⇌ + /+♭×⊃(-⇡.⧻⊢|=@O) +) PartI Parse TestInput +PartII Parse TestInput PartI Parse &fras "day14.in" +PartII Parse &fras "day14.in"