From 402d7f44ac41ceba020c87525846e1df8b7c5a7d Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Mon, 27 May 2024 14:16:38 +0100 Subject: [PATCH] 19a: correct maximum-cost calculation --- 19/19a.bqn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/19/19a.bqn b/19/19a.bqn index 28be0de..04653f6 100644 --- a/19/19a.bqn +++ b/19/19a.bqn @@ -20,7 +20,8 @@ Prep←{ NtZ←{=˜𝕩 ? 𝕩; 0}¨ # NaN is not equal to itself. EvalBlueprint←{𝕊 robot_costs: - max_costs←⌈´˘robot_costs + •Show robot_costs + •Show max_costs←⌈˝(robot_costs∾[⟨0,0,0,∞⟩]) # Want all the geodes. Search←{ 𝕊⟨time,stock,robots⟩: #•Show ⟨time,stock,robots⟩ result←⌈´{ @@ -37,7 +38,6 @@ EvalBlueprint←{𝕊 robot_costs: 𝕊⟨time,stock,robots⟩: 3⊑stock+robots×time # If not, return number of geodes we can get in time. } - •Show robot_costs •Show Search ⟨24,⟨0,0,0,0⟩,⟨1,0,0,0⟩⟩ } -- 2.30.2