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

Method is_zero

Math/Subset Sum Problem.cpp:145–148  ·  view source on GitHub ↗

Beware!! p[i] = k won't change the value of p.a[i]

Source from the content-addressed store, hash-verified

143 inline mint coef(const int i) const { return (i < a.size() && i >= 0) ? a[i]: mint(0); }
144 mint operator[](const int i) const { return (i < a.size() && i >= 0) ? a[i]: mint(0); } //Beware!! p[i] = k won't change the value of p.a[i]
145 bool is_zero() const {
146 for (int i = 0; i < size(); i++) if (a[i] != 0) return 0;
147 return 1;
148 }
149 poly operator + (const poly &x) const {
150 int n = max(size(), x.size());
151 vector<mint> ans(n);

Callers 1

operator *Method · 0.45

Calls 1

sizeFunction · 0.85

Tested by

no test coverage detected