简单的钱币兑换问题,就是钱的种类多了一点,完全背包。

#include<cstdio>
#include<cstring>
int main ()
{
int i,j,dp[];
memset(dp,,sizeof(dp));
dp[]=;
for(i=; i<=; i++)
for(j=i; j<=; j++)
dp[j]+=dp[j-i];
while(~scanf("%d",&i))
printf("%d\n",dp[i]);
return ;
}

HDU 1028 HDU Ignatius and the Princess III的更多相关文章

  1. hdu 1028 Sample Ignatius and the Princess III (母函数)

    Ignatius and the Princess III Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K ...

  2. 1028:Ignatius and the Princess III

    本题应该有两种方法: 1.母函数法 2.递推法 母函数不了解,待充分了解之后,再进行补充! 这里为递推实现的方法: 思路: 定义:n为要拆分的整数: k为拆分的项数: f[n][k]代表 n的整数拆分 ...

  3. hdu acm 1028 数字拆分Ignatius and the Princess III

    Ignatius and the Princess III Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K ...

  4. hdu 1028 Ignatius and the Princess III 简单dp

    题目链接:hdu 1028 Ignatius and the Princess III 题意:对于给定的n,问有多少种组成方式 思路:dp[i][j],i表示要求的数,j表示组成i的最大值,最后答案是 ...

  5. HDU 1028 Ignatius and the Princess III 整数的划分问题(打表或者记忆化搜索)

    传送门: http://acm.hdu.edu.cn/showproblem.php?pid=1028 Ignatius and the Princess III Time Limit: 2000/1 ...

  6. Ignatius and the Princess III HDU - 1028 || 整数拆分,母函数

    Ignatius and the Princess III HDU - 1028 整数划分问题 假的dp(复杂度不对) #include<cstdio> #include<cstri ...

  7. hdu 1028 Ignatius and the Princess III(DP)

    Ignatius and the Princess III Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K ...

  8. HDU 1028 整数拆分问题 Ignatius and the Princess III

    Ignatius and the Princess III Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K ...

  9. HDU 1028 Ignatius and the Princess III (母函数或者dp,找规律,)

    Ignatius and the Princess III Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K ...

  10. hdu 1028 Ignatius and the Princess III 母函数

    Ignatius and the Princess III Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K ...

随机推荐

  1. C语言之数组

    数组 数组就是在内存空间中,开辟一个大的空间,然后再将这个大的空间均的分为若干份的小空间,每个小空间用来保存一个数据. 1). 数组的专业术语: 长度:指的能存放数据的个数 下标/索引:每一个数据所在 ...

  2. CodeForces 718C Sasha and Array

    线段树. 线段树维护区间矩阵和,操作都是最简单的线段树.$lazy$标记不要记录乘了几次,直接记录乘了几次之后的矩阵就可以了,不然每次下传的时候再算一遍时间复杂度会提高. #pragma commen ...

  3. hdu1043

    #include<iostream>#include<cstdio>#include<cstring>#include<algorithm>#inclu ...

  4. 【SQL】T-SQL基本语法复习

    数据库基本的几个对象 数据表.视图.存储过程.索引.触发器.函数 增删改查 Insert into test(name,sex,ago) values ('陈三','男',20) Update tes ...

  5. 【Excel】Excel筛选迟点时间的公式

    效果是这样: 方法: 在B列第2排,输入=if(HOUR(A2) >=9,"迟点","") 然后就是复制,粘贴整个列就OK了.不想复制也可以按住的右下角那 ...

  6. 脚本录制--html模式和url模式

    设置位置:tool--recording options-recording 1.html模式--默认---结果较简单 脚本采用html页面的形式来展示,优点:容易维护.容易理解 2.url模式--- ...

  7. readelf -s 命令‘symbol’名字显示不全

    GCC编译出来的object(目标文件)getPon.o,在链接时(ld)报了一个错误说找不到一个函数(undefined reference to identifier devCtl_getEthe ...

  8. C# winform调用东软动态库的问题

    在C# winform程序中调用东软的动态库ESActiveX.ocx 如果是引用ESActiveX.ocx,然后在代码中设置示例,调用就会报"灾难性错误" 如果在工具箱中点击右键 ...

  9. centos搭建svn服务器

    1.在centos6.5上面搭建svn服务器,安装svn服务器:yum install subversion 2.在任意目录下创建仓库目录,这里放在/data/mypros目录下 3.执行命令:svn ...

  10. 前端开发中的一些js小技巧

    1.获取某个月的天数 function getDate (year, month) { return new Date(year, month + 1, 0).getDate(); } 2.获取变量类 ...