matyr #4572(2007/12/02 16:12 GMT) [ xtal ] Rating0/0=0.00
1 2 3 4 5 6
(|n, m|{ if(m <= 1) return [[n]]; r: []; (n + 1).times{|x| callee(x, m - 1){ r.push_back([n - x] ~ it); } } return r; })(5, 3){ it.p; }
Rating0/0=0.00-0+
1 reply [ reply ]
matyr #4597(2007/12/03 23:34 GMT) [ xtal ] Rating1/1=1.00
(|n, m|{ c: callee; m--; return fiber{ if(m < 1) yield [n]; else (n + 1).times{|x| c(x, m){ yield [n - x] ~ it; } } } })(5, 3).join("\n").p;
Rating1/1=1.00-0+
[ reply ]
matyr
#4572()
[
xtal
]
Rating0/0=0.00
(|n, m|{ if(m <= 1) return [[n]]; r: []; (n + 1).times{|x| callee(x, m - 1){ r.push_back([n - x] ~ it); } } return r; })(5, 3){ it.p; }Rating0/0=0.00-0+
1 reply [ reply ]