Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main(void)
- {
- int ara[] = {1, 3, 5 ,5, 7};
- auto ptr = lower_bound(ara, ara+5, 5);
- cout << *ptr << " " << ptr - ara << endl;
- auto qtr = upper_bound(ara, ara+5, 5);
- cout << *qtr << " " << qtr - ara << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement