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 5%
Steffan
#2
74 c.
Top 10%
helbling
#3
76 c.
Top 20%
XenThe
Lv0Sys
#4
79 c.
Top 30%
tree
Natanaelel
#5
81 c.
Top 35%
voytxt
#6
86 c.
Top 40%
CorentinTh
#7
88 c.
Top 45%
cers
#8
91 c.
Top 50%
Thomasdcrt
#9
95 c.
Top 55%
Tony
#10
98 c.
Top 65%
Alex
scpchicken
#11
100 c.
Top 70%
maximec-indy
#12
108 c.
Top 75%
SephQ
#13
110 c.
Top 80%
Pascal
#14
113 c.
Top 85%
davyboyh
#15
257 c.
Top 90%
Luke
#16
643 c.
Top 95%
ComputerKWasTaken
#17
659 c.
Top 100%
Arnaud