Try to find two solutions.
The simplest algorithm is brute force recursive countdown algorithm . Once you find the first solution, step back and find the second. This is slow, but (unlike algorithms based only on logic), the ability to find all solutions in the end is guaranteed. Therefore, if this algorithm ends up finding only one solution, then this solution must be unique.
, . , , .
- . . , , , . , , , , , .
, , . :