diff options
author | sterni <sternenseemann@systemli.org> | 2022-12-18T15·56+0100 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2022-12-20T19·01+0000 |
commit | ba719f8f5e8a1bb55a9f4fc99cd0e853f7ec62b8 (patch) | |
tree | f7b7388c2a5b87cf9351ed6a508a1f34fd9ece04 /users/sterni/exercises/aoc/2021/solutions.bqn | |
parent | c9a44bfe1575691eaec449f2e6d0424de0dbcb8a (diff) |
feat(sterni/aoc/2022): day18 BQN solution r/5430
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>
Diffstat (limited to 'users/sterni/exercises/aoc/2021/solutions.bqn')
-rwxr-xr-x | users/sterni/exercises/aoc/2021/solutions.bqn | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/users/sterni/exercises/aoc/2021/solutions.bqn b/users/sterni/exercises/aoc/2021/solutions.bqn index f7247cadf280..755c9440460a 100755 --- a/users/sterni/exercises/aoc/2021/solutions.bqn +++ b/users/sterni/exercises/aoc/2021/solutions.bqn @@ -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 ← { |