| XX Open Cup, Grand Prix of Tokyo |
|---|
| Закончено |
Determine whether there exists a sequence of $$$N$$$ nonnegative integers $$$a_1,a_2,\cdots,a_N$$$ that satisfies all of the following conditions, and if it exists, find the minimum possible value of the maximum of the array.
Note that there are $$$T$$$ tests in one input file.
Input is given from Standard Input in the following format:
$$$T$$$
$$$N_1$$$ $$$S_1$$$ $$$X_1$$$
$$$N_2$$$ $$$S_2$$$ $$$X_2$$$
$$$\vdots$$$
$$$N_T$$$ $$$S_T$$$ $$$X_T$$$
Here, $$$N_i,S_i,X_i$$$ represent values of $$$N,S,X$$$ for the $$$i$$$-th test, respectively.
Constraints:
Print $$$T$$$ lines. In the $$$i$$$-th line, print $$$-1$$$ if there doesn't exist an array with the mentioned property in the $$$i$$$-th test, and print the minimum possible value of the maximum of the array if it exists.
6 3 9 3 4 8 0 6 19 1 1 15 15 2 6 5 5 4 3
3 2 4 15 -1 -1
The following is a solution for each test:
| Название |
|---|


