summaryrefslogtreecommitdiff
path: root/content/math/transforms/multiplyBitwise.cpp
blob: 5275b8c12ae03065e6980f5135d5378957371d8a (plain)
1
2
3
4
5
6
7
8
vector<ll> mul(vector<ll> a, vector<ll> b) {
	int n = 1 << (__lg(2 * max(ssize(a), ssize(b)) - 1));
	a.resize(n), b.resize(n);
	bitwiseConv(a), bitwiseConv(b);
	for (int i=0; i<n; i++) a[i] *= b[i]; // MOD?
	bitwiseConv(a, true);
	return a;
}