In my real situation, I have a 68*160 large matrix.
In this example let\'s use a smaller one. each number represents a cost.
matrix = [[8, 5, 4, 7,