From e5af6348cdb47bfe199f295591065e980e9385c3 Mon Sep 17 00:00:00 2001 From: Katie <5213160+KatieLG@users.noreply.github.com> Date: Mon, 16 Dec 2024 06:32:36 +0000 Subject: [PATCH] day16 uiua part b --- AOC/uiua/solutions/day16.ua | 9 +++++++-- AOC/uiua/tests/test_solutions.ua | 7 ++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/AOC/uiua/solutions/day16.ua b/AOC/uiua/solutions/day16.ua index 8cfaeba..9007a89 100644 --- a/AOC/uiua/solutions/day16.ua +++ b/AOC/uiua/solutions/day16.ua @@ -27,10 +27,15 @@ Solve ← ( Moves # Pick from moves with costs | ≍End↙₂ # keep going until on the Ending ) - ◌ # discard the paths, keeping only the cost ) # Part A Input # Grid ⊂Start Dir # Start position and start direction -Solve # solve for cost +◌Solve # solve and discard paths for cost only + +# Part A +Input # Grid +⊂Start Dir # Start position and start direction +⊙◌Solve # solve and discard cost for paths +⧻◴≡↙₂/◇⊂ # find all points that lie on a best path diff --git a/AOC/uiua/tests/test_solutions.ua b/AOC/uiua/tests/test_solutions.ua index eb43b6b..6f622d1 100644 --- a/AOC/uiua/tests/test_solutions.ua +++ b/AOC/uiua/tests/test_solutions.ua @@ -14,9 +14,10 @@ Expected ← ( [31589 98080815200063] # day 13 [222208000 7623] # day 14 [1406628 1432781] # day 15 + [85420 492] # day 16 ] ) -SolutionMap ← map+1⇡15 Expected +SolutionMap ← map+1⇡⊸⧻Expected GetSolution ← get⊙SolutionMap TestDay ← ( @@ -85,3 +86,7 @@ TestDay 14 # TODO SkipDay 15 "Not done yet" + +now +~ "../solutions/day16.ua" +TestDay 16