Function to find the maximum neighbor within the distance of less than equal to K
vector < vector < int > > getMaxNeighbour ( vector < vector < int > > & A , int K ) { vector < vector < int > > ans = A ;