It is not hard to produce data for this problem so that there is no solution.
For instance, if the total number of tubes is less than the number of colors; besides that, a number of empty tubes must be necessary. On the other hand, if there are as many empty tubes as colors, the solution is trivial, except fo some special configurations.

I don't know off hand how to detect that there is no solution.
Supposing somebody does find out, what should be returned?

Created at: 2024/01/05 20:49; Updated at: 2024/01/14 20:13