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 6%
Steffan
#2
74 c.
Top 12%
helbling
#3
79 c.
Top 24%
Natanaelel
tree
#4
81 c.
Top 29%
voytxt
#5
86 c.
Top 35%
CorentinTh
#6
88 c.
Top 41%
cers
#7
91 c.
Top 47%
Thomasdcrt
#8
95 c.
Top 53%
Tony
#9
98 c.
Top 65%
scpchicken
Alex
#10
100 c.
Top 71%
maximec-indy
#11
108 c.
Top 76%
SephQ
#12
110 c.
Top 82%
Pascal
#13
113 c.
Top 88%
davyboyh
#14
643 c.
Top 94%
ComputerKWasTaken
#15
659 c.
Top 100%
Arnaud