Created
February 8, 2011 22:26
-
-
Save sphynx/817407 to your computer and use it in GitHub Desktop.
Task 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment