F.A.Q
Hand In Hand
Online Acmers
Forum | Discuss
Statistical Charts
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
Virtual Contests
    DIY | Web-DIY beta
Recent Contests
Author ID 
Password 
 Register new ID

Evaluation

Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others)
Total Submission(s): 845    Accepted Submission(s): 258


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
2 1 2 3 0 1
 

Sample Output
4 7
 

Source
 

Recommend
zhuyuanchen520
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2020 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.001000(s) query 2, Server time : 2020-01-25 07:22:04, Gzip enabled