#include #include #include #include using namespace std; int main(){ int n, lb, rb; cin >> n >> lb >> rb; vector> e(n); for(int i = 0; i < n; i++){ int xl, yu, xr, yd; cin >> xl >> yu >> xr >> yd; e[i] = make_tuple(yd, xl, xr, i); } sort(rbegin(e), rend(e)); vector ans(n); for(int x = lb; x <= rb; x++){ for(int i = 0; i < n; i++){ int xl, xr, id; tie(ignore, xl, xr, id) = e[i]; if(xl <= x && x <= xr){ ans[id] = 1; break; } } } for(auto&& i : ans){ cout << i << endl; } return 0; }