[Haskell-cafe] Slow IO or bad code?
chaddai.fouche at gmail.com
Thu Aug 9 12:10:52 EDT 2007
I get "Wrong answer" with the following code for the same problem...
Is there something strange in this code :
module Main where
import qualified Data.ByteString.Char8 as B
sequence_ . flip replicate hot . maybe 0 fst . B.readInt
hot = do
men <- B.getLine
women <- B.getLine
$ zipWith (*)
(map (maybe 0 fst . B.readInt) $ B.words men)
(map (maybe 0 fst . B.readInt) $ B.words women)
I get the expected results with my tests.
More information about the Haskell-Cafe