线性求逆元模板

参考链接

LL inv[maxn];
inline void inv_init()
{
  inv[0] = inv[1] = 1;
  for(int i=2; i<maxn; i++)
    inv[i] = (LL)(mod - mod / i) * inv[mod % i] % mod;
}

原文地址:https://www.cnblogs.com/qwertiLH/p/9111126.html