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

Method operator +

Math/Subset Sum Problem.cpp:149–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147 return 1;
148 }
149 poly operator + (const poly &x) const {
150 int n = max(size(), x.size());
151 vector<mint> ans(n);
152 for(int i = 0; i < n; i++) ans[i] = coef(i) + x.coef(i);
153 while ((int)ans.size() && ans.back() == 0) ans.pop_back();
154 return ans;
155 }
156 poly operator - (const poly &x) const {
157 int n = max(size(), x.size());
158 vector<mint> ans(n);

Callers

nothing calls this directly

Calls 3

sizeFunction · 0.85
sizeMethod · 0.45
coefMethod · 0.45

Tested by

no test coverage detected