题号:NC222151
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld
题目描述
Chino has an array a with

elements. Now she prepares

different arithmetic sequence. The first term of the

arithmetic sequence is

, the tolerance is

, and the length of the sequence is exactly

.
The element of

marked

and

marked

with same position in respective array. The element in

in Same position marked

.

is equal to

minus

. (

)
For each array

, marked

is the minimum element in

.
That is
Now Chino want to know for each different array

, what are the generated

.
输入描述:
In the first line, input two integer
means the length of the array the numbers of arithmetic sequence.
In the next line, input
non-negative integers )
In the next
lines, input two integers )
输出描述:
Output
lines, Represents each
.