Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Main where
- d = [3, 4, 9, 14, 15, 19, 28, 37, 47, 50, 54, 56, 59, 61, 70, 73, 78, 81, 92, 95, 97, 99]
- superset [] = [[]]
- superset (x:xs) = ss ++ map (x:) ss
- where ss = superset xs
- check [] = False
- check xs = m == sum xs - m where m = maximum xs
- res = length . filter check . superset $ d
Add Comment
Please, Sign In to add comment