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 11%
helbling
#3
76 c.
Top 21%
XenThe
Lv0Sys
#4
79 c.
Top 32%
Natanaelel
tree
#5
81 c.
Top 37%
voytxt
#6
86 c.
Top 42%
CorentinTh
#7
88 c.
Top 47%
cers
#8
91 c.
Top 53%
Thomasdcrt
#9
95 c.
Top 58%
Tony
#10
98 c.
Top 68%
Alex
scpchicken
#11
100 c.
Top 74%
maximec-indy
#12
108 c.
Top 79%
SephQ
#13
110 c.
Top 84%
Pascal
#14
113 c.
Top 89%
davyboyh
#15
643 c.
Top 95%
ComputerKWasTaken
#16
659 c.
Top 100%
Arnaud