F.A.Q
Hand In Hand
Online Acmers
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
DIY | Web-DIY beta
Register new ID

# Evaluation

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


Sample Output
4
7

Source

Statistic | Submit | Discuss | Note
 Home | Top Hangzhou Dianzi University Online Judge 3.0 Copyright © 2005-2024 HDU ACM Team. All Rights Reserved. Designer & Developer : Wang Rongtao LinLe GaoJie GanLu Total 0.000000(s) query 1, Server time : 2024-06-17 03:11:21, Gzip enabled Administration