Блог пользователя Robloxian

Автор Robloxian, 4 года назад, По-английски

Problem A

You have to realize that when the price of one donut is greater than or equal to price of the box of donuts the first x will be -1. If it's not it will be 1. Then for the second x you have to realize that when the price of the box of donuts divided by the number of donuts in the box is less than price of one donut the second x will be 1000000000. If it's not it will be -1.

Here is the solution:

Problem B

Problem C

Problem D

  • Проголосовать: нравится
  • -20
  • Проголосовать: не нравится

»
4 года назад, # |
Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

For problem A consider the test case 1, 10^9 -1, 10^9 -2. The program outputs 10^9 for the second shop when it costs 2*(10^9 -2) for the second shop > 10^9 for the first. If you output x = b it is the most optimal for shop 2.