2181: Evaluation

内存限制:128 MB 时间限制:10.000 S
评测方式:文本比较 命题人:
提交:36 解决:3

题目描述

xk=b*c(2k)+d
F(x)=a0x0+a1x1+a2x2+...+an-1xn-1
Given n, b, c, d, a0, ..., an-1, calculate F(x0), ..., F(xn-1).

输入

There is only one test case.
First line, four integers, n, b, c, d.
Second line, n integers, a0, ..., an-1.

1<=n<=105
1<= b, c, d <=106
0<=ai<=106

输出

n lines. i-th line contains one integer, F(xi-1).
Since the answers may be very large, you should output them modulo 106+3.

样例输入 复制

2 1 2 3
0 1

样例输出 复制

4
7

来源/分类