• [deleted]
    + 0 comments

    Maybe this'll be helpful for those using haskell who have issues with time limits and reading input. This is my go to for reading a bunch of ints:

    import qualified Data.ByteString.Char8 as B
    import Data.List (unfoldr)
    import Data.Char (isSpace)
    
    ints = unfoldr (B.readInt . B.dropWhile isSpace) 
    
    solve (n:xs) = error "some solution to a hackerrank problem"
    main = solve =<< ints <$> B.getContents