diff --git a/math/compositional_inverse_of_formal_power_series_large/sol/correct.cpp b/math/compositional_inverse_of_formal_power_series_large/sol/correct.cpp index 2d69937b6..658562d5b 100644 --- a/math/compositional_inverse_of_formal_power_series_large/sol/correct.cpp +++ b/math/compositional_inverse_of_formal_power_series_large/sol/correct.cpp @@ -426,34 +426,6 @@ vc poly_taylor_shift(vc f, mint c) { return f; } -// n, m 次多項式 (n>=m) a, b → n-m 次多項式 c -// c[i] = sum_j b[j]a[i+j] -template -vc middle_product(vc& a, vc& b) { - assert(len(a) >= len(b)); - if (b.empty()) return vc(len(a) - len(b) + 1); - if (min(len(b), len(a) - len(b) + 1) <= 60) { - return middle_product_naive(a, b); - } - int n = 1 << __lg(2 * len(a) - 1); - vc fa(n), fb(n); - copy(a.begin(), a.end(), fa.begin()); - copy(b.rbegin(), b.rend(), fb.begin()); - ntt(fa, 0), ntt(fb, 0); - FOR(i, n) fa[i] *= fb[i]; - ntt(fa, 1); - fa.resize(len(a)); - fa.erase(fa.begin(), fa.begin() + len(b) - 1); - return fa; -} - -template -vc middle_product_naive(vc& a, vc& b) { - vc res(len(a) - len(b) + 1); - FOR(i, len(res)) FOR(j, len(b)) res[i] += b[j] * a[i + j]; - return res; -} - template int count_terms(const vc& f) { int t = 0;