Approach hintTry it first, then revealHide
With at most 15 problems every subset can be examined: track the subset's size, sum, minimum and maximum during the recursion or bitmask loop and test each condition.
With at most 15 problems every subset can be examined: track the subset's size, sum, minimum and maximum during the recursion or bitmask loop and test each condition.