I have a strange solution of 1632C

Revision en2, by dhyNightWind0311, 2023-07-31 15:56:15

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.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English dhyNightWind0311 2023-07-31 15:56:15 0 (published)
en1 English dhyNightWind0311 2023-07-31 15:53:20 766 Initial revision (saved to drafts)