Comment by eieio
6 days ago
oh this is a really good point! You're totally right, I had completely skipped over the fact that the rectangles were allowed to overlap. I think I'm probably done with this project / I'm pretty happy with the solution as it stands, but I think you're right that this simplifies the problem considerably. Thanks!
I think my attempt would've been to flood fill to create an ordered list of spans, then use roughly the same method as the Lebesque integral, using the data from the flood fill as the function.