#include using namespace std; int main(){ int N, xLB, xRB; cin >> N >> xLB >> xRB; xLB--; vector XL(N), YU(N), XR(N), YD(N); for (int i = 0; i < N; i++){ cin >> XL[i] >> YU[i] >> XR[i] >> YD[i]; XL[i]--; YU[i]--; } vector> id(1280, vector(1680, -1)); for (int i = 0; i < N; i++){ for (int j = max(XL[i], 0); j < min(XR[i], 1280); j++){ for (int k = max(YU[i], 0); k < min(YD[i], 1680); k++){ id[j][k] = i; } } } vector H(N, 0); for (int i = xLB; i < xRB; i++){ for (int j = 1679; j >= 0; j--){ if (id[i][j] != -1){ H[id[i][j]] = 1; break; } } } for (int i = 0; i < N; i++){ cout << H[i] << endl; } }