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 i have no ideia to solve this query type '-'
Can someone help me?