Hi guys,↵
↵
Today i viewed a, aparently, [simple seg2D problem](https://www.urionlinejudge.com.br/repository/UOJ_1511_en.html): ↵
↵
**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?↵
↵
↵
Today i viewed a, aparently, [simple seg2D problem](https://www.urionlinejudge.com.br/repository/UOJ_1511_en.html): ↵
↵
**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?↵
↵