#include <vector>
#include <functional>
#include <algorithm>
#include <iostream>
using namespace std;

int main() {
	vector<int> v = { 1, 8, 7, 4, 3, 6, 2, 5 };
    auto it = partition(begin(v), end(v), bind(greater<int>(), placeholders::_1, 3));

    cout << (find<decltype(cbegin(v))>(cbegin(v), it, 13) != cend(v)) << endl;
	return 0;
}