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 11%
helbling
#3
76 c.
Top 17%
Lv0Sys
#4
79 c.
Top 28%
tree
Natanaelel
#5
81 c.
Top 33%
voytxt
#6
86 c.
Top 39%
CorentinTh
#7
88 c.
Top 44%
cers
#8
91 c.
Top 50%
Thomasdcrt
#9
95 c.
Top 56%
Tony
#10
98 c.
Top 67%
scpchicken
Alex
#11
100 c.
Top 72%
maximec-indy
#12
108 c.
Top 78%
SephQ
#13
110 c.
Top 83%
Pascal
#14
113 c.
Top 89%
davyboyh
#15
643 c.
Top 94%
ComputerKWasTaken
#16
659 c.
Top 100%
Arnaud