From 463a2917444cb54fe2d6ef1a2467fe8911e03619 Mon Sep 17 00:00:00 2001 From: ajet Date: Mon, 20 Oct 2025 08:08:14 -0900 Subject: [PATCH] rename --- 2024/src/day20.clj | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/2024/src/day20.clj b/2024/src/day20.clj index 0d3470e..4b7d4af 100644 --- a/2024/src/day20.clj +++ b/2024/src/day20.clj @@ -35,7 +35,7 @@ (into visited searches) (into shortest searches-w-path-lengths)))))) -(defn find-best-cheat [] +(defn find-cheats [] (let [search-path (find-search-path) walls (->> grid (filter (comp #{\#} second)) @@ -53,7 +53,8 @@ (map #(- % a) bs))))] (frequencies cheats))) -(->> (find-best-cheat) +;; part 1 +(->> (find-cheats) (filter (comp #(> % 100) first)) (map second) (apply +))