AbhishekAg's blog

By AbhishekAg, history, 4 years ago, In English

Can't understand the diagnostics to this submission for the problem.

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

»
4 years ago, # |
  Vote: I like it +3 Vote: I do not like it

This type of diagnostic error (the one in your submission) usually happens in my case whenever I try to access a non-allocated memory space (like trying to access an element not in an array), I can see a lower_bound in your code, have you checked for it's edge cases, like when it throws last?

PS — I am only a noob so take this with a grain of salt

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    Seems fine to me....have used the same thing many times.....but am not much of an expert myself.....

»
4 years ago, # |
Rev. 2   Vote: I like it +7 Vote: I do not like it

You do binary search on a not sorted array.

Error: elements in iterator range [__first, __last) are not partitioned by 
the value __val.
  • »
    »
    4 years ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    Thanks......I just assumed that input was ordered.....

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

Still getting WA for this, would really appreciate if someone could point out what is wrong?