Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit bc76aab

Browse files
Fix redundant copy in convolution
1 parent d8ca7f2 commit bc76aab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎atcoder/convolution.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ std::vector<mint> convolution(std::vector<mint>&& a, std::vector<mint>&& b) {
223223
int z = (int)internal::bit_ceil((unsigned int)(n + m - 1));
224224
assert((mint::mod() - 1) % z == 0);
225225

226-
if (std::min(n, m) <= 60) return convolution_naive(a, b);
227-
return internal::convolution_fft(a, b);
226+
if (std::min(n, m) <= 60) return convolution_naive(std::move(a), std::move(b));
227+
return internal::convolution_fft(std::move(a), std::move(b));
228228
}
229229
template <class mint, internal::is_static_modint_t<mint>* = nullptr>
230230
std::vector<mint> convolution(const std::vector<mint>& a,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /