You are viewing a single comment's thread. Return to all comments →
... main = flip replicateM_ sub =<< readLn sub = putStrLn . (\b -> if b then "YES" else "NO") =<< sol <$> (readLn >>= getIntPairs) getIntList :: IO [Int] getIntList = fmap read <$> words <$> getLine getIntPairs :: Int -> IO [(Int, Int)] getIntPairs = flip replicateM getIntPair getIntPair :: IO (Int, Int) getIntPair = (,) <$> head <*> last <$> (fmap read . words <$> getLine) sol :: [(Int, Int)] -> Bool sol ps = ...
Seems like cookies are disabled on this browser, please enable them to open this website
Functions or Not?
You are viewing a single comment's thread. Return to all comments →