摘要:        
卢卡斯定理(Lucas) 题目:P3807-洛谷 题面 给定整数 \(n,m,p\) 的值,求出 \(\binom{n+m}{n} \bmod p\) 的值,且保证 \(p\) 为质数。 做法 Step 0: 卢卡斯定理: \[\binom{n}{m}\equiv \binom{\lfloor{\f    阅读全文
posted @ 2025-04-16 17:01
tyh_27
阅读(8)
评论(0)
推荐(0)
        
            
        
        
摘要:        
逆元 定义 若 \(ax\equiv1\pmod p\),且 \(a\) 与 \(p\) 互质,则称 \(x\) 为 \(a\) 的逆元,记为 \(a^{-1}\)。 所以对于求解 \(\frac{a}{b} \bmod p\),我们可以先求出 \(b\) 的逆元 \(b^{-1}\),在将 \(a    阅读全文
posted @ 2025-04-16 16:56
tyh_27
阅读(8)
评论(0)
推荐(0)
        
                    
                
浙公网安备 33010602011771号