#include <iostream>
#include <vector>
#include <iterator>
#include <algorithm>
int main()
{
std::vector<int> data = { 3, 7, 5, 8, 7, 2, 9, 4, 1, 7, 6, 0 };
std::sort(std::begin(data), std::end(data), std::greater<>());
copy(std::begin(data), std::end(data), std::ostream_iterator<int>(std::cout, " "));
std::cout << '\n';
int val = 7;
bool found = std::binary_search(std::begin(data), std::end(data), val, std::greater<>());
std::cout << val << " " << (found ? "found" : "not found") << '\n';
}