// // podaj wydruk


//dokumentacja
//Computes the absolute value of an integer number.
// int std::abs(int);

//Finds the smallest element in the range [first, last). Elements are compared using operator<.
// template<class ForwardIt >
// ForwardIt std::min_element( ForwardIt first, ForwardIt last );

//Finds the smallest element in the range [first, last). Elements are compared using the given binary comparison function comp
// template< class ForwardIt, class Compare >
// ForwardIt std::min_element( ForwardIt first, ForwardIt last, Compare comp );


//liczba liter Twojego nazwiska
const int NAME_SIZE = 5;

#include <vector>
#include <iostream>
#include <algorithm>

using namespace std;

int main() {
    vector<int> v = {10, 0, 5, 15, 3 };
    cout << *std::min_element(v.begin(), v.end() )
         << *std::min_element(v.begin(), v.end(), [](int a, int b) { return std::abs(NAME_SIZE-a) < std::abs(NAME_SIZE-b); } )
         << *std::min_element(v.begin(), v.end(), [](int a, int b) { return std::abs(2-a) < std::abs(2-b); } ) << endl;
    return 0;
}
