Logo
(追記) (追記ここまで)

19019번 - Convolution 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
3 초 512 MB1332076.731%

문제

You are given two sequences $a_0, a_1, \ldots, a_n$ and $b_0, b_1, \ldots, b_n$. You want to compute a new sequence $c_0, c_1, \ldots, c_n$ such that $$c_k = \left(\sum_{i = 0}^k {k \choose i} a_i b_{k-i}\right) \bmod 2^{32}\text{.}$$

Here, ${k \choose i} = \frac{k!}{i! (k - i)!}$ are binomial coefficients.

Output $c_0, c_1, \ldots, c_n$.

입력

The first line contains an integer $n$ (1ドル \leq n \leq 2 \cdot 10^5$).

The second line contains $n + 1$ integers $a_0, a_1, \ldots, a_n$ (0ドル\leq a_i < 2^{32}$).

The third line contains $n + 1$ integers $b_0, b_1, \ldots, b_n$ (0ドル \leq b_i < 2^{32}$).

출력

Output one line with $n + 1$ integers: $c_0, c_1, \ldots, c_n$.

제한

예제 입력 1

5
0 1 2 3 4 5
6 7 8 9 10 11

예제 출력 1

0 6 26 84 240 640

힌트

출처

Camp > Petrozavodsk Programming Camp > Summer 2018 > Day 8: Yuhao Du Contest 5, Grand Prix of Zhejiang C번

Contest > Open Cup > 2018/2019 Season > Stage 1: Grand Prix of Zheijang C번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

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