From bc76aabcdf364c07b64865e30e94a16d43077c97 Mon Sep 17 00:00:00 2001 From: Rezwan Arefin Date: Sat, 29 Jul 2023 21:43:09 +0800 Subject: [PATCH] Fix redundant copy in convolution --- atcoder/convolution.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/atcoder/convolution.hpp b/atcoder/convolution.hpp index d206205..20a9355 100644 --- a/atcoder/convolution.hpp +++ b/atcoder/convolution.hpp @@ -223,8 +223,8 @@ std::vector convolution(std::vector&& a, std::vector&& b) { int z = (int)internal::bit_ceil((unsigned int)(n + m - 1)); assert((mint::mod() - 1) % z == 0); - if (std::min(n, m) <= 60) return convolution_naive(a, b); - return internal::convolution_fft(a, b); + if (std::min(n, m) <= 60) return convolution_naive(std::move(a), std::move(b)); + return internal::convolution_fft(std::move(a), std::move(b)); } template * = nullptr> std::vector convolution(const std::vector& a,