Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
A simple complex mapping. solution in Clear category for Compass, Map and Spyglass by veky
def navigation(sea):
loc = {c:i+j*1j for i,row in enumerate(sea) for j,c in enumerate(row) if c}
metric = lambda z: max(abs(z.real), abs(z.imag))
return sum(metric(loc['Y'] - target) for target in loc.values())
Sept. 6, 2018
Comments: