Function to calculate maximum sum possible of a matrix by multiplying pairs of adjacent elements with - 1 any number of times ( possibly zero )
void getMaxSum ( vector < vector < int > > A , int M , int N ) {