Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- count(S, m, n) = count(S, m - 1, n) + count(S, m, n - S[m - 1]);
- count(S, m, n < 0) = 0
- count(S, m, n = 0) = 1
- count(S, m <= 0, n >= 1) = 0
- count(S, m, n) = count(S, m - 1, 2*n) + count(S, m, n - 2*S[m - 1]);
Add Comment
Please, Sign In to add comment