Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
third time's a charm solution in 3rd party category for Ground for the House by ssk8
from numpy import rot90
def horizontal_use(plan):
indices = [i for row in plan for i, p in enumerate(row) if p]
return 0 if not indices else max(indices) - min(indices) + 1
def house(plan):
p = [[p == '#' for p in row] for row in plan.split()]
return horizontal_use(p) * horizontal_use(rot90(p))
Sept. 5, 2018
Comments: