Submission #97369


Source Code Expand

Copy
import Control.Applicative
import Control.Monad
import Data.List
import Data.MemoTrie
import qualified Data.HashSet as S

main :: IO ()
main = do
  _n <- getLine
  p <- map read . words <$> getLine
  print $ length $ solve p

solve :: [Int] -> [Int]
solve [] = [0]
solve (x:xs) =
  let a = memo solve xs
  in nub' $ a ++ map (+x) a

nub' = S.toList . S.fromList

Submission Info

Submission Time
Task A - コンテスト
User tanakh
Language Haskell (GHC 7.4.1)
Score 0
Code Size 381 Byte
Status CE

Compile Error

Main.hs:5:18:
    Could not find module `Data.HashSet'
    Use -v to see a list of the files searched for.