day18.1
This commit is contained in:
parent
0ca15eb016
commit
37029c00d1
1 changed files with 8 additions and 4 deletions
12
aoc.bqn
12
aoc.bqn
|
@ -50,8 +50,6 @@ Day5 ⇐ {
|
|||
Day6 ⇐ {{𝕨+ ⊑/ ≡⟜⍷˘ 𝕨↕𝕩}⟜(•FChars 𝕩)¨ 4‿14}
|
||||
# ⟨ 1929 3298 ⟩
|
||||
|
||||
Day7 ⇐ {𝕩, "mercury only"!0}
|
||||
|
||||
Day8 ⇐ {
|
||||
_rots ← {F‿x←𝔽‿𝕩, >{F⌾𝕏x}¨⟨⊢,⍉,⌽˘,⍉⌽⟩}
|
||||
A ← {+´⥊ ∨˝ ∧´∘(⊑>1⊸↓)¨ 𝕩}
|
||||
|
@ -60,8 +58,6 @@ Day8 ⇐ {
|
|||
}
|
||||
# ⟨ 1843 180000 ⟩
|
||||
|
||||
Day9 ⇐ {𝕩, "mercury only"!0}
|
||||
|
||||
Day10 ⇐ {
|
||||
Line ← 0∾ ·•BQN⎊⟨⟩ 5↓⊢
|
||||
A ← (+´ 19⊸⊏∘⍉) (⊢×1+↕∘≠⌾⥊)
|
||||
|
@ -70,3 +66,11 @@ Day10 ⇐ {
|
|||
}
|
||||
# ⟨ 13060 "FJUBULRZ" ⟩
|
||||
# (but the string is a big banner)
|
||||
|
||||
Day18 ⇐ { # part 1 only :[
|
||||
grid ← (↕∘> 1+⌈˝)⊸∊ •BQN¨ '‿'⍟(=⟜',')⚇0 •FLines 𝕩
|
||||
touch ← +´⥊ «‿» {∧⟜(𝕎⎉𝕩) grid}⌜ 1+↕3
|
||||
+´⥊ (6×grid)-touch
|
||||
}
|
||||
# 3470
|
||||
•Show Day18 ⊑•args
|
||||
|
|
Loading…
Reference in a new issue