Function to find the minimum cost
static int find_min_odd_cost ( int [ , ] given , int m , int n ) { int [ , ] floor = new int [ M , N ] ; int min_odd_cost = 0 ; int i , j , temp ; for ( j = 0 ; j < n ; j ++ ) floor [ 0 , j ] = given [ 0 , j ] ; for ( i = 1 ; i < m ; i ++ ) for ( j = 0 ; j < n ; j ++ ) {