• 2024-08-20Templates by Hanggoash
    快速幂点击查看代码inlineintpower(inta,intb,intp){ longlongans=1; while(b) { if(b&1)ans=ans*a%p; a=a*a%p; b>>=1; } returnans;}矩阵快速幂点击查看代码structMatrix{ intn,m; inta[maxn][maxn]; Matrix(){memset(a,0,sizeofa);}};