Hard
Overlap of Two Rectangles
Each rectangle is given as
x1 y1 x2 y2 (bottom-left and top-right corners). Read two rectangles and print the area where they overlap (0 if they don't), using max and min.Input
Two lines of four integers.
Output
One integer.
Sample 1
Input
0 0 4 4 2 2 6 6
Output
4
Sample 2
Input
0 0 1 1 2 2 3 3
Output
0
Output appears here