Function to return the perimeter of the square having top - left corner at ( i , j ) and size k
int perimeter ( int i , int j , int k , vector < vector < int > > & row , vector < vector < int > > & col , vector < vector < int > > & A ) {