题目描述
Problem Description
Given \( N \) integers \( a_1, a_2, ..., a_N \), perform the operation of multiplying the smallest number by \( A \) for \( B \) times.
Output the resulting integers in ascending order. When outputting, print the remainder of each number when divided by \( 10^9 + 7 \).
Note that the output should be in ascending order of the original numbers, not their remainders when divided by \( 10^9 + 7 \).
Input Format
The input is given from the standard input in the following format:
\( N \) \( A \) \( B \) \( a_1 \) \( a_2 \) ... \( a_N \)
Output Format
Output \( N \) lines.
The \( i \)-th line should contain the remainder of the \( i \)-th integer after sorting, when divided by \( 10^9 + 7 \).
Sample Input and Output
Sample Input #1
3 10 3
1 99 10
Sample Output #1
99
100
100
Sample Input #2
2 100001 2
1 200000
Sample Output #2
200000
199931
Sample Input #3
10 123 1000000000
394632992 714094234 84420 5 3439891 3395 35 58 5001 730
Sample Output #3
954804718
385989482
948741792
268211139
100694402
492858064
955116743
68100851
154525400
479209143
Notes/Hints
Constraints
- \( 1 \leq N \leq 50 \)
- \( 1 \leq a_i \leq 1,000,000,000 \)
- \( 1 \leq A, B \leq 1,000,000,000 \)
- \( A \) is an integer
Sample Explanation 2
After the operations, the two integers \( 20000, 10000200001 \) are obtained. Pay attention to output the remainder when divided by \( 10^9 + 7 \).
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分