Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:这道题用母函数可以吗? 母函数若干个多项式相乘是直接模拟?

Posted by o_oXo_o at 2006-07-26 16:11:00 on Problem 2229
In Reply To:Re:这道题用母函数可以吗? 母函数若干个多项式相乘是直接模拟? Posted by:HYSBZ at 2005-09-02 22:17:42
> 用DP就可以了吧,开始以为O(N)才能过,不过O(N*N)也过了..............

O(N*N)能过?我nlogn的dp, 超时得不行了。
S[i][j] 表示 把i分解的数中最大数不大于2^j的 i的可分解方案数
S[i][j] = S[i][j-1]+S[i-2^j][ min{log2(i-2^j), j} ];
这样不能过吗?

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator