This file contains 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
#!/usr/bin/env stack | |
-- stack --resolver lts-13.30 script --package random | |
import Control.Monad (foldM) | |
import Data.List (elemIndex, minimumBy) | |
import Data.Maybe (fromMaybe) | |
import Debug.Trace (trace) | |
import System.IO (getLine) | |
import System.Random (randomIO, randomRIO) |