摘要:
组合数取模就是求C(n,m)%MOD的值 当m<=1000,n<=1000时,根据 C[i][j]=(C[i-1][j]+C[i-1][j-1])的性质,可以通过递推预处理出所有的组合数 利用阶乘进行的线性求组合数 对于大范围的组合数 引用自http://blog.csdn.net/acdreame 阅读全文
posted @ 2017-08-13 17:07
hinata_hajime
阅读(210)
评论(0)
推荐(0)
摘要:
单点更新(HDU1166) 区间更新(HDU1698) 阅读全文
posted @ 2017-08-13 13:59
hinata_hajime
阅读(206)
评论(0)
推荐(0)
摘要:
//查询和修改都是log(n)//从c[1]开始进行赋值,不赋c[0],n为数的个数 //sum(x)为计算前x个数的和 #include #include #include using namespace std; const int MAXN=50010; int c[MAXN]; int n; int lowbit(int x) { return x&(-x); } vo... 阅读全文
posted @ 2017-08-13 13:29
hinata_hajime
阅读(140)
评论(0)
推荐(0)

浙公网安备 33010602011771号