| 154 | return ans; |
| 155 | } |
| 156 | poly operator - (const poly &x) const { |
| 157 | int n = max(size(), x.size()); |
| 158 | vector<mint> ans(n); |
| 159 | for(int i = 0; i < n; i++) ans[i] = coef(i) - x.coef(i); |
| 160 | while ((int)ans.size() && ans.back() == 0) ans.pop_back(); |
| 161 | return ans; |
| 162 | } |
| 163 | poly operator * (const poly& b) const { |
| 164 | if(is_zero() || b.is_zero()) return {}; |
| 165 | vector<int> A, B; |