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"