THE CHALLENGETwo axis-aligned rectangles are each given by their bottom-left corner (x1, y1) and top-right corner (x2, y2), with x1 < x2 and y1 < y2. Read x1 y1 x2 y2 for the first rectangle, then the same four numbers for the second. The overlap has width w = min(right edges) - max(left edges) and height h = min(top edges) - max(bottom edges).
Print Disjoint if w < 0 or h < 0, Touching if they only share an edge or a corner (w = 0 or h = 0), otherwise Overlap: <area>. Rules: at most 3 if statements in the whole program, and no loops.
Sample input:
0 0 4 4 2 2 6 6
Sample output:
Overlap: 4