随笔分类 - 数论/数学-卢卡斯定理
Xiao Ming's Hope
摘要:题目 给你一个数 \(n\),让你求 \(C(n,0),C(n,1),...,C(n,n)\) 这 \(n+1\) 个数中为奇数的个数。 解法 \(\text{Update on 2021.2.15}\) 我之前写了些什么。 由卢卡斯定理得:若 \(n=a\times p+b,m=c\times p
阅读全文
Tom and matrix
摘要:题目 求 \(\sum_{i=x_1}^{x_2}\sum_{j=y_1}^{y_2}\text C[i][j]\bmod p\)。 要求在 \(\mathcal O(y)\) 的复杂度求解。 解法 组合数有一个式子:\(C[i][j]=C[i-1][j-1]+C[i-1][j]\)。 我们可以这样
阅读全文
浙公网安备 33010602011771号