摘要:
"传送门" cpp include using namespace std; const int maxn = 1e6 + 10; char a[maxn], b[maxn], st[maxn]; int nex[maxn], p[maxn]; void getNext() { int len = 阅读全文
摘要:
在分数取模时总会用到逆元运算 一般只需要求出分母关于取模的逆元即可 然后分子乘以该逆元就是分数取模的结果 在模运算中 (a + b) % p = (a%p + b%p) %p (对) (a - b) % p = (a%p - b%p) %p (对) (a * b) % p = (a%p * b%p) 阅读全文