#include <bits/stdc++.h>

using namespace std;

typedef int T;

class tutorial_t: vector< T >
{
    T val; iterator it, iu;

    void example(   const function< iterator() >& bound_function,
                    const function< bool( const T&, const T& ) >& bound_operator,
                    const string& function_name,
                    const string& operator_name ) const
    {
        iterator iv = bound_function(); cout << function_name << "( begin(), end(), " << val << " ): ";

        if ( iv != iu )
            cout << "Found " << *iv << " at position " << ( iv - it ) << endl;
        else
            cout << "Not found! all items are " << operator_name << ' ' << val << endl;

        assert( iv == iu or not bound_operator( *iv, val ) );
    }

public:

    tutorial_t()
    {
        size_t n; cin >> n >> val, resize( n ), it = begin(), iu = end();

        for( auto& a: *this )
            cin >> a;

        sort( it, iu ), cout << "sorted_vector(" << n << "):";

        for( auto a: *this )
            cout << ' ' << a;

        cout << endl, assert( is_sorted( it, iu ) );

        example( [&]() { return lower_bound( it, iu, val ); },       less< T >(), "lower_bound", "<"  ),
        example( [&]() { return upper_bound( it, iu, val ); }, less_equal< T >(), "upper_bound", "<=" );
    }
};

int main()
{
    ios_base::sync_with_stdio( false ), cin.tie( nullptr ), cout.tie( nullptr );

    tutorial_t tutorial;
}
