|
|
@ -13,12 +13,12 @@ $ MXMXAXMASX
|
|
|
|
⊜∘≠@\n.
|
|
|
|
⊜∘≠@\n.
|
|
|
|
Input ←
|
|
|
|
Input ←
|
|
|
|
|
|
|
|
|
|
|
|
Search ← /+♭≡(◇⌕) ⊙¤
|
|
|
|
Search ← /+♭≡(◇⌕) ♭≡[⍥₃⊸(⍉⇌)] ⊙¤
|
|
|
|
|
|
|
|
|
|
|
|
Diagonal ← ≡⊏×⟜⊞=.+₁⇡⟜↯4 "\WXMAS"
|
|
|
|
Diagonal ← ≡⊏×⟜⊞=.+₁⇡⟜↯4 "\WXMAS"
|
|
|
|
Part₁ ← Search {∩⍥₃⊸(⍉⇌) Diagonal ¤"XMAS"}
|
|
|
|
Part₁ ← Search {Diagonal ¤"XMAS"}
|
|
|
|
|
|
|
|
|
|
|
|
Part₂ ← Search [⍥₃⊸(⍉⇌)]↯3_3"M\WM\WA\WS\WS"
|
|
|
|
Part₂ ← Search {↯3_3"M\WM\WA\WS\WS"}
|
|
|
|
|
|
|
|
|
|
|
|
$Part₁ Part₁ Input
|
|
|
|
$Part₁ Part₁ Input
|
|
|
|
$Part₂ Part₂ Input
|
|
|
|
$Part₂ Part₂ Input
|
|
|
|