摘要:
同样求逆元的题目,费马的条件,首先要保证p为质数,然后保证a与p互素。 数据范围问题,要保证在数据范围内,所以要b先模上mod #include<bits/stdc++.h> using namespace std; const int mod=9973; int qmi(int a,int b) 阅读全文
posted @ 2021-07-14 00:19
mofan552
阅读(31)
评论(0)
推荐(0)
摘要:
求逆元板子题,费马小定理求逆元,快速幂,维护前缀积。 #include<bits/stdc++.h> using namespace std; //bool isprime(int x) //{ // if(x==1) return false; // if(x==2) return true; / 阅读全文
posted @ 2021-07-14 00:11
mofan552
阅读(25)
评论(0)
推荐(0)

浙公网安备 33010602011771号