406361: GYM102388 G Snails
Description
On Planet E, snails are born in infinitely deep wells!
Initially a snail is at $$$n$$$ meters below the ground. During the daytime the snail try very hard to climb up, and goes up by $$$a$$$ meters. It can escape the well once it touches the ground. However during the night the snail has to sleep and falls back by $$$b$$$ meters. Hence it may happens that an unfortunate snail stucks in the well forever.
Can you help the snails on Planet E to determine the number of days they need to escape the well?
InputThe first line contains a positive integer $$$T$$$ ($$$T \le 10$$$), the number of testcases.
Each testcase contains three integers $$$n, a, b$$$ ($$$1 \le n \le 1000$$$, $$$0 \le a \le 1000$$$, $$$0 \le b \le 1000$$$), the initial position of the snail, the length it climbs up during the daytime, and the length it falls during the night.
OutputFor each testcase, output a single line consisting of the number of days the snail need to escape the well. Output "-1" (without quotes) if it is impossible.
ExampleInput3 10 5 2 10 5 5 5 5 6Output
3 -1 1