Baltic Olympiad in Informatics: 2001 Day 2, Problem 2
In the year 2051, several Mars expeditions have explored different areas of the red planet and produced maps of these areas. Now, the BaSA (Baltic Space Agency) has an ambitious plan: they would like to produce a map of the whole planet. In order to calculate the necessary effort, they need to know the total size of the area for which maps already exist. It is your task to write a program that calculates this area.
Constraints
Input Specification
The input starts with a line containing a single integer
Output Specification
The output should contain one integer
Sample Input
2
10 10 20 20
15 15 25 30
Sample Output
225
Sample Explanation
The area of the rectangle union above is
Comments