Help with 2D Grid Rotation

Правка en1, от LGMyoshi, 2023-01-09 20:50:09

Hi all!

I had a question about a commonly known trick for this problem: — Given a set of points(x and y are between 0 and 1e5), calculate the total number of pairs of points that are within a Manhattan distance of 'k'.

I know that you can use a BIT with a sweepline by changing each point to (x + y, x — y). My question is: How does 'k' change when I do the grid rotation / how do I perform queries after the grid rotation?

Thank you in advance!

Теги geometry, sweepline, help, plz

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский LGMyoshi 2023-01-09 20:50:09 494 Initial revision (published)