#include #include #include #include #include #include #include #include #include #define MAX_N 100001 #define INF_INT 2147483647 #define INF_LL 9223372036854775807 #define REP(i,n) for(int i=0;i<(int)(n);i++) using namespace std; typedef long long int ll; typedef pair P; bool cmp_P(const P &a,const P &b){ return a.second < b.second; } int main() { bool bl[200]; fill(bl,bl+200,false); int xl,yu,xr,yd,my[1282],shoot[1282]; fill(my,my+1282,-9999); fill(shoot,shoot+1282,-1); int N,LB,RB; cin >> N >> LB >> RB; REP(i,N){ cin >> xl>>yu>>xr>>yd; int j=yd; for(int d=max(xl,0);d<=xr;d++){ if(my[d] <= j){ my[d] = j; shoot[d] = i+1; } } } for(int i=LB;i<=RB;i++){ if(shoot[i] != -1){ bl[shoot[i]] = true; } } REP(i,N){ if(bl[i+1]) cout << 1 << endl; else cout << 0 << endl; } return 0; }