版本比较
模板
正文
增加 3 行删除 3 行
89 行未改动9091929394959697989944 行未改动144145146147148149150151152211 行未改动全部展开89 行未改动Complex(double xx = 0, double yy = 0) : x(xx), y(yy) {}};Complex operator + (Complex a, Complex b) { return Complex(a.x + b.x, a.y + b.y); }Complex operator - (Complex a, Complex b) { return Complex(a.x - b.x, a.y - b.y); }Complex operator * (Complex a, Complex b) {return Complex(a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x);}void fft(vector<Complex>& A, int opt) {int n = A.size();vector<int> rev(n);44 行未改动int qmi (int a, int b) {int res = 1;while (b) {if (b & 1) res = 1ll * res * a % mod;a = 1ll * a * a % mod; b >>= 1;}return res;}void ntt(vector<int>& A, int opt) {211 行未改动全部展开89 行未改动9091929394959697989944 行未改动144145146147148149150151152211 行未改动全部展开89 行未改动Complex(double xx = 0, double yy = 0) : x(xx), y(yy) {}};Complex operator + (Complex a, Complex b) { return Complex(a.x + b.x, a.y + b.y); }Complex operator - (Complex a, Complex b) { return Complex(a.x - b.x, a.y - b.y); }Complex operator * (Complex a, Complex b) {return Complex(a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x);}void fft(vector<Complex>& A, int opt) {int n = A.size();vector<int> rev(n);44 行未改动int qmi (int a, int b) {int res = 1;while (b) {if (b & 1) res = 1ll * res * a % mod;a = 1ll * a * a % mod; b >>= 1;}return res;}void ntt(vector<int>& A, int opt) {211 行未改动全部展开