From 1ff1de6b1e49fc5f92cf32a927a3c4fd94a0a8eb Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Mon, 2 Dec 2024 10:08:36 -0800 Subject: [PATCH] [2024][uiua][2.x] golfed --- 2024/uiua/day_02.ua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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₂