Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. #include<iostream>
  3. #include<stdio.h>
  4. #include<vector>
  5. using namespace std;
  6. int main()
  7. {
  8.     vector<int>v= {1,3,5,7,9,12};
  9.     auto it=upper_bound(v.begin(),v.end(),8);
  10.     cout<<((it==v.end())?"not found":to_string(*it))<<endl;
  11.  
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement