Function to print the maximum sum possible by selecting at most one element from each column such that no consecutive pairs are selected from a single row
static void maxSum ( int [ ] [ ] arr , int n ) {