![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
启发-经典题目
HITYYJ
这个作者很懒,什么都没留下…
展开
-
大组合数取模 hdu 3037 Saving Beans lucas定理
from yangboy Lucas定理 A、B是非负整数,p是质数。A B写成p进制:A=a[n]a[n-1]...a[0],B=b[n]b[n-1]...b[0]。 则组合数C(A,B)与C(a[n],b[n])*C(a[n-1],b[n-1])*...*C(a[0],b[0]) mod p同余 即:Lucas(n,m,p)=C(n%p,m%p)*Lucas(n/转载 2013-08-13 07:22:11 · 916 阅读 · 5 评论 -
数组中的几个问题
记得去年四省赛的时候有一个题目是,给你一个数组,原创 2014-04-21 10:35:12 · 760 阅读 · 0 评论 -
lightoj 1127 Funny Knapsack
1127 - Funny Knapsack PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB Given n integers and a knapsack of weight W,you have t原创 2014-07-31 09:41:12 · 1135 阅读 · 0 评论