|
||||||||||
EvaluationTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 1479 Accepted Submission(s): 362 Problem Description xk=b*c(2k)+d F(x)=a0 x0+a1 x1+a2 x2+...+an-1 xn-1 Given n, b, c, d, a0, ..., an-1, calculate F(x0), ..., F(xn-1). Input 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 Output 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. Sample Input
Sample Output
Source | ||||||||||
|