Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
比较慢(16ms)的公式: f(n, m)=f(n-2^k, m)+f(n-2^(k+1), m-2^(k+1))f(n, m) = m*f(n-1, m)+f(n-1,m-1) = m*(m*f(n-2, m)+f(n-2, m-1))+(m-1)*f(n-2, m-1)+f(n-2, m-2) = m*f(n-2, m) + f(n-2, m-1)+ f(n-2, m-2) = f(n-1, m) + f(n-2, m-2) = f(n-2, m) + f(n-3, m-2) + f(n-3, m-2) + f(n-4, m-4) = f(n-2, m) + f(n-4, m-4) = f(n-4, m) + f(n-8, m-8) ... = f(n-2^k, m) + f(n-2^(k+1), m-2^(k+1)) Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator