#include <iostream>
#include <vector>
#include <algorithm>
using std::cout;
using std::endl;
int main()
{
std::vector<int> vec = { 0, 1, 2, 3, 4, 5, 6, 7, 8 ,9 };
bool found;
found = std::binary_search(vec.begin(), vec.end(), 5);
cout << found << endl;
found = std::binary_search(vec.begin(), vec.end(), 348);
cout << found << endl;
return 0;
}
/*
run:
1
0
*/