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

Автор AbhishekAg, история, 6 лет назад, По-английски

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

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

»
6 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

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

»
6 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +7 Проголосовать: не нравится

You do binary search on a not sorted array.

Error: elements in iterator range [__first, __last) are not partitioned by 
the value __val.
»
6 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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