Created
October 15, 2014 22:48
-
-
Save ewingd/f71cf27b90bd231d179b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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