![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
母函数
wchyumo2009
这个作者很懒,什么都没留下…
展开
-
杭电hdu 1028 Ignatius and the Princess III母函数
http://acm.hdu.edu.cn/showproblem.php?pid=1028 初识母函数,感觉这里讲的很好,http://www.wutianqi.com/?p=596做个标签,供以后再学习。并且学习的过程中参考杭电里面的母函数课件。 1g,2g,3g,4g砝码各一个的组合形式如下: 贴1角,2角,3角邮票实例(整数拆分和他就是同一种类型的) #includ原创 2012-04-05 16:57:30 · 1674 阅读 · 0 评论 -
杭电hdu 1398 Square Coins 母函数
http://acm.hdu.edu.cn/showproblem.php?pid=1398 貌似母函数的题都是万变不离其宗,恩,多加练习以掌握之。 本题中的币值要求是1到17的数的平方组成,求300以内的数的组合方案。 #include #include int c1[301], c2[301]; void init() { int i, j, k; memset(c1, 0,原创 2012-04-08 09:55:20 · 861 阅读 · 0 评论 -
杭电hdu 2082 找单词 母函数
http://acm.hdu.edu.cn/showproblem.php?pid=2082 母函数的题,需要多练 #include #include int main() { int num[27], c1[51], c2[51];//c1存放系数,c2为中间变量 int t, i, j, k; while(scanf("%d",&t)!=EOF){ while(t--){原创 2012-04-08 09:29:40 · 2790 阅读 · 0 评论 -
杭电hdu 2069 Coin Change 母函数
http://acm.hdu.edu.cn/showproblem.php?pid=2069 母函数题真是博大精深,当限制硬币数量时,就又有了新的考验。此题就是,如何去限制呢?还得深思。 #include #include #define MAX 251 int c1[MAX][101], c2[MAX][101]; int res[MAX]; int num[6] = {0, 1原创 2012-04-08 10:47:53 · 2271 阅读 · 2 评论 -
杭电hdu 2079 选课时间(题目已修改,注意读题) 母函数
http://acm.hdu.edu.cn/showproblem.php?pid=2079 母函数简单题,注意条件的控制 #include #include int c1[41], c2[41]; int num[9]; void init(int total, int k) { int i, j, p; memset(c1, 0, sizeof(c1)); memset(c原创 2012-04-08 14:08:17 · 1286 阅读 · 0 评论