Skip to content

Instantly share code, notes, and snippets.

@jkramer
Created January 12, 2016 11:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkramer/a56ac7a18037dd1f763c to your computer and use it in GitHub Desktop.
Save jkramer/a56ac7a18037dd1f763c to your computer and use it in GitHub Desktop.
CodinGame - Horse Race
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