직사각형

    [실1] 2527 - 직사각형

    #include #include using namespace std; int main() { int x1, y1, p1, q1, x2, y2, p2, q2; int xr, xl, yb, yt, xdiff, ydiff; for (int i = 0; i > x1 >> y1 >> p1 >> q1 >> x2 >> y2 >> p2 >> q2; xl = max(x1, x2); xr = min(p1, p2); yb = max(y1, y2); yt = min(q1, q2); xdiff = xr - xl; ydiff = yt - yb; if (xdiff > 0 && ydiff > 0) cout