Solution of the Generalized Noah's Ark Problem.

Solution of the Generalized Noah's Ark Problem.