def gen(b)
(1..(b - 1)).inject([[b]]) {|s, i| s + gen(b - i).collect{|j| ([i] + j).sort}}.sort
end
arr_uniq = gen(6).uniq.reject { |a| a.uniq.count != a.count }
print arr_uniq
puts '', arr_uniq.count
ZGVmIGdlbihiKQogICgxLi4oYiAtIDEpKS5pbmplY3QoW1tiXV0pIHt8cywgaXwgcyArIGdlbihiIC0gaSkuY29sbGVjdHt8anwgKFtpXSArIGopLnNvcnR9fS5zb3J0CmVuZAoKYXJyX3VuaXEgPSBnZW4oNikudW5pcS5yZWplY3QgeyB8YXwgYS51bmlxLmNvdW50ICE9IGEuY291bnQgfQoKcHJpbnQgYXJyX3VuaXEKcHV0cyAnJywgYXJyX3VuaXEuY291bnQK