private void Split(FriendsPresents pr, int n, int m) { FriendsPresents f1 = pr.Give(n, m); FriendsPresents f2 = f1.Clone(); Share(f1, n - 1, 0); Share(f2, n - 1, 1); }
private void Share(FriendsPresents pr, int n, int m) { if (n == 0) { pr.Give(n, m); posibilities.Add(pr); return; } Split(pr, n, m); }