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

Автор dhyNightWind0311, история, 3 года назад, По-английски

Hi! I recently found a strange solution of Problem 1632C. It passed all the tests but I think there are some problems about it.

Let's consider three cases:

  1. Let a increase to b by only using the first operation.

  2. Let b increase by using the first operation until (a or b) = b, then use the third operation once to make a equals to b.

  3. Let a increase to x (x is less than b) by using the first operation, then perform the third operation once, and use the second operation until a equals to b.

The answer is equal to the minimum value of the number of operations in the above three cases.

I think this method ignores some cases, but it was accepted. I hope someone can hack me or prove my solution is correct.

Полный текст и комментарии »

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