diff --git a/2024/uiua/day_02.ua b/2024/uiua/day_02.ua index f59375c..8c97122 100644 --- a/2024/uiua/day_02.ua +++ b/2024/uiua/day_02.ua @@ -12,10 +12,9 @@ Records ← ⊜(⊜⋕≠@ .)≠@\n. Raw IsSafe ← /×∨∩(×⊃(>0|<4) ≡(-°⊟)◫2) ⟜⇌ -# part one -/+ ≡IsSafe Records +Part₁ ← /+ ≡IsSafe Records -Dampened ← ≡°¤ ⊞(⍜↻(↘1)) ⊙¤ ⊸(⇡⧻) +Dampened ← ≡(⍜↻(↘1)) ⊃(⇡⧻)¤ +Part₂ ← /+ ≡(/∨≡IsSafe Dampened) Records -# part two -/+ ≡(/∨≡IsSafe Dampened) Records +⊂⊃Part₁Part₂