///gnc #include #include #include using namespace std; bool regionintersects(int a1, int a2, int b1, int b2) { return !(a2>nc; while ( nc-- > 0 ) { int nrects; int i, j, k; in>>nrects; vector vr; for ( i=0 ; i> x1>>y1>>x2>>y2; vr.push_back(Rectr(x1, y1, x2, y2)); } int colors = 0; for(;;) { for ( i=0 ; i=0 ; i++ ) ; if ( i==nrects ) break; vr[i].color = ++colors; int ends=0; while ( ends==0 ) { ends=1; for ( i=0 ; i=0 ) continue; for ( j=0 ; j