Project Euler Problem 076
import Data.Array countsums :: (Enum t, Num t, Num e, Ix t) => t -> e countsums n = a!(n,n) where a = array ((0,0),(n,n)) $ ((0,0),1) : [( (k,l), foldl (\c x -> c + (a!(k-x, min (k-x) x))) 0 [1..l]) | k<-[1..n], l<-[1..k]] ans1 :: Integer ans1 = (subtract 1) . countsums $ 100 main :: IO () main = print ans1