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

21268번 - Do Use FFT 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
10 초 1024 MB108361538.462%

문제

You are given integer sequences $A,ドル $B,ドル and $C,ドル each of length $N$. For each $k=1,2,\ldots,N,ドル find the following value modulo 998244353ドル$.

$$ \sum_{1 \leq i \leq N} \left( C_i \times \prod_{1 \leq j \leq k} (A_i+B_j) \right) $$

입력

The first line contains an integer $N$ (1ドル \leq N \leq 250000$).

The second line contains $N$ integers $A_1,A_2,\ldots,A_N$ (0ドル \leq A_i < 998244353$).

The third line contains $N$ integers $B_1,B_2,\ldots,B_N$ (0ドル \leq B_i < 998244353$).

The fourth line contains $N$ integers $C_1,C_2,\ldots,C_N$ (0ドル \leq C_i < 998244353$).

출력

For each $k=1,2,\ldots,N,ドル print the answer.

제한

예제 입력 1

3
1 2 3
4 5 6
7 8 9

예제 출력 1

146 1050 8694

힌트

출처

Contest > Open Cup > 2020/2021 Season > Stage 14: Grand Prix of Tokyo D번

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

출처

대학교 대회

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

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