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

Method operator *

Math/Subset Sum Problem.cpp:163–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161 return ans;
162 }
163 poly operator * (const poly& b) const {
164 if(is_zero() || b.is_zero()) return {};
165 vector<int> A, B;
166 for(auto x: a) A.push_back(x.value);
167 for(auto x: b.a) B.push_back(x.value);
168 auto res = multiply(A, B, (A == B));
169 vector<mint> ans;
170 for(auto x: res) ans.push_back(mint(x));
171 while ((int)ans.size() && ans.back() == 0) ans.pop_back();
172 return ans;
173 }
174 poly operator * (const mint& x) const {
175 int n = size();
176 vector<mint> ans(n);

Callers

nothing calls this directly

Calls 6

is_zeroFunction · 0.85
sizeFunction · 0.85
push_backMethod · 0.80
multiplyFunction · 0.70
is_zeroMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected