feat(sterni/aoc/2022): day18 BQN solution
Change-Id: I1504cd5e443ff0b28c2d97ae357e5d92c88bba4d Reviewed-on: https://cl.tvl.fyi/c/depot/+/7601 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Autosubmit: sterni <sternenseemann@systemli.org>
This commit is contained in:
parent
c9a44bfe15
commit
ba719f8f5e
3 changed files with 18 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
|||
#!/usr/bin/env BQN
|
||||
|
||||
⟨Xor⟩ ← •Import "../lib.bqn"
|
||||
|
||||
#
|
||||
# Utilities
|
||||
#
|
||||
|
@ -469,7 +471,6 @@ _EnhancedPixelCount ← {+´⥊⊑ (𝕨⊸Enhance)⍟𝕗 𝕩}
|
|||
day25Input ← ".>v" ⊐ > ReadInput 25
|
||||
day25ExampleInput ← ".>v"⊐∘‿10⥊"v...>>.vv>.vv>>.vv..>>.>v>...v>>v>>.>.v.v>v.vv.v..>.>>..v....vv..>.>v.v.v..>>v.v....v..v.>"
|
||||
|
||||
Xor ← (¬⊸∧∨∧⟜¬)
|
||||
MoveHerd ← {(𝕩∧𝕩≠𝕨)+𝕨× (𝕨=𝕩) (Xor⟜(1⊸⌽)∨⊢) (0=𝕩)∧(-1)⌽𝕨=𝕩}
|
||||
|
||||
_fixCount ← {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue