m, n = gets.split.map(&:to_i)
win_rate = (1..m).map { gets.split.map(&:to_f) }

table = Array(n+1)
table[n] = (0..2**m-1).map { 1 }

(n-1).downto(0) do |i|
    table[i] = [0]
    (1..2**m-1).each do |x|
        max = 0
        (0..m-1).each do|j|
            next if x[j] == 0
            wr = win_rate[j][i]
            prob = wr * table[i+1][x] + (1 - wr) * table[i][x - (1 << j)]
            max = prob if prob > max
        end
        table[i][x] = max
    end
end

printf("%.12f\n", table[0].max)