Rectangles Total Area

Find the total area covered by a list of rectangles.

Easy1/22/2024

Problem statement

Given a list of rectangles defined by their top-left corner coordinates and their width and height (all are positive integers), find the total area covered by the rectangles. The rectangles may overlap.

Problem leaderboard

#
Size
%
Users
#1
69 c.
Top 7%
Steffan
#2
79 c.
Top 20%
tree
Natanaelel
#3
81 c.
Top 27%
voytxt
#4
86 c.
Top 33%
CorentinTh
#5
88 c.
Top 40%
cers
#6
91 c.
Top 47%
Thomasdcrt
#7
95 c.
Top 53%
Tony
#8
98 c.
Top 60%
scpchicken
#9
100 c.
Top 67%
maximec-indy
#10
108 c.
Top 73%
SephQ
#11
110 c.
Top 80%
Pascal
#12
113 c.
Top 87%
davyboyh
#13
643 c.
Top 93%
ComputerKWasTaken
#14
659 c.
Top 100%
Arnaud