2011年8月26日

ACM PKU poj 2084 Game of Connections

摘要: 题目描述:http://poj.org/problem?id=2084这道题必须要贴一下,我的第一道卡特兰数,顺便测试一下我的大数模板,哈哈,T了一次,后来改成打表就A了,顺便贴上我的JAVA代码;C++代码:#include <iostream>#include <cstdio>#include <cstring>using namespace std;#include<iostream>#include<vector>#include<string>//--------------------------------- 阅读全文

posted @ 2011-08-26 18:57 _Clarence 阅读(308) 评论(0) 推荐(0) 编辑

用母函数的思路解释母函数的代码

摘要: 该文章建立在你已经看过母函数的相关数学知识的基础上,如果没有看过,建议看一下 hdu 论坛的母函数课件,传送门:http://acm.hdu.edu.cn/forum/read.php?tid=3853用一个最简单的例子说明代码:硬币面值有1元、5元、10元、25元、50元,一共5种,对于一个钱数 money,可以有多少中兑现方法?很容易地构造母函数G(x) = (x^0 + x^1 + x^2 + …) * (x^0 + x^5 + x^10 + …) * (x^0 + x^10 + x^20 + …)* (x^0 + x^25 + x^50 + x^75 + …) * (x^0 + x^5 阅读全文

posted @ 2011-08-26 14:40 _Clarence 阅读(265) 评论(0) 推荐(0) 编辑

导航