Area of Rectangles

From CSES. Union area with sweep line. Solve the geometry problem "Area of Rectangles".

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

Area of Rectangles

**From CSES.** Union area with sweep line. Solve the geometry problem "Area of Rectangles".