LL fast(LL a,LL b) { LL res = 1; while(b>0) { if(b&1) res = res*a%mod; b>>=1; a=a*a%mod; // a*=a%mod;//不行,会超范围 } return res; }