• + 0 comments
    def flippingMatrix(matrix):
        return sum(
            max(matrix[i][j], matrix[~i][j], matrix[i][~j], matrix[~i][~j])
            for i in range(len(matrix) >> 1)
            for j in range(len(matrix) >> 1)
        )