Standard Bar Recursion · Subsequences Pattern O(2^9) — the bench is fixed at nine candidates · O(k) recursion depth beyond the output
A court coordinator seats a jury of exactly k members whose seniority scores add up to a required total n, drawing from a fixed candidate bench numbered 1 through 9. Each candidate serves at most once, and the roster must be complete — exactly k names, no fewer. The coordinator walks the bench once per slot: seat the current candidate and shrink the target, or pass on them for good.
Input: Two integers k (roster size) and n (required sum).
Output: Every k-member combination from 1..9 summing to n, sorted lexicographically by the verifier.
2 <= k <= 91 <= n <= 60Input: {"k":3,"n":7}
Output: [[1,2,4]]
1 + 2 + 4 is the only three-member roster reaching 7.
Input: {"k":3,"n":9}
Output: [[1,2,6],[1,3,5],[2,3,4]]
Three rosters: the smallest three plus two, or mid-weight trades around them.