1 人解决,8 人已尝试。
1 份提交通过,共有 58 份提交。
9.9 EMB 奖励。
单点时限: 3.0 sec
内存限制: 512 MB
You are given an array $A$ with $N$ nodes. The array nodes are numbered from $0$ to $N-1$ (represented by $a_i$).
Then you define a new array $B$. The $i$-th ($0 \le i < N$) node of $B$ is $b_i$:
$$b_i = \sum_{j=0}^{N-1} (a_j (4^i \cdot p + q)^j)) \bmod 200003$$
Please calculate array $B$.
The first line contains three integers $N$, $p$, $q$ ($1 \le N \le 100000, 1 \le p, q \le 10$).
The next line contains $N$ integers of array $A$. ($0 \le a_i \le 1000$)
Output $N$ integers of array $B$ in one line separated with space.
5 1 1 1 2 3 4 5
129 3711 38153 163078 120839
3 1 2 1 1 1
13 43 343
1 人解决,8 人已尝试。
1 份提交通过,共有 58 份提交。
9.9 EMB 奖励。