From f4dafa64e27e63d8cde5adcfbfa98e2a30fb7504 Mon Sep 17 00:00:00 2001 From: Noobie99 Date: Mon, 5 Feb 2024 22:23:53 +0100 Subject: renamed ntt and bitwiseConv function + more multiply functions --- math/transforms/multiplyNTT.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 math/transforms/multiplyNTT.cpp (limited to 'math/transforms/multiplyNTT.cpp') diff --git a/math/transforms/multiplyNTT.cpp b/math/transforms/multiplyNTT.cpp new file mode 100644 index 0000000..806d124 --- /dev/null +++ b/math/transforms/multiplyNTT.cpp @@ -0,0 +1,8 @@ +vector mul(vector a, vector b) { + int n = 1 << (__lg(sz(a) + sz(b) - 1) + 1); + a.resize(n), b.resize(n); + ntt(a), ntt(b); + for (int i=0; i