|
|
@ -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"
|