1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| const ll maxn=1e5+10 ll mod const long long M=1000000007 ll quickmul(ll a,ll b) { ll ret = 0 for ( if (b & 1) ret = (ret + a) % mod return ret%mod } ll bigpow(ll x, ll y) { ll ret = 1 ll tmp = x%mod while (y > 0) { if (y & 1) ret = quickmul(ret,tmp) %mod y >>= 1 tmp = quickmul(tmp,tmp) %mod } return ret%mod }
|