From 459ec24170debd83cb31a1b050fbc4dd8a108227 Mon Sep 17 00:00:00 2001 From: aprzn Date: Wed, 13 Dec 2023 03:09:29 -0500 Subject: [PATCH] day 13 --- day13.ua | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 day13.ua diff --git a/day13.ua b/day13.ua new file mode 100644 index 0000000..61ea49f --- /dev/null +++ b/day13.ua @@ -0,0 +1,35 @@ +$ #.##..##. +$ ..#.##.#. +$ ##......# +$ ##......# +$ ..#.##.#. +$ ..##..##. +$ #.#.##.#. +$ +$ #...##..# +$ #....#..# +$ ..##..### +$ #####.##. +$ #####.##. +$ ..##..### +$ #....#..# +TestInput ← + +Parse ← ⊜(□=@#⊜∘≠@\n.)¬⌕"\n\n". + +PartI ← +⊙(×100)∩( + -⊃(⧻|×2+1⊚|:)≡≍⬚0↻1.. + /+▽⊓(≡(/×≡≍⇌.↘)⊙¤|+1⊚) +)⍉.°□ + +# apparently adding a comment here fixes highlighting lol +PartII ← +⊙(×100)∩( + -⊃(⧻|×2+1⊚|:)⍜(⊢⇌|⋅0)+1⊚⧻.? + /+▽⊓(≡(×⊃(/×+|=2/+)≡⊃(=1/+≠|≍)⇌.↘)⊙¤|+1⊚) +)⍉.°□ + +/+≡PartI Parse TestInput +/+≡PartII Parse TestInput + +/+≡PartI Parse &fras "day13.in" +/+≡PartII Parse &fras "day13.in"