
组合数学
luo964061873
这个作者很懒,什么都没留下…
展开
-
poj 3370 Halloween treats
题目地址:http://poj.org/problem?id=3370 一篇很好的博客:http://www.cppblog.com/pcfeng502/archive/2009/10/18/98902.aspx #include #include #define maxn 100005 int a[maxn],b[maxn],num; void work(int c,int n) { in原创 2012-10-23 14:15:35 · 563 阅读 · 0 评论 -
poj 2249Binomial Showdown
简单排列组合题,输入n,m求n中选m个数的种类 #include __int64 work(__int64 n,__int64 k) {//求在n个数中选m个数的组合数. __int64 i,sum,j = 1; if(k > n) return 0; //求组合数 for(sum = 1,i = k; i ; i--) { sum *= n--;原创 2012-10-26 14:42:11 · 453 阅读 · 0 评论