feat(sterni/aoc/2022): day25 array solutions
Another approach for figuring out the SNAFU digits in k: https://github.com/leahneukirchen/adventofcode2022/blob/master/day25.k Change-Id: Iddf424aff8fcac176109fd35ef44bdd875302adc Reviewed-on: https://cl.tvl.fyi/c/depot/+/7647 Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
This commit is contained in:
parent
7df27dad12
commit
a25c60361e
2 changed files with 5 additions and 0 deletions
4
users/sterni/exercises/aoc/2022/25/25.bqn
Normal file
4
users/sterni/exercises/aoc/2022/25/25.bqn
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
c ← "=-012"
|
||||||
|
F ← +´∘(⊢×(5⊸⋆)∘⌽∘↕∘≠)∘(-⟜2)∘(c⊸⊐)
|
||||||
|
T ← {c⊏˜5|2+𝕩 {(⌊5÷˜𝕨+2) (𝕊⟜(𝕨⊸∾))⍟(0<𝕨) 𝕩} ⟨⟩}
|
||||||
|
•Out "day25.1: "∾T +´F¨ •FLines "input"
|
1
users/sterni/exercises/aoc/2022/25/25.k
Normal file
1
users/sterni/exercises/aoc/2022/25/25.k
Normal file
|
@ -0,0 +1 @@
|
||||||
|
c@2+{(1_o,0)+x+-5*o:2<x}/5\+/{5/x-2}'(c:"=-012")?0:"input"
|
Loading…
Reference in a new issue