You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
419 B
25 lines
419 B
# Experimental!
|
|
|
|
$ MMMSXXMASM
|
|
$ MSAMXMSMSA
|
|
$ AMXSXMAAMM
|
|
$ MSAMASMSMX
|
|
$ XMASAMXAMM
|
|
$ XXAMMXXAMA
|
|
$ SMSMSASXSS
|
|
$ SAXAMASAAA
|
|
$ MAMMMXMMMM
|
|
$ MXMXAXMASX
|
|
⊜∘≠@\n.
|
|
Input ←
|
|
|
|
Search ← /+♭≡(◇⌕) ♭≡[⍥₃⊸(⍉⇌)] ⊙¤
|
|
|
|
Diagonal ← ≡⊏×⟜⊞=.+₁⇡⟜↯4 "\WXMAS"
|
|
Part₁ ← Search {Diagonal ¤"XMAS"}
|
|
|
|
Part₂ ← Search {↯3_3"M\WM\WA\WS\WS"}
|
|
|
|
$Part₁ Part₁ Input
|
|
$Part₂ Part₂ Input
|