MCPcopy Create free account
hub / github.com/atcoder/ac-library / conv_ll_naive

Function conv_ll_naive

test/unittest/convolution_test.cpp:14–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12using ull = unsigned long long;
13
14std::vector<ll> conv_ll_naive(std::vector<ll> a, std::vector<ll> b) {
15 int n = int(a.size()), m = int(b.size());
16 std::vector<ll> c(n + m - 1);
17 for (int i = 0; i < n; i++) {
18 for (int j = 0; j < m; j++) {
19 c[i + j] += a[i] * b[j];
20 }
21 }
22 return c;
23}
24
25template <class mint, internal::is_static_modint_t<mint>* = nullptr>
26std::vector<mint> conv_naive(std::vector<mint> a, std::vector<mint> b) {

Callers 1

TESTFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected