You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
527 B
Plaintext

$ ...#......
$ .......#..
$ #.........
$ ..........
$ ......#...
$ .#........
$ .........#
$ ..........
$ .......#..
$ #...#.....
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"