#include using namespace std; typedef long long ll; int main() { cin.tie(0); ios::sync_with_stdio(false); ll N, LB, RB; cin >> N >> LB >> RB; vector XL(N), YU(N), XR(N), YD(N); vector< pair > vp(N); vector used(1300, false); for(int i=0;i> XL[i] >> YU[i] >> XR[i] >> YD[i]; vp[i] = make_pair(YD[i], i); } sort(vp.begin(), vp.end(), greater >()); vector ans(N); for(int i=0;i= RB || XR[idx] <= LB) { ans[idx] = 0; continue; } bool flag = false; for(int x=max(0, XL[idx]);x<=min(XR[idx], RB);x++) { if(!used[x]) flag = true; used[x] = true; } if(flag) ans[idx] = 1; else ans[idx] = 0; } for(int i=0;i