Skip to content

Instantly share code, notes, and snippets.

@ewingd
Created October 15, 2014 22:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ewingd/f71cf27b90bd231d179b to your computer and use it in GitHub Desktop.
Save ewingd/f71cf27b90bd231d179b to your computer and use it in GitHub Desktop.
(require '[clojure.string :as str])
(defn SplitStringToList
[input_string]
(map read-string (str/split input_string #" "))
)
(defn MinInSlice
[[start end] widths]
(apply min (drop start (take (+ 1 end) widths)))
)
(def input_lines (read-line))
(def input_widths (SplitStringToList (read-line)))
(doseq [x (range (read-string input_lines))]
(def range_list (SplitStringToList (read-line)))
(println (MinInSlice range_list input_widths))
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment