2025 Day 8 Part 1
This commit is contained in:
parent
5f9a9cd6ed
commit
d30bf9f343
1 changed files with 30 additions and 0 deletions
30
2025/day08.ua
Normal file
30
2025/day08.ua
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
~ "aoc.ua" ~ Lines
|
||||||
|
|
||||||
|
Input ← Lines &fras "input/day08.txt"
|
||||||
|
Junctions ← ≡◇⊜⋕ ⊸≠@, Input
|
||||||
|
|
||||||
|
Distance ← √ /+ ⁿ2 -
|
||||||
|
Dist₂ ← /+ ⁿ2 -
|
||||||
|
|
||||||
|
≡(□¤) Junctions
|
||||||
|
|
||||||
|
°⊏ Junctions
|
||||||
|
⊏ ⧅< 2
|
||||||
|
⊏⍏⊸≡(Distance°[⊙⊙])
|
||||||
|
|
||||||
|
↙ 1000
|
||||||
|
|
||||||
|
⍥₁₀₀₀(
|
||||||
|
⊃(↘1|⊢)
|
||||||
|
⊙(
|
||||||
|
⊃(⋅∘|¤∘)
|
||||||
|
⤚≡(/↥◇∊)
|
||||||
|
⊃(▽|▽¬)
|
||||||
|
/⍚⊂
|
||||||
|
⊂
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
˙⍤=0⧻
|
||||||
|
|
||||||
|
/×↙¯3⍆≡◇⧻
|
||||||
Loading…
Reference in a new issue