## GUPTA MECHANICAL

IN THIS WEBSITE I CAN TELL ALL ABOUT TECH. TIPS AND TRICKS APP REVIEWS AND UNBOXINGS ALSO TECH. NEWS .............

# [Solution] Beautiful Array Codeforces Solution

B. Beautiful Array
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Stanley defines the beauty of an array $a$ of length $n$, which contains non-negative integers, as follows:

$\sum _{i=1}^{n}⌊\frac{{a}_{i}}{k}⌋,$
which means that we divide each element by $k$, round it down, and sum up the resulting values.

Stanley told Sam the integer $k$ and asked him to find an array $a$ of $n$ non-negative integers, such that the beauty is equal to $b$ and the sum of elements is equal to $s$. Help Sam — find any of the arrays satisfying the conditions above.

Input

Each test contains multiple test cases. The first line contains the number of test cases $t$ ($1\le t\le 1000$). Description of the test cases follows.

Solution Click Below:-  👉
👇👇👇👇👇

The first line of each test case contains integers $n$$k$$b$$s$ ($1\le n\le {10}^{5}$$1\le k\le {10}^{9}$$0\le b\le {10}^{9}$$0\le s\le {10}^{18}$).

It is guaranteed that the sum of $n$ over all test cases does not exceed ${10}^{5}$.

Output

For each test case print $-1$ if such array $a$ does not exist. Otherwise print $n$ non-negative integers ${a}_{1},{a}_{2},\dots ,{a}_{n}$ ($0\le {a}_{i}\le {10}^{18}$) — the answer.