#include using namespace std; using ll = long long; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); ll N,L,R; cin>>N>>L>>R; map>> D; for(int i=0;i>l>>u>>r>>d; for(ll x=max(L,l);x<=min(R,r);x++){ D[x].push_back({d,i}); } } vector OK(N,0); for(ll x=L;x<=R;x++){ if(!D.count(x))continue; sort(D[x].begin(),D[x].end()); reverse(D[x].begin(),D[x].end()); OK[D[x][0].second]=1; } for(int i=0;i