poj 1028 Ignatius and the Princess III 等于价值为M的有多少种情况
2013-04-11 15:11
323 查看
#include<cstdio> #include<iostream> #include<stdlib.h> #include<ctype.h> #include<algorithm> #include<cmath> #include<cstring> #include<queue> #include<iomanip> #include<set> #include<string> #include<iterator> using namespace std; int dp[200]; int main(){ int n; while(cin>>n){ memset(dp,0,sizeof(dp)); dp[0]=1; for(int i=1;i<=n;i++) for(int j=i;j<=n;j++) dp[j]+=dp[j-i]; cout<<dp <<endl; } }
相关文章推荐
- poj1028--动态规划--Ignatius and the Princess III
- poj1028--动态规划--Ignatius and the Princess III
- hdu 1028 Ignatius and the Princess III(分解正整数的方案数)
- hdu 1028 Ignatius and the Princess III(动态规划)
- hdu 题目1028 Ignatius and the Princess III(母函数及其应用)
- hdu-1028-Ignatius and the Princess III
- [ACM] hdu 1028 Ignatius and the Princess III (母函数)
- HDU 1028 Ignatius and the Princess III
- hdu 1028 Ignatius and the Princess III ( 母函数)
- Hdu 1028 Ignatius and the Princess III(整数拆分问题,DP)
- HDOJ1028 Ignatius and the Princess III
- HDOJ 1028 Ignatius and the Princess III(整数划分)
- hdu 1028 Ignatius and the Princess III
- 【hdoj】1028 Ignatius and the Princess III
- 杭电 HDU ACM 1028 Ignatius and the Princess III
- 杭电 ACM 1028 Ignatius and the Princess III
- HDU 1028 Ignatius and the Princess III(DP,经典母函数问题)
- HDU 1028 Ignatius and the Princess III (母函数,或者DP)
- hdu 1028 Ignatius and the Princess III
- HDU1028 Ignatius and the Princess III,母函数