number = 80
arr = Array.new number.succ, Array.new
arr[1], arr[2] = [[1]], [[2]]
3.upto(number) do |c|
1.upto(c / 2) do |i|
arr[c] += arr[c-i].reject { |sub_arr| sub_arr.any? { |e| i >= e } }
.map { |sub_arr| sub_arr.dup.unshift i }
end
arr[c] << [c]
end
puts arr[number].count, ''
#print arr[number]
bnVtYmVyID0gODAKCmFyciA9IEFycmF5Lm5ldyBudW1iZXIuc3VjYywgQXJyYXkubmV3CmFyclsxXSwgYXJyWzJdID0gW1sxXV0sIFtbMl1dCgozLnVwdG8obnVtYmVyKSBkbyB8Y3wKICAxLnVwdG8oYyAvIDIpIGRvIHxpfAogICAgYXJyW2NdICs9IGFycltjLWldLnJlamVjdCB7IHxzdWJfYXJyfCBzdWJfYXJyLmFueT8geyB8ZXwgaSA+PSBlIH0gfQogICAgICAgICAgICAgICAgICAgICAgLm1hcCAgICB7IHxzdWJfYXJyfCBzdWJfYXJyLmR1cC51bnNoaWZ0IGkgICAgICAgfQogIGVuZAogIGFycltjXSA8PCBbY10KZW5kCgpwdXRzIGFycltudW1iZXJdLmNvdW50LCAnJwojcHJpbnQgYXJyW251bWJlcl0=