是啊 我现在还在纠结一个问题 不知道能帮忙解答下吗
Give a PROLOG program subsum( Set, Sum, SubSet) such that with Set a list of
numbers, SubSet is a sublist of this list, and such that the sum of the numbers in SubSet(求出符合和的条件的所有子集)
equals Sum. For eample(例如):
?- subsum([1,2,5,3,2], 5, Sub).
Sub = [1,2,2];
Sub = [2,3];
Sub = [5];
Sub = [3,2];
no.