| UNICAMP Selection Contest 2023 |
|---|
| Закончено |
Technoblade is famous for always taking things to the extreme. One day he was planting potatoes and, after seeing the size of his huge plantation, he became curious to know how long it would take for him to become the person with the most potatoes. After investigation, Techno did the math and saw that he has $$$X_1$$$ potatoes and produces $$$Y_1$$$ potatoes per day, while his biggest competitor, Squid Kid, has $$$X_2$$$ potatoes and produces $$$Y_2$$$ potatoes per day.
He will declare himself victorious of the 1st Potato War if he has a strictly greater number of potatoes than Squid. Help Techno predict the outcome of this battle.
The input is just one line with 4 integers $$$X_1,Y_1,X_2,Y_2$$$ separated by space, in this order. It is guaranteed that all numbers are greater than or equal to 0 and less than or equal to 1000.
If Technoblade is destined for success and victory in the 1st Potato War, print the smallest number of days until he has strictly more potatoes than SquidKid. If he still doesn't have a large enough plantation, and won't win the battle in a finite time, print $$$-1$$$.
1000 0 999 1000
0
0 1 1000 0
1001
100 2 200 1
101
| Название |
|---|


