diff --git a/2025/src/day09.clj b/2025/src/day09.clj index 70ca334..c64d7f8 100644 --- a/2025/src/day09.clj +++ b/2025/src/day09.clj @@ -1,5 +1,5 @@ (ns day09 - (:require input-manager)) + (:require [input-manager])) (def input (->> (input-manager/get-input 2025 9) (mapv #(mapv parse-long (re-seq #"\d+" %))))) @@ -28,10 +28,10 @@ "Lines AB and CD intersect if points A and B falls on different sides of CD and if C and D fall on different sides of AB" [[a b] [c d]] - (let [o1 (orientation a b c) - o2 (orientation a b d) - o3 (orientation c d a) - o4 (orientation c d b)] + (let [o1 (orientation a c b) + o2 (orientation a d b) + o3 (orientation c a d) + o4 (orientation c b d)] (and (not= o1 o2) (not= o3 o4)))) (def line-segments (map vector input (rest input))) @@ -48,5 +48,4 @@ (not (some #(intersect? reverse-diag %) segments)))))) (map (partial apply area)) sort - last) - + last) \ No newline at end of file