MCPcopy Create free account
hub / github.com/ShahjalalShohag/code-library / operator -

Method operator -

Math/Subset Sum Problem.cpp:156–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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;

Callers

nothing calls this directly

Calls 3

sizeFunction · 0.85
sizeMethod · 0.45
coefMethod · 0.45

Tested by

no test coverage detected