Loserinlife's blog

By Loserinlife, history, 4 months ago, In English

Given an isosceles right triangle with vertices (0, 0) (0, d) (d, 0). And N rectangles (x1, y1, x2, y2).

Count number of points (x, y) that is both inside the triangle and at least 1 of the rectangles.

N <= 2e5

d, x1, x2, y1, y2 <= 1e9

x1 <= x2, y1 <= y2


  • Vote: I like it
  • +12
  • Vote: I do not like it