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 |
Re:动规方程怎么找呢?求救!!!In Reply To:动规方程怎么找呢?求救!!! Posted by:123454321 at 2006-10-29 18:05:51 用dp[i][j]表示将i这个数分成不小于j的UNIMODAL PALINDROMIC DECOMPOSITIONS的个数 则这些数可分为两大类,一类是包含j的,即j...j,另一类是j+k....j+k(k>=1),这两类即是dp[i-2j][j] (因为j必须出现,即固定,即将i-2j这个数分成不小于j的个数)和dp[i][j+1] (即将i分成不小于j+1的个数) 递推公式:dp[ i ][ j ] = dp[ i ][ j+1 ]+(i-2*j)>=0 ? dp[ i-2*j ][ j ] : 0; Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator