Skip to content

Instantly share code, notes, and snippets.

@jkramer jkramer/horse.hs
Created Jan 12, 2016

Embed
What would you like to do?
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
You can’t perform that action at this time.