water's blog

By water, 12 years ago, In English

what's wrong with my code of 158_DIV2_C? Here is my submission:2847080

  • Vote: I like it
  • -8
  • Vote: I do not like it

»
12 years ago, # |
  Vote: I like it 0 Vote: I do not like it

You should choose another minimum element, that test is like this one: 10 8 1 1 0 1 1 1 0 1 1 1

Your code chooses first 0, but it needs to take second.

  • »
    »
    12 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Thank you, I figure out that the minimum element should be the nearest element before the number x.

    • »
      »
      »
      12 years ago, # ^ |
        Vote: I like it -6 Vote: I do not like it

      But don't forget about situation when minimum elements are situated after number x