|
|
@ -4,19 +4,14 @@
|
|
|
|
; the previous.
|
|
|
|
; the previous.
|
|
|
|
;
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
(loop [inc-count 0
|
|
|
|
(->> (slurp "./in")
|
|
|
|
prev (Integer/parseInt (read-line))
|
|
|
|
(clojure.string/split-lines)
|
|
|
|
]
|
|
|
|
(map read-string)
|
|
|
|
(let [input (read-line)]
|
|
|
|
(reduce
|
|
|
|
(if (not (empty? input))
|
|
|
|
#(update [%2 (second %1)] 1 (partial + (if (> %2 (first %1)) 1 0)))
|
|
|
|
(let [depth (Integer/parseInt input)]
|
|
|
|
[999999 0]
|
|
|
|
(recur
|
|
|
|
)
|
|
|
|
(if (> depth prev) (inc inc-count) inc-count)
|
|
|
|
(second)
|
|
|
|
depth
|
|
|
|
(println)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
(println inc-count)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|