版本比较
20260320
正文
增加 1 行删除 1 行
20 行未改动2122232425252627282985 行未改动20 行未改动struct Complex { ll a, b; inline Complex(ll A = 0, ll B = 0) : a(A), b(B) {} inline Complex& operator *= (const Complex &y) { return *this = Complex((a * y.a + I2 * (b * y.b % P)) % P, (a * y.b + b * y.a) % P); } Complex qpow(ll y) const { Complex x = *this, res(1); for (; y; x *= x, y >>= 1) if (y & 1) res *= x; return res; } Complex qpow(ll y) const { Complex x = *this, res(1); for (; y; x *= x, y >>= 1) if (y & 1) res *= x; return res; }};std::mt19937 rnd(114514);ll cipolla(ll a, ll p) { if (a == 0) return 0;85 行未改动