master
Clyne 2 years ago
parent f0702f0483
commit 6b9ec331ef

@ -0,0 +1,12 @@
(->> (slurp "input")
(#(clojure.string/split % #"[^0-9]"))
(map read-string)
(partition 4)
(map
#(or (and (>= (first %) (nth % 2))
(<= (second %) (nth % 3)))
(and (>= (nth % 2) (first %))
(<= (nth % 3) (second %)))))
(filter true?)
count
println)

@ -0,0 +1,12 @@
(->> (slurp "input")
(#(clojure.string/split % #"[^0-9]"))
(map read-string)
(partition 4)
(map
#(or (and (>= (first %) (nth % 2)) (<= (first %) (nth % 3)))
(and (>= (second %) (nth % 2)) (<= (second %) (nth % 3)))
(and (>= (nth % 2) (first %)) (<= (nth % 2) (second %)))
(and (>= (nth % 3) (first %)) (<= (nth % 3) (second %)))))
(filter true?)
count
println)
Loading…
Cancel
Save