While there are many answers to this sort of question, many of them do not handle large sets or sums well. I want to get all subsets of set {1,2,3,...,254,255} that sum up to a value 666, and actually get some results in a reasonable amount of time (say 10 minutes).
Heuristics are welcome, because I think this is an NP-complete problem. Dynamic programming may be a good approach. A program to produce at least 10 results would be great--Any program that I've tried has taken too long. Pointers to other stackoverflow answers welcome.
If you like, produce the results by hand. An algorithm would be better.