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

Function main

Dynamic Programming Optimizations/SOS convolutions.cpp:108–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106};
107
108int32_t main() {
109 ios_base::sync_with_stdio(0);
110 cin.tie(0);
111 int n;
112 cin >> n;
113 vector<int> a(1 << 20, 0), b(1 << 20, 0);
114 for (int i = 0; i < (1 << n); i++) cin >> a[i];
115 for (int i = 0; i < (1 << n); i++) cin >> b[i];
116 auto ans = SOS::subset_sum_convolution(a, b);
117 for (int i = 0; i < (1 << n); i++) cout << ans[i] << ' ';
118 cout << '\n';
119 return 0;
120}

Callers

nothing calls this directly

Calls 1

subset_sum_convolutionFunction · 0.85

Tested by

no test coverage detected