bqn
This commit is contained in:
parent
3c76445fcc
commit
4bf733471e
1 changed files with 9 additions and 0 deletions
9
aoc.bqn
9
aoc.bqn
|
@ -23,3 +23,12 @@ Day3 ⇐ {
|
||||||
(A⋈B) •FLines 𝕩
|
(A⋈B) •FLines 𝕩
|
||||||
}
|
}
|
||||||
# ⟨ 7683 2488 ⟩
|
# ⟨ 7683 2488 ⟩
|
||||||
|
|
||||||
|
Day4 ⇐ {
|
||||||
|
Line ← •BQN∘> '‿'⍟(∊⟜"-,")¨ # hehe
|
||||||
|
A ← {a‿b‿c‿d:(∧´c‿b≥¨a‿d)∨∧´d‿a≥¨b‿c}
|
||||||
|
B ← {a‿b‿c‿d:(∧´c‿b≥¨a‿c)∨∧´a‿d≥¨c‿a}
|
||||||
|
+´˘⍉>((A⋈B)Line)¨•FLines𝕩
|
||||||
|
}
|
||||||
|
# ⟨ 536 845 ⟩
|
||||||
|
# •Show Day4 ⊑•args
|
||||||
|
|
Loading…
Reference in a new issue