OCC '19 S1 - Floor Planning

View as PDF

Submit solution

Points: 3 (partial)
Time limit: 2.0s
Memory limit: 256M

Author:
Problem type

Angie is buying a house!

The floor plan of the house can be represented as two rectangles on the Cartesian plane: one from (x1,y1) to (x2,y2) and one from (x3,y3) to (x4,y4).

She wants to know how large her house is. Can you help her find out?

Constraints

1x1,x2,x3,x4,y1,y2,y3,y4103

Input Specification

The first line contains the space separated integers x1,y1,x2,y2 (the coordinates of the first rectangle).

The second line contains the space separated integers x3,y3,x4,y4 (the coordinates of the second rectangle).

Output Specification

Output one integer, the total area of the floor plan.

Sample Input

Copy
2 6 11 10
14 14 8 5

Sample Output

Copy
78

Comments

There are no comments at the moment.