I don't understand how example 1 is correct. There are only 12 solutions(not 20) for:
checkio([3, 2, 1, 4]):
[0,0,0],[0,0,1],[0,1,0],[1,0,0],[1,1,0],[1,0,1],[0,1,1],[1,1,1],[2,2,0],[1,2,1],[2,1,1],[3,0,1]