limitations of upper_bound in c++

Revision en1, by hellomoto, 2018-08-24 21:24:17

if(1<=A[i]<=2*1e9)

vector<long long int>A;
auto it=upper_bound(A.begin(),A.end(),1000000000);

is it overflows? why it is giving wrong answer for me in c++.

Tags c++ 14, #c++, #algorithms, #data structure

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English hellomoto 2018-08-24 21:24:17 209 Initial revision (published)