https://123dok.net/document/yr36j94p-exact-pseudopolynomial-algorithm-problem-finding-family-disjoint-subsets.html