Guest User

Untitled

a guest
Jul 22nd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. module Main where
  2.  
  3. d = [3, 4, 9, 14, 15, 19, 28, 37, 47, 50, 54, 56, 59, 61, 70, 73, 78, 81, 92, 95, 97, 99]
  4.  
  5. superset [] = [[]]
  6. superset (x:xs) = ss ++ map (x:) ss
  7. where ss = superset xs
  8.  
  9. check [] = False
  10. check xs = m == sum xs - m where m = maximum xs
  11. res = length . filter check . superset $ d
Add Comment
Please, Sign In to add comment