2024 day 4 part 1
This commit is contained in:
parent
6b4cc3984a
commit
61962a5c27
3 changed files with 158 additions and 0 deletions
8
2024/day04/day04.bqn
Normal file
8
2024/day04/day04.bqn
Normal file
|
@ -0,0 +1,8 @@
|
|||
in←>•FLines"input"
|
||||
|
||||
a←⌽∘⍉⍟(↕4)in
|
||||
UpperDiags←{(⌽1+↕≠𝕩)↑¨<˘⍉(↕∘≠⌽˘⊢)𝕩}
|
||||
d←∾1⊸↓¨∾¨⌽⍟0‿1¨¨UpperDiags¨a
|
||||
na←+´+´∘⥊¨"XMAS"⊸⍷¨a
|
||||
nd←+´+´¨"XMAS"⊸⍷¨d
|
||||
•Show na+nd
|
Loading…
Add table
Add a link
Reference in a new issue