Convolution

모든 k에 대해 c_k를 이항계수를 곱한 합으로 정의할 때, a와 b의 이항 합성곱을 2^32로 나눈 나머지로 계산해 출력한다.

어려움8수학조합론분할 정복구현아직 제출이 없습니다시간 제한3초메모리 제한512 MB

문제

You are given two sequences a_0,a_1,,a_na\_0, a\_1, \ldots, a\_n and b_0,b_1,,b_nb\_0, b\_1, \ldots, b\_n. You want to compute a new sequence c_0,c_1,,c_nc\_0, c\_1, \ldots, c\_n such that c_k=(_i=0k(ki)a_ib_ki)mod232.c\_k = \left(\sum\_{i = 0}^k {k \choose i} a\_i b\_{k-i}\right) \bmod 2^{32}\text{.}

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

Output c_0,c_1,,c_nc\_0, c\_1, \ldots, c\_n.\

입력

The first line contains an integer nn (1n21051 \leq n \leq 2 \cdot 10^5).

The second line contains n+1n + 1 integers a_0,a_1,,a_na\_0, a\_1, \ldots, a\_n (0a_i<2320\leq a\_i < 2^{32}).

The third line contains n+1n + 1 integers b_0,b_1,,b_nb\_0, b\_1, \ldots, b\_n (0b_i<2320 \leq b\_i < 2^{32}).

출력

Output one line with n+1n + 1 integers: c_0,c_1,,c_nc\_0, c\_1, \ldots, c\_n.