Ignatius and the Princess III Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 19589 Accepted Submission(s): 13709 Problem Description "Well, it seems the first problem is too easy. I will let…
题目链接:HDU 1028 Problem Description "Well, it seems the first problem is too easy. I will let you know how foolish you are later." feng5166 says. "The second problem is, given an positive integer N, we define an equation like this: N=a[1]+a[2…
HDU 1028 Ignatius and the Princess III Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Description "Well, it seems the first problem is too easy. I will let you know how foolish you are later." feng5166 says. &q…
题目链接:hdu 1028 Ignatius and the Princess III 题意:对于给定的n,问有多少种组成方式 思路:dp[i][j],i表示要求的数,j表示组成i的最大值,最后答案是dp[i][i].那么dp[i][j]=dp[i][j-1]+dp[i-j][i-j],dp[i][j-1]是累加1到j-1的结果,dp[i-j][i-j]表示的就是最大为j,然后i-j有多少种表达方式啦.因为i-j可能大于j,这与我们定义的j为最大值矛盾,所以要去掉大于j的那些值 /*******…