#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { int i, j, k; int n, lb, rb; //vector< pair>> p(200); vector< pair, pair>> p(200); bool matx[1300] = { false }; bool ans[200] = { false }; for (i = 0; i < 200; i++) { p[i].first.first = -999999; } cin >> n >> lb >> rb; for (i = 0; i < n; i++) { int z; cin >> p[i].second.first; cin >> p[i].first.first; cin >> p[i].second.second; cin >> z; p[i].first.second = i; } sort(p.begin(), p.end(),greater, pair>>()); for (i = 0; i < n; i++) { bool flag2 = false; for (j = p[i].second.first; j <= p[i].second.second; j++) { if (matx[j] == false) { matx[j] = true; flag2 = true; ans[p[i].first.second] = true; } } } for (i = 0; i < n; i++) { if (ans[i] == true) { cout << 1 << endl; } else { cout << 0 << endl; } } getchar(); getchar(); return 0; }