Блог пользователя mahmud2690

Автор mahmud2690, история, 8 лет назад, По-английски

Hi, i am faced with the following 2D segment tree (actually title says) problem on SPOJ. Problem link here: link. Basically it says to find the area of union of rectangles. Number of rectangles is up to 10^5. Is it possible to solve this problem using 2D segment tree + lazy propagation?. I read about quadtrees, but it's written complexity of per operation in Quadtrees is O(N). Can you give any hint to solve this problem?

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

you can solve this task with sweep line method, there are some info about it: topcoder tutor