Three rectangles
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Three rectangles are painted on the white sheet of paper so that their sides lie on the grid lines and the vertices have integer coordinates. Find the total number of painted cells.
Input
Three lines contain four integers — the coordinates of two opposite vertices of each rectangle (the coordinates do not exceed by absolute value).
Output
Print the number of painted cells.
Examples
Input #1
Answer #1
Submissions 2K
Acceptance rate 40%