|
|
|
@ -0,0 +1,33 @@
|
|
|
|
|
$ ...#......
|
|
|
|
|
$ .......#..
|
|
|
|
|
$ #.........
|
|
|
|
|
$ ..........
|
|
|
|
|
$ ......#...
|
|
|
|
|
$ .#........
|
|
|
|
|
$ .........#
|
|
|
|
|
$ ..........
|
|
|
|
|
$ .......#..
|
|
|
|
|
$ #...#.....
|
|
|
|
|
TestInput ←
|
|
|
|
|
|
|
|
|
|
Parse ← ⊜∘≠@\n.
|
|
|
|
|
|
|
|
|
|
PartI ← +∩(
|
|
|
|
|
+⊃(
|
|
|
|
|
÷2/+♭⌵⊞-.
|
|
|
|
|
| /+×⊃∘-≡(/+<)⊃(⍜°⊚(=0)|¤|⧻)
|
|
|
|
|
)⊏⍏.
|
|
|
|
|
)≡°⊟⊚=@#
|
|
|
|
|
|
|
|
|
|
PartII ← +∩(
|
|
|
|
|
+⊃(
|
|
|
|
|
÷2/+♭⌵⊞-.
|
|
|
|
|
| ×999999 /+×⊃∘-≡(/+<)⊃(⍜°⊚(=0)|¤|⧻)
|
|
|
|
|
)⊏⍏.
|
|
|
|
|
)≡°⊟⊚=@#
|
|
|
|
|
|
|
|
|
|
PartI Parse TestInput
|
|
|
|
|
PartII Parse TestInput
|
|
|
|
|
|
|
|
|
|
PartI Parse &fras "day11.in"
|
|
|
|
|
PartII Parse &fras "day11.in"
|