|
|
вернуться в форумSome Useful hint is here... anyone view: HI all For solving this problem use dynamic programming as this way: for finding answer of k... do it: for i:=1 to k do f[k]:=f[k]+c(i,k)*f[k-i]; which c(i,k) is amount of ways to choose i thing from k thing: c(i,k)= k! / (i!*(k-i)!) ans its proof is: variable i is amount of '='s that use if 1time '=' use then it we should choose 2 operand in both sides of = operator and if 2= uses then we should chose 3operand (form k operand that we have)... ans etc. mail me for more explaination: aidin_n7@hotmail.com
|
|
|