Created
January 12, 2016 11:55
-
-
Save jkramer/a56ac7a18037dd1f763c to your computer and use it in GitHub Desktop.
CodinGame - Horse Race
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
import System.IO | |
import Control.Monad | |
import Data.List | |
main = do | |
hSetBuffering stdout NoBuffering -- DO NOT REMOVE | |
count <- fmap read getLine | |
strengths <- fmap sort (replicateM count (fmap read getLine)) | |
print $ minimum $ zipWith (-) (tail strengths) strengths |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment