Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Compass, Map and Spyglass by tom-tom
def navigation(seaside):
linear, width = sum(seaside, []), len(seaside[0])
y, c, m, s = (divmod(linear.index(i), width) for i in 'YCMS')
return sum(max(abs(y[0] - i[0]), abs(y[1] - i[1])) for i in (c, m, s))
Sept. 18, 2018