diff --git a/2024/uiua/day_04.ua b/2024/uiua/day_04.ua index 65920ae..1771e8a 100644 --- a/2024/uiua/day_04.ua +++ b/2024/uiua/day_04.ua @@ -13,7 +13,7 @@ $ MXMXAXMASX ⊜∘≠@\n. Input ← -Search ← /+♭≡(◇⌕) ♭≡[⍥₃⊸(⍉⇌)] ⊙¤ +Search ← /+♭≡◇⌕ ♭≡[⍥₃⊸(⍉⇌)] ⊙¤ Diagonal ← ≡⊏×⟜⊞=.+₁⇡⟜↯4 "\WXMAS" Part₁ ← Search {Diagonal ¤"XMAS"} diff --git a/2024/uiua/day_05.ua b/2024/uiua/day_05.ua new file mode 100644 index 0000000..f47a66c --- /dev/null +++ b/2024/uiua/day_05.ua @@ -0,0 +1,49 @@ +# Experimental! + +$ 47|53 +$ 97|13 +$ 97|61 +$ 97|47 +$ 75|29 +$ 61|13 +$ 75|53 +$ 29|13 +$ 97|29 +$ 53|29 +$ 61|53 +$ 97|53 +$ 61|29 +$ 47|13 +$ 75|47 +$ 97|75 +$ 47|61 +$ 75|61 +$ 47|29 +$ 75|13 +$ 53|13 +$ +$ 75,47,61,53,29 +$ 97,61,53,29,13 +$ 75,29,13 +$ 75,97,47,61,53 +$ 61,13,29 +$ 97,13,75,29,47 +°$"_\n\n_" +∩(⊜□≠@\n.) +⊓(≡(⋕⊟°$"_|_"))(≡(⍚⊜⋕≠@,.)) +Rules ← +Updates ← + +⊃(▽)(▽¬) ≡(/×◇⧈(⍜¤∈Rules) 2) .Updates +Correct ← +Incorrect ← + +Middle ← ⊡⌊÷₂⧻. + +Part₁ ← /+ ≡◇Middle Correct + +Sort ← ⊏⍏/+∈Rules⊸⊞⊟. +Part₂ ← /+ ≡◇(Middle Sort) Incorrect + +$Part₁ Part₁ +$Part₂ Part₂