摘要: 这好像第三次巩固母函数了,第一次没理解思想,第二次理解了,但不知变通,这次总算是弄得挺清楚了。这里写一个模板吧!以及个人对母函数的理解下面以整数划分数的数量为例写的一个模板。#include#includeint c1max],c2[max];//c1保存整数课划分的数目//c2是中间量,保存每一次的情况int main(){ int n,i,j,k; while(scanf("%d",&n)!=EOF) { for(i=0;i<=n;i++)//首先对c1初始化,由第一个表达式(1+x+x^2+..x^n)初始化,把质量从0到n的所有砝码都初始化为1. .. 阅读全文
posted @ 2013-12-15 11:38 段少 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionPeople in Silverland use square coins. Not only they have square shapes but also their values are square numbers. Coins with values of all square numbers up to 289 (=17^2), i.e., 1-credit coins, 4-credit coins, 9-credit coins, ..., and 289-credit coins, are available in Silverland 阅读全文
posted @ 2013-12-15 00:39 段少 阅读(153) 评论(0) 推荐(0) 编辑