you give 2D array axisaligne rectangle each rectanglei xi1 yi1 xi2 yi2 denote ith rectangle xi1 yi1 coordinate bottomleft corner xi2 yi2 coordinate topright cornercalculate total area cover rectangle plane any area cover rectangle count oncereturn total area since answer large return modulo 109 7 Example 1input rectangle 002210231031output 6explanation a total area 6 cover rectangle illustrate pictureFrom 11 22 green red rectangle overlapfrom 10 23 rectangle overlapexample 2input rectangle 0010000000001000000000output 49explanation the answer 1018 modulo 109 7 49 Constraints1 rectangleslength 200rectangesilength 40 xi1 yi1 xi2 yi2 109