2025 Day 4 Part 2
This commit is contained in:
parent
f0d9c304d3
commit
79050036a1
1 changed files with 27 additions and 6 deletions
|
|
@ -3,10 +3,31 @@
|
|||
Input ← Lines &fras "input/day04.txt"
|
||||
Wall ← ≡◇=@@ Input
|
||||
|
||||
/⊂ -₁⇡[3 3]
|
||||
▽¬⍜⍉(⊡1)⊸⦷0_0
|
||||
# Removed ? Wall
|
||||
Step ← |1 (
|
||||
/⊂ -₁⇡[3 3]
|
||||
▽¬⍜⍉(⊡1)⊸⦷0_0
|
||||
|
||||
/+ ⬚0˜↻ Wall
|
||||
<4
|
||||
×Wall
|
||||
/+♭
|
||||
/+ ⊸⬚0↻
|
||||
<4
|
||||
×
|
||||
)
|
||||
|
||||
# Removed Wall' ? Wall
|
||||
Run ← |1.2 (
|
||||
⍢(
|
||||
| ⊙(
|
||||
⊸Step
|
||||
⟜-
|
||||
/+♭
|
||||
)
|
||||
⤙+
|
||||
≠₀
|
||||
) 0
|
||||
)
|
||||
|
||||
Part₁ ← /+♭ Step
|
||||
Part₂ ← ⊙◌ Run
|
||||
|
||||
Part₁ Wall
|
||||
Part₂ Wall
|
||||
|
|
|
|||
Loading…
Reference in a new issue