Rectangle Area II

From LeetCode. Union area with sweep line. Solve the geometry problem "Rectangle Area II".

Examples
Input: [1,2,3]
Output: 0
Hints

Rectangle Area II

**From LeetCode.** Union area with sweep line. Solve the geometry problem "Rectangle Area II".