This commit is contained in:
rhiannon morris 2022-12-05 13:24:35 +01:00
parent 1da0498792
commit e8b5d3cfcf

18
aoc.bqn
View file

@ -31,4 +31,20 @@ Day4 ⇐ {
+´ (AB)Line¨ •FLines 𝕩 +´ (AB)Line¨ •FLines 𝕩
} }
# ⟨ 536 845 ⟩ # ⟨ 536 845 ⟩
# •Show Day4 ⊑•args
Day5 {
inp •FLines 𝕩
Start {(𝕨=0)¨/ 𝕩}
stks ' '/¨ <˘ > (1¨ 4Chunk)¨ '[' Start inp
todo •BQN1 (135 ' 'Split)¨ 'm' Start inp
_Do1 {
nst 𝕩 - 011
lr n () s𝕨
(𝔽 l)(t) r(s) 𝕨
}
_Do {¨ 𝕨𝔽_Do1˜´𝕩}, A _Do, B _Do
stks (AB) todo
}
# ⟨ "QNNTGTPFN" "GGNPJBTTR" ⟩
# •Show Day5 ⊑•args