Seg 2D problem: Query using manhattan distance[HELP]

Правка en1, от ThomazL, 2017-05-31 03:30:21

Hi guys,

Today i viewed a, aparently, simple seg2D problem:

SET x y d: Set position (x,y) of the grid to integer d. QUERY x y d: Return the gcd (Greatest Common Divisor) of all positions of the grid that are at most 'd' positions away (Manhattan Distance) from position (x,y).

But a have no ideia to solve this query type '-'

Can someone help me?

Теги 2d segment tree, help, uri, advanced data structure

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский ThomazL 2017-05-31 04:43:42 2 Tiny change: ').\n\nBut a have no i' -> ').\n\nBut i have no i'
en2 Английский ThomazL 2017-05-31 03:48:07 3 Tiny change: 'teger d.\n**QUERY ' -> 'teger d.\n\n**QUERY '
en1 Английский ThomazL 2017-05-31 03:30:21 490 Initial revision (published)