Help with 580B

Revision en1, by royappa, 2016-01-04 09:10:12

Hi, I'm working on http://codeforces.net/contest/580/problem/B and getting WA on test 7.
This is my code: http://ideone.com/IlboLx
I read the tutorial and it made sense, I'm just using upper_bound() instead of my own binary search.
Any hint on the bug would be great. Thanks!

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English royappa 2016-01-04 09:10:12 306 Initial revision (published)