dhyNightWind0311's blog

By dhyNightWind0311, history, 3 years ago, In English

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.

Full text and comments »

  • Vote: I like it
  • +1
  • Vote: I do not like it