update ucpc2026
This commit is contained in:
@@ -51,7 +51,7 @@ struct Qring : public vl {
|
||||
}
|
||||
friend poly operator*(const poly& A, const poly& B) {
|
||||
poly ret = conv<mod, w>(A, B);
|
||||
// ACL : poly ret = atcoder::convolution<mod>(A, B);
|
||||
// poly ret = atcoder::convolution<mod>(A, B); // ACL
|
||||
return ret.adjust(), ret;
|
||||
}
|
||||
friend poly inv(const poly& A, int t) { assert(A[0] != 0);
|
||||
@@ -89,16 +89,15 @@ struct Qring : public vl {
|
||||
ll idx = 0; while(ret[idx] == 0) idx++;
|
||||
if((__int128_t) idx * b >= t) return poly(0, t);
|
||||
|
||||
ll c = ret[idx]; ll ic = pow<mod>(ret[idx], mod-2); poly g;
|
||||
int n = ret.size();
|
||||
ll c = ret[idx]; ll ic = pow<mod>(ret[idx], mod-2);
|
||||
poly g; int n = ret.size();
|
||||
fors(i, idx, n-1) g[i-idx] = ret[i]*ic%mod;
|
||||
g.resize(t-idx*b);
|
||||
|
||||
g = exp(b * log(g, t-idx*b), t-idx*b);
|
||||
c = pow<mod>(c, b);
|
||||
|
||||
ret = poly(0, t); fors(i, idx*b, t-1) ret[i] = g[i-idx*b] * c % mod;
|
||||
|
||||
ret = poly(0, t);
|
||||
fors(i, idx*b, t-1) ret[i] = g[i-idx*b] * c % mod;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user